fix: text and removed database total

This commit is contained in:
Arman committed 2022-09-01 11:44:15 +02:00
1 parent 9c347e3cdc
commit f9ff29b467
3 files changed
+17 -21

No files matched your search

@@ -200,13 +200,14 @@
</label>
</li>
</ul>
<Alert type="info">
<p>
Tip: Add <b>role:all</b> for wildcards access. Check out our documentation
for more on <a class="link" href="/#">Permissions</a>
</p>
</Alert>
{#if collectionPermissions === 'collection'}
<Alert type="info">
<p>
Tip: Add <b>role:all</b> for wildcards access. Check out our
documentation for more on <a class="link" href="/#">Permissions</a>
</p>
</Alert>
<ul class="form-list">
<InputTags
id="read"
@@ -219,6 +220,15 @@
placeholder="User ID, Team ID, or Role"
bind:tags={collectionWrite} />
</ul>
{:else}
<Alert type="info">
<p>
Manage permissions at the <b>Document Level</b> to control access over
every document in your collection. Check out our documentation for more
on
<a class="link" href="/#">Permissions</a>
</p>
</Alert>
{/if}
</svelte:fragment>
<svelte:fragment slot="actions">
@@ -40,13 +40,7 @@
style={` --grid-item-size:${$databaseList.total > 3 ? '22rem' : '25rem'};`}>
{#each $databaseList.databases as database}
<Bucket href={`${base}/console/${project}/databases/database/${database.$id}`}>
<svelte:fragment slot="eyebrow">
{#await databaseList.total(database.$id)}
N Collections
{:then n}
{n[database.$id] ? n[database.$id] : 'NO'} Collections
{/await}
</svelte:fragment>
<svelte:fragment slot="eyebrow">X Collections</svelte:fragment>
<svelte:fragment slot="title">{database.name}</svelte:fragment>
<Copy value={database.$id}>
@@ -14,14 +14,6 @@ function createDatabaseListStore() {
load: async (search: string, limit: number, offset: number) => {
const response = await sdkForProject.databases.list(search, limit, offset);
set(response);
},
total: async (id: string) => {
let total = {};
total = browser ? JSON.parse(sessionStorage.getItem('databaseTotal')) ?? {} : {};
const response = await sdkForProject.databases.listCollections(id);
total[id] = response.total;
sessionStorage?.setItem('databaseTotal', JSON.stringify(total));
return total;
}
};
}