mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
chore: modified last layout
This commit is contained in:
1 parent
d219f2181c
commit
98395e2a22
2 files changed
+21
-48
No files matched your search
+21
-22
@@ -1,40 +1,39 @@
|
||||
<script lang="ts">
|
||||
import { browser } from '$app/env';
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import { Back } from '$lib/components';
|
||||
import { Container, Cover } from '$lib/layout';
|
||||
import { collection } from '../../store';
|
||||
import { browser } from '$app/env';
|
||||
import { tabs, title } from '$lib/stores/layout';
|
||||
import { doc } from './store';
|
||||
import Tabs from './_tabs.svelte';
|
||||
|
||||
const project = $page.params.project;
|
||||
const collectionId = $page.params.collection;
|
||||
const documentId = $page.params.document;
|
||||
const path = `database/collection/${collectionId}/document/${documentId}`;
|
||||
|
||||
$: {
|
||||
if (browser) {
|
||||
doc.load(collectionId, documentId);
|
||||
}
|
||||
}
|
||||
|
||||
$: {
|
||||
if ($doc) {
|
||||
title.set(`Document - ${$doc.$id}`);
|
||||
}
|
||||
}
|
||||
|
||||
tabs.set([
|
||||
{
|
||||
href: path,
|
||||
title: 'Overview'
|
||||
},
|
||||
{
|
||||
href: `${path}/activity`,
|
||||
title: 'Activity'
|
||||
}
|
||||
]);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Appwrite - Database Document</title>
|
||||
</svelte:head>
|
||||
|
||||
{#if $doc && $collection}
|
||||
<Cover>
|
||||
<Back href={`${base}/console/${project}/database/collection/${collectionId}`}>
|
||||
Collection - {$collection.name}
|
||||
</Back>
|
||||
<h1>{$doc.$id}</h1>
|
||||
<Tabs />
|
||||
</Cover>
|
||||
|
||||
<Container>
|
||||
<slot />
|
||||
</Container>
|
||||
{:else}
|
||||
<div aria-busy="true" />
|
||||
{/if}
|
||||
<slot />
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
<script>
|
||||
import { base } from '$app/paths';
|
||||
|
||||
import { page } from '$app/stores';
|
||||
|
||||
$: project = $page.params.project;
|
||||
$: collectionId = $page.params.collection;
|
||||
$: documentId = $page.params.document;
|
||||
$: path = `${base}/console/${project}/database/collection/${collectionId}/document/${documentId}`;
|
||||
</script>
|
||||
|
||||
<ul class="tabs">
|
||||
<li class="tabs-item">
|
||||
<a class="tabs-button" href={path} class:is-selected={$page.url.pathname === path}>
|
||||
<span class="text">Overview</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="tabs-item">
|
||||
<a
|
||||
class="tabs-button"
|
||||
href={`${path}/activity`}
|
||||
class:is-selected={$page.url.pathname.startsWith(`${path}/activity`)}>
|
||||
<span class="text">Activity</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
Reference in new issue
Block a user