chore: polish some components
This commit is contained in:
@@ -372,6 +372,8 @@ export class Ark {
|
||||
signal?: AbortSignal;
|
||||
dedup?: boolean;
|
||||
}) {
|
||||
if (!filter?.authors?.length) return [];
|
||||
|
||||
const rootIds = new Set();
|
||||
const dedupQueue = new Set();
|
||||
const connectedRelays = this.ndk.pool
|
||||
|
||||
@@ -40,7 +40,7 @@ export const MentionNote = memo(function MentionNote({
|
||||
|
||||
return (
|
||||
<Note.Provider event={data}>
|
||||
<Note.Root className="my-2 flex w-full cursor-default flex-col gap-1 rounded-lg bg-neutral-100 dark:bg-neutral-900">
|
||||
<Note.Root className="flex w-full cursor-default flex-col gap-1 rounded-lg bg-neutral-100 dark:bg-neutral-900">
|
||||
<div className="mt-3 px-3">
|
||||
<Note.User variant="mention" />
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { CheckCircleIcon, DownloadIcon } from "@lume/icons";
|
||||
import { getImageMeta } from "@lume/utils";
|
||||
import { downloadDir } from "@tauri-apps/api/path";
|
||||
import { Window } from "@tauri-apps/api/window";
|
||||
import { download } from "@tauri-apps/plugin-upload";
|
||||
@@ -21,8 +22,15 @@ export function ImagePreview({ url }: { url: string }) {
|
||||
}
|
||||
};
|
||||
|
||||
const open = () => {
|
||||
return new Window("image-viewer", { url, title: "Image Viewer" });
|
||||
const open = async () => {
|
||||
const name = new URL(url).pathname.split("/").pop();
|
||||
const image = await getImageMeta(url);
|
||||
return new Window("image-viewer", {
|
||||
url,
|
||||
title: name,
|
||||
width: image.width,
|
||||
height: image.height,
|
||||
});
|
||||
};
|
||||
|
||||
const fallback = (event: SyntheticEvent<HTMLImageElement, Event>) => {
|
||||
|
||||
Reference in New Issue
Block a user