mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat: add output copy to function and logs
This commit is contained in:
1 parent
326d8a2dd0
commit
99b767a142
4 files changed
+43
-5
No files matched your search
@@ -42,3 +42,4 @@ export { default as Tab } from './tab.svelte';
|
||||
export { default as EventModal } from './eventModal.svelte';
|
||||
export { default as Status } from './status.svelte';
|
||||
export { default as Heading } from './heading.svelte';
|
||||
export { default as Output } from './output.svelte';
|
||||
@@ -0,0 +1,17 @@
|
||||
<script lang="ts">
|
||||
import Copy from './copy.svelte';
|
||||
|
||||
export let value: string;
|
||||
</script>
|
||||
|
||||
<Copy {value}>
|
||||
<div class="interactive-text-output is-textarea">
|
||||
<span class="text u-line-height-1-5 u-break-word"><slot /></span>
|
||||
|
||||
<div class="u-flex u-cross-child-start u-gap-8">
|
||||
<button class="interactive-text-output-button" aria-label="copy text">
|
||||
<span class="icon-duplicate" aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</Copy>
|
||||
@@ -2,7 +2,7 @@
|
||||
import { toLocaleDateTime } from '$lib/helpers/date';
|
||||
import { humanFileSize } from '$lib/helpers/sizeConvertion';
|
||||
import { log } from '$lib/stores/logs';
|
||||
import { Status, Tab, Tabs } from '../components';
|
||||
import { Output, Status, Tab, Tabs } from '../components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { base } from '$app/paths';
|
||||
import { app } from '$lib/stores/app';
|
||||
@@ -68,7 +68,12 @@
|
||||
alt="technology" />
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="body-text-2">Deployment ID: {$log.data.$id}</h2>
|
||||
<div class="u-flex u-gap-12 u-cross-center">
|
||||
<h2 class="body-text-2">Deployment ID:</h2>
|
||||
<Output value={$log.data.$id}>
|
||||
{$log.data.$id}
|
||||
</Output>
|
||||
</div>
|
||||
<time class="u-block"
|
||||
>Created at: {toLocaleDateTime($log.data.$createdAt)}</time>
|
||||
<div>Size: {size.value} {size.unit}</div>
|
||||
@@ -131,7 +136,12 @@
|
||||
alt="technology" />
|
||||
</div>
|
||||
<div>
|
||||
<h2 class="body-text-2">Execution ID: {$log.data.$id}</h2>
|
||||
<div class="u-flex u-gap-12 u-cross-center">
|
||||
<h2 class="body-text-2">Execution ID:</h2>
|
||||
<Output value={$log.data.$id}>
|
||||
{$log.data.$id}
|
||||
</Output>
|
||||
</div>
|
||||
<time class="u-block">
|
||||
Created at: {toLocaleDateTime($log.data.$createdAt)}</time>
|
||||
</div>
|
||||
|
||||
+12
-2
@@ -37,6 +37,7 @@
|
||||
import { browser } from '$app/environment';
|
||||
import { sdkForConsole } from '$lib/stores/sdk';
|
||||
import { page } from '$app/stores';
|
||||
import Output from '$lib/components/output.svelte';
|
||||
|
||||
export let data: PageData;
|
||||
|
||||
@@ -98,8 +99,17 @@
|
||||
alt="technology" />
|
||||
</div>
|
||||
<div>
|
||||
<p><b>Function ID: {$func.$id} </b></p>
|
||||
<p>Deployment ID: {$func.deployment}</p>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="u-flex u-gap-12 u-cross-center">
|
||||
<p>Deployment ID:</p>
|
||||
<Output value={$func.deployment}>
|
||||
{$func.deployment}
|
||||
</Output>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<svelte:fragment slot="aside">
|
||||
|
||||
Reference in new issue
Block a user