mirror of
https://github.com/appwrite/console.git
synced 2026-04-07 19:17:46 +00:00
fix format
This commit is contained in:
@@ -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>
|
||||
|
||||
+18
-14
@@ -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>
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@
|
||||
event: 'settings',
|
||||
disabled: !$canWriteCollections
|
||||
}
|
||||
].filter((tab) => !tab.disabled);;
|
||||
].filter((tab) => !tab.disabled);
|
||||
</script>
|
||||
|
||||
<Cover>
|
||||
|
||||
+17
-14
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user