more fixes

This commit is contained in:
Damodar Lohani
2024-09-18 14:34:12 +05:45
parent 89f9f91d45
commit ffd9d52fa9
2 changed files with 7 additions and 2 deletions
@@ -7,6 +7,7 @@
import type { ColumnType } from '$lib/helpers/types';
import { Container } from '$lib/layout';
import { preferences } from '$lib/stores/preferences';
import { canWriteCollections } from '$lib/stores/roles';
import { wizard } from '$lib/stores/wizard';
import type { PageData } from './$types';
import CreateAttributeDropdown from './attributes/createAttributeDropdown.svelte';
@@ -119,7 +120,7 @@
on:click={openWizard} />
{/if}
{:else}
<Empty single target="attribute" on:click={() => (showCreateDropdown = true)}>
<Empty allowCreate={$canWriteCollections} single target="attribute" on:click={() => (showCreateDropdown = true)}>
<div class="u-text-center">
<Heading size="7" tag="h2">Create an attribute to get started.</Heading>
<p class="body-text-2 u-bold u-margin-block-start-4">
@@ -133,6 +134,7 @@
text
event="empty_documentation"
ariaLabel={`create {target}`}>Documentation</Button>
{#if $canWriteCollections}
<CreateAttributeDropdown
bind:showCreateDropdown
bind:showCreate={showCreateAttribute}
@@ -146,6 +148,7 @@
Create attribute
</Button>
</CreateAttributeDropdown>
{/if}
</div>
</Empty>
{/if}
@@ -197,7 +197,7 @@
<p class="text">Total results: {$attributes.length}</p>
</div>
{:else}
<Empty single target="attribute" on:click={() => (showEmptyCreateDropdown = true)}>
<Empty allowCreate={$canWriteCollections} single target="attribute" on:click={() => (showEmptyCreateDropdown = true)}>
<div class="u-text-center">
<Heading size="7" tag="h2">Create your first attribute to get started.</Heading>
<p class="body-text-2 u-bold u-margin-block-start-4">
@@ -211,6 +211,7 @@
text
event="empty_documentation"
ariaLabel={`create {target}`}>Documentation</Button>
{#if $canWriteCollections}
<CreateAttributeDropdown
bind:showCreateDropdown={showEmptyCreateDropdown}
bind:selectedOption
@@ -224,6 +225,7 @@
Create attribute
</Button>
</CreateAttributeDropdown>
{/if}
</div>
</Empty>
{/if}