Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/components/fakeModal.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Alert } from '$lib/components';
import { Alert } from '@appwrite.io/pink-svelte';
import { onMount } from 'svelte';
import Form from '$lib/elements/forms/form.svelte';
import { Click, trackEvent } from '$lib/actions/analytics';
Expand Down Expand Up @@ -112,14 +112,14 @@
<div class="modal-content">
<div class="modal-content-spacer u-flex-vertical u-gap-24 u-width-full-line">
{#if error}
<Alert
<Alert.Inline
status="warning"
dismissible
type="warning"
on:dismiss={() => {
error = null;
}}>
{error}
</Alert>
</Alert.Inline>
{/if}
<slot />
</div>
Expand Down
11 changes: 6 additions & 5 deletions src/lib/layout/containerHeader.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<script lang="ts">
import { Alert, DropList } from '$lib/components';
import { DropList } from '$lib/components';
import { BillingPlan } from '$lib/constants';
import { Link, Pill } from '$lib/elements';
import { Alert } from '@appwrite.io/pink-svelte';
import {
checkForProjectLimitation,
checkForUsageFees,
Expand Down Expand Up @@ -95,24 +96,24 @@
{#if services.length}
<slot name="alert" {limit} {tier} {title} {upgradeMethod} {hasUsageFees} {services}>
{#if $organization?.billingPlan !== BillingPlan.FREE && hasUsageFees}
<Alert type="info" isStandalone>
<Alert.Inline status="info">
<span class="text">
You've reached the {services} limit for the {tier} plan.
<Link on:mousedown={() => ($showUsageRatesModal = true)}
>Excess usage fees will apply</Link
>.
</span>
</Alert>
</Alert.Inline>
{:else}
<Alert type={alertType} isStandalone>
<Alert.Inline status={alertType === 'default' ? 'info' : alertType}>
<span class="text">
You've reached the {services} limit for the {tier} plan. <Link
href={$upgradeURL}
event="organization_upgrade"
eventData={{ from: 'event', source: 'inline_alert' }}>Upgrade</Link> your
organization for additional resources.
</span>
</Alert>
</Alert.Inline>
{/if}
</slot>
{/if}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<script lang="ts">
import { Alert } from '$lib/components';
import { Alert } from '@appwrite.io/pink-svelte';
import type { EstimationDeleteOrganization } from '$lib/sdk/billing';
import InvoicesTable from './invoicesTable.svelte';
export let estimation: EstimationDeleteOrganization;
</script>

{#if estimation}
{#if estimation.unpaidInvoices?.length > 0}
<Alert type="warning">
<Alert.Inline status="warning">
This organization has unresolved invoices that must be settled before it can be deleted.
Please review and resolve these invoices to proceed.
</Alert>
</Alert.Inline>

<InvoicesTable invoices={estimation.unpaidInvoices} showActions={false} />
{/if}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { CardGrid, BoxAvatar, Alert } from '$lib/components';
import { CardGrid, BoxAvatar } from '$lib/components';
import { Container } from '$lib/layout';
import { Button } from '$lib/elements/forms';
import { sdk } from '$lib/stores/sdk';
Expand All @@ -14,6 +14,7 @@
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
import { collection } from '../../store';
import { page } from '$app/stores';
import { Alert } from '@appwrite.io/pink-svelte';

let showDelete = false;
let permissions = $doc?.$permissions;
Expand Down Expand Up @@ -85,27 +86,23 @@
<svelte:fragment slot="aside">
{#if $collection.documentSecurity}
{#if showPermissionAlert}
<Alert type="info" dismissible on:dismiss={() => (showPermissionAlert = false)}>
<svelte:fragment slot="title">Document security is enabled</svelte:fragment>
<p class="text">
Users will be able to access this document if they have been granted <b
>either document or collection permissions.
</b>
</p>
</Alert>
<Alert.Inline
status="info"
title="Document security is enabled"
dismissible
on:dismiss={() => (showPermissionAlert = false)}>
Users will be able to access this document if they have been granted <b
>either document or collection permissions.</b>
</Alert.Inline>
{/if}
{#if permissions}
<Permissions bind:permissions />
{/if}
{:else}
<Alert type="info">
<svelte:fragment slot="title">Document security is disabled</svelte:fragment>
<p class="text">
If you want to assign document permissions. Go to Collection settings and
enable document security. Otherwise, only collection permissions will be
used.
</p>
</Alert>
<Alert.Inline status="info" title="Document security is disabled">
If you want to assign document permissions. Go to Collection settings and enable
document security. Otherwise, only collection permissions will be used.
</Alert.Inline>
{/if}
</svelte:fragment>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import { base } from '$app/paths';
import { page } from '$app/state';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import { Alert, Confirm, Id } from '$lib/components';
import { Confirm, Id } from '$lib/components';
import { Alert } from '@appwrite.io/pink-svelte';
import { Dependencies } from '$lib/constants';
import { Button as ConsoleButton, InputChoice } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
Expand Down Expand Up @@ -343,7 +344,8 @@
{/each}
</Table.Root>
<div class="u-flex u-flex-vertical u-gap-16">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets use the Layout.Stack here.

<Alert>To change the selection edit the relationship settings.</Alert>
<Alert.Inline status="info"
>To change the selection edit the relationship settings.</Alert.Inline>

<ul>
<InputChoice id="delete" label="Delete" showLabel={false} bind:value={checked}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import { sdk } from '$lib/stores/sdk';
import { Dependencies } from '$lib/constants';
import { invalidate } from '$app/navigation';
import { Alert } from '$lib/components';
import { Alert } from '@appwrite.io/pink-svelte';
import { Button } from '$lib/elements/forms';
import { Click, trackEvent } from '$lib/actions/analytics';
import UpdateRepository from './updateRepository.svelte';
Expand Down Expand Up @@ -55,35 +55,33 @@

<Container>
{#if data.function.version === 'v2' && showAlert}
<Alert
type="warning"
dismissible
class="u-margin-block-start-24"
on:dismiss={() => (showAlert = false)}>
<svelte:fragment slot="title">Your function is outdated</svelte:fragment>
Update your function version to make use of new features including build commands and HTTP
data in your executions. To update, follow the steps outlined in our
<a
href="https://appwrite.io/docs/products/functions/development"
target="_blank"
rel="noopener noreferrer"
class="link">documentation</a
>.
<svelte:fragment slot="buttons">
<Button
on:click={() =>
trackEvent(Click.WebsiteOpenClick, {
from: 'button',
source: 'function_keys_card',
destination: 'docs'
})}
<div class="u-margin-block-start-24">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this margin here?

<Alert.Inline status="warning" dismissible on:dismiss={() => (showAlert = false)}>
<svelte:fragment slot="title">Your function is outdated</svelte:fragment>
Update your function version to make use of new features including build commands and
HTTP data in your executions. To update, follow the steps outlined in our
<a
href="https://appwrite.io/docs/products/functions/development"
external
text>
Learn more
</Button>
</svelte:fragment>
</Alert>
target="_blank"
rel="noopener noreferrer"
class="link">documentation</a
>.
<svelte:fragment slot="actions">
<Button
on:click={() =>
trackEvent(Click.WebsiteOpenClick, {
from: 'button',
source: 'function_keys_card',
destination: 'docs'
})}
href="https://appwrite.io/docs/products/functions/development"
external
text>
Learn more
</Button>
</svelte:fragment>
</Alert.Inline>
</div>
{/if}
<ExecuteFunction />
<UpdateName />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { Modal } from '$lib/components';
import Alert from '$lib/components/alert.svelte';
import { Alert } from '@appwrite.io/pink-svelte';
import { Button } from '$lib/elements/forms';
import type { Models } from '@appwrite.io/console';
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
Expand Down Expand Up @@ -75,9 +75,9 @@
</Layout.Stack>
</Upload.Dropzone>
{#if variables?.length > 0}
<Alert type="info" dismissible>
<Alert.Inline status="info" dismissible>
This action can create and update variables but can not delete them.
</Alert>
</Alert.Inline>
{/if}
</Layout.Stack>
<Selector.Checkbox
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { Click, Submit, trackEvent } from '$lib/actions/analytics';
import { Alert, CardGrid } from '$lib/components';
import { CardGrid } from '$lib/components';
import { Alert } from '@appwrite.io/pink-svelte';
import { BillingPlan } from '$lib/constants';
import { Button, Form, InputNumber, InputSelect } from '$lib/elements/forms';
import { humanFileSize, sizeToBytes } from '$lib/helpers/sizeConvertion';
Expand Down Expand Up @@ -45,7 +46,7 @@
<svelte:fragment slot="aside">
{#if isCloud}
{@const size = humanFileSize(sizeToBytes(service, 'MB', 1000))}
<Alert type="info">
<Alert.Inline status="info">
<p class="text">
The {currentPlan.name} plan has a maximum upload file size limit of {Math.floor(
parseInt(size.value)
Expand All @@ -54,7 +55,7 @@
Upgrade to allow files of a larger size.
{/if}
</p>
<svelte:fragment slot="action">
<svelte:fragment slot="actions">
{#if $organization?.billingPlan === BillingPlan.FREE}
<div class="alert-buttons u-flex">
<Button
Expand All @@ -68,7 +69,7 @@
</div>
{/if}
</svelte:fragment>
</Alert>
</Alert.Inline>
{/if}
<InputNumber
required
Expand Down