mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-04 14:46:42 +00:00
fix: show action icon in action panel (#219)
This commit is contained in:
parent
6555ebcfcb
commit
f09b2832e9
@ -1,10 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Icon from "@iconify/svelte"
|
import Icon from "@iconify/svelte"
|
||||||
import { Action as ActionSchema } from "@kksh/api/models"
|
import { Action as ActionSchema } from "@kksh/api/models"
|
||||||
import { Button, ButtonModule, Command, Input, Label, Popover } from "@kksh/svelte5"
|
import { Button, Command, Popover } from "@kksh/svelte5"
|
||||||
import { cn } from "@kksh/ui/utils"
|
import { ChevronsUpDown } from "lucide-svelte"
|
||||||
import { Check, ChevronsUpDown } from "lucide-svelte"
|
import { IconMultiplexer } from "../common"
|
||||||
import { tick } from "svelte"
|
|
||||||
import Kbd from "../common/Kbd.svelte"
|
import Kbd from "../common/Kbd.svelte"
|
||||||
|
|
||||||
const isMac = navigator.platform.toLowerCase().includes("mac")
|
const isMac = navigator.platform.toLowerCase().includes("mac")
|
||||||
@ -80,6 +79,11 @@
|
|||||||
onActionSelected?.(action.value)
|
onActionSelected?.(action.value)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{#if action.icon}
|
||||||
|
<IconMultiplexer icon={action.icon} class="!h-4 !w-4 shrink-0"></IconMultiplexer>
|
||||||
|
{:else}
|
||||||
|
<Icon icon="mdi:gear-outline" class="!h-4 !w-4 shrink-0"></Icon>
|
||||||
|
{/if}
|
||||||
{action.title}
|
{action.title}
|
||||||
</Command.Item>
|
</Command.Item>
|
||||||
{/each}
|
{/each}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user