mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat: fix back button
This commit is contained in:
1 parent
552cde0482
commit
cd72fcfd49
23 files changed
+96
-152
No files matched your search
@@ -1,8 +0,0 @@
|
||||
<script lang="ts">
|
||||
export let href: string;
|
||||
</script>
|
||||
|
||||
<a {href}>
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
<slot />
|
||||
</a>
|
||||
@@ -0,0 +1,10 @@
|
||||
<script lang="ts">
|
||||
export let href: string;
|
||||
export let disabled = false;
|
||||
</script>
|
||||
|
||||
<li class="drop-tabs-item">
|
||||
<a class="drop-tabs-button" {disabled} {href}>
|
||||
<span class="text"><slot /></span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -7,7 +7,6 @@ export { default as CardContainer } from './cardContainer.svelte';
|
||||
export { default as InnerModal } from './innerModal.svelte';
|
||||
export { default as Tile } from './tile.svelte';
|
||||
export { default as Tiles } from './tiles.svelte';
|
||||
export { default as Back } from './back.svelte';
|
||||
export { default as Copy } from './copy.svelte';
|
||||
export { default as CopyInput } from './copyInput.svelte';
|
||||
export { default as UploadBox } from './uploadBox.svelte';
|
||||
@@ -22,6 +21,7 @@ export { default as Collapsible } from './collapsible.svelte';
|
||||
export { default as CollapsibleItem } from './collapsibleItem.svelte';
|
||||
export { default as DropTabs } from './dropTabs.svelte';
|
||||
export { default as DropTabsItem } from './dropTabsItem.svelte';
|
||||
export { default as DropTabsLink } from './dropTabsLink.svelte';
|
||||
export { default as Avatar } from './avatar.svelte';
|
||||
export { default as AvatarInitials } from './avatarInitials.svelte';
|
||||
export { default as AvatarGroup } from './avatarGroup.svelte';
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { Heading } from '$lib/components';
|
||||
|
||||
export let href: string = null;
|
||||
</script>
|
||||
|
||||
<Heading size="4" tag="h1">
|
||||
{#if href}
|
||||
<a class="button is-text is-only-icon" {href} aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
{/if}
|
||||
<span class="text">
|
||||
<slot />
|
||||
</span>
|
||||
</Heading>
|
||||
@@ -1,5 +1,6 @@
|
||||
export { default as Container } from './container.svelte';
|
||||
export { default as Cover } from './cover.svelte';
|
||||
export { default as CoverTitle } from './coverTitle.svelte';
|
||||
export { default as Footer } from './footer.svelte';
|
||||
export { default as Header } from './header.svelte';
|
||||
export { default as Navigation } from './navigation.svelte';
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
import { Colors } from '$lib/charts/config';
|
||||
import type { Models } from '@aw-labs/appwrite-console';
|
||||
import DropListLink from '$lib/components/dropListLink.svelte';
|
||||
import DropTabsLink from '$lib/components/dropTabsLink.svelte';
|
||||
|
||||
type MetricMetadata = {
|
||||
title: string;
|
||||
@@ -44,9 +45,9 @@
|
||||
<div class="u-flex u-main-space-between common-section">
|
||||
<Heading tag="h2" size="5">{title}</Heading>
|
||||
<DropTabs>
|
||||
<DropListLink href={`${path}/24h`} disabled={range === '24h'}>24h</DropListLink>
|
||||
<DropListLink href={`${path}/30d`} disabled={range === '30d'}>30d</DropListLink>
|
||||
<DropListLink href={`${path}/90d`} disabled={range === '90d'}>90d</DropListLink>
|
||||
<DropTabsLink href={`${path}/24h`} disabled={range === '24h'}>24h</DropTabsLink>
|
||||
<DropTabsLink href={`${path}/30d`} disabled={range === '30d'}>30d</DropTabsLink>
|
||||
<DropTabsLink href={`${path}/90d`} disabled={range === '90d'}>90d</DropTabsLink>
|
||||
</DropTabs>
|
||||
</div>
|
||||
<Card>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { Copy, Tab, Tabs } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { sdkForConsole } from '$lib/stores/sdk';
|
||||
import { user } from '$lib/stores/user';
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$user.name}</span>
|
||||
</h1>
|
||||
<CoverTitle>
|
||||
{$user.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$user.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { Tab, Tabs } from '$lib/components';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
const path = `/console/project-${projectId}/authentication`;
|
||||
@@ -31,11 +31,8 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">Authentication</span>
|
||||
</h1>
|
||||
<CoverTitle>Authentication</CoverTitle>
|
||||
</svelte:fragment>
|
||||
|
||||
<Tabs>
|
||||
{#each tabs as tab}
|
||||
<Tab href={tab.href} selected={$page.url.pathname === tab.href}>
|
||||
|
||||
+4
-10
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy, Tab, Tabs } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { team } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -26,15 +26,9 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/authentication/teams`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$team?.name}</span>
|
||||
</h1>
|
||||
<CoverTitle href={`/console/project-${projectId}/authentication/teams`}>
|
||||
{$team?.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$team?.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy, Tab, Tabs } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { user } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -30,15 +30,9 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/authentication`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$user.name}</span>
|
||||
</h1>
|
||||
<CoverTitle href={`/console/project-${projectId}/authentication`}>
|
||||
{$user.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$user.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
+5
-10
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy, Tab, Tabs } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { doc } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -24,15 +24,10 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/databases/database-${databaseId}/collection-${collectionId}`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$doc.$id}</span>
|
||||
</h1>
|
||||
<CoverTitle
|
||||
href={`/console/project-${projectId}/databases/database-${databaseId}/collection-${collectionId}`}>
|
||||
{$doc?.$id}
|
||||
</CoverTitle>
|
||||
<Copy value={$doc.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
+5
-11
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy, Tab, Tabs } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { collection } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -35,16 +35,10 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/databases/database-${databaseId}`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$collection.name}</span>
|
||||
</h1>
|
||||
<Copy value={$collection.$id}>
|
||||
<CoverTitle href={`/console/project-${projectId}/databases/database-${databaseId}`}>
|
||||
{$collection?.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$collection?.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
Collection ID
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy, Tab, Tabs } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { database } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -26,15 +26,9 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/databases`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$database.name}</span>
|
||||
</h1>
|
||||
<CoverTitle href={`/console/project-${projectId}/databases`}>
|
||||
{$database.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$database.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { Tab, Tabs } from '$lib/components';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
const path = `/console/project-${projectId}/databases`;
|
||||
@@ -19,11 +19,8 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">Databases</span>
|
||||
</h1>
|
||||
<CoverTitle>Databases</CoverTitle>
|
||||
</svelte:fragment>
|
||||
|
||||
<Tabs>
|
||||
{#each tabs as tab}
|
||||
<Tab href={tab.href} selected={$page.url.pathname === tab.href}>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy, Tab, Tabs } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { func } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -30,15 +30,9 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/functions`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$func?.name}</span>
|
||||
</h1>
|
||||
<CoverTitle href={`/console/project-${projectId}/functions`}>
|
||||
{$func?.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$func?.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
</script>
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">Functions</span>
|
||||
</h1>
|
||||
<CoverTitle>Functions</CoverTitle>
|
||||
</svelte:fragment>
|
||||
</Cover>
|
||||
@@ -1,15 +1,15 @@
|
||||
<script lang="ts">
|
||||
import { Copy } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { project } from '../store';
|
||||
</script>
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$project.name}</span>
|
||||
</h1>
|
||||
<CoverTitle>
|
||||
{$project?.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$project.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { key } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -10,16 +10,10 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/overview/keys`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$key.name}</span>
|
||||
</h1>
|
||||
<Copy value={$key.secret}>
|
||||
<CoverTitle href={`/console/project-${projectId}/overview/keys`}>
|
||||
{$key?.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$key?.secret}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
API Key Secret
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { platform } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -8,14 +8,8 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/overview/platforms`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$platform?.name}</span>
|
||||
</h1>
|
||||
<CoverTitle href={`/console/project-${projectId}/overview/platforms`}>
|
||||
{$platform?.name}
|
||||
</CoverTitle>
|
||||
</svelte:fragment>
|
||||
</Cover>
|
||||
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { webhook } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -10,16 +10,10 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/settings/webhooks`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$webhook.name}</span>
|
||||
</h1>
|
||||
<Copy value={$webhook.$id}>
|
||||
<CoverTitle href={`/console/project-${projectId}/settings/webhooks`}>
|
||||
{$webhook?.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$webhook?.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
Webhook ID
|
||||
|
||||
+4
-10
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { file } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -11,15 +11,9 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/storage/bucket-${bucketId}`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$file?.name}</span>
|
||||
</h1>
|
||||
<CoverTitle href={`/console/project-${projectId}/storage/bucket-${bucketId}`}>
|
||||
{$file?.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$file?.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { page } from '$app/stores';
|
||||
import { Copy, Tab, Tabs } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
import { bucket } from './store';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
@@ -26,15 +26,9 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<a
|
||||
class="back-button"
|
||||
href={`/console/project-${projectId}/storage`}
|
||||
aria-label="page back">
|
||||
<span class="icon-cheveron-left" aria-hidden="true" />
|
||||
</a>
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">{$bucket?.name}</span>
|
||||
</h1>
|
||||
<CoverTitle href={`/console/project-${projectId}/storage`}>
|
||||
{$bucket?.name}
|
||||
</CoverTitle>
|
||||
<Copy value={$bucket?.$id}>
|
||||
<Pill button>
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { Tab, Tabs } from '$lib/components';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { Cover, CoverTitle } from '$lib/layout';
|
||||
|
||||
const projectId = $page.params.project;
|
||||
const path = `/console/project-${projectId}/storage`;
|
||||
@@ -19,11 +19,8 @@
|
||||
|
||||
<Cover>
|
||||
<svelte:fragment slot="header">
|
||||
<h1 class="heading-level-4">
|
||||
<span class="text">Storage</span>
|
||||
</h1>
|
||||
<CoverTitle>Storage</CoverTitle>
|
||||
</svelte:fragment>
|
||||
|
||||
<Tabs>
|
||||
{#each tabs as tab}
|
||||
<Tab href={tab.href} selected={$page.url.pathname === tab.href}>
|
||||
|
||||
Reference in new issue
Block a user