Files
windmill/frontend/src/lib/components/DefaultScripts.svelte
Faton Ramadani 62fcf086cc feat(frontend): Deeply nested Modals and Drawers (#3565)
* fix(frontend): Support deeply nested drawers and modals

* fix(frontend): Support deeply nested drawers and modals

* fix(frontend): Support deeply nested drawers and modals

* feat(frontend): fix name

* chore(main): release 1.308.2 (#3569)

* chore(main): release 1.308.2

* Apply automatic changes

---------

Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>

* feat(frontend): wip

* feat(frontend): wip

* fix(frontend): fix event propagation

* fix(frontend): fix drawers globally

* feat(frontend): Fix all drawers

* feat(frontend): split zIndexes in a new file

---------

Co-authored-by: Ruben Fiszel <ruben@windmill.dev>
Co-authored-by: rubenfiszel <rubenfiszel@users.noreply.github.com>
2024-04-19 18:58:39 +02:00

27 lines
777 B
Svelte

<script lang="ts">
import { userStore } from '$lib/stores'
import { SettingsIcon } from 'lucide-svelte'
import { Button } from './common'
import Drawer from './common/drawer/Drawer.svelte'
import DrawerContent from './common/drawer/DrawerContent.svelte'
import DefaultScriptsInner from './DefaultScriptsInner.svelte'
let drawer: Drawer
</script>
{#if $userStore?.is_admin || $userStore?.is_super_admin}
<Drawer bind:this={drawer} placement="left">
<DrawerContent title="Edit Default Scripts" on:close={drawer.closeDrawer}>
<DefaultScriptsInner />
</DrawerContent>
</Drawer>
<Button
on:click={drawer?.openDrawer}
startIcon={{ icon: SettingsIcon }}
color="light"
size="xs2"
btnClasses="!text-tertiary"
variant="contained">defaults</Button
>
{/if}