diff --git a/apps/desktop/src/routes/app/extension/store/+page.svelte b/apps/desktop/src/routes/app/extension/store/+page.svelte index ae6f15d..7e8918b 100644 --- a/apps/desktop/src/routes/app/extension/store/+page.svelte +++ b/apps/desktop/src/routes/app/extension/store/+page.svelte @@ -1,9 +1,12 @@ - + {#snippet leftSlot()} {/snippet} - + { + if (e.key === "Enter") { + const modifier = _platform === "macos" ? e.metaKey : e.ctrlKey + if (modifier) { + if (highlightedCmd) { + onExtItemInstall(highlightedCmd) + } + } else { + if (highlightedCmd) { + onExtItemSelected(highlightedCmd) + } + } + } + }} /> No results found. @@ -105,11 +167,38 @@ {ext} installedVersion={$installedExtsMap[ext.identifier]} isUpgradable={!!$upgradableExpsMap[ext.identifier]} - onSelect={() => onExtItemSelected(ext)} + onSelect={() => {}} onUpgrade={() => onExtItemUpgrade(ext)} onInstall={() => onExtItemInstall(ext)} /> {/each} - + { + if (value === "install") { + console.log("install") + if (highlightedCmd) { + onExtItemInstall(highlightedCmd) + } + } + }} + onDefaultActionSelected={() => { + console.log("default install") + if (highlightedCmd) { + onExtItemInstall(highlightedCmd) + } + }} + /> diff --git a/packages/api/src/ui/index.ts b/packages/api/src/ui/index.ts index 2360e9d..07a3397 100644 --- a/packages/api/src/ui/index.ts +++ b/packages/api/src/ui/index.ts @@ -21,3 +21,4 @@ export type { export * from "../api/client" // all client types export type { IUiTemplate } from "./template" export type { IShell } from "../api/shell" +export * from "./template/components" diff --git a/packages/ui/src/components/extension/ExtListItem.svelte b/packages/ui/src/components/extension/ExtListItem.svelte index 0496beb..20387c0 100644 --- a/packages/ui/src/components/extension/ExtListItem.svelte +++ b/packages/ui/src/components/extension/ExtListItem.svelte @@ -1,6 +1,6 @@ - +