diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 1a61488..91a147e 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -17,7 +17,6 @@ "@sveltejs/adapter-static": "^3.0.1", "@sveltejs/kit": "^2.5.2", "@sveltejs/vite-plugin-svelte": "^3.0.2", - "@types/file-saver": "^2.0.7", "@zerodevx/svelte-toast": "^0.9.5", "adm-zip": "^0.5.10", "dotenv": "^16.4.5", @@ -29,11 +28,9 @@ "vite": "^5.1.7" }, "dependencies": { - "@cryptgeon/shared": "workspace:*", + "cryptgeon": "workspace:*", "@fontsource/fira-mono": "^5.0.8", - "copy-to-clipboard": "^3.3.3", - "file-saver": "^2.0.5", - "occulto": "^2.0.3", + "occulto": "^2.0.6", "pretty-bytes": "^6.1.1", "qrious": "^4.0.2" } diff --git a/packages/frontend/src/lib/stores/status.ts b/packages/frontend/src/lib/stores/status.ts index 4cc347c..b020413 100644 --- a/packages/frontend/src/lib/stores/status.ts +++ b/packages/frontend/src/lib/stores/status.ts @@ -1,8 +1,8 @@ -import { status as getStatus, type Status } from '@cryptgeon/shared' +import { API, type Status } from 'cryptgeon/shared' import { writable } from 'svelte/store' export const status = writable(null) export async function init() { - status.set(await getStatus()) + status.set(await API.status()) } diff --git a/packages/frontend/src/lib/toast.ts b/packages/frontend/src/lib/toast.ts index 9e2dfd8..10a5ec7 100644 --- a/packages/frontend/src/lib/toast.ts +++ b/packages/frontend/src/lib/toast.ts @@ -1,11 +1,11 @@ -import { toast, type SvelteToastOptions } from '@zerodevx/svelte-toast' +import { toast } from '@zerodevx/svelte-toast' export enum NotifyType { Success = 'success', Error = 'error', } -const themeMapping: Record = { +const themeMapping: Record> = { [NotifyType.Success]: { '--toastBackground': 'var(--ui-clr-primary)', '--toastBarBackground': 'var(--ui-clr-primary-alt)', @@ -17,7 +17,7 @@ const themeMapping: Record = { } function notifyFN(message: string, type: NotifyType = NotifyType.Success) { - const options: SvelteToastOptions = { + const options = { duration: 5_000, theme: { ...themeMapping[type], diff --git a/packages/frontend/src/lib/ui/AdvancedParameters.svelte b/packages/frontend/src/lib/ui/AdvancedParameters.svelte index e3d18f4..89d5dff 100644 --- a/packages/frontend/src/lib/ui/AdvancedParameters.svelte +++ b/packages/frontend/src/lib/ui/AdvancedParameters.svelte @@ -4,7 +4,7 @@ import { status } from '$lib/stores/status' import Switch from '$lib/ui/Switch.svelte' import TextInput from '$lib/ui/TextInput.svelte' - import type { Note } from '@cryptgeon/shared' + import type { Note } from 'cryptgeon/shared' export let note: Note export let timeExpiration = false diff --git a/packages/frontend/src/lib/ui/FileUpload.svelte b/packages/frontend/src/lib/ui/FileUpload.svelte index fea73f3..f4ae69b 100644 --- a/packages/frontend/src/lib/ui/FileUpload.svelte +++ b/packages/frontend/src/lib/ui/FileUpload.svelte @@ -3,7 +3,7 @@ import Button from '$lib/ui/Button.svelte' import MaxSize from '$lib/ui/MaxSize.svelte' - import type { FileDTO } from '@cryptgeon/shared' + import type { FileDTO } from 'cryptgeon/shared' export let label: string = '' export let files: FileDTO[] = [] diff --git a/packages/frontend/src/lib/ui/ShowNote.svelte b/packages/frontend/src/lib/ui/ShowNote.svelte index 2198c98..d1408ef 100644 --- a/packages/frontend/src/lib/ui/ShowNote.svelte +++ b/packages/frontend/src/lib/ui/ShowNote.svelte @@ -1,16 +1,26 @@