more conversion
This commit is contained in:
parent
2ea62f14ab
commit
f7cacbc8ae
|
@ -1,15 +1,12 @@
|
||||||
<script>
|
<script>
|
||||||
import { goto } from "@roxi/routify"
|
import { goto } from "@roxi/routify"
|
||||||
import { store, allScreens } from "builderStore"
|
import { store, allScreens } from "builderStore"
|
||||||
import { notifications } from "@budibase/bbui"
|
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import { ActionMenu, MenuItem, Icon } from "@budibase/bbui"
|
import { ActionMenu, MenuItem, Icon, notifications } from "@budibase/bbui"
|
||||||
|
|
||||||
export let screenId
|
export let screenId
|
||||||
|
|
||||||
let confirmDeleteDialog
|
let confirmDeleteDialog
|
||||||
let dropdown
|
|
||||||
let anchor
|
|
||||||
|
|
||||||
$: screen = $allScreens.find((screen) => screen._id === screenId)
|
$: screen = $allScreens.find((screen) => screen._id === screenId)
|
||||||
|
|
||||||
|
@ -24,18 +21,13 @@
|
||||||
notifications.error("Error deleting screen")
|
notifications.error("Error deleting screen")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const openModal = () => {
|
|
||||||
confirmDeleteDialog.show()
|
|
||||||
dropdown.hide()
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ActionMenu bind:this={dropdown}>
|
<ActionMenu let:open let:closeOnClick>
|
||||||
<div slot="button" class="icon" on:click={dropdown.show}>
|
<div slot="button" class="icon" on:click={open}>
|
||||||
<Icon s hoverable name="MoreSmallList" />
|
<Icon s hoverable name="MoreSmallList" />
|
||||||
</div>
|
</div>
|
||||||
<MenuItem icon="Delete" on:click={openModal}>Delete</MenuItem>
|
<MenuItem icon="Delete" on:click={closeOnClick(confirmDeleteDialog.show)}>Delete</MenuItem>
|
||||||
</ActionMenu>
|
</ActionMenu>
|
||||||
|
|
||||||
<ConfirmDialog
|
<ConfirmDialog
|
||||||
|
@ -45,9 +37,3 @@
|
||||||
okText="Delete Screen"
|
okText="Delete Screen"
|
||||||
onOk={deleteScreen}
|
onOk={deleteScreen}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<style>
|
|
||||||
.icon i {
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
Loading…
Reference in New Issue