Fix styles in generate button and hide generate button for users table

This commit is contained in:
Andrew Kingston 2024-08-22 08:06:38 +01:00
parent 7431d1c8da
commit acb3893730
No known key found for this signature in database
2 changed files with 34 additions and 22 deletions

View File

@ -62,24 +62,35 @@
<svelte:fragment slot="anchor" let:open>
<ActionButton icon="MagicWand" selected={open}>Generate</ActionButton>
</svelte:fragment>
<Menu>
<MenuItem
icon="ShareAndroid"
on:click={() => {
open = false
createAutomation(TriggerStepID.ROW_SAVED)
}}
>
Automation: when row is created
</MenuItem>
<MenuItem
icon="ShareAndroid"
on:click={() => {
open = false
createAutomation(TriggerStepID.ROW_UPDATED)
}}
>
Automation: when row is updated
</MenuItem>
</Menu>
<div class="menu">
<Menu>
<MenuItem
icon="ShareAndroid"
on:click={() => {
open = false
createAutomation(TriggerStepID.ROW_SAVED)
}}
>
Automation: when row is created
</MenuItem>
<MenuItem
icon="ShareAndroid"
on:click={() => {
open = false
createAutomation(TriggerStepID.ROW_UPDATED)
}}
>
Automation: when row is updated
</MenuItem>
</Menu>
</div>
</DetailPopover>
<style>
.menu {
margin: 0 calc(-1 * var(--spacing-xl));
display: flex;
flex-direction: column;
align-items: stretch;
}
</style>

View File

@ -128,9 +128,10 @@
{/if}
<GridExportButton />
</svelte:fragment>
<svelte:fragment slot="controls-right">
<GridGenerateButton bind:this={generateButton} />
{#if !isUsersTable}
<GridGenerateButton bind:this={generateButton} />
{/if}
</svelte:fragment>
<!-- Content for editing columns -->