kunkun/apps/desktop/src/lib/components/common/sidebar-trigger.svelte
Huakun Shen 7865d18580
Feature: Settings (#23)
* feat: add pin screenshot builtin command

* feat: pin screenshot command nows zoom and scroll

* chore: upgrade @kksh/svelte5

* feat: add mdns built-in command

* feat: add sidebar for settings page

* fix: builtin command command listing problem with key id in "each" loop

* feat: add settings

* style: modify settings sidebar style

* feat: add sidebar to troubleshooter pages

* fix: some styling bug

* feat: add menu item highlight for sidebar

* feat: improve some keyboard interaction logic

* fix: improve troubleshooter flex box

* feat: add uuid for mdns

* fix mdns host removing caused by dead lock

* feat: settings page implemented, hotkey, hide on blur implemented

* style: update styles in settings

* feat: improve search bar dropdown menu items
2024-11-11 17:15:42 -05:00

25 lines
636 B
Svelte

<script lang="ts">
import { goHome } from "@/utils/route"
import { Button, SideBar } from "@kksh/svelte5"
import { Constants } from "@kksh/ui"
import { ArrowLeftIcon } from "lucide-svelte"
const { useSidebar } = SideBar
const sidebar = useSidebar()
</script>
<div class="fixed flex h-10 w-full items-center gap-2 pl-1 pt-1" data-tauri-drag-region>
<SideBar.Trigger class="z-50" />
{#if sidebar.state === "collapsed"}
<Button
variant="outline"
size="icon"
class="z-50 {Constants.CLASSNAMES.BACK_BUTTON}"
onclick={goHome}
>
<ArrowLeftIcon class="h-4 w-4" />
</Button>
{/if}
</div>
<div class="h-10"></div>