fix format

This commit is contained in:
Damodar Lohani
2024-09-18 15:37:46 +05:45
parent a1fe4bdec4
commit d043fb4f71
10 changed files with 43 additions and 38 deletions
+1 -3
View File
@@ -22,9 +22,7 @@ export const canWriteTeams = derived(scopes, ($scopes) => $scopes.includes('team
export const canWriteCollections = derived(scopes, ($scopes) =>
$scopes.includes('collections.write')
);
export const canWriteDocuments = derived(scopes, ($scopes) =>
$scopes.includes('documents.write')
);
export const canWriteDocuments = derived(scopes, ($scopes) => $scopes.includes('documents.write'));
export const canWriteExecutions = derived(scopes, ($scopes) =>
$scopes.includes('executions.write')
);
@@ -80,7 +80,7 @@
}
function handleCreateProject() {
if(!$canWriteProjects) return;
if (!$canWriteProjects) return;
if (isCloud) wizard.start(Create);
else showCreate = true;
}
@@ -6,7 +6,7 @@ import type { PageLoad } from './$types';
import { redirect } from '@sveltejs/kit';
export const load: PageLoad = async ({ params, url, route, depends, parent }) => {
const {roles, scopes} = await parent();
const { roles, scopes } = await parent();
depends(Dependencies.ORGANIZATION);
const page = getPage(url);
const limit = getLimit(url, route, CARD_LIMIT);
@@ -8,7 +8,7 @@ import type { PageLoad } from './$types';
export const load: PageLoad = async ({ parent, depends }) => {
const { organization, scopes } = await parent();
if(!scopes.includes('billing.read')) {
if (!scopes.includes('billing.read')) {
return redirect(301, `/console/organization-${organization.$id}`);
}
depends(Dependencies.PAYMENT_METHODS);
@@ -46,7 +46,7 @@
event: 'settings',
disabled: !$canWriteProjects
}
].filter((tab) => !tab.disabled);;
].filter((tab) => !tab.disabled);
</script>
<Cover>
@@ -197,7 +197,11 @@
<p class="text">Total results: {$attributes.length}</p>
</div>
{:else}
<Empty allowCreate={$canWriteCollections} 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">
@@ -212,19 +216,19 @@
event="empty_documentation"
ariaLabel={`create {target}`}>Documentation</Button>
{#if $canWriteCollections}
<CreateAttributeDropdown
bind:showCreateDropdown={showEmptyCreateDropdown}
bind:selectedOption
bind:showCreate>
<Button
secondary
event="create_attribute"
on:click={() => {
showEmptyCreateDropdown = !showEmptyCreateDropdown;
}}>
Create attribute
</Button>
</CreateAttributeDropdown>
<CreateAttributeDropdown
bind:showCreateDropdown={showEmptyCreateDropdown}
bind:selectedOption
bind:showCreate>
<Button
secondary
event="create_attribute"
on:click={() => {
showEmptyCreateDropdown = !showEmptyCreateDropdown;
}}>
Create attribute
</Button>
</CreateAttributeDropdown>
{/if}
</div>
</Empty>
@@ -46,7 +46,7 @@
event: 'settings',
disabled: !$canWriteCollections
}
].filter((tab) => !tab.disabled);;
].filter((tab) => !tab.disabled);
</script>
<Cover>
@@ -140,7 +140,10 @@
on:click={() => (showCreateIndex = $canWriteCollections)} />
{/if}
{:else}
<Empty single target="attribute" on:click={() => (showCreateDropdown = $canWriteCollections)}>
<Empty
single
target="attribute"
on:click={() => (showCreateDropdown = $canWriteCollections)}>
<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">
@@ -155,19 +158,19 @@
event="empty_documentation"
ariaLabel={`create {target}`}>Documentation</Button>
{#if $canWriteCollections}
<CreateAttributeDropdown
bind:showCreateDropdown
bind:showCreate={showCreateAttribute}
bind:selectedOption={selectedAttribute}>
<Button
secondary
event="create_attribute"
on:click={() => {
showCreateDropdown = !showCreateDropdown;
}}>
Create attribute
</Button>
</CreateAttributeDropdown>
<CreateAttributeDropdown
bind:showCreateDropdown
bind:showCreate={showCreateAttribute}
bind:selectedOption={selectedAttribute}>
<Button
secondary
event="create_attribute"
on:click={() => {
showCreateDropdown = !showCreateDropdown;
}}>
Create attribute
</Button>
</CreateAttributeDropdown>
{/if}
</div>
</Empty>
@@ -29,7 +29,7 @@
title: 'Settings',
disabled: !$canWriteDatabases
}
].filter((tab) => !tab.disabled);;
].filter((tab) => !tab.disabled);
</script>
<Cover>
@@ -40,7 +40,7 @@
title: 'Settings',
disabled: !$canWriteFunctions
}
].filter((tab) => !tab.disabled);;
].filter((tab) => !tab.disabled);
</script>
<Cover>