Add scaffolding for new role editor modal
This commit is contained in:
parent
eb20686de8
commit
9da84b19f9
|
@ -5,11 +5,9 @@
|
||||||
let modal
|
let modal
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div>
|
<Button secondary icon="UsersLock" on:click on:click={modal.show}>
|
||||||
<Button secondary icon="UsersLock" on:click on:click={modal.show}>
|
Edit roles
|
||||||
Edit roles
|
</Button>
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
<Modal bind:this={modal} on:show on:hide>
|
<Modal bind:this={modal} on:show on:hide>
|
||||||
<EditRolesModal />
|
<EditRolesModal />
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
ActionButton,
|
ActionButton,
|
||||||
Icon,
|
|
||||||
Body,
|
|
||||||
Input,
|
Input,
|
||||||
Select,
|
Select,
|
||||||
Label,
|
Label,
|
||||||
|
@ -17,6 +15,7 @@
|
||||||
import { capitalise } from "helpers"
|
import { capitalise } from "helpers"
|
||||||
import InfoDisplay from "pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/InfoDisplay.svelte"
|
import InfoDisplay from "pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/InfoDisplay.svelte"
|
||||||
import { Roles } from "constants/backend"
|
import { Roles } from "constants/backend"
|
||||||
|
import RoleEditor from "./RoleEditor.svelte"
|
||||||
|
|
||||||
export let resourceId
|
export let resourceId
|
||||||
|
|
||||||
|
@ -193,10 +192,16 @@
|
||||||
<InfoDisplay info body={dependantsInfoMessage} />
|
<InfoDisplay info body={dependantsInfoMessage} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<EditRolesButton
|
<div class="buttons">
|
||||||
on:show={() => (showPopover = false)}
|
<EditRolesButton
|
||||||
on:hide={() => (showPopover = true)}
|
on:show={() => (showPopover = false)}
|
||||||
/>
|
on:hide={() => (showPopover = true)}
|
||||||
|
/>
|
||||||
|
<RoleEditor
|
||||||
|
on:drawerShow={() => (showPopover = false)}
|
||||||
|
on:drawerHide={() => (showPopover = true)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</DetailPopover>
|
</DetailPopover>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
Button,
|
||||||
|
Modal,
|
||||||
|
ModalContent,
|
||||||
|
Drawer,
|
||||||
|
DrawerContent,
|
||||||
|
} from "@budibase/bbui"
|
||||||
|
|
||||||
|
let drawer
|
||||||
|
|
||||||
|
$: invalid = false
|
||||||
|
|
||||||
|
const save = async () => {
|
||||||
|
drawer.hide()
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Button secondary icon="UsersLock" on:click on:click={drawer.show}>
|
||||||
|
Role editor
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
<Drawer
|
||||||
|
bind:this={drawer}
|
||||||
|
title="Role editor"
|
||||||
|
on:drawerHide
|
||||||
|
on:drawerShow
|
||||||
|
forceModal
|
||||||
|
>
|
||||||
|
<Button disabled={invalid} cta slot="buttons" on:click={save}>Save</Button>
|
||||||
|
<DrawerContent slot="body">asdasdasd</DrawerContent>
|
||||||
|
</Drawer>
|
Loading…
Reference in New Issue