mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: add View source button to template detail page
This commit is contained in:
@@ -62,6 +62,9 @@
|
||||
</Typography.Text>
|
||||
</Layout.Stack>
|
||||
</Layout.Stack>
|
||||
<Layout.Stack gap="s">
|
||||
<slot name="framework-actions" />
|
||||
</Layout.Stack>
|
||||
{/if}
|
||||
|
||||
{#if domain && showAfter}
|
||||
|
||||
+15
@@ -37,6 +37,7 @@
|
||||
import { connectGitHub } from '$lib/stores/git';
|
||||
import { getFrameworkIcon } from '$lib/stores/sites';
|
||||
import { regionalConsoleVariables } from '$routes/(console)/project-[region]-[project]/store';
|
||||
import { getTemplateSourceUrl } from '$lib/helpers/templateSource';
|
||||
|
||||
export let data;
|
||||
|
||||
@@ -351,6 +352,20 @@
|
||||
alt={data.template.name}
|
||||
ratio="16/9" />
|
||||
</Layout.Stack>
|
||||
|
||||
<svelte:fragment slot="framework-actions" >
|
||||
{@const sourceUrl = getTemplateSourceUrl(data.template)}
|
||||
{#if sourceUrl}
|
||||
<Button
|
||||
secondary
|
||||
size="s"
|
||||
external
|
||||
href={sourceUrl}>
|
||||
View source
|
||||
<Icon icon={IconExternalLink} slot="end" size="s" />
|
||||
</Button>
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
</Aside>
|
||||
</svelte:fragment>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user