feat: polish note component

This commit is contained in:
reya
2024-01-12 13:56:20 +07:00
parent e0d4c53098
commit a9d10ff93b
16 changed files with 707 additions and 555 deletions
@@ -1,5 +1,4 @@
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";
@@ -24,12 +23,9 @@ export function ImagePreview({ url }: { url: string }) {
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,
});
};