chore: replaced heading with component

This commit is contained in:
Arman committed 2022-10-19 11:13:44 +02:00
1 parent cff4f8e473
commit ce16505c13
7 files changed
+31 -30

No files matched your search

@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import { Button } from '$lib/elements/forms';
import { Empty, CardContainer, Pagination, Copy, GridItem1 } from '$lib/components';
import { Empty, CardContainer, Pagination, Copy, GridItem1, Heading } from '$lib/components';
import { Pill } from '$lib/elements';
import type { Models } from '@aw-labs/appwrite-console';
import Create from './createFunction.svelte';
@@ -44,8 +44,7 @@
<Container>
<div class="u-flex u-gap-12 common-section u-main-space-between">
<h2 class="heading-level-5">Functions</h2>
<Heading tag="h2" size="5">Functions</Heading>
<Button on:click={openWizard}>
<span class="icon-plus" aria-hidden="true" /> <span class="text">Create function</span>
</Button>
@@ -9,7 +9,8 @@
DropList,
DropListItem,
Empty,
Status
Status,
Heading
} from '$lib/components';
import {
Table,
@@ -56,8 +57,7 @@
<Container>
<div class="u-flex u-gap-12 common-section u-main-space-between">
<h2 class="heading-level-5">Deployments</h2>
<Heading tag="h2" size="5">Deployments</Heading>
<Button on:click={() => (showCreate = true)}>
<span class="icon-plus" aria-hidden="true" />
<span class="text">Create deployment</span>
@@ -65,7 +65,7 @@
</div>
{#if $deploymentList?.total}
<div class="common-section">
<h2 class="heading-level-7">Active</h2>
<Heading tag="h3" size="7">Active</Heading>
</div>
{#if activeDeployment}
<CardGrid>
@@ -131,7 +131,7 @@
{/if}
<div class="common-section">
<h2 class="heading-level-7">Inactive</h2>
<Heading tag="h3" size="7">Inactive</Heading>
</div>
<Table>
@@ -6,7 +6,7 @@
import { Container } from '$lib/layout';
import { Button } from '$lib/elements/forms';
import { Pill } from '$lib/elements';
import { Pagination, Copy, Empty, Status } from '$lib/components';
import { Pagination, Copy, Empty, Status, Heading } from '$lib/components';
import {
Table,
TableHeader,
@@ -33,7 +33,7 @@
<Container>
<div class="u-flex u-gap-12 common-section u-main-space-between">
<h2 class="heading-level-5">Logs</h2>
<Heading tag="h2" size="5">Logs</Heading>
</div>
{#if $executionList?.total}
<Table>
@@ -28,6 +28,7 @@
import { difference } from '$lib/helpers/array';
import TableList from '$lib/elements/table/tableList.svelte';
import { TableCell, TableCellText } from '$lib/elements/table';
import Heading from '$lib/components/heading.svelte';
const functionId = $page.params.function;
let showDelete = false;
@@ -247,7 +248,8 @@
alt="technology" />
</div>
<div>
<h6 class="heading-level-7">{$func.name}</h6>
<Heading tag="h6" size="7">{$func.name}</Heading>
<p>{$func.runtime}</p>
</div>
</div>
@@ -273,7 +275,7 @@
<Form on:submit={updateName}>
<CardGrid>
<h6 class="heading-level-7">Update Name</h6>
<Heading tag="h6" size="7">Update Name</Heading>
<svelte:fragment slot="aside">
<ul>
@@ -296,7 +298,7 @@
<Form on:submit={updatePermissions}>
<CardGrid>
<h6 class="heading-level-7">Execute Access</h6>
<Heading tag="h6" size="7">Execute Access</Heading>
<p>
Choose who can execute this function using the client API. For more information,
check out the Permissions Guide in our documentation.
@@ -313,7 +315,7 @@
<Form on:submit={updateEvents}>
<CardGrid>
<h6 class="heading-level-7">Update Events</h6>
<Heading tag="h6" size="7">Update Events</Heading>
<p>Set the events that will trigger your function. Maximum 100 events allowed.</p>
<svelte:fragment slot="aside">
{#if eventSet.size}
@@ -359,7 +361,7 @@
<Form on:submit={() => console.log($func.schedule)}>
<CardGrid>
<h2 class="heading-level-6">Update CRON Schedule</h2>
<Heading tag="h6" size="7">Update CRON Schedule</Heading>
<p>
Set a CRON schedule to trigger your function. Leave blank for no schedule. <a
href="#/"
@@ -385,7 +387,7 @@
<Form on:submit={updateTimeout}>
<CardGrid>
<h2 class="heading-level-6">Update Timeout</h2>
<Heading tag="h6" size="7">Update Timeout</Heading>
<p>
Limit the execution time of your function. Maximum value is 900 seconds (15
minutes).
@@ -408,7 +410,7 @@
</Form>
<CardGrid>
<h2 class="heading-level-6">Update Function Variables</h2>
<Heading tag="h6" size="7">Update Function Variables</Heading>
<p>Set the variables (or secret keys) that will be passed to your function at runtime.</p>
<svelte:fragment slot="aside">
<div class="u-flex u-margin-inline-start-auto u-gap-16">
@@ -527,7 +529,7 @@
</CardGrid>
<CardGrid>
<h6 class="heading-level-7">Delete Function</h6>
<Heading tag="h6" size="7">Delete Function</Heading>
<p>
The function will be permanently deleted, including all deployments associated with it.
This action is irreversible.
@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import { tooltip } from '$lib/actions/tooltip';
import { Empty } from '$lib/components';
import { Empty, Heading } from '$lib/components';
import { Pill } from '$lib/elements';
import { Button } from '$lib/elements/forms';
import {
@@ -58,7 +58,7 @@
<Container>
<div class="u-flex u-gap-12 common-section u-main-space-between">
<h2 class="heading-level-5">Custom Domains</h2>
<Heading tag="h2" size="5">Custom Domains</Heading>
<Button on:click={openWizard}>
<span class="icon-plus" aria-hidden="true" /> <span class="text">Create domain</span>
@@ -18,6 +18,7 @@
import { wizard } from '$lib/stores/wizard';
import Create from './createWebhook.svelte';
import { webhookList } from './store';
import Heading from '$lib/components/heading.svelte';
function openWizard() {
wizard.start(Create);
@@ -37,8 +38,7 @@
</svelte:head>
<Container>
<div class="u-flex u-gap-12 common-section u-main-space-between">
<h2 class="heading-level-5">Webhooks</h2>
<Heading tag="h2" size="5">Webhooks</Heading>
<Button on:click={openWizard}>
<span class="icon-plus" aria-hidden="true" /> <span class="text">Create webhook</span>
</Button>
@@ -1,6 +1,6 @@
<script lang="ts">
import { onMount } from 'svelte';
import { CardGrid, Box, Secret, Empty, EventModal } from '$lib/components';
import { CardGrid, Box, Secret, Empty, EventModal, Heading } from '$lib/components';
import {
Button,
Form,
@@ -142,7 +142,7 @@
<Container>
<CardGrid>
<h6 class="heading-level-7">Signature Key</h6>
<Heading tag="h2" size="7">Signature Key</Heading>
<p>You can use the Signature Key to validate your webhooks.</p>
<svelte:fragment slot="aside">
<div>
@@ -157,7 +157,7 @@
</CardGrid>
<Form on:submit={updateName}>
<CardGrid>
<h6 class="heading-level-7">Update Name</h6>
<Heading tag="h2" size="7">Update Name</Heading>
<p>Choose any name that will help you distinguish between Webhooks.</p>
<svelte:fragment slot="aside">
<FormList>
@@ -178,7 +178,7 @@
<Form on:submit={updateUrl}>
<CardGrid>
<h6 class="heading-level-7">Update Url</h6>
<Heading tag="h2" size="7">Update Url</Heading>
<svelte:fragment slot="aside">
<FormList>
@@ -199,7 +199,7 @@
<Form on:submit={updateEvents}>
<CardGrid>
<h6 class="heading-level-7">Update Events</h6>
<Heading tag="h2" size="7">Update Events</Heading>
<p class="text">
Set the events that will trigger your webhook. Maximum 100 events allowed.
</p>
@@ -243,7 +243,7 @@
<Form on:submit={updateSecurity}>
<CardGrid>
<h6 class="heading-level-7">Security</h6>
<Heading tag="h2" size="7">Security</Heading>
<p class="text">
Set an optional basic HTTP authentication username and password to protect your
endpoint from unauthorized access.
@@ -251,7 +251,7 @@
<svelte:fragment slot="aside">
<FormList>
<div>
<h2 class="heading-level-7">HTTP Authentication</h2>
<Heading tag="h3" size="7">HTTP Authentication</Heading>
<p class="text">Use to secure your endpoint from untrusted sources.</p>
</div>
<InputText
@@ -291,7 +291,7 @@
<CardGrid>
<div>
<h6 class="heading-level-7">Delete Webhook</h6>
<Heading tag="h2" size="7">Delete Webhook</Heading>
</div>
<p>The webhook will be permanently deleted. This action is irreversible.</p>
<svelte:fragment slot="aside">