diff --git a/Cargo.lock b/Cargo.lock index a0a409a..a7a5475 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7776,7 +7776,7 @@ dependencies = [ [[package]] name = "tauri-plugin-system-info" -version = "2.0.8" +version = "2.0.9" dependencies = [ "serde", "starship-battery", diff --git a/apps/desktop/src/routes/app/+page.svelte b/apps/desktop/src/routes/app/+page.svelte index ca0a2f7..bd9718c 100644 --- a/apps/desktop/src/routes/app/+page.svelte +++ b/apps/desktop/src/routes/app/+page.svelte @@ -139,7 +139,7 @@ - + exit()}> diff --git a/apps/desktop/src/routes/app/extension/clipboard/+page.svelte b/apps/desktop/src/routes/app/extension/clipboard/+page.svelte index b013ee2..b702cfd 100644 --- a/apps/desktop/src/routes/app/extension/clipboard/+page.svelte +++ b/apps/desktop/src/routes/app/extension/clipboard/+page.svelte @@ -10,6 +10,7 @@ import { app } from "@tauri-apps/api" import type { UnlistenFn } from "@tauri-apps/api/event" import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow" + import { platform } from "@tauri-apps/plugin-os" import { ArrowLeft, FileQuestionIcon, ImageIcon, LetterTextIcon } from "lucide-svelte" import { onDestroy, onMount, type Snippet } from "svelte" import { toast } from "svelte-sonner" @@ -17,6 +18,7 @@ import * as userInput from "tauri-plugin-user-input-api" import ContentPreview from "./content-preview.svelte" + const _platform = platform() const curWin = getCurrentWebviewWindow() let searchTerm = $state("") let clipboardHistoryList = $state([]) @@ -199,13 +201,16 @@ toast.warning("No data found") return Promise.reject(new Error("No data found")) } - return writeToClipboard(data).then(async () => - app - .hide() - .then(() => sleep(100)) - .then(() => curWin.hide()) - .then(() => paste()) - ) + return writeToClipboard(data).then(async () => { + if (_platform === "macos") { + // TODO: add support for Windows and Linux + return app + .hide() + .then(() => sleep(100)) + .then(() => curWin.hide()) + .then(() => paste()) + } + }) }) .then(() => toast.success("Copied to clipboard")) .catch((err) => { diff --git a/apps/desktop/src/routes/app/extension/ui-worker/+page.svelte b/apps/desktop/src/routes/app/extension/ui-worker/+page.svelte index 8fef2f9..cb6810f 100644 --- a/apps/desktop/src/routes/app/extension/ui-worker/+page.svelte +++ b/apps/desktop/src/routes/app/extension/ui-worker/+page.svelte @@ -281,7 +281,6 @@ ) { // actionPanelOpen = true setTimeout(() => { - console.log("toggle action panel") actionPanelOpen = !actionPanelOpen if (!actionPanelOpen) { onActionPanelBlur() @@ -298,8 +297,6 @@ function onkeydown(e: KeyboardEvent) { if (e.key === "Escape") { - console.log(document.activeElement) - console.log(document.activeElement?.nodeName) if (document.activeElement?.nodeName === "INPUT") { console.log("input") } @@ -376,7 +373,7 @@ {pbar} onGoBack={goBack} onSubmit={(formData: Record) => { - console.log("formData", formData) + console.log("Submit formData", formData) workerAPI?.onFormSubmit(formData) }} /> diff --git a/packages/ui/src/components/extension/StoreExtDetail.svelte b/packages/ui/src/components/extension/StoreExtDetail.svelte index b9b9f45..a59edbb 100644 --- a/packages/ui/src/components/extension/StoreExtDetail.svelte +++ b/packages/ui/src/components/extension/StoreExtDetail.svelte @@ -182,28 +182,31 @@ ).format("YYYY-MM-DD HH:mm")} -
- {#if metadata && metadata.sourceType === ExtPublishSourceTypeEnum.jsr} - - - - {:else if metadata && metadata.sourceType === ExtPublishSourceTypeEnum.npm} - - - - {/if} - {#if metadata && metadata?.git?.commit && metadata?.rekorLogIndex && metadata?.git?.owner && metadata?.git?.repo} - - - - {metadata.git.owner}/{metadata.git.repo} - - - {/if} -
+ {#if !isInTauri} + + {/if} + +
+ {#if metadata && metadata.sourceType === ExtPublishSourceTypeEnum.jsr} + + + + {:else if metadata && metadata.sourceType === ExtPublishSourceTypeEnum.npm} + + + + {/if} + {#if metadata && metadata?.git?.commit && metadata?.rekorLogIndex && metadata?.git?.owner && metadata?.git?.repo} + + + + {metadata.git.owner}/{metadata.git.repo} + + + {/if}
{#if metadata && metadata?.git?.commit && metadata?.rekorLogIndex && metadata?.git?.owner && metadata?.git?.repo} diff --git a/vendors/tauri-plugin-system-info b/vendors/tauri-plugin-system-info index 282b6df..5d0424d 160000 --- a/vendors/tauri-plugin-system-info +++ b/vendors/tauri-plugin-system-info @@ -1 +1 @@ -Subproject commit 282b6df90c6e4fc596e1be33e923e13270174ee1 +Subproject commit 5d0424ddb61e217a03a4d3d75ef9a761d9901c41