Skip to content

Commit 2df7aae

Browse files
committed
fix: made some more components replaced with pink2
1 parent 8f9c726 commit 2df7aae

File tree

7 files changed

+30
-26
lines changed

7 files changed

+30
-26
lines changed

src/lib/components/fakeModal.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { Alert } from '$lib/components';
2+
import { Alert } from '@appwrite.io/pink-svelte';
33
import { onMount } from 'svelte';
44
import Form from '$lib/elements/forms/form.svelte';
55
import { Click, trackEvent } from '$lib/actions/analytics';
@@ -112,14 +112,14 @@
112112
<div class="modal-content">
113113
<div class="modal-content-spacer u-flex-vertical u-gap-24 u-width-full-line">
114114
{#if error}
115-
<Alert
115+
<Alert.Inline
116+
status="warning"
116117
dismissible
117-
type="warning"
118118
on:dismiss={() => {
119119
error = null;
120120
}}>
121121
{error}
122-
</Alert>
122+
</Alert.Inline>
123123
{/if}
124124
<slot />
125125
</div>

src/lib/layout/containerHeader.svelte

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<script lang="ts">
2-
import { Alert, DropList } from '$lib/components';
2+
import { DropList } from '$lib/components';
33
import { BillingPlan } from '$lib/constants';
44
import { Link, Pill } from '$lib/elements';
5+
import { Alert } from '@appwrite.io/pink-svelte';
56
import {
67
checkForProjectLimitation,
78
checkForUsageFees,
@@ -95,24 +96,24 @@
9596
{#if services.length}
9697
<slot name="alert" {limit} {tier} {title} {upgradeMethod} {hasUsageFees} {services}>
9798
{#if $organization?.billingPlan !== BillingPlan.FREE && hasUsageFees}
98-
<Alert type="info" isStandalone>
99+
<Alert.Inline status="info">
99100
<span class="text">
100101
You've reached the {services} limit for the {tier} plan.
101102
<Link on:mousedown={() => ($showUsageRatesModal = true)}
102103
>Excess usage fees will apply</Link
103104
>.
104105
</span>
105-
</Alert>
106+
</Alert.Inline>
106107
{:else}
107-
<Alert type={alertType} isStandalone>
108+
<Alert.Inline status={alertType === 'default' ? 'info' : alertType}>
108109
<span class="text">
109110
You've reached the {services} limit for the {tier} plan. <Link
110111
href={$upgradeURL}
111112
event="organization_upgrade"
112113
eventData={{ from: 'event', source: 'inline_alert' }}>Upgrade</Link> your
113114
organization for additional resources.
114115
</span>
115-
</Alert>
116+
</Alert.Inline>
116117
{/if}
117118
</slot>
118119
{/if}

src/routes/(console)/organization-[organization]/settings/deleteOrganizationEstimation.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<script lang="ts">
2-
import { Alert } from '$lib/components';
2+
import { Alert } from '@appwrite.io/pink-svelte';
33
import type { EstimationDeleteOrganization } from '$lib/sdk/billing';
44
import InvoicesTable from './invoicesTable.svelte';
55
export let estimation: EstimationDeleteOrganization;
66
</script>
77

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

1515
<InvoicesTable invoices={estimation.unpaidInvoices} showActions={false} />
1616
{/if}

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/table.svelte

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import { base } from '$app/paths';
44
import { page } from '$app/state';
55
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
6-
import { Alert, Confirm, Id } from '$lib/components';
6+
import { Confirm, Id } from '$lib/components';
7+
import { Alert } from '@appwrite.io/pink-svelte';
78
import { Dependencies } from '$lib/constants';
89
import { Button as ConsoleButton, InputChoice } from '$lib/elements/forms';
910
import { addNotification } from '$lib/stores/notifications';
@@ -343,7 +344,8 @@
343344
{/each}
344345
</Table.Root>
345346
<div class="u-flex u-flex-vertical u-gap-16">
346-
<Alert>To change the selection edit the relationship settings.</Alert>
347+
<Alert.Inline status="info"
348+
>To change the selection edit the relationship settings.</Alert.Inline>
347349

348350
<ul>
349351
<InputChoice id="delete" label="Delete" showLabel={false} bind:value={checked}>

src/routes/(console)/project-[region]-[project]/functions/function-[function]/settings/+page.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import { sdk } from '$lib/stores/sdk';
1414
import { Dependencies } from '$lib/constants';
1515
import { invalidate } from '$app/navigation';
16-
import { Alert } from '$lib/components';
16+
import { Alert } from '@appwrite.io/pink-svelte';
1717
import { Button } from '$lib/elements/forms';
1818
import { Click, trackEvent } from '$lib/actions/analytics';
1919
import UpdateRepository from './updateRepository.svelte';
@@ -55,8 +55,8 @@
5555

5656
<Container>
5757
{#if data.function.version === 'v2' && showAlert}
58-
<Alert
59-
type="warning"
58+
<Alert.Inline
59+
status="warning"
6060
dismissible
6161
class="u-margin-block-start-24"
6262
on:dismiss={() => (showAlert = false)}>
@@ -69,7 +69,7 @@
6969
rel="noopener noreferrer"
7070
class="link">documentation</a
7171
>.
72-
<svelte:fragment slot="buttons">
72+
<svelte:fragment slot="actions">
7373
<Button
7474
on:click={() =>
7575
trackEvent(Click.WebsiteOpenClick, {
@@ -83,7 +83,7 @@
8383
Learn more
8484
</Button>
8585
</svelte:fragment>
86-
</Alert>
86+
</Alert.Inline>
8787
{/if}
8888
<ExecuteFunction />
8989
<UpdateName />

src/routes/(console)/project-[region]-[project]/sites/create-site/importSiteVariablesModal.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts">
22
import { Modal } from '$lib/components';
3-
import Alert from '$lib/components/alert.svelte';
3+
import { Alert } from '@appwrite.io/pink-svelte';
44
import { Button } from '$lib/elements/forms';
55
import type { Models } from '@appwrite.io/console';
66
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
@@ -75,9 +75,9 @@
7575
</Layout.Stack>
7676
</Upload.Dropzone>
7777
{#if variables?.length > 0}
78-
<Alert type="info" dismissible>
78+
<Alert.Inline status="info" dismissible>
7979
This action can create and update variables but can not delete them.
80-
</Alert>
80+
</Alert.Inline>
8181
{/if}
8282
</Layout.Stack>
8383
<Selector.Checkbox

src/routes/(console)/project-[region]-[project]/storage/bucket-[bucket]/settings/updateMaxFileSize.svelte

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script lang="ts">
22
import { Click, Submit, trackEvent } from '$lib/actions/analytics';
3-
import { Alert, CardGrid } from '$lib/components';
3+
import { CardGrid } from '$lib/components';
4+
import { Alert } from '@appwrite.io/pink-svelte';
45
import { BillingPlan } from '$lib/constants';
56
import { Button, Form, InputNumber, InputSelect } from '$lib/elements/forms';
67
import { humanFileSize, sizeToBytes } from '$lib/helpers/sizeConvertion';
@@ -45,7 +46,7 @@
4546
<svelte:fragment slot="aside">
4647
{#if isCloud}
4748
{@const size = humanFileSize(sizeToBytes(service, 'MB', 1000))}
48-
<Alert type="info">
49+
<Alert.Inline status="info">
4950
<p class="text">
5051
The {currentPlan.name} plan has a maximum upload file size limit of {Math.floor(
5152
parseInt(size.value)
@@ -54,7 +55,7 @@
5455
Upgrade to allow files of a larger size.
5556
{/if}
5657
</p>
57-
<svelte:fragment slot="action">
58+
<svelte:fragment slot="actions">
5859
{#if $organization?.billingPlan === BillingPlan.FREE}
5960
<div class="alert-buttons u-flex">
6061
<Button
@@ -68,7 +69,7 @@
6869
</div>
6970
{/if}
7071
</svelte:fragment>
71-
</Alert>
72+
</Alert.Inline>
7273
{/if}
7374
<InputNumber
7475
required

0 commit comments

Comments
 (0)