Merge pull request #381 from appwrite/feat-id-component

feat: new id component
This commit is contained in:
Torsten Dittmann authored and GitHub committed 2023-04-11 18:22:47 +02:00
commit e3e99487e5
30 files changed
+148 -213

No files matched your search

+1
View File
@@ -33,6 +33,7 @@
</script>
<span
data-private
style:cursor="pointer"
on:click|preventDefault={handleClick}
on:keyup={clickOnEnter}
+67
View File
@@ -0,0 +1,67 @@
<script lang="ts">
import { Copy } from '.';
export let value: string;
export let event: string = null;
function truncateText(node: HTMLElement) {
const MAX_TRIES = 100;
let originalText = node.textContent;
function checkOverflow() {
node.textContent = originalText;
if (node.scrollWidth > node.clientWidth) {
let truncatedText = originalText;
let tries = 0;
while (
node.scrollWidth > node.clientWidth &&
truncatedText.length > 0 &&
tries < MAX_TRIES
) {
tries++;
if (truncatedText.includes('…')) {
const [left, right] = truncatedText.split('…');
truncatedText = `${left.slice(0, -1)}…${right.slice(1)}`;
} else {
const left = truncatedText.slice(0, truncatedText.length / 2);
const right = truncatedText.slice(truncatedText.length / 2);
truncatedText = `${left.slice(0, -1)}…${right.slice(1)}`;
}
node.textContent = truncatedText;
}
}
}
checkOverflow();
window.addEventListener('resize', checkOverflow);
return {
update() {
originalText = node.textContent;
checkOverflow();
},
destroy() {
window.removeEventListener('resize', checkOverflow);
}
};
}
</script>
<div
class="interactive-text-output is-buttons-on-top"
style:min-inline-size="0"
style:display="inline-flex">
<span
style:white-space="nowrap"
class="text u-line-height-1-5"
style:overflow="hidden"
use:truncateText>
<slot />
</span>
<div class="interactive-text-output-buttons">
<Copy {value} {event}>
<button class="interactive-text-output-button is-hidden" aria-label="copy text">
<span class="icon-duplicate" aria-hidden="true" />
</button>
</Copy>
</div>
</div>
+1
View File
@@ -53,3 +53,4 @@ export { default as Limit } from './limit.svelte';
export { default as PaginationWithLimit } from './paginationWithLimit.svelte';
export { default as ClickableList } from './clickableList.svelte';
export { default as ClickableListItem } from './clickableListItem.svelte';
export { default as Id } from './id.svelte';
-29
View File
@@ -9,34 +9,6 @@
export let submit = false;
export let external = false;
export let href: string = null;
export let trim = false;
let element: HTMLButtonElement;
const isOverflowing = (elem: HTMLButtonElement, iterator = 1) => {
let parent = elem?.parentElement;
if (
trim &&
elem &&
elem.scrollWidth + 10 >
(parent.clientWidth ? parent.clientWidth : parent.parentElement.clientWidth)
)
trimText(iterator);
else return;
};
function trimText(iterator: number) {
if (iterator > 3) {
element.childNodes[element.childElementCount].textContent = '...';
} else {
let text = element.childNodes[element.childElementCount].textContent;
element.childNodes[element.childElementCount].textContent =
text.slice(0, 3) + '...' + text.slice(-9 + iterator * 2);
isOverflowing(element, iterator + 1);
}
}
$: isOverflowing(element);
</script>
{#if href}
@@ -55,7 +27,6 @@
</a>
{:else if button}
<button
bind:this={element}
on:click
{disabled}
type={submit ? 'submit' : 'button'}
+1 -1
View File
@@ -5,7 +5,7 @@
</script>
<div
style={width ? `--p-col-width:${width?.toString()}` : ''}
style:--p-col-width={width?.toString()}
class:is-only-desktop={onlyDesktop}
class="table-thead-col"
role="columnheader">
+2
View File
@@ -3,10 +3,12 @@
export let title: string;
export let showOverflow = false;
export let onlyDesktop = false;
export let width: number = null;
</script>
<div
class="table-col"
style:--p-col-width={width?.toString()}
class:is-only-desktop={onlyDesktop}
class:u-overflow-visible={showOverflow}
data-title={title}
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy, Tab, Tabs } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id, Tab, Tabs } from '$lib/components';
import { isTabSelected } from '$lib/helpers/load';
import { Cover, CoverTitle } from '$lib/layout';
import { team } from './store';
@@ -35,12 +34,7 @@
<CoverTitle href={`/console/project-${projectId}/auth/teams`}>
{$team?.name}
</CoverTitle>
<Copy value={$team?.$id} event="team">
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
Team ID
</Pill>
</Copy>
<Id value={$team?.$id} event="team">{$team?.$id}</Id>
</svelte:fragment>
<Tabs>
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy, Tab, Tabs } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id, Tab, Tabs } from '$lib/components';
import { isTabSelected } from '$lib/helpers/load';
import { Cover, CoverTitle } from '$lib/layout';
import { user } from './store';
@@ -39,12 +38,7 @@
<CoverTitle href={`/console/project-${projectId}/auth`}>
{$user.name ? $user.name : '-'}
</CoverTitle>
<Copy value={$user.$id} event="user">
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
User ID
</Pill>
</Copy>
<Id value={$user.$id} event="user">{$user.$id}</Id>
</svelte:fragment>
<Tabs>
@@ -8,7 +8,7 @@ export type Column = {
};
export const columns = writable<Column[]>([
{ id: '$id', title: 'Database ID', show: true, width: 50 },
{ id: '$id', title: 'Database ID', show: true, width: 150 },
{ id: 'name', title: 'Name', show: true, width: 120 },
{ id: '$createdAt', title: 'Created', show: true, width: 120 },
{ id: '$updatedAt', title: 'Updated', show: true, width: 120 }
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy, Tab, Tabs } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id, Tab, Tabs } from '$lib/components';
import { isTabSelected } from '$lib/helpers/load';
import { Cover, CoverTitle } from '$lib/layout';
import { doc } from './store';
@@ -38,12 +37,7 @@
href={`/console/project-${projectId}/databases/database-${databaseId}/collection-${collectionId}`}>
{$doc?.$id}
</CoverTitle>
<Copy value={$doc.$id} event="document">
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
Document ID
</Pill>
</Copy>
<Id value={$doc?.$id} event="document">Document ID</Id>
</svelte:fragment>
<Tabs>
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy, Tab, Tabs } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id, Tab, Tabs } from '$lib/components';
import { isTabSelected } from '$lib/helpers/load';
import { Cover, CoverTitle } from '$lib/layout';
import { collection } from './store';
@@ -52,12 +51,7 @@
<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
</Pill>
</Copy>
<Id value={$collection?.$id}>{$collection?.$id}</Id>
</svelte:fragment>
<Tabs>
@@ -3,8 +3,7 @@
import { base } from '$app/paths';
import { page } from '$app/stores';
import { tooltip } from '$lib/actions/tooltip';
import { Copy } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id } from '$lib/components';
import {
TableBody,
TableCell,
@@ -97,13 +96,10 @@
{#each data.documents.documents as document}
<TableRowLink
href={`${base}/console/project-${projectId}/databases/database-${databaseId}/collection-${$collection.$id}/document-${document.$id}`}>
<TableCell>
<Copy value={document.$id}>
<Pill button trim>
<span class="icon-duplicate" aria-hidden="true" />
<span class="text">{document.$id}</span>
</Pill>
</Copy>
<TableCell width={150}>
<Id value={document.$id}>
{document.$id}
</Id>
</TableCell>
{#each $columns as column}
@@ -1,7 +1,7 @@
<script lang="ts">
import { base } from '$app/paths';
import { page } from '$app/stores';
import { CardContainer, Copy, GridItem1 } from '$lib/components';
import { CardContainer, GridItem1, Id } from '$lib/components';
import { Pill } from '$lib/elements';
import type { PageData } from './$types';
export let data: PageData;
@@ -23,9 +23,7 @@
<Pill>disabled</Pill>
{/if}</svelte:fragment>
<Copy value={collection.$id}>
<Pill button><i class="icon-duplicate" />Collection ID</Pill>
</Copy>
<Id value={collection.$id}>{collection.$id}</Id>
</GridItem1>
{/each}
</CardContainer>
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy, Tab, Tabs } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id, Tab, Tabs } from '$lib/components';
import { isTabSelected } from '$lib/helpers/load';
import { Cover, CoverTitle } from '$lib/layout';
import { database } from './store';
@@ -35,12 +34,7 @@
<CoverTitle href={`/console/project-${projectId}/databases`}>
{$database.name}
</CoverTitle>
<Copy value={$database.$id}>
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
Database ID
</Pill>
</Copy>
<Id value={$database.$id}>{$database.$id}</Id>
</svelte:fragment>
<Tabs>
@@ -7,7 +7,7 @@ export const database = derived(page, ($page) => $page.data.database as Models.D
export const showCreate = writable(false);
export const columns = writable<Column[]>([
{ id: '$id', title: 'Collection ID', show: true, width: 50 },
{ id: '$id', title: 'Collection ID', show: true, width: 150 },
{ id: 'name', title: 'Name', show: true, width: 120 },
{ id: '$createdAt', title: 'Created', show: true, width: 120 },
{ id: '$updatedAt', title: 'Updated', show: true, width: 120 }
@@ -1,8 +1,7 @@
<script lang="ts">
import { base } from '$app/paths';
import { page } from '$app/stores';
import { Copy } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id } from '$lib/components';
import {
Table,
TableBody,
@@ -37,21 +36,16 @@
{#if column.show}
{#if column.id === '$id'}
{#key $columns}
<TableCell title={column.title}>
<Copy value={collection.$id}>
<Pill button trim>
<span class="icon-duplicate" aria-hidden="true" />
<span class="text u-trim">{collection.$id}</span>
</Pill>
</Copy>
<TableCell title={column.title} width={column.width}>
<Id value={collection.$id}>{collection.$id}</Id>
</TableCell>
{/key}
{:else if column.id === 'name'}
<TableCellText title={column.title}>
<TableCellText title={column.title} width={column.width}>
{collection.name}
</TableCellText>
{:else}
<TableCellText title={column.title}>
<TableCellText title={column.title} width={column.width}>
{toLocaleDateTime(collection[column.id])}
</TableCellText>
{/if}
@@ -1,8 +1,7 @@
<script lang="ts">
import { base } from '$app/paths';
import { page } from '$app/stores';
import { CardContainer, Copy, GridItem1 } from '$lib/components';
import { Pill } from '$lib/elements';
import { CardContainer, GridItem1, Id } from '$lib/components';
import type { PageData } from './$types';
export let data: PageData;
export let showCreate = false;
@@ -13,10 +12,7 @@
{#each data.databases.databases as database}
<GridItem1 href={`${base}/console/project-${project}/databases/database-${database.$id}`}>
<svelte:fragment slot="title">{database.name}</svelte:fragment>
<Copy value={database.$id}>
<Pill button><i class="icon-duplicate" />Database ID</Pill>
</Copy>
<Id value={database.$id}>{database.$id}</Id>
</GridItem1>
{/each}
<svelte:fragment slot="empty">
@@ -2,7 +2,7 @@ import type { Column } from '$lib/components/viewSelector.svelte';
import { writable } from 'svelte/store';
export const columns = writable<Column[]>([
{ id: '$id', title: 'Database ID', show: true, width: 50 },
{ id: '$id', title: 'Database ID', show: true, width: 150 },
{ id: 'name', title: 'Name', show: true, width: 120 },
{ id: '$createdAt', title: 'Created', show: true, width: 120 },
{ id: '$updatedAt', title: 'Updated', show: true, width: 120 }
@@ -1,8 +1,7 @@
<script lang="ts">
import { base } from '$app/paths';
import { page } from '$app/stores';
import { Copy } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id } from '$lib/components';
import {
Table,
TableBody,
@@ -36,21 +35,18 @@
{#if column.show}
{#if column.id === '$id'}
{#key $columns}
<TableCell title={column.title}>
<Copy value={database.$id}>
<Pill button trim>
<span class="icon-duplicate" aria-hidden="true" />
<span class="text u-trim">{database.$id}</span>
</Pill>
</Copy>
<TableCell width={column.width} title={column.title}>
<Id value={database.$id}>
{database.$id}
</Id>
</TableCell>
{/key}
{:else if column.id === 'name'}
<TableCellText title={column.title}>
<TableCellText width={column.width} title={column.title}>
{database.name}
</TableCellText>
{:else}
<TableCellText title={column.title}>
<TableCellText width={column.width} title={column.title}>
{toLocaleDateTime(database[column.id])}
</TableCellText>
{/if}
@@ -4,12 +4,11 @@
import {
Empty,
CardContainer,
Copy,
GridItem1,
Heading,
PaginationWithLimit
PaginationWithLimit,
Id
} from '$lib/components';
import { Pill } from '$lib/elements';
import { Container } from '$lib/layout';
import { base } from '$app/paths';
import { tooltip } from '$lib/actions/tooltip';
@@ -77,10 +76,7 @@
</li>
{/if}
</svelte:fragment>
<Copy value={func.$id} event="function">
<Pill button><i class="icon-duplicate" />Function ID</Pill>
</Copy>
<Id value={func.$id} event="function">{func.$id}</Id>
</GridItem1>
{/each}
<svelte:fragment slot="empty">
@@ -1,15 +1,14 @@
<script lang="ts">
import { Button } from '$lib/elements/forms';
import { Pill } from '$lib/elements';
import {
CardGrid,
Copy,
DropList,
DropListItem,
Empty,
Status,
Heading,
PaginationWithLimit
PaginationWithLimit,
Id
} from '$lib/components';
import {
TableHeader,
@@ -36,7 +35,6 @@
import Activate from './activate.svelte';
import { browser } from '$app/environment';
import { sdk } from '$lib/stores/sdk';
import Output from '$lib/components/output.svelte';
import { calculateTime } from '$lib/helpers/timeConversion';
import { timer } from '$lib/actions/timer';
@@ -102,14 +100,14 @@
<div>
<div class="u-flex u-gap-12 u-cross-center">
<p><b>Function ID: </b></p>
<Output value={$func.$id}><b>{$func.$id}</b></Output>
<Id value={$func.$id}><b>{$func.$id}</b></Id>
</div>
<div class="u-flex u-gap-12 u-cross-center">
<p>Deployment ID:</p>
<Output value={$func.deployment}>
<Id value={$func.deployment}>
{$func.deployment}
</Output>
</Id>
</div>
</div>
</div>
@@ -158,7 +156,7 @@
{#if data.deployments.total > 1 || (!activeDeployment && data.deployments.total === 1)}
<TableScroll>
<TableHeader>
<TableCellHead width={90}>Deployment ID</TableCellHead>
<TableCellHead width={150}>Deployment ID</TableCellHead>
<TableCellHead width={140}>Created</TableCellHead>
<TableCellHead width={100}>Status</TableCellHead>
<TableCellHead width={100}>Build Time</TableCellHead>
@@ -169,25 +167,20 @@
{#each data.deployments.deployments as deployment, index}
{#if deployment.$id !== $func.deployment}
<TableRow>
<TableCell title="Deployment ID">
<Copy value={deployment.$id}>
<Pill button trim>
<span class="icon-duplicate" aria-hidden="true" />
<span class="text u-trim">{deployment.$id}</span>
</Pill>
</Copy>
<TableCell width={150} title="Deployment ID">
<Id value={deployment.$id}>{deployment.$id}</Id>
</TableCell>
<TableCellText title="Created">
<TableCellText width={140} title="Created">
{toLocaleDateTime(deployment.$createdAt)}
</TableCellText>
<TableCell title="Status">
<TableCell width={100} title="Status">
<Status status={deployment.status}>
{deployment.status}
</Status>
</TableCell>
<TableCellText title="Build Time">
<TableCellText width={100} title="Build Time">
{#if ['processing', 'building'].includes(deployment.status)}
<span use:timer={{ start: deployment.$createdAt }} />
{:else}
@@ -195,11 +188,11 @@
{/if}
</TableCellText>
<TableCellText title="Size">
<TableCellText width={70} title="Size">
{calculateSize(deployment.size)}
</TableCellText>
<TableCell showOverflow>
<TableCell width={25} showOverflow>
<DropList
bind:show={showDropdown[index]}
placement="bottom-start"
@@ -1,6 +1,6 @@
<script lang="ts">
import { invalidate } from '$app/navigation';
import { Copy, EmptySearch, Heading, PaginationWithLimit, Status } from '$lib/components';
import { EmptySearch, Heading, Id, PaginationWithLimit, Status } from '$lib/components';
import { Dependencies } from '$lib/constants';
import { Pill } from '$lib/elements';
import { Button } from '$lib/elements/forms';
@@ -57,7 +57,7 @@
{#if data.executions.total}
<TableScroll>
<TableHeader>
<TableCellHead width={90}>Execution ID</TableCellHead>
<TableCellHead width={150}>Execution ID</TableCellHead>
<TableCellHead width={140}>Created</TableCellHead>
<TableCellHead width={110}>Status</TableCellHead>
<TableCellHead width={90}>Trigger</TableCellHead>
@@ -67,31 +67,26 @@
<TableBody>
{#each data.executions.executions as execution}
<TableRow>
<TableCell title="Execution ID">
<Copy value={execution.$id}>
<Pill button trim>
<span class="icon-duplicate" aria-hidden="true" />
<span class="text u-trim">{execution.$id}</span>
</Pill>
</Copy>
<TableCell width={150} title="Execution ID">
<Id value={execution.$id}>{execution.$id}</Id>
</TableCell>
<TableCellText title="Created">
<TableCellText width={140} title="Created">
{toLocaleDateTime(execution.$createdAt)}
</TableCellText>
<TableCellText title="Status">
<TableCellText width={110} title="Status">
<Status status={execution.status}>
{execution.status}
</Status>
</TableCellText>
<TableCellText title="Trigger">
<TableCellText width={90} title="Trigger">
<Pill>
<span class="text u-trim">{execution.trigger}</span>
</Pill>
</TableCellText>
<TableCellText title="Duration">
<TableCellText width={80} title="Duration">
{calculateTime(execution.duration)}
</TableCellText>
<TableCell>
<TableCell width={50}>
<Button
secondary
event="view_logs"
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy, Tab, Tabs } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id, Tab, Tabs } from '$lib/components';
import { isTabSelected } from '$lib/helpers/load';
import { Cover, CoverTitle } from '$lib/layout';
import { func } from './store';
@@ -41,12 +40,7 @@
<CoverTitle href={`/console/project-${projectId}/functions`}>
{$func?.name}
</CoverTitle>
<Copy value={$func?.$id} event="function">
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
Function ID
</Pill>
</Copy>
<Id value={$func?.$id} event="function">Function ID</Id>
</svelte:fragment>
<Tabs>
@@ -1,6 +1,5 @@
<script lang="ts">
import { Copy } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id } from '$lib/components';
import { Cover, CoverTitle } from '$lib/layout';
import { project } from '../store';
</script>
@@ -10,11 +9,6 @@
<CoverTitle>
{$project?.name}
</CoverTitle>
<Copy value={$project.$id}>
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
Project ID
</Pill>
</Copy>
<Id value={$project.$id}>{$project.$id}</Id>
</svelte:fragment>
</Cover>
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id } from '$lib/components';
import { Cover, CoverTitle } from '$lib/layout';
import { key } from './store';
@@ -13,11 +12,6 @@
<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
</Pill>
</Copy>
<Id value={$key?.secret}>API Key Secret</Id>
</svelte:fragment>
</Cover>
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id } from '$lib/components';
import { Cover, CoverTitle } from '$lib/layout';
import { webhook } from './store';
@@ -13,11 +12,6 @@
<CoverTitle href={`/console/project-${projectId}/settings/webhooks`}>
{$webhook?.name}
</CoverTitle>
<Copy value={$webhook?.$id} event="webhook">
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
Webhook ID
</Pill>
</Copy>
<Id value={$webhook?.$id} event="webhook">Webhook ID</Id>
</svelte:fragment>
</Cover>
@@ -4,11 +4,11 @@
import { Button } from '$lib/elements/forms';
import {
Empty,
Copy,
GridItem1,
CardContainer,
Heading,
PaginationWithLimit
PaginationWithLimit,
Id
} from '$lib/components';
import { Pill } from '$lib/elements';
import Create from './create.svelte';
@@ -54,9 +54,7 @@
{/if}
</svelte:fragment>
<Copy value={bucket.$id}>
<Pill button><i class="icon-duplicate" />Bucket ID</Pill>
</Copy>
<Id value={bucket.$id}>{bucket.$id}</Id>
<svelte:fragment slot="icons">
<li>
@@ -1,8 +1,7 @@
<script lang="ts">
import { CardGrid, Box, Copy, Heading, Alert } from '$lib/components';
import { CardGrid, Box, Heading, Alert, Id } from '$lib/components';
import { Container } from '$lib/layout';
import { Button } from '$lib/elements/forms';
import { Pill } from '$lib/elements';
import { file } from './store';
import { toLocaleDate, toLocaleDateTime } from '$lib/helpers/date';
import { sdk } from '$lib/stores/sdk';
@@ -90,9 +89,7 @@
</a>
<div class="u-flex u-flex-vertical u-gap-16">
<Heading tag="h2" size="7">{$file.name}</Heading>
<Copy value={getView($file.$id)}>
<Pill button><i class="icon-duplicate" />File URL</Pill>
</Copy>
<Id value={getView($file.$id)}>File URL</Id>
</div>
</div>
<svelte:fragment slot="aside">
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id } from '$lib/components';
import { Cover, CoverTitle } from '$lib/layout';
import { file } from './store';
@@ -14,11 +13,6 @@
<CoverTitle href={`/console/project-${projectId}/storage/bucket-${bucketId}`}>
{$file?.name}
</CoverTitle>
<Copy value={$file?.$id} event="file">
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
File ID
</Pill>
</Copy>
<Id value={$file?.$id} event="file">{$file?.$id}</Id>
</svelte:fragment>
</Cover>
@@ -1,7 +1,6 @@
<script lang="ts">
import { page } from '$app/stores';
import { Copy, Tab, Tabs } from '$lib/components';
import { Pill } from '$lib/elements';
import { Id, Tab, Tabs } from '$lib/components';
import { isTabSelected } from '$lib/helpers/load';
import { Cover, CoverTitle } from '$lib/layout';
import { bucket } from './store';
@@ -35,12 +34,7 @@
<CoverTitle href={`/console/project-${projectId}/storage`}>
{$bucket?.name}
</CoverTitle>
<Copy value={$bucket?.$id} event="bucket">
<Pill button>
<span class="icon-duplicate" aria-hidden="true" />
Bucket ID
</Pill>
</Copy>
<Id value={$bucket?.$id} event="bucket">Bucket ID</Id>
</svelte:fragment>
<Tabs>