-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c250b9
commit 54b7cc5
Showing
5 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { getSystemCommands } from "@kksh/api/commands" | ||
import type { SysCommand } from "@kksh/api/models" | ||
|
||
export const systemCommands: SysCommand[] = getSystemCommands() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<script lang="ts"> | ||
import { IconEnum, SysCommand } from "@kksh/api/models" | ||
import { Command } from "@kksh/svelte5" | ||
import { IconMultiplexer } from "@kksh/ui" | ||
import { DraggableCommandGroup } from "@kksh/ui/custom" | ||
const { systemCommands }: { systemCommands: SysCommand[] } = $props() | ||
</script> | ||
|
||
<DraggableCommandGroup heading="System Commands"> | ||
{#each systemCommands as cmd} | ||
<Command.Item | ||
class="flex justify-between" | ||
onSelect={() => { | ||
cmd.function() | ||
}} | ||
> | ||
<span class="flex gap-2"> | ||
{#if cmd.icon} | ||
<IconMultiplexer icon={cmd.icon} class="!h-5 !w-5 shrink-0" /> | ||
{/if} | ||
<span>{cmd.name}</span> | ||
</span> | ||
</Command.Item> | ||
{/each} | ||
</DraggableCommandGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters