mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
review fixes
This commit is contained in:
1 parent
d86f812b9f
commit
c3e33e2638
11 files changed
+55
-60
No files matched your search
@@ -17,8 +17,8 @@ export const load: LayoutLoad = async ({ params, depends }) => {
|
||||
depends(Dependencies.ORGANIZATION);
|
||||
depends(Dependencies.MEMBERS);
|
||||
depends(Dependencies.PAYMENT_METHODS);
|
||||
var roles = [];
|
||||
var scopes = [];
|
||||
let roles = [];
|
||||
let scopes = [];
|
||||
|
||||
try {
|
||||
if (isCloud) {
|
||||
|
||||
@@ -53,8 +53,6 @@
|
||||
|
||||
function createOrg() {
|
||||
showDropdown = false;
|
||||
console.log('billing:', isBilling);
|
||||
console.log('developer:', isDeveloper);
|
||||
if (isCloud) {
|
||||
goto(`${base}/create-organization`);
|
||||
} else newOrgModal.set(true);
|
||||
|
||||
@@ -18,8 +18,8 @@ export const load: LayoutLoad = async ({ params, depends }) => {
|
||||
const newPrefs = { ...prefs, organization: project.teamId };
|
||||
sdk.forConsole.account.updatePrefs(newPrefs);
|
||||
preferences.loadTeamPrefs(project.teamId);
|
||||
var roles = [];
|
||||
var scopes = [];
|
||||
let roles = [];
|
||||
let scopes = [];
|
||||
if (isCloud) {
|
||||
if (get(canSeeBilling)) {
|
||||
await failedInvoice.load(project.teamId);
|
||||
|
||||
@@ -21,36 +21,31 @@
|
||||
hasChildren: true,
|
||||
event: 'teams'
|
||||
},
|
||||
...($canWriteUsers
|
||||
? [
|
||||
{
|
||||
href: `${path}/security`,
|
||||
title: 'Security',
|
||||
event: 'security'
|
||||
},
|
||||
{
|
||||
href: `${path}/templates`,
|
||||
title: 'Templates',
|
||||
hasChildren: false,
|
||||
event: 'templates'
|
||||
}
|
||||
]
|
||||
: []),
|
||||
{
|
||||
href: `${path}/security`,
|
||||
title: 'Security',
|
||||
event: 'security',
|
||||
disabled: !$canWriteUsers
|
||||
},
|
||||
{
|
||||
href: `${path}/templates`,
|
||||
title: 'Templates',
|
||||
hasChildren: false,
|
||||
event: 'templates',
|
||||
disabled: !$canWriteUsers
|
||||
},
|
||||
{
|
||||
href: `${path}/usage`,
|
||||
title: 'Usage',
|
||||
hasChildren: true,
|
||||
event: 'usage'
|
||||
},
|
||||
...($canWriteUsers
|
||||
? [
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
title: 'Settings',
|
||||
event: 'settings'
|
||||
}
|
||||
]
|
||||
: [])
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
title: 'Settings',
|
||||
event: 'settings',
|
||||
disabled: !$canWriteUsers
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
+6
-9
@@ -40,15 +40,12 @@
|
||||
event: 'usage',
|
||||
hasChildren: true
|
||||
},
|
||||
...($canWriteCollections
|
||||
? [
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
title: 'Settings',
|
||||
event: 'settings'
|
||||
}
|
||||
]
|
||||
: [])
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
title: 'Settings',
|
||||
event: 'settings',
|
||||
disabled: !$canWriteCollections
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
@@ -23,15 +23,12 @@
|
||||
event: 'usage',
|
||||
hasChildren: true
|
||||
},
|
||||
...($canWriteDatabases
|
||||
? [
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
event: 'settings',
|
||||
title: 'Settings'
|
||||
}
|
||||
]
|
||||
: [])
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
event: 'settings',
|
||||
title: 'Settings',
|
||||
disabled: !$canWriteDatabases
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
@@ -34,15 +34,12 @@
|
||||
event: 'sage',
|
||||
hasChildren: true
|
||||
},
|
||||
...($canWriteFunctions
|
||||
? [
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
event: 'settings',
|
||||
title: 'Settings'
|
||||
}
|
||||
]
|
||||
: [])
|
||||
{
|
||||
href: `${path}/settings`,
|
||||
event: 'settings',
|
||||
title: 'Settings',
|
||||
disabled: !$canWriteFunctions
|
||||
}
|
||||
];
|
||||
</script>
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
{:else}
|
||||
<Empty
|
||||
single
|
||||
on:click={$canWriteTopics ? () => ($showCreate = true) : null}
|
||||
on:click={() => $canWriteTopics && ($showCreate = true)}
|
||||
href="https://appwrite.io/docs/products/messaging/topics"
|
||||
target="topic" />
|
||||
{/if}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<script lang="ts" context="module">
|
||||
export function createApiKey() {
|
||||
if (!get(canWriteKeys)) {
|
||||
return;
|
||||
}
|
||||
wizard.start(Wizard);
|
||||
}
|
||||
</script>
|
||||
@@ -18,6 +21,7 @@
|
||||
import { toLocaleDate, toLocaleDateTime } from '$lib/helpers/date';
|
||||
import { canWriteKeys } from '$lib/stores/roles';
|
||||
import { wizard } from '$lib/stores/wizard';
|
||||
import { get } from 'svelte/store';
|
||||
import type { PageData } from './$types';
|
||||
import Wizard from './wizard.svelte';
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
<script lang="ts" context="module">
|
||||
export function openWebhooksWizard() {
|
||||
if (!get(canWriteWebhooks)) {
|
||||
return;
|
||||
}
|
||||
wizard.start(Create);
|
||||
}
|
||||
</script>
|
||||
@@ -29,6 +32,7 @@
|
||||
import FailedModal from './failedModal.svelte';
|
||||
import MessageStatusPill from './messageStatusPill.svelte';
|
||||
import { canWriteWebhooks } from '$lib/stores/roles';
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
@@ -36,6 +40,9 @@
|
||||
let selectedWebhook: Models.Webhook;
|
||||
|
||||
function openWizard() {
|
||||
if (!$canWriteWebhooks) {
|
||||
return;
|
||||
}
|
||||
wizard.start(Create);
|
||||
}
|
||||
|
||||
@@ -123,7 +130,7 @@
|
||||
single
|
||||
href="https://appwrite.io/docs/advanced/platform/webhooks"
|
||||
target="webhook"
|
||||
on:click={$canWriteWebhooks ? openWizard : null} />
|
||||
on:click={openWizard} />
|
||||
{/if}
|
||||
</Container>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<ContainerHeader
|
||||
title="Buckets"
|
||||
total={data.buckets.total}
|
||||
buttonText={$canWriteBuckets ? 'Create bucket' : ''}
|
||||
buttonText={$canWriteBuckets ? 'Create bucket' : null}
|
||||
buttonEvent="create_bucket"
|
||||
buttonMethod={() => ($showCreateBucket = true)} />
|
||||
{#if data.buckets.total}
|
||||
|
||||
Reference in new issue
Block a user