Lint
This commit is contained in:
parent
c634cfdeac
commit
d23d4156c3
|
@ -8,10 +8,6 @@
|
||||||
const { nodes, edges, createRole } = getContext("flow")
|
const { nodes, edges, createRole } = getContext("flow")
|
||||||
const flow = useSvelteFlow()
|
const flow = useSvelteFlow()
|
||||||
|
|
||||||
const addRole = async () => {
|
|
||||||
await createRole()
|
|
||||||
}
|
|
||||||
|
|
||||||
const doAutoLayout = async () => {
|
const doAutoLayout = async () => {
|
||||||
const layout = autoLayout({ nodes: $nodes, edges: $edges })
|
const layout = autoLayout({ nodes: $nodes, edges: $edges })
|
||||||
nodes.set(layout.nodes)
|
nodes.set(layout.nodes)
|
||||||
|
@ -47,7 +43,7 @@
|
||||||
<Button secondary on:click={doAutoLayout}>Auto layout</Button>
|
<Button secondary on:click={doAutoLayout}>Auto layout</Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="control bottom-right">
|
<div class="control bottom-right">
|
||||||
<Button icon="Add" cta on:click={addRole}>Add role</Button>
|
<Button icon="Add" cta on:click={createRole}>Add role</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { Roles } from "constants/backend"
|
import { Roles } from "constants/backend"
|
||||||
import { NodeWidth, NodeHeight, MaxAutoZoom, ZoomDuration } from "./constants"
|
import { NodeWidth, NodeHeight, MaxAutoZoom, ZoomDuration } from "./constants"
|
||||||
import { getContext, tick } from "svelte"
|
import { getContext } from "svelte"
|
||||||
import { autoLayout } from "./layout"
|
import { autoLayout } from "./layout"
|
||||||
import { roles } from "stores/builder"
|
import { roles } from "stores/builder"
|
||||||
|
|
||||||
|
@ -48,10 +48,6 @@
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
const deleteNode = async () => {
|
|
||||||
await deleteRole(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
const openPopover = () => {
|
const openPopover = () => {
|
||||||
tempDisplayName = data.displayName
|
tempDisplayName = data.displayName
|
||||||
tempDescription = data.description
|
tempDescription = data.description
|
||||||
|
@ -92,7 +88,12 @@
|
||||||
{#if data.custom}
|
{#if data.custom}
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<Icon size="S" name="Edit" hoverable on:click={openPopover} />
|
<Icon size="S" name="Edit" hoverable on:click={openPopover} />
|
||||||
<Icon size="S" name="Delete" hoverable on:click={deleteNode} />
|
<Icon
|
||||||
|
size="S"
|
||||||
|
name="Delete"
|
||||||
|
hoverable
|
||||||
|
on:click={() => deleteRole(id)}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue