mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
275 files changed
+1685
-2297
No files matched your search
@@ -4,13 +4,14 @@
|
||||
addPlatform
|
||||
} from '$routes/(console)/project-[project]/overview/platforms/+page.svelte';
|
||||
import Template from './template.svelte';
|
||||
import { IconAndroid, IconApple, IconCode, IconFlutter } from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
let search = '';
|
||||
|
||||
let platforms = [
|
||||
{
|
||||
label: 'Web',
|
||||
icon: 'code',
|
||||
icon: IconCode,
|
||||
group: 'platforms',
|
||||
callback: () => {
|
||||
addPlatform(Platform.Web);
|
||||
@@ -18,7 +19,7 @@
|
||||
},
|
||||
{
|
||||
label: 'Flutter',
|
||||
icon: 'flutter',
|
||||
icon: IconFlutter,
|
||||
group: 'platforms',
|
||||
callback: () => {
|
||||
addPlatform(Platform.Flutter);
|
||||
@@ -26,7 +27,7 @@
|
||||
},
|
||||
{
|
||||
label: 'Android',
|
||||
icon: 'android',
|
||||
icon: IconAndroid,
|
||||
group: 'platforms',
|
||||
callback: () => {
|
||||
addPlatform(Platform.Android);
|
||||
@@ -34,7 +35,7 @@
|
||||
},
|
||||
{
|
||||
label: 'Apple',
|
||||
icon: 'apple',
|
||||
icon: IconApple,
|
||||
group: 'platforms',
|
||||
callback: () => {
|
||||
addPlatform(Platform.Apple);
|
||||
|
||||
@@ -7,6 +7,13 @@ import type { Command, Searcher } from '../commands';
|
||||
import { addSubPanel } from '../subPanels';
|
||||
import { FilesPanel } from '../panels';
|
||||
import { base } from '$app/paths';
|
||||
import {
|
||||
IconFolder,
|
||||
IconKey,
|
||||
IconLockClosed,
|
||||
IconPuzzle,
|
||||
IconSearch
|
||||
} from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
const getBucketCommand = (bucket: Models.Bucket, projectId: string) => {
|
||||
return {
|
||||
@@ -15,7 +22,7 @@ const getBucketCommand = (bucket: Models.Bucket, projectId: string) => {
|
||||
goto(`${base}/project-${projectId}/storage/bucket-${bucket.$id}`);
|
||||
},
|
||||
group: 'buckets',
|
||||
icon: 'folder'
|
||||
icon: IconFolder
|
||||
} satisfies Command;
|
||||
};
|
||||
|
||||
@@ -37,7 +44,7 @@ export const bucketSearcher = (async (query: string) => {
|
||||
},
|
||||
group: 'buckets',
|
||||
nested: true,
|
||||
icon: 'search',
|
||||
icon: IconSearch,
|
||||
keepOpen: true
|
||||
},
|
||||
{
|
||||
@@ -50,7 +57,7 @@ export const bucketSearcher = (async (query: string) => {
|
||||
},
|
||||
group: 'buckets',
|
||||
nested: true,
|
||||
icon: 'key'
|
||||
icon: IconKey
|
||||
},
|
||||
{
|
||||
label: 'Extensions',
|
||||
@@ -61,7 +68,7 @@ export const bucketSearcher = (async (query: string) => {
|
||||
},
|
||||
group: 'buckets',
|
||||
nested: true,
|
||||
icon: 'puzzle'
|
||||
icon: IconPuzzle
|
||||
},
|
||||
{
|
||||
label: 'File Security',
|
||||
@@ -73,7 +80,7 @@ export const bucketSearcher = (async (query: string) => {
|
||||
},
|
||||
group: 'buckets',
|
||||
nested: true,
|
||||
icon: 'lock-closed'
|
||||
icon: IconLockClosed
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { get } from 'svelte/store';
|
||||
import type { Searcher } from '../commands';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { base } from '$app/paths';
|
||||
import { IconDatabase } from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
export const dbSearcher = (async (query: string) => {
|
||||
const { databases } = await sdk.forProject.databases.list();
|
||||
@@ -18,7 +19,7 @@ export const dbSearcher = (async (query: string) => {
|
||||
callback: () => {
|
||||
goto(`${base}/project-${get(project).$id}/databases/database-${db.$id}`);
|
||||
},
|
||||
icon: 'database'
|
||||
icon: IconDatabase
|
||||
}) as const
|
||||
);
|
||||
}) satisfies Searcher;
|
||||
@@ -6,6 +6,7 @@ import { Query } from '@appwrite.io/console';
|
||||
import { goto } from '$app/navigation';
|
||||
import { project } from '$routes/(console)/project-[project]/store';
|
||||
import { base } from '$app/paths';
|
||||
import { IconDocument } from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
export const fileSearcher = (async (query: string) => {
|
||||
const $bucket = get(bucket);
|
||||
@@ -22,7 +23,7 @@ export const fileSearcher = (async (query: string) => {
|
||||
callback: () => {
|
||||
goto(`${base}/project-${$project.$id}/storage/bucket-${$bucket.$id}/file-${file.$id}`);
|
||||
},
|
||||
icon: 'document',
|
||||
icon: IconDocument,
|
||||
group: 'files'
|
||||
}));
|
||||
}) satisfies Searcher;
|
||||
@@ -3,32 +3,33 @@ import { project } from '$routes/(console)/project-[project]/store';
|
||||
import { get } from 'svelte/store';
|
||||
import { type Searcher } from '../commands';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { MessagingProviderType } from '@appwrite.io/console';
|
||||
import { MessagingProviderType, type Models } from '@appwrite.io/console';
|
||||
import { base } from '$app/paths';
|
||||
import { IconAnnotation, IconDeviceMobile, IconMail } from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
const getLabel = (message) => {
|
||||
const getLabel = (message: Models.Message) => {
|
||||
switch (message.providerType) {
|
||||
case MessagingProviderType.Push:
|
||||
return message.data.title;
|
||||
return message.data['title'];
|
||||
case MessagingProviderType.Sms:
|
||||
return message.data.content;
|
||||
return message.data['content'];
|
||||
case MessagingProviderType.Email:
|
||||
return message.data.subject;
|
||||
return message.data['subject'];
|
||||
default:
|
||||
return 'null';
|
||||
}
|
||||
};
|
||||
|
||||
const getIcon = (message) => {
|
||||
const getIcon = (message: Models.Message) => {
|
||||
switch (message.providerType) {
|
||||
case MessagingProviderType.Push:
|
||||
return 'device-mobile';
|
||||
return IconDeviceMobile;
|
||||
case MessagingProviderType.Sms:
|
||||
return 'annotation';
|
||||
return IconAnnotation;
|
||||
case MessagingProviderType.Email:
|
||||
return 'mail';
|
||||
return IconMail;
|
||||
default:
|
||||
return 'send';
|
||||
throw new Error('Unsupported provider type');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { get } from 'svelte/store';
|
||||
import type { Command, Searcher } from '../commands';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { base } from '$app/paths';
|
||||
import { IconUserCircle } from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
const getTeamCommand = (team: Models.Team<Models.Preferences>, projectId: string) =>
|
||||
({
|
||||
@@ -13,7 +14,7 @@ const getTeamCommand = (team: Models.Team<Models.Preferences>, projectId: string
|
||||
goto(`${base}/project-${projectId}/auth/teams/team-${team.$id}`);
|
||||
},
|
||||
group: 'teams',
|
||||
icon: 'user-circle'
|
||||
icon: IconUserCircle
|
||||
}) satisfies Command;
|
||||
|
||||
export const teamSearcher = (async (query: string) => {
|
||||
|
||||
@@ -4,6 +4,7 @@ import { get } from 'svelte/store';
|
||||
import type { Searcher } from '../commands';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { base } from '$app/paths';
|
||||
import { IconChevronRight } from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
export const topicsSearcher = (async (query: string) => {
|
||||
const { topics } = await sdk.forProject.messaging.listTopics([], query || undefined);
|
||||
@@ -20,7 +21,7 @@ export const topicsSearcher = (async (query: string) => {
|
||||
callback: () => {
|
||||
goto(`${base}/project-${projectId}/messaging/topics/topic-${topic.$id}`);
|
||||
},
|
||||
icon: 'send'
|
||||
icon: IconChevronRight // TODO: @itznotabug - 'send' no replacement yet.
|
||||
}) as const
|
||||
);
|
||||
}) satisfies Searcher;
|
||||
@@ -6,6 +6,7 @@ import type { Command, Searcher } from '../commands';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { promptDeleteUser } from '$routes/(console)/project-[project]/auth/user-[user]/dangerZone.svelte';
|
||||
import { base } from '$app/paths';
|
||||
import { IconTrash, IconUserCircle } from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
const getUserCommand = (user: Models.User<Models.Preferences>, projectId: string) =>
|
||||
({
|
||||
@@ -14,7 +15,7 @@ const getUserCommand = (user: Models.User<Models.Preferences>, projectId: string
|
||||
goto(`${base}/project-${projectId}/auth/user-${user.$id}`);
|
||||
},
|
||||
group: 'users',
|
||||
icon: 'user-circle'
|
||||
icon: IconUserCircle
|
||||
}) satisfies Command;
|
||||
|
||||
export const userSearcher = (async (query: string) => {
|
||||
@@ -31,7 +32,7 @@ export const userSearcher = (async (query: string) => {
|
||||
},
|
||||
group: 'users',
|
||||
nested: true,
|
||||
icon: 'trash'
|
||||
icon: IconTrash
|
||||
},
|
||||
{
|
||||
label: 'Go to activity',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Button, FormList, InputText } from '$lib/elements/forms';
|
||||
import { Button, InputText } from '$lib/elements/forms';
|
||||
import { formatCurrency } from '$lib/helpers/numbers';
|
||||
import type { Coupon } from '$lib/sdk/billing';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<script lang="ts">
|
||||
import { FakeModal } from '$lib/components';
|
||||
import { InputText, Button, FormList } from '$lib/elements/forms';
|
||||
import { InputText, Button } from '$lib/elements/forms';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { initializeStripe, submitStripeCard } from '$lib/stores/stripe';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { page } from '$app/stores';
|
||||
import { Layout, Spinner } from '@appwrite.io/pink-svelte';
|
||||
import { Spinner } from '@appwrite.io/pink-svelte';
|
||||
|
||||
export let show = false;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { Alert, Icon, Table, Tooltip } from '@appwrite.io/pink-svelte';
|
||||
import Cell from '$lib/elements/table/cell.svelte';
|
||||
import { IconInfo } from '@appwrite.io/pink-icons-svelte';
|
||||
|
||||
export let tier: Tier;
|
||||
@@ -65,7 +64,7 @@
|
||||
<Table.Header.Cell {root}>Resource</Table.Header.Cell>
|
||||
<Table.Header.Cell {root}>Free limit</Table.Header.Cell>
|
||||
<Table.Header.Cell {root}>
|
||||
Excess usage <Tooltip
|
||||
Excess usage <Tooltip maxWidth="fit-content"
|
||||
><Icon icon={IconInfo} />
|
||||
<span slot="tooltip">Metrics are estimates updated every 24 hours</span>
|
||||
</Tooltip>
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
export let anyOrgFree = false;
|
||||
export let isNewOrg = false;
|
||||
export let selfService = true;
|
||||
let classes: string = '';
|
||||
export { classes as class };
|
||||
|
||||
$: freePlan = $plansInfo.get(BillingPlan.FREE);
|
||||
$: proPlan = $plansInfo.get(BillingPlan.PRO);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
import type { ComponentProps } from 'svelte';
|
||||
|
||||
type BaseProps = {
|
||||
isTile?: boolean;
|
||||
isDashed?: boolean;
|
||||
danger?: boolean;
|
||||
style?: string;
|
||||
@@ -23,7 +22,6 @@
|
||||
|
||||
type $$Props = BaseProps & (ButtonProps | AnchorProps | BaseProps) & ComponentProps<Base>;
|
||||
|
||||
export let isTile = false;
|
||||
export let isDashed = false;
|
||||
export let isButton = false;
|
||||
export let href: string = null;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Divider, Layout, Card, Typography } from '@appwrite.io/pink-svelte';
|
||||
|
||||
export let hideOverflow = false;
|
||||
export let hideFooter = false;
|
||||
export let gap: 'none' | 'xxxs' | 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'xxxl' = 'l';
|
||||
</script>
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
export let name: string;
|
||||
export let id: string;
|
||||
export let autofocus = true;
|
||||
export let fullWidth = false;
|
||||
export let isProject = false;
|
||||
$: if (!show) {
|
||||
id = null;
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
action: null as EventAction | null,
|
||||
attribute: null as string | null
|
||||
};
|
||||
let helper: string = null;
|
||||
let customInput: string = null;
|
||||
let customInputCursor = -1;
|
||||
let showInput = false;
|
||||
@@ -235,6 +236,10 @@
|
||||
customInput = null;
|
||||
showInput = false;
|
||||
}
|
||||
|
||||
$: if (showInput) {
|
||||
helper = getCustomInputHelperStr(customInput, customInputCursor);
|
||||
}
|
||||
</script>
|
||||
|
||||
<Modal title="Create event" bind:show onSubmit={create}>
|
||||
@@ -303,12 +308,17 @@
|
||||
{/if}
|
||||
|
||||
{#if showInput}
|
||||
<Input.Text bind:value={customInput} placeholder="Enter custom event">
|
||||
<svelte:fragment slot="end">
|
||||
<Input.Action icon={IconCheck} on:click={toggleShowInput} />
|
||||
<Input.Action icon={IconX} />
|
||||
</svelte:fragment>
|
||||
</Input.Text>
|
||||
<Layout.Stack gap="s">
|
||||
<Input.Text bind:value={customInput} placeholder="Enter custom event">
|
||||
<svelte:fragment slot="end">
|
||||
<Input.Action icon={IconCheck} on:click={toggleShowInput} />
|
||||
<Input.Action icon={IconX} />
|
||||
</svelte:fragment>
|
||||
</Input.Text>
|
||||
|
||||
<!-- TODO: get checked by design -->
|
||||
<Typography.Caption variant="400">{helper ?? ''}</Typography.Caption>
|
||||
</Layout.Stack>
|
||||
{:else}
|
||||
<Input.Text
|
||||
value={eventString.map((e) => e.value).join('.')}
|
||||
|
||||
@@ -3,11 +3,9 @@
|
||||
import { feedbackData } from '$lib/stores/feedback';
|
||||
</script>
|
||||
|
||||
<FormList>
|
||||
<InputTextarea
|
||||
required
|
||||
id="feedback"
|
||||
bind:value={$feedbackData.message}
|
||||
label="Tell us more about your experience"
|
||||
placeholder="Share your suggestions and feature requests..." />
|
||||
</FormList>
|
||||
<InputTextarea
|
||||
required
|
||||
id="feedback"
|
||||
bind:value={$feedbackData.message}
|
||||
label="Tell us more about your experience"
|
||||
placeholder="Share your suggestions and feature requests..." />
|
||||
@@ -4,15 +4,13 @@
|
||||
import { FormList, InputTextarea } from '$lib/elements/forms';
|
||||
</script>
|
||||
|
||||
<FormList>
|
||||
<Evaluation bind:value={$feedbackData.value} />
|
||||
{#if $feedbackData.value !== null}
|
||||
<!-- TODO: @itznotabug, helper is a plain string atm, cannot add html/anchor for Discord link -->
|
||||
<InputTextarea
|
||||
id="feedback"
|
||||
bind:value={$feedbackData.message}
|
||||
label="Tell us more about your experience (optional)"
|
||||
placeholder="Share your suggestions and feature requests..."
|
||||
helper="Need help? Join our Discord for community support" />
|
||||
{/if}
|
||||
</FormList>
|
||||
<Evaluation bind:value={$feedbackData.value} />
|
||||
{#if $feedbackData.value !== null}
|
||||
<!-- TODO: @itznotabug, helper is a plain string atm, cannot add html/anchor for Discord link -->
|
||||
<InputTextarea
|
||||
id="feedback"
|
||||
bind:value={$feedbackData.message}
|
||||
label="Tell us more about your experience (optional)"
|
||||
placeholder="Share your suggestions and feature requests..."
|
||||
helper="Need help? Join our Discord for community support" />
|
||||
{/if}
|
||||
@@ -241,6 +241,7 @@
|
||||
columnsS={3}
|
||||
columns={4}>
|
||||
{#each response?.files as file}
|
||||
<!-- TODO: @itznotabug - `src` type prop added on latest commits. Refactor after latest merge. -->
|
||||
<Card.Selector
|
||||
group="files"
|
||||
name="files"
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
export let show = false;
|
||||
export let columns: Writable<Column[]>;
|
||||
export let analyticsSource = '';
|
||||
export let clearOnClick = false;
|
||||
/* eslint @typescript-eslint/no-explicit-any: 'off' */
|
||||
let value: any = null;
|
||||
let selectedColumn: string | null = null;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
export let silentMode: boolean;
|
||||
export let installationId: string;
|
||||
export let repositoryId: string;
|
||||
export let product: 'sites' | 'functions';
|
||||
|
||||
let show = false;
|
||||
|
||||
@@ -90,5 +91,5 @@
|
||||
</Fieldset>
|
||||
|
||||
{#if show}
|
||||
<SelectRootModal bind:show bind:rootDir />
|
||||
<SelectRootModal bind:show bind:rootDir {product} />
|
||||
{/if}
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
export let show = false;
|
||||
export let rootDir: string;
|
||||
export let product: 'sites' | 'functions';
|
||||
export let product: 'sites' | 'functions' = 'functions';
|
||||
|
||||
let isLoading = true;
|
||||
let directories: Directory[] = [
|
||||
@@ -88,7 +88,7 @@
|
||||
const runtime = await sdk.forProject.vcs.createRepositoryDetection(
|
||||
$installation.$id,
|
||||
$repository.id,
|
||||
VCSDetectionType.Framework, //TODO: add type: VCSDetectionType.Framework || VCSDetectionType.Runtime according to the product
|
||||
product === 'sites' ? VCSDetectionType.Framework : VCSDetectionType.Runtime,
|
||||
path
|
||||
);
|
||||
//TODO: Fix runtime after passing type: runtime.framework || runtime.runtime
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
export let tooltipShow = false;
|
||||
|
||||
// Pink v2
|
||||
export let icon: Props['icon'] = undefined;
|
||||
export let radius: Props['radius'] = 's';
|
||||
export let imageRadius: Props['imageRadius'] = 'xxs';
|
||||
export let padding: Props['padding'] = 's';
|
||||
export let variant: Props['variant'] = 'primary';
|
||||
export let name: Props['name'] = undefined;
|
||||
//temporarily unefined
|
||||
//temporarily undefined
|
||||
export let title: Props['title'] = undefined;
|
||||
export let disabled = false;
|
||||
export let src: string = null;
|
||||
@@ -31,6 +32,7 @@
|
||||
{name}
|
||||
{src}
|
||||
{alt}
|
||||
{icon}
|
||||
{padding}
|
||||
{imageRadius}
|
||||
{variant}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if challengeType == AuthenticationFactor.Recoverycode}
|
||||
{#if challengeType === AuthenticationFactor.Recoverycode}
|
||||
<Typography.Text align="center">
|
||||
Enter below one of the recovery codes you received when enabling MFA for this account.
|
||||
</Typography.Text>
|
||||
@@ -80,10 +80,10 @@
|
||||
{#if factors.totp && (challengeType == AuthenticationFactor.Totp || challengeType == null)}
|
||||
<Typography.Text align="center"
|
||||
>Enter below a 6-digit one-time code generated by your authentication app.</Typography.Text>
|
||||
{:else if challengeType == AuthenticationFactor.Email}
|
||||
{:else if challengeType === AuthenticationFactor.Email}
|
||||
<Typography.Text align="center"
|
||||
>A 6-digit verification code was sent to your email, enter it below.</Typography.Text>
|
||||
{:else if challengeType == AuthenticationFactor.Phone}
|
||||
{:else if challengeType === AuthenticationFactor.Phone}
|
||||
<Typography.Text align="center"
|
||||
>A 6-digit verification code was sent to your phone, enter it below.</Typography.Text>
|
||||
{/if}
|
||||
@@ -105,7 +105,7 @@
|
||||
Authenticator app
|
||||
</Button>
|
||||
{/if}
|
||||
{#if factors.email && challengeType != AuthenticationFactor.Email}
|
||||
{#if factors.email && challengeType !== AuthenticationFactor.Email}
|
||||
<Button
|
||||
secondary
|
||||
fullWidth
|
||||
@@ -115,7 +115,7 @@
|
||||
Email verification
|
||||
</Button>
|
||||
{/if}
|
||||
{#if factors.phone && challengeType != AuthenticationFactor.Phone}
|
||||
{#if factors.phone && challengeType !== AuthenticationFactor.Phone}
|
||||
<Button
|
||||
secondary
|
||||
fullWidth
|
||||
@@ -125,7 +125,7 @@
|
||||
Phone verification
|
||||
</Button>
|
||||
{/if}
|
||||
{#if factors.recoveryCode && challengeType != AuthenticationFactor.Recoverycode}
|
||||
{#if factors.recoveryCode && challengeType !== AuthenticationFactor.Recoverycode}
|
||||
<Button
|
||||
text
|
||||
fullWidth
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
export let hideFooter = false;
|
||||
|
||||
let alert: HTMLElement;
|
||||
let formComponent: Form;
|
||||
|
||||
beforeNavigate(() => {
|
||||
show = false;
|
||||
@@ -28,8 +27,8 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Form isModal {onSubmit} bind:this={formComponent}>
|
||||
<Modal {title} bind:open={show} {hideFooter} {dismissible} {size}>
|
||||
<Form isModal {onSubmit}>
|
||||
<Modal {size} {title} bind:open={show} {hideFooter} {dismissible}>
|
||||
<slot slot="description" name="description" />
|
||||
{#if error}
|
||||
<div bind:this={alert}>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
let showSupport = false;
|
||||
|
||||
type $$Props = BaseNavbarProps & {
|
||||
links: Array<{ label: string; href: string }>;
|
||||
links?: Array<{ label: string; href: string }>;
|
||||
organizations: Array<{
|
||||
name: string;
|
||||
$id: string;
|
||||
@@ -230,7 +230,7 @@
|
||||
<ActionMenu.Item.Button
|
||||
trailingIcon={IconLogoutRight}
|
||||
size="l"
|
||||
on:click={logout}>Sign out</ActionMenu.Item.Button>
|
||||
on:click={() => logout()}>Sign out</ActionMenu.Item.Button>
|
||||
<div
|
||||
style:padding-inline-start="10px"
|
||||
style:padding-inline-end="8px">
|
||||
@@ -243,9 +243,8 @@
|
||||
class:keepTransformTransition={shouldAnimateThemeToggle}>
|
||||
<ToggleButton
|
||||
bind:active={activeTheme}
|
||||
on:change={(event) => {
|
||||
shouldAnimateThemeToggle = true;
|
||||
}}
|
||||
on:change={() =>
|
||||
(shouldAnimateThemeToggle = true)}
|
||||
buttons={[
|
||||
{
|
||||
id: 'light',
|
||||
@@ -355,11 +354,6 @@
|
||||
.right {
|
||||
display: flex;
|
||||
gap: var(--space-9, 24px);
|
||||
|
||||
.icons {
|
||||
display: flex;
|
||||
gap: var(--space-5, 10px);
|
||||
}
|
||||
}
|
||||
|
||||
:global(.right button) {
|
||||
@@ -384,11 +378,6 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.only-mobile {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
.only-mobile-tablet {
|
||||
display: none;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Button, FormList, Helper, InputText } from '$lib/elements/forms';
|
||||
import { Button, InputText } from '$lib/elements/forms';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { Modal } from '..';
|
||||
import type { Writable } from 'svelte/store';
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
import { isTabletViewport } from '$lib/stores/viewport';
|
||||
import { Click, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
type $$Props = HTMLElement & {
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
|
||||
type $$Props = HTMLAttributes<HTMLElement> & {
|
||||
state?: 'closed' | 'open' | 'icons';
|
||||
project: { $id: string } | undefined;
|
||||
avatar: string;
|
||||
|
||||
@@ -68,7 +68,6 @@
|
||||
{#each supportOptions as option, index}
|
||||
{#if showCloudSupport(index)}
|
||||
<Card
|
||||
isTile
|
||||
class="support-option-card "
|
||||
style="border-radius: var(--border-radius-small, 8px); --gap-xl: 16px">
|
||||
<div class="u-flex u-flex-vertical u-gap-4">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
export let value: string | number = null;
|
||||
</script>
|
||||
|
||||
<Card radius="s" padding="xs" isTile>
|
||||
<Card radius="s" padding="xs">
|
||||
<Layout.Stack gap="xxxs">
|
||||
<Typography.Caption variant="400" color="--fgcolor-neutral-tertiary">
|
||||
{description}
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
function handleInvalid(event: Event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (event.currentTarget.validity.valueMissing) {
|
||||
const inputNode = event.currentTarget as HTMLInputElement;
|
||||
|
||||
if (inputNode.validity.valueMissing) {
|
||||
error = 'This field is required';
|
||||
return;
|
||||
}
|
||||
|
||||
error = event.currentTarget.validationMessage;
|
||||
error = inputNode.validationMessage;
|
||||
}
|
||||
|
||||
$: if (value) {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from 'svelte';
|
||||
import { Input } from '@appwrite.io/pink-svelte';
|
||||
|
||||
export let label: string = undefined;
|
||||
@@ -21,12 +20,14 @@
|
||||
function handleInvalid(event: Event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (event.currentTarget.validity.valueMissing) {
|
||||
const inputNode = event.currentTarget as HTMLInputElement;
|
||||
|
||||
if (inputNode.validity.valueMissing) {
|
||||
error = 'This field is required';
|
||||
return;
|
||||
}
|
||||
|
||||
error = event.currentTarget.validationMessage;
|
||||
error = inputNode.validationMessage;
|
||||
}
|
||||
|
||||
$: if (value) {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
export let readonly = false;
|
||||
export let autofocus = false;
|
||||
export let autocomplete = false;
|
||||
export let maxlength: number | undefined = undefined;
|
||||
|
||||
// https://www.geeksforgeeks.org/how-to-validate-a-domain-name-using-regular-expression/
|
||||
const pattern = String.raw`(?!-)[A-Za-z0-9\-]+([\-\.]{1}[a-z0-9]+)*\.[A-Za-z]{2,18}`;
|
||||
@@ -48,6 +49,7 @@
|
||||
{label}
|
||||
{nullable}
|
||||
{pattern}
|
||||
{maxlength}
|
||||
on:input
|
||||
on:invalid={handleInvalid}
|
||||
type="text"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
import { humanFileSize } from '$lib/helpers/sizeConvertion';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { Label } from '.';
|
||||
import { Upload } from '@appwrite.io/pink-svelte';
|
||||
|
||||
export let label: string = null;
|
||||
export let value: Models.File = null;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { SvelteComponent, onMount } from 'svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import { Input } from '@appwrite.io/pink-svelte';
|
||||
|
||||
export let label: string = undefined;
|
||||
export let optionalText: string | undefined = undefined;
|
||||
export let showLabel = true;
|
||||
export let id: string;
|
||||
export let name: string = id;
|
||||
export let value = '';
|
||||
@@ -12,16 +10,16 @@
|
||||
export let patternError: string = '';
|
||||
export let placeholder = '';
|
||||
export let required = false;
|
||||
export let hideRequired = false;
|
||||
// export let hideRequired = false;
|
||||
export let disabled = false;
|
||||
export let readonly = false;
|
||||
export let maxlength: number = null;
|
||||
export let autofocus = false;
|
||||
export let autocomplete = false;
|
||||
export let fullWidth = false;
|
||||
// export let fullWidth = false;
|
||||
export let tooltip: string = null;
|
||||
export let popover: typeof SvelteComponent<unknown> = null;
|
||||
export let popoverProps: Record<string, unknown> = {};
|
||||
// export let popover: typeof SvelteComponent<unknown> = null;
|
||||
// export let popoverProps: Record<string, unknown> = {};
|
||||
|
||||
let element: HTMLInputElement;
|
||||
let error: string;
|
||||
@@ -65,6 +63,7 @@
|
||||
{required}
|
||||
{maxlength}
|
||||
{label}
|
||||
{pattern}
|
||||
{readonly}
|
||||
autofocus={autofocus || undefined}
|
||||
autocomplete={autocomplete ? 'on' : 'off'}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
export let id: string;
|
||||
export let label: string | undefined = undefined;
|
||||
export let value: string | number | boolean | null;
|
||||
export let optionalText: string | number | boolean | null | undefined = undefined;
|
||||
export let placeholder = '';
|
||||
export let required = false;
|
||||
export let disabled = false;
|
||||
@@ -49,6 +50,7 @@
|
||||
{id}
|
||||
{label}
|
||||
{options}
|
||||
{optionalText}
|
||||
{placeholder}
|
||||
{disabled}
|
||||
{isSearchable}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Input } from '@appwrite.io/pink-svelte';
|
||||
import type ComboBox from '@appwrite.io/pink-svelte/dist/input/ComboBox.svelte';
|
||||
import type { ComponentProps } from 'svelte';
|
||||
import type ComboBox from '@appwrite.io/pink-svelte/dist/input/ComboBox.svelte';
|
||||
|
||||
export let options: ComponentProps<ComboBox>['options'];
|
||||
export let id: string;
|
||||
@@ -12,20 +11,22 @@
|
||||
export let disabled = false;
|
||||
export let value: ComponentProps<ComboBox>['value'];
|
||||
|
||||
let element: HTMLInputElement;
|
||||
let error: string | null;
|
||||
// TODO: Torsten, is this used on latest branch?
|
||||
|
||||
function handleInvalid(event: Event) {
|
||||
event.preventDefault();
|
||||
// let element: HTMLInputElement;
|
||||
// let error: string | null;
|
||||
|
||||
if (element.validity.valueMissing) {
|
||||
error = 'This field is required';
|
||||
return;
|
||||
}
|
||||
error = element.validationMessage;
|
||||
}
|
||||
|
||||
$: if (value) error = null;
|
||||
// function handleInvalid(event: Event) {
|
||||
// event.preventDefault();
|
||||
//
|
||||
// if (element.validity.valueMissing) {
|
||||
// error = 'This field is required';
|
||||
// return;
|
||||
// }
|
||||
// error = element.validationMessage;
|
||||
// }
|
||||
//
|
||||
// $: if (value) error = null;
|
||||
</script>
|
||||
|
||||
<!-- <Input.ComboBox {label} {id} {placeholder} {disabled} {name} bind:value {required} {options} /> -->
|
||||
|
||||
@@ -14,11 +14,13 @@
|
||||
const handleInvalid = (event: Event) => {
|
||||
event.preventDefault();
|
||||
|
||||
if (event.currentTarget.validity.valueMissing) {
|
||||
const inputNode = event.currentTarget as HTMLInputElement;
|
||||
|
||||
if (inputNode.validity.valueMissing) {
|
||||
error = 'This field is required';
|
||||
return;
|
||||
}
|
||||
error = event.currentTarget.validationMessage;
|
||||
error = inputNode.validationMessage;
|
||||
};
|
||||
|
||||
$: if (value) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { Input } from '@appwrite.io/pink-svelte';
|
||||
|
||||
export let label: string = undefined;
|
||||
export let id: string;
|
||||
export let name: string = id;
|
||||
@@ -19,12 +20,14 @@
|
||||
const handleInvalid = (event: Event) => {
|
||||
event.preventDefault();
|
||||
|
||||
if (event.currentTarget.validity.valueMissing) {
|
||||
const inputNode = event.currentTarget as HTMLInputElement;
|
||||
|
||||
if (inputNode.validity.valueMissing) {
|
||||
error = 'This field is required';
|
||||
return;
|
||||
}
|
||||
|
||||
error = event.currentTarget.validationMessage;
|
||||
error = inputNode.validationMessage;
|
||||
};
|
||||
|
||||
$: if (value) {
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
function handleInvalid(event: Event) {
|
||||
event.preventDefault();
|
||||
|
||||
if (event.currentTarget.validity.valueMissing) {
|
||||
const inputNode = event.currentTarget as HTMLInputElement;
|
||||
|
||||
if (inputNode.validity.valueMissing) {
|
||||
error = 'This field is required';
|
||||
return;
|
||||
}
|
||||
|
||||
error = event.currentTarget.validationMessage;
|
||||
error = inputNode.validationMessage;
|
||||
}
|
||||
|
||||
$: if (value) {
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
<InputCheckbox
|
||||
bind:element={el}
|
||||
id="select-{id}"
|
||||
wrapperTag="div"
|
||||
checked={selectedIds.includes(id)}
|
||||
{disabled}
|
||||
on:click={handleClick} />
|
||||
|
||||
@@ -30,6 +30,7 @@ export type Column = PinkColumn & {
|
||||
filter?: boolean;
|
||||
array?: boolean;
|
||||
format?: string;
|
||||
show?: boolean;
|
||||
elements?: string[] | { value: string | number; label: string }[];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,277 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { base } from '$app/paths';
|
||||
import { AvatarInitials, DropList, DropListItem, DropListLink, Support } from '$lib/components';
|
||||
import { app } from '$lib/stores/app';
|
||||
import { user } from '$lib/stores/user';
|
||||
import { organizationList, organization, newOrgModal } from '$lib/stores/organization';
|
||||
import { page } from '$app/stores';
|
||||
import { Click, trackEvent } from '$lib/actions/analytics';
|
||||
import { tooltip } from '$lib/actions/tooltip';
|
||||
import { toggleCommandCenter } from '$lib/commandCenter/commandCenter.svelte';
|
||||
import Button from '$lib/elements/forms/button.svelte';
|
||||
import { isMac } from '$lib/helpers/platform';
|
||||
import AppwriteLogoDark from '$lib/images/appwrite-logo-dark.svg';
|
||||
import AppwriteLogoLight from '$lib/images/appwrite-logo-light.svg';
|
||||
import DarkMode from '$lib/images/mode/dark-mode.svg';
|
||||
import LightMode from '$lib/images/mode/light-mode.svg';
|
||||
import SystemMode from '$lib/images/mode/system-mode.svg';
|
||||
import { feedback } from '$lib/stores/feedback';
|
||||
import { slide } from 'svelte/transition';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { Feedback } from '$lib/components/feedback';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { logout } from '$lib/helpers/logout';
|
||||
import { upgradeURL } from '$lib/stores/billing';
|
||||
|
||||
let showDropdown = false;
|
||||
let showSupport = false;
|
||||
let droplistElement: HTMLDivElement;
|
||||
|
||||
function toggleFeedback() {
|
||||
feedback.toggleFeedback();
|
||||
trackEvent(Click.FeedbackSubmitClick);
|
||||
if ($feedback.notification) {
|
||||
feedback.toggleNotification();
|
||||
feedback.addVisualization();
|
||||
}
|
||||
}
|
||||
|
||||
function onBlur(event: MouseEvent) {
|
||||
if (
|
||||
showDropdown &&
|
||||
!(event.target === droplistElement || droplistElement.contains(event.target as Node))
|
||||
) {
|
||||
showDropdown = false;
|
||||
}
|
||||
}
|
||||
|
||||
function createOrg() {
|
||||
showDropdown = false;
|
||||
if (isCloud) {
|
||||
goto(`${base}/create-organization`);
|
||||
} else newOrgModal.set(true);
|
||||
}
|
||||
|
||||
$: if (showDropdown) {
|
||||
trackEvent(Click.MenuDropDownClick);
|
||||
}
|
||||
|
||||
const slideFade: typeof slide = (node, options) => {
|
||||
const slideTrans = slide(node, options);
|
||||
return {
|
||||
...slideTrans,
|
||||
css: (t, u) => `
|
||||
${slideTrans.css(t, u)};
|
||||
opacity: ${t};`
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<svelte:window on:click={onBlur} />
|
||||
|
||||
<div class="logo u-inline-flex u-gap-16 u-cross-center">
|
||||
<a href={$organization ? `${base}/organization-${$organization.$id}` : base}>
|
||||
<img
|
||||
src={$app.themeInUse == 'dark' ? AppwriteLogoDark : AppwriteLogoLight}
|
||||
width="120"
|
||||
height="22"
|
||||
alt="Appwrite" />
|
||||
</a>
|
||||
{#if isCloud}
|
||||
<div
|
||||
class="tag eyebrow-heading-3 u-padding-block-4"
|
||||
style="--p-tag-height: 1.785rem; --p-tag-content-height: 1.2rem;">
|
||||
<span class="text u-x-small" style="font-weight: 500">Beta</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if $page.data.breadcrumbs}
|
||||
<svelte:component this={$page.data.breadcrumbs} />
|
||||
{/if}
|
||||
|
||||
<div class="main-header-end">
|
||||
<nav class="u-flex is-only-desktop u-cross-center">
|
||||
{#if isCloud && $organization?.billingPlan === BillingPlan.FREE && !$page.url.pathname.startsWith('/console/account')}
|
||||
<Button
|
||||
disabled={$organization?.markedForDeletion}
|
||||
href={$upgradeURL}
|
||||
on:click={() => {
|
||||
trackEvent(Click.OrganizationClickUpgrade, {
|
||||
from: 'button',
|
||||
source: 'top_nav'
|
||||
});
|
||||
}}>
|
||||
Upgrade
|
||||
</Button>
|
||||
{/if}
|
||||
|
||||
{#if $feedback.notification}
|
||||
<div class="u-flex u-cross-center">
|
||||
<div class="pulse-notification" />
|
||||
</div>
|
||||
{/if}
|
||||
<DropList show={$feedback.show} scrollable on:blur={toggleFeedback}>
|
||||
<button class="button is-small is-text" on:click={toggleFeedback}>
|
||||
{#if $feedback.notification}
|
||||
<span
|
||||
class="notification u-position-absolute u-inset-block-start-8 u-inset-inline-end-8"
|
||||
></span>
|
||||
{/if}
|
||||
<span class="text">Feedback</span>
|
||||
</button>
|
||||
<svelte:fragment slot="other">
|
||||
<Feedback />
|
||||
</svelte:fragment>
|
||||
</DropList>
|
||||
<DropList
|
||||
bind:show={showSupport}
|
||||
scrollable={true}
|
||||
noArrow
|
||||
width="28.25"
|
||||
placement="bottom-end"
|
||||
on:blur={() => (showSupport = !showSupport)}>
|
||||
<Button text on:click={() => (showSupport = !showSupport)}>
|
||||
<span class="text">Support</span>
|
||||
</Button>
|
||||
<svelte:fragment slot="other">
|
||||
<Support bind:show={showSupport} />
|
||||
</svelte:fragment>
|
||||
</DropList>
|
||||
<Button
|
||||
actions={[
|
||||
(node) => {
|
||||
return tooltip(node, {
|
||||
content: isMac() ? '⌘ + K' : 'Ctrl + K',
|
||||
placement: 'bottom'
|
||||
});
|
||||
}
|
||||
]}
|
||||
text
|
||||
class="is-small"
|
||||
ariaLabel="Toggle Command Center"
|
||||
on:click={toggleCommandCenter}>
|
||||
<i class="icon-search" />
|
||||
</Button>
|
||||
</nav>
|
||||
<nav class="u-flex u-height-100-percent u-sep-inline-start">
|
||||
{#if $user}
|
||||
<div class="drop-wrapper" class:is-open={showDropdown} bind:this={droplistElement}>
|
||||
<button class="user-profile-button" on:click={() => (showDropdown = !showDropdown)}>
|
||||
<AvatarInitials size="m" name={$user.name || $user.email} />
|
||||
<span class="user-profile-info is-only-desktop">
|
||||
<span class="name" data-private>{$user.name || $user.email}</span>
|
||||
{#if $organization}
|
||||
<span class="title" data-private>{$organization.name}</span>
|
||||
{/if}
|
||||
</span>
|
||||
<span
|
||||
class="is-only-desktop"
|
||||
aria-hidden="true"
|
||||
class:icon-cheveron-up={showDropdown}
|
||||
class:icon-cheveron-down={!showDropdown} />
|
||||
</button>
|
||||
{#if showDropdown}
|
||||
<div
|
||||
class="drop is-no-arrow is-block-end is-inline-end"
|
||||
transition:slideFade|global={{ duration: 150 }}>
|
||||
{#if $organizationList?.total}
|
||||
<section class="drop-section u-overflow-y-auto u-max-height-200">
|
||||
<ul
|
||||
class="drop-list"
|
||||
data-sveltekit-preload-data={$page.params.organization
|
||||
? false
|
||||
: 'hover'}>
|
||||
{#each $organizationList.teams as org}
|
||||
<DropListLink
|
||||
href={`${base}/organization-${org.$id}`}
|
||||
on:click={() => {
|
||||
showDropdown = false;
|
||||
}}>{org.name}</DropListLink>
|
||||
{/each}
|
||||
</ul>
|
||||
</section>
|
||||
{/if}
|
||||
<section class="drop-section">
|
||||
<ul class="drop-list">
|
||||
<DropListItem icon="plus" on:click={createOrg}>
|
||||
New organization
|
||||
</DropListItem>
|
||||
<DropListLink
|
||||
href={`${base}/account`}
|
||||
on:click={() => (showDropdown = false)}>
|
||||
Your account
|
||||
</DropListLink>
|
||||
<DropListItem
|
||||
icon="logout-right"
|
||||
on:click={() => {
|
||||
showDropdown = false;
|
||||
logout();
|
||||
}}>
|
||||
Sign out
|
||||
</DropListItem>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="drop-section">
|
||||
<ul class="u-flex u-gap-12">
|
||||
<li class="u-stretch">
|
||||
<label class="image-radio">
|
||||
<img src={LightMode} alt="light mode" />
|
||||
<input
|
||||
type="radio"
|
||||
class="is-small"
|
||||
name="mode"
|
||||
on:click={() =>
|
||||
trackEvent('select_theme', {
|
||||
value: 'light'
|
||||
})}
|
||||
bind:group={$app.theme}
|
||||
value="light" />
|
||||
</label>
|
||||
</li>
|
||||
<li class="u-stretch">
|
||||
<label class="image-radio">
|
||||
<img src={DarkMode} alt="dark mode" />
|
||||
<input
|
||||
type="radio"
|
||||
class="is-small"
|
||||
name="mode"
|
||||
on:click={() =>
|
||||
trackEvent('select_theme', {
|
||||
value: 'dark'
|
||||
})}
|
||||
bind:group={$app.theme}
|
||||
value="dark" />
|
||||
</label>
|
||||
</li>
|
||||
<li class="u-stretch">
|
||||
<label class="image-radio">
|
||||
<img src={SystemMode} alt="system mode" />
|
||||
<input
|
||||
type="radio"
|
||||
class="is-small"
|
||||
name="mode"
|
||||
on:click={() =>
|
||||
trackEvent('select_theme', {
|
||||
value: 'system'
|
||||
})}
|
||||
bind:group={$app.theme}
|
||||
value="auto" />
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
:global(.support-drop-section) {
|
||||
width: 28.375rem;
|
||||
margin-block-start: 0.15rem;
|
||||
}
|
||||
</style>
|
||||
@@ -343,7 +343,7 @@
|
||||
language="sh"
|
||||
class="limited-code-height" />
|
||||
{:else}
|
||||
<Card isDashed isTile>
|
||||
<Card isDashed>
|
||||
<p class="text u-text-center">No response was recorded.</p>
|
||||
</Card>
|
||||
{/if}
|
||||
@@ -357,7 +357,7 @@
|
||||
language="sh"
|
||||
class="limited-code-height" />
|
||||
{:else}
|
||||
<Card isDashed isTile>
|
||||
<Card isDashed>
|
||||
<p class="text u-text-center">No response was recorded.</p>
|
||||
</Card>
|
||||
{/if}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
import { getContext } from 'svelte';
|
||||
import type { Writable } from 'svelte/store';
|
||||
|
||||
export let state: 'closed' | 'open' | 'icons' = 'open';
|
||||
export let subNavigation;
|
||||
|
||||
$: subNavigation = $page.data.subNavigation;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<script lang="ts">
|
||||
import { beforeNavigate } from '$app/navigation';
|
||||
import { Navbar, Sidebar } from '$lib/components';
|
||||
import { type NavbarProject } from '$lib/components/navbar.svelte';
|
||||
import type { NavbarProject } from '$lib/components/navbar.svelte';
|
||||
import { page } from '$app/stores';
|
||||
import { log } from '$lib/stores/logs';
|
||||
import { wizard } from '$lib/stores/wizard';
|
||||
import { activeHeaderAlert } from '$routes/(console)/store';
|
||||
import { type ComponentType, setContext } from 'svelte';
|
||||
import { setContext } from 'svelte';
|
||||
import { writable } from 'svelte/store';
|
||||
import { showSubNavigation } from '$lib/stores/layout';
|
||||
import { organization, organizationList } from '$lib/stores/organization';
|
||||
@@ -29,7 +29,7 @@
|
||||
$: selectedProject = loadedProjects.find((project) => project.isSelected);
|
||||
let yOnMenuOpen: number;
|
||||
let showContentTransition = false;
|
||||
let timeoutId: NodeJS.Timeout;
|
||||
let timeoutId: ReturnType<typeof setTimeout>;
|
||||
|
||||
page.subscribe(({ url }) => {
|
||||
$showSubNavigation = url.searchParams.get('openNavbar') === 'true';
|
||||
@@ -97,11 +97,12 @@
|
||||
avatar: sdk.forConsole.avatars.getInitials($user?.name, 80, 80).toString(),
|
||||
|
||||
organizations: $organizationList.teams.map((org) => {
|
||||
const billingPlan = org['billingPlan'];
|
||||
return {
|
||||
name: org.name,
|
||||
$id: org.$id,
|
||||
showUpgrade: org.billingPlan === BillingPlan.FREE,
|
||||
tierName: isCloud ? tierToPlan(org.billingPlan).name : null,
|
||||
showUpgrade: billingPlan === BillingPlan.FREE,
|
||||
tierName: isCloud ? tierToPlan(billingPlan).name : null,
|
||||
isSelected: $organization?.$id === org.$id,
|
||||
projects: loadedProjects
|
||||
};
|
||||
@@ -154,7 +155,7 @@
|
||||
bind:sideBarIsOpen={$isSidebarOpen}
|
||||
bind:showAccountMenu
|
||||
bind:state />
|
||||
<SideNavigation bind:state bind:subNavigation />
|
||||
<SideNavigation bind:subNavigation />
|
||||
<div
|
||||
class="content"
|
||||
class:has-transition={showContentTransition}
|
||||
@@ -237,6 +238,9 @@
|
||||
main {
|
||||
min-height: 100vh;
|
||||
|
||||
/**
|
||||
TODO: @ernst, check if this is still used. The class comes from Pink legacy
|
||||
*/
|
||||
&:not(.grid-with-side) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -244,7 +248,11 @@
|
||||
}
|
||||
|
||||
@media (min-width: 1199px) {
|
||||
/**
|
||||
TODO: @ernst, check if this is still used. The class comes from Pink legacy
|
||||
*/
|
||||
.grid-with-side {
|
||||
outline: red 1px solid;
|
||||
grid-template-columns: auto 1fr !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
legend: string;
|
||||
};
|
||||
|
||||
export let title: string;
|
||||
export let total: number;
|
||||
export let count: Models.Metric[];
|
||||
export let countMetadata: MetricMetadata;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
| {
|
||||
title?: string;
|
||||
href: string;
|
||||
href?: string;
|
||||
confirmExit?: boolean;
|
||||
showExitModal?: boolean;
|
||||
invertColumns?: boolean;
|
||||
|
||||
@@ -2,14 +2,12 @@
|
||||
import { Copy } from '$lib/components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { Table } from '@appwrite.io/pink-svelte';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
|
||||
export let domain: Models.ProxyRule;
|
||||
import { domain } from './store';
|
||||
|
||||
const target = window?.location.hostname ?? '';
|
||||
$: parts = domain.domain.split('.');
|
||||
$: parts = $domain.domain.split('.');
|
||||
$: registerable = [parts[parts.length - 2], parts[parts.length - 1]].join('.');
|
||||
$: cnameValue = domain.domain.replace('.' + registerable, '');
|
||||
$: cnameValue = $domain.domain.replace('.' + registerable, '');
|
||||
</script>
|
||||
|
||||
<Table.Root
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import CnameTable from './cnameTable.svelte';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { Code, Trim } from '$lib/components';
|
||||
import { Code } from '$lib/components';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
@@ -61,7 +61,7 @@
|
||||
rel="noopener noreferrer">contact support</Link.Anchor
|
||||
>.
|
||||
</Typography.Text>
|
||||
<CnameTable bind:domain />
|
||||
<CnameTable />
|
||||
{:else if domain.status === 'unverified'}
|
||||
<div class="u-flex u-gap-8 u-cross-center">
|
||||
<span class="icon-exclamation-circle u-color-text-danger" aria-hidden="true" />
|
||||
|
||||
@@ -41,15 +41,14 @@
|
||||
>.
|
||||
</svelte:fragment>
|
||||
|
||||
<FormList>
|
||||
<InputDomain
|
||||
id="domain"
|
||||
label="Domain"
|
||||
placeholder="appwrite.example.com"
|
||||
autocomplete={false}
|
||||
required
|
||||
bind:value={$domain.domain} />
|
||||
</FormList>
|
||||
<InputDomain
|
||||
id="domain"
|
||||
label="Domain"
|
||||
placeholder="appwrite.example.com"
|
||||
autocomplete={false}
|
||||
required
|
||||
bind:value={$domain.domain} />
|
||||
|
||||
{#if error}
|
||||
<div class="common-section">
|
||||
<p>
|
||||
|
||||
@@ -268,6 +268,7 @@ export type Plan = {
|
||||
$id: string;
|
||||
name: string;
|
||||
price: number;
|
||||
order: number;
|
||||
bandwidth: number;
|
||||
storage: number;
|
||||
members: number;
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
$: wizard.setNextDisabled(!report);
|
||||
</script>
|
||||
|
||||
<Box radius="small">
|
||||
<Box radius="s">
|
||||
<div class="u-flex u-flex-vertical u-gap-16">
|
||||
<EyebrowHeading class="eyebrow" tag="h3" size={3}>Good to know</EyebrowHeading>
|
||||
<div class="u-flex u-gap-16">
|
||||
|
||||
@@ -44,70 +44,68 @@
|
||||
<WizardStep {beforeSubmit}>
|
||||
<svelte:fragment slot="title">Project</svelte:fragment>
|
||||
|
||||
<FormList>
|
||||
{#if organizations.length > 1}
|
||||
<InputSelect
|
||||
id="organization"
|
||||
bind:value={selectedOrg}
|
||||
label="Select organization"
|
||||
options={organizations.map((p) => ({
|
||||
label: p.name,
|
||||
value: p.$id
|
||||
}))}
|
||||
disabled={loadingProjects} />
|
||||
{/if}
|
||||
{#if organizations.length > 1}
|
||||
<InputSelect
|
||||
id="organization"
|
||||
bind:value={selectedOrg}
|
||||
label="Select organization"
|
||||
options={organizations.map((p) => ({
|
||||
label: p.name,
|
||||
value: p.$id
|
||||
}))}
|
||||
disabled={loadingProjects} />
|
||||
{/if}
|
||||
|
||||
{#if selectedOrg && !loadingProjects}
|
||||
{#if projects.length}
|
||||
<div class="radios">
|
||||
<div class="u-flex u-gap-8">
|
||||
<input
|
||||
type="radio"
|
||||
name="project_type"
|
||||
id="project_type--existing"
|
||||
bind:group={projectType}
|
||||
value="existing" />
|
||||
<label for="project_type--existing">
|
||||
<p class="u-bold">Existing project</p>
|
||||
<p>Import data to an existing project</p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="u-flex u-gap-8">
|
||||
<input
|
||||
type="radio"
|
||||
name="project_type"
|
||||
id="project_type--new"
|
||||
bind:group={projectType}
|
||||
value="new" />
|
||||
<label for="project_type--new">
|
||||
<p class="u-bold">Create new project</p>
|
||||
<span>Import data to a new project</span>
|
||||
</label>
|
||||
</div>
|
||||
{#if selectedOrg && !loadingProjects}
|
||||
{#if projects.length}
|
||||
<div class="radios">
|
||||
<div class="u-flex u-gap-8">
|
||||
<input
|
||||
type="radio"
|
||||
name="project_type"
|
||||
id="project_type--existing"
|
||||
bind:group={projectType}
|
||||
value="existing" />
|
||||
<label for="project_type--existing">
|
||||
<p class="u-bold">Existing project</p>
|
||||
<p>Import data to an existing project</p>
|
||||
</label>
|
||||
</div>
|
||||
<div class="u-flex u-gap-8">
|
||||
<input
|
||||
type="radio"
|
||||
name="project_type"
|
||||
id="project_type--new"
|
||||
bind:group={projectType}
|
||||
value="new" />
|
||||
<label for="project_type--new">
|
||||
<p class="u-bold">Create new project</p>
|
||||
<span>Import data to a new project</span>
|
||||
</label>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div>
|
||||
{#if projectType === 'existing'}
|
||||
<InputSelect
|
||||
id="project"
|
||||
bind:value={$selectedProject}
|
||||
label="Select a project"
|
||||
options={projects.map((p) => ({
|
||||
label: p.name,
|
||||
value: p.$id
|
||||
}))} />
|
||||
{:else}
|
||||
<InputText
|
||||
label="Project name"
|
||||
placeholder="Enter project name"
|
||||
id="project_name"
|
||||
bind:value={newProjName}
|
||||
required />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</FormList>
|
||||
|
||||
<div>
|
||||
{#if projectType === 'existing'}
|
||||
<InputSelect
|
||||
id="project"
|
||||
bind:value={$selectedProject}
|
||||
label="Select a project"
|
||||
options={projects.map((p) => ({
|
||||
label: p.name,
|
||||
value: p.$id
|
||||
}))} />
|
||||
{:else}
|
||||
<InputText
|
||||
label="Project name"
|
||||
placeholder="Enter project name"
|
||||
id="project_name"
|
||||
bind:value={newProjName}
|
||||
required />
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</WizardStep>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
{$user.name || $user.email}
|
||||
</CoverTitle>
|
||||
<div class="u-margin-inline-start-auto">
|
||||
<Button secondary on:click={logout}>Logout</Button>
|
||||
<Button secondary on:click={() => logout()}>Logout</Button>
|
||||
</div>
|
||||
</svelte:fragment>
|
||||
<Tabs>
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
export let showSetup = false;
|
||||
|
||||
let copyParent: HTMLElement;
|
||||
let code: string;
|
||||
let type: Models.MfaType = null;
|
||||
let step = 1;
|
||||
@@ -42,7 +41,7 @@
|
||||
</script>
|
||||
|
||||
<Modal
|
||||
title={step == 1 ? 'Scan QR code' : 'Enter verification code'}
|
||||
title={step === 1 ? 'Scan QR code' : 'Enter verification code'}
|
||||
bind:show={showSetup}
|
||||
onSubmit={verifyAuthenticator}
|
||||
{error}>
|
||||
@@ -67,19 +66,16 @@
|
||||
</div>
|
||||
<span class="with-separators eyebrow-heading-3">or</span>
|
||||
|
||||
<div bind:this={copyParent}>
|
||||
<div>
|
||||
<CopyInput
|
||||
showLabel={true}
|
||||
label="Manual entry code"
|
||||
labelTooltip="Manually enter the following code into the authenticator app"
|
||||
optionalText="Manually enter the following code into the authenticator app"
|
||||
value={type.secret} />
|
||||
</div>
|
||||
{/await}
|
||||
{:else}
|
||||
<FormList>
|
||||
<label for="code">Enter the 6-digit one-time code generated by the app</label>
|
||||
<InputDigits bind:value={code} autofocus />
|
||||
</FormList>
|
||||
<label for="code">Enter the 6-digit one-time code generated by the app</label>
|
||||
<InputDigits bind:value={code} autofocus />
|
||||
{/if}
|
||||
{/key}
|
||||
<svelte:fragment slot="footer">
|
||||
|
||||
@@ -38,8 +38,7 @@
|
||||
factors={{ ...factors, recoveryCode: false }}
|
||||
bind:challenge
|
||||
bind:code
|
||||
showVerifyButton={false}
|
||||
autoSubmit={false} />
|
||||
showVerifyButton={false} />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button text on:click={() => (show = false)}>Cancel</Button>
|
||||
|
||||
@@ -75,40 +75,38 @@
|
||||
$: isButtonDisabled = !country || !address || !city || !state;
|
||||
</script>
|
||||
|
||||
<Modal bind:show bind:error onSubmit={handleSubmit} size="big" title="Add billing address">
|
||||
<FormList gap={16}>
|
||||
<InputSelect
|
||||
bind:value={country}
|
||||
{options}
|
||||
label="Country or region"
|
||||
placeholder="Select country or region"
|
||||
id="country"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={address}
|
||||
id="address"
|
||||
label="Street address"
|
||||
placeholder="Enter street address"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={address2}
|
||||
id="address2"
|
||||
label="Address line 2"
|
||||
placeholder="Unit number, floor, etc." />
|
||||
<InputText
|
||||
bind:value={city}
|
||||
id="city"
|
||||
label="City or suburb"
|
||||
placeholder="Enter your city"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={state}
|
||||
id="state"
|
||||
label="State"
|
||||
placeholder="Enter your state"
|
||||
required />
|
||||
<InputText bind:value={zip} id="zip" label="Postal code" placeholder="Enter postal code" />
|
||||
</FormList>
|
||||
<Modal bind:show bind:error onSubmit={handleSubmit} size="m" title="Add billing address">
|
||||
<InputSelect
|
||||
bind:value={country}
|
||||
{options}
|
||||
label="Country or region"
|
||||
placeholder="Select country or region"
|
||||
id="country"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={address}
|
||||
id="address"
|
||||
label="Street address"
|
||||
placeholder="Enter street address"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={address2}
|
||||
id="address2"
|
||||
label="Address line 2"
|
||||
placeholder="Unit number, floor, etc." />
|
||||
<InputText
|
||||
bind:value={city}
|
||||
id="city"
|
||||
label="City or suburb"
|
||||
placeholder="Enter your city"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={state}
|
||||
id="state"
|
||||
label="State"
|
||||
placeholder="Enter your state"
|
||||
required />
|
||||
<InputText bind:value={zip} id="zip" label="Postal code" placeholder="Enter postal code" />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button text on:click={() => (show = false)}>Cancel</Button>
|
||||
|
||||
@@ -2,10 +2,8 @@
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { base } from '$app/paths';
|
||||
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
|
||||
import { Modal } from '$lib/components';
|
||||
import Confirm from '$lib/components/confirm.svelte';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import type { Organization } from '$lib/stores/organization';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
|
||||
@@ -59,45 +59,43 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Modal bind:error bind:show onSubmit={handleSubmit} size="big" title="Update billing address">
|
||||
<FormList gap={16}>
|
||||
<InputSelect
|
||||
bind:value={selectedAddress.country}
|
||||
{options}
|
||||
label="Country or region"
|
||||
placeholder="Select country or region"
|
||||
id="country"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={selectedAddress.streetAddress}
|
||||
id="address"
|
||||
label="Street address"
|
||||
placeholder="Enter street address"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={selectedAddress.addressLine2}
|
||||
id="address2"
|
||||
label="Address line 2"
|
||||
placeholder="Unit number, floor, etc." />
|
||||
<InputText
|
||||
bind:value={selectedAddress.city}
|
||||
id="city"
|
||||
label="City or suburb"
|
||||
placeholder="Enter your city"
|
||||
required />
|
||||
<InputText
|
||||
fullWidth
|
||||
bind:value={selectedAddress.state}
|
||||
id="state"
|
||||
label="State"
|
||||
placeholder="Enter your state"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={selectedAddress.postalCode}
|
||||
id="zip"
|
||||
label="Postal code"
|
||||
placeholder="Enter postal code" />
|
||||
</FormList>
|
||||
<Modal bind:error bind:show onSubmit={handleSubmit} size="m" title="Update billing address">
|
||||
<InputSelect
|
||||
bind:value={selectedAddress.country}
|
||||
{options}
|
||||
label="Country or region"
|
||||
placeholder="Select country or region"
|
||||
id="country"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={selectedAddress.streetAddress}
|
||||
id="address"
|
||||
label="Street address"
|
||||
placeholder="Enter street address"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={selectedAddress.addressLine2}
|
||||
id="address2"
|
||||
label="Address line 2"
|
||||
placeholder="Unit number, floor, etc." />
|
||||
<InputText
|
||||
bind:value={selectedAddress.city}
|
||||
id="city"
|
||||
label="City or suburb"
|
||||
placeholder="Enter your city"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={selectedAddress.state}
|
||||
id="state"
|
||||
label="State"
|
||||
placeholder="Enter your state"
|
||||
required />
|
||||
<InputText
|
||||
bind:value={selectedAddress.postalCode}
|
||||
id="zip"
|
||||
label="Postal code"
|
||||
placeholder="Enter postal code" />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button text on:click={() => (show = false)}>Cancel</Button>
|
||||
<Button submit>Save</Button>
|
||||
|
||||
@@ -73,22 +73,22 @@
|
||||
Updates to this payment method will be applied to any linked organizations.
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
<FormList>
|
||||
<InputSelect
|
||||
id="month"
|
||||
label="Month"
|
||||
bind:value={month}
|
||||
{options}
|
||||
required
|
||||
placeholder="Enter expiry month" />
|
||||
<InputNumber
|
||||
id="year"
|
||||
label="Year"
|
||||
bind:value={year}
|
||||
min={currentYear}
|
||||
required
|
||||
placeholder="Enter expiry year" />
|
||||
</FormList>
|
||||
|
||||
<InputSelect
|
||||
id="month"
|
||||
label="Month"
|
||||
bind:value={month}
|
||||
{options}
|
||||
required
|
||||
placeholder="Enter expiry month" />
|
||||
<InputNumber
|
||||
id="year"
|
||||
label="Year"
|
||||
bind:value={year}
|
||||
min={currentYear}
|
||||
required
|
||||
placeholder="Enter expiry year" />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button secondary on:click={() => (show = false)}>Cancel</Button>
|
||||
<Button submit disabled={!month || !year}>Update</Button>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { CardGrid, CreditCardInfo, DropList, DropListItem, Empty } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { CardGrid, CreditCardInfo, Empty } from '$lib/components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { paymentMethods } from '$lib/stores/billing';
|
||||
import type { PaymentMethodData } from '$lib/sdk/billing';
|
||||
@@ -35,7 +34,6 @@
|
||||
let showDelete = false;
|
||||
let showEdit = false;
|
||||
let isLinked = false;
|
||||
let showLinked = [];
|
||||
|
||||
$: orgList = $organizationList.teams as unknown as Organization[];
|
||||
|
||||
|
||||
@@ -39,22 +39,20 @@
|
||||
<CardGrid>
|
||||
<svelte:fragment slot="title">Email</svelte:fragment>
|
||||
<svelte:fragment slot="aside">
|
||||
<FormList>
|
||||
<InputText
|
||||
id="email"
|
||||
label="Email"
|
||||
placeholder="Enter email"
|
||||
bind:value={email}
|
||||
required />
|
||||
{#if email !== $user.email && email}
|
||||
<InputPassword
|
||||
id="emailPassword"
|
||||
label="Password"
|
||||
placeholder="Enter password"
|
||||
required
|
||||
bind:value={emailPassword} />
|
||||
{/if}
|
||||
</FormList>
|
||||
<InputText
|
||||
id="email"
|
||||
label="Email"
|
||||
placeholder="Enter email"
|
||||
bind:value={email}
|
||||
required />
|
||||
{#if email !== $user.email && email}
|
||||
<InputPassword
|
||||
id="emailPassword"
|
||||
label="Password"
|
||||
placeholder="Enter password"
|
||||
required
|
||||
bind:value={emailPassword} />
|
||||
{/if}
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
|
||||
@@ -258,8 +258,8 @@
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
|
||||
{#if enabledMethods.length > 0}
|
||||
<Layout.Stack>
|
||||
{#if enabledMethods.length >= 0}
|
||||
<Layout.Stack class="method">
|
||||
<EyebrowHeading tag="h6" size={3} class="u-normal"
|
||||
>Recovery</EyebrowHeading>
|
||||
<Layout.Stack>
|
||||
@@ -279,14 +279,15 @@
|
||||
</Layout.Stack>
|
||||
{#if $factors.recoveryCode}
|
||||
<Button
|
||||
text
|
||||
secondary
|
||||
class="recovery-codes-button"
|
||||
on:click={() => (showRegenerateRecoveryCodes = true)}>
|
||||
Regenerate
|
||||
</Button>
|
||||
{:else}
|
||||
<Button
|
||||
class="method-button"
|
||||
secondary
|
||||
class="recovery-codes-button"
|
||||
on:click={createRecoveryCodes}>View</Button>
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
@@ -310,21 +311,10 @@
|
||||
{regenerateRecoveryCodes}
|
||||
factors={$factors} />
|
||||
|
||||
<style lang="scss">
|
||||
@use '@appwrite.io/pink-legacy/src/abstract/variables/devices';
|
||||
|
||||
/* Default (including mobile) */
|
||||
.method {
|
||||
align-items: start;
|
||||
.method-button {
|
||||
margin-inline-start: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* for smaller screens */
|
||||
@media #{devices.$break2open} {
|
||||
.method {
|
||||
align-items: center;
|
||||
}
|
||||
<style>
|
||||
:global(.recovery-codes-button) {
|
||||
height: fit-content;
|
||||
margin-inline-start: 0.5rem;
|
||||
padding-inline: 1rem !important;
|
||||
}
|
||||
</style>
|
||||
@@ -39,14 +39,7 @@
|
||||
<svelte:fragment slot="title">Name</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="aside">
|
||||
<FormList>
|
||||
<InputText
|
||||
id="name"
|
||||
label="Name"
|
||||
placeholder="Enter name"
|
||||
bind:value={name}
|
||||
required />
|
||||
</FormList>
|
||||
<InputText id="name" label="Name" placeholder="Enter name" bind:value={name} required />
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
|
||||
@@ -36,20 +36,18 @@
|
||||
>Recover your password</Link.Anchor>
|
||||
|
||||
<svelte:fragment slot="aside">
|
||||
<FormList>
|
||||
<InputPassword
|
||||
id="oldPassword"
|
||||
label="Old password"
|
||||
placeholder="Enter password"
|
||||
required
|
||||
bind:value={oldPassword} />
|
||||
<InputPassword
|
||||
id="newPassword"
|
||||
label="New password"
|
||||
placeholder="Enter password"
|
||||
required
|
||||
bind:value={newPassword} />
|
||||
</FormList>
|
||||
<InputPassword
|
||||
id="oldPassword"
|
||||
label="Old password"
|
||||
placeholder="Enter password"
|
||||
required
|
||||
bind:value={oldPassword} />
|
||||
<InputPassword
|
||||
id="newPassword"
|
||||
label="New password"
|
||||
placeholder="Enter password"
|
||||
required
|
||||
bind:value={newPassword} />
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
import { ID } from '@appwrite.io/console';
|
||||
import { onMount } from 'svelte';
|
||||
import { writable } from 'svelte/store';
|
||||
import { plansInfo } from '$lib/stores/billing';
|
||||
|
||||
export let data;
|
||||
|
||||
@@ -204,53 +205,49 @@
|
||||
<svelte:fragment slot="title">Apply credits</svelte:fragment>
|
||||
<WizardSecondaryContent>
|
||||
<Form bind:this={formComponent} onSubmit={handleSubmit} bind:isSubmitting>
|
||||
<FormList>
|
||||
{#if $organizationList?.total && !campaign?.onlyNewOrgs && canSelectOrg}
|
||||
<InputSelect
|
||||
bind:value={selectedOrgId}
|
||||
label="Select organization"
|
||||
{options}
|
||||
{#if $organizationList?.total && !campaign?.onlyNewOrgs && canSelectOrg}
|
||||
<InputSelect
|
||||
bind:value={selectedOrgId}
|
||||
label="Select organization"
|
||||
{options}
|
||||
required
|
||||
placeholder="Select organization"
|
||||
id="organization" />
|
||||
{/if}
|
||||
{#if selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.PRO || !selectedOrg?.paymentMethodId)}
|
||||
{#if selectedOrgId === newOrgId}
|
||||
<InputText
|
||||
label="Organization name"
|
||||
placeholder="Enter organization name"
|
||||
id="name"
|
||||
required
|
||||
placeholder="Select organization"
|
||||
id="organization" />
|
||||
bind:value={name} />
|
||||
{/if}
|
||||
{#if selectedOrgId && (selectedOrg?.billingPlan !== BillingPlan.PRO || !selectedOrg?.paymentMethodId)}
|
||||
{#if selectedOrgId === newOrgId}
|
||||
<InputText
|
||||
label="Organization name"
|
||||
placeholder="Enter organization name"
|
||||
id="name"
|
||||
required
|
||||
bind:value={name} />
|
||||
{/if}
|
||||
<InputTags
|
||||
bind:tags={collaborators}
|
||||
label="Invite members by email"
|
||||
tooltip="Invited members will have access to all services and payment data within your organization"
|
||||
placeholder="Enter email address(es)"
|
||||
validityRegex={emailRegex}
|
||||
validityMessage="Invalid email address"
|
||||
id="members" />
|
||||
<SelectPaymentMethod bind:methods bind:value={paymentMethodId} bind:taxId />
|
||||
{/if}
|
||||
</FormList>
|
||||
<InputTags
|
||||
bind:tags={collaborators}
|
||||
label="Invite members by email"
|
||||
tooltip="Invited members will have access to all services and payment data within your organization"
|
||||
placeholder="Enter email address(es)"
|
||||
validityRegex={emailRegex}
|
||||
validityMessage="Invalid email address"
|
||||
id="members" />
|
||||
<SelectPaymentMethod bind:methods bind:value={paymentMethodId} bind:taxId />
|
||||
{/if}
|
||||
</Form>
|
||||
<Form bind:this={couponForm} onSubmit={addCoupon}>
|
||||
<FormList>
|
||||
{#if !data?.couponData?.code && selectedOrgId}
|
||||
<InputText
|
||||
required
|
||||
disabled={!!couponData?.credits}
|
||||
bind:value={coupon}
|
||||
placeholder="Enter coupon code"
|
||||
id="code"
|
||||
label="Coupon code">
|
||||
<Button submit secondary disabled={!!couponData?.credits}>
|
||||
<span class="text">Apply</span>
|
||||
</Button>
|
||||
</InputText>
|
||||
{/if}
|
||||
</FormList>
|
||||
{#if !data?.couponData?.code && selectedOrgId}
|
||||
<InputText
|
||||
required
|
||||
disabled={!!couponData?.credits}
|
||||
bind:value={coupon}
|
||||
placeholder="Enter coupon code"
|
||||
id="code"
|
||||
label="Coupon code">
|
||||
<Button submit secondary disabled={!!couponData?.credits}>
|
||||
<span class="text">Apply</span>
|
||||
</Button>
|
||||
</InputText>
|
||||
{/if}
|
||||
</Form>
|
||||
<svelte:fragment slot="aside">
|
||||
{#if campaign?.template === 'card'}
|
||||
@@ -294,6 +291,7 @@
|
||||
fixedCoupon={!!data?.couponData?.code}
|
||||
{billingPlan}
|
||||
{collaborators}
|
||||
plans={$plansInfo}
|
||||
bind:couponData
|
||||
bind:billingBudget>
|
||||
{#if campaign?.template === 'review' && (campaign?.cta || campaign?.claimed || campaign?.unclaimed)}
|
||||
|
||||
@@ -51,15 +51,15 @@
|
||||
</svelte:fragment>
|
||||
</Alert.Inline>
|
||||
{/if}
|
||||
<FormList>
|
||||
<InputText
|
||||
id="organization-name"
|
||||
label="Name"
|
||||
placeholder="Enter name"
|
||||
bind:value={name}
|
||||
autofocus={true}
|
||||
required />
|
||||
</FormList>
|
||||
|
||||
<InputText
|
||||
id="organization-name"
|
||||
label="Name"
|
||||
placeholder="Enter name"
|
||||
bind:value={name}
|
||||
autofocus={true}
|
||||
required />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button secondary on:click={() => (show = false)}>Cancel</Button>
|
||||
<Button submit>Create</Button>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import type { RegionList } from '$lib/sdk/billing';
|
||||
import { isCloud } from '$lib/system';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { Flag, ID, Region } from '@appwrite.io/console';
|
||||
import { ID, Region } from '@appwrite.io/console';
|
||||
import Loading from './loading.svelte';
|
||||
import { BillingPlan, Dependencies } from '$lib/constants';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
@@ -138,8 +138,7 @@
|
||||
});
|
||||
|
||||
function findRegion(project: Models.Project) {
|
||||
const region = regions.regions.find((region) => region.$id === project.region);
|
||||
return region;
|
||||
return regions.regions.find((region) => region.$id === project.region);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Modal } from '$lib/components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
import { base } from '$app/paths';
|
||||
import { Alert, Badge, Card, Layout, Skeleton, Spinner } from '@appwrite.io/pink-svelte';
|
||||
import { Alert, Badge, Card, Layout, Skeleton } from '@appwrite.io/pink-svelte';
|
||||
|
||||
export let show = false;
|
||||
let loading = true;
|
||||
|
||||
@@ -39,13 +39,7 @@
|
||||
<svelte:fragment slot="title">Tax ID</svelte:fragment>
|
||||
Add a tax identification number to your organization.
|
||||
<svelte:fragment slot="aside">
|
||||
<FormList>
|
||||
<InputText
|
||||
label="Tax ID"
|
||||
placeholder="Enter tax ID"
|
||||
id="taxId"
|
||||
bind:value={taxId} />
|
||||
</FormList>
|
||||
<InputText label="Tax ID" placeholder="Enter tax ID" id="taxId" bind:value={taxId} />
|
||||
</svelte:fragment>
|
||||
|
||||
<svelte:fragment slot="actions">
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts">
|
||||
import { FormList } from '$lib/elements/forms';
|
||||
import { WizardStep } from '$lib/layout';
|
||||
import { onMount } from 'svelte';
|
||||
import type { PaymentList } from '$lib/sdk/billing';
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
import { Button, Form, InputSelect, InputTags, InputTextarea } from '$lib/elements/forms';
|
||||
import { formatCurrency } from '$lib/helpers/numbers.js';
|
||||
import { Wizard } from '$lib/layout';
|
||||
import { type Coupon, type PaymentList } from '$lib/sdk/billing';
|
||||
import { type Coupon } from '$lib/sdk/billing';
|
||||
import { plansInfo, tierToPlan } from '$lib/stores/billing';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { organization } from '$lib/stores/organization';
|
||||
import { currentPlan, organization } from '$lib/stores/organization';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { user } from '$lib/stores/user';
|
||||
import { VARS } from '$lib/system';
|
||||
@@ -174,11 +174,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
$: isUpgrade = data.plan > data.organization.billingPlan;
|
||||
$: isDowngrade = data.plan < data.organization.billingPlan;
|
||||
$: isUpgrade = $plansInfo.get(selectedPlan).order > $currentPlan.order;
|
||||
$: isDowngrade = $plansInfo.get(selectedPlan).order < $currentPlan.order;
|
||||
$: isButtonDisabled = $organization.billingPlan === selectedPlan;
|
||||
|
||||
$: console.log(data.paymentMethods);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -193,48 +191,51 @@
|
||||
<Form bind:this={formComponent} onSubmit={handleSubmit} bind:isSubmitting>
|
||||
<Layout.Stack gap="xxl">
|
||||
<Fieldset legend="Select plan">
|
||||
<Typography.Text>
|
||||
For more details on our plans, visit our
|
||||
<Link.Anchor
|
||||
href="https://appwrite.io/pricing"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">pricing page</Link.Anchor
|
||||
>.
|
||||
</Typography.Text>
|
||||
{#if !data.selfService}
|
||||
<Alert.Inline status="info">
|
||||
Your contract is not eligible for manual changes. Please reach out to
|
||||
schedule a call or setup a dialog.
|
||||
</Alert.Inline>
|
||||
{/if}
|
||||
<PlanSelection
|
||||
bind:billingPlan={selectedPlan}
|
||||
selfService={data.selfService}
|
||||
anyOrgFree={data.hasFreeOrgs} />
|
||||
<Layout.Stack gap="l">
|
||||
<Typography.Text>
|
||||
For more details on our plans, visit our
|
||||
<Link.Anchor
|
||||
href="https://appwrite.io/pricing"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer">pricing page</Link.Anchor
|
||||
>.
|
||||
</Typography.Text>
|
||||
|
||||
{#if isDowngrade}
|
||||
{#if selectedPlan === BillingPlan.FREE}
|
||||
<PlanExcess
|
||||
tier={BillingPlan.FREE}
|
||||
class="u-margin-block-start-24"
|
||||
members={data?.members?.total ?? 0} />
|
||||
{:else if selectedPlan === BillingPlan.PRO && data.organization.billingPlan === BillingPlan.SCALE && collaborators?.length > 0}
|
||||
{@const extraMembers = collaborators?.length ?? 0}
|
||||
{@const price = formatCurrency(
|
||||
extraMembers *
|
||||
($plansInfo?.get(selectedPlan)?.addons?.member?.price ?? 0)
|
||||
)}
|
||||
<Alert.Inline status="error">
|
||||
<svelte:fragment slot="title">
|
||||
Your monthly payments will be adjusted for the Pro plan
|
||||
</svelte:fragment>
|
||||
After switching plans,
|
||||
<b
|
||||
>you will be charged {price} monthly for {extraMembers} team members.</b>
|
||||
This will be reflected in your next invoice.
|
||||
{#if !data.selfService}
|
||||
<Alert.Inline status="info">
|
||||
Your contract is not eligible for manual changes. Please reach out to
|
||||
schedule a call or setup a dialog.
|
||||
</Alert.Inline>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<PlanSelection
|
||||
bind:billingPlan={selectedPlan}
|
||||
selfService={data.selfService}
|
||||
anyOrgFree={data.hasFreeOrgs} />
|
||||
|
||||
{#if isDowngrade}
|
||||
{#if selectedPlan === BillingPlan.FREE}
|
||||
<PlanExcess
|
||||
tier={BillingPlan.FREE}
|
||||
members={data?.members?.total ?? 0} />
|
||||
{:else if selectedPlan === BillingPlan.PRO && data.organization.billingPlan === BillingPlan.SCALE && collaborators?.length > 0}
|
||||
{@const extraMembers = collaborators?.length ?? 0}
|
||||
{@const price = formatCurrency(
|
||||
extraMembers *
|
||||
($plansInfo?.get(selectedPlan)?.addons?.member?.price ?? 0)
|
||||
)}
|
||||
<Alert.Inline status="error">
|
||||
<svelte:fragment slot="title">
|
||||
Your monthly payments will be adjusted for the Pro plan
|
||||
</svelte:fragment>
|
||||
After switching plans,
|
||||
<b
|
||||
>you will be charged {price} monthly for {extraMembers} team members.</b>
|
||||
This will be reflected in your next invoice.
|
||||
</Alert.Inline>
|
||||
{/if}
|
||||
{/if}
|
||||
</Layout.Stack>
|
||||
</Fieldset>
|
||||
|
||||
<!-- Show email input if upgrading from free plan -->
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import { Modal } from '$lib/components';
|
||||
import { InputText, InputEmail, Button, FormList } from '$lib/elements/forms';
|
||||
import { InputText, InputEmail, Button } from '$lib/elements/forms';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
@@ -69,6 +69,7 @@
|
||||
bind:value={email} />
|
||||
<InputText id="member-name" label="Name" placeholder="Enter name" bind:value={name} />
|
||||
{#if isCloud}
|
||||
<!-- TODO: Torsten, input also no longer have popover atm -->
|
||||
<InputSelect
|
||||
required
|
||||
popover={Roles}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
import { base } from '$app/paths';
|
||||
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
|
||||
import { Modal, CustomId } from '$lib/components';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { InputText, Button, FormList } from '$lib/elements/forms';
|
||||
import { InputText, Button } from '$lib/elements/forms';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { ID, Region } from '@appwrite.io/console';
|
||||
|
||||
@@ -62,14 +62,14 @@
|
||||
|
||||
<Modal bind:show={showCreateProjectCloud} title={'Create project'}
|
||||
><CreateProject
|
||||
createProject={create}
|
||||
showTitle={false}
|
||||
bind:id={$createProject.id}
|
||||
bind:projectName={$createProject.name}
|
||||
bind:region={$createProject.region}
|
||||
{regions} />
|
||||
<svelte:fragment slot="footer"
|
||||
><Button.Button type="button" variant="primary" size="s" on:click={create}>
|
||||
Create</Button.Button
|
||||
></svelte:fragment>
|
||||
{regions}>
|
||||
<svelte:fragment slot="footer"
|
||||
><Button.Button type="button" variant="primary" size="s" on:click={create}>
|
||||
Create</Button.Button
|
||||
></svelte:fragment>
|
||||
</CreateProject>
|
||||
</Modal>
|
||||
@@ -1,7 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { Modal } from '$lib/components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
import { protocol } from '$routes/(console)/store.js';
|
||||
import {
|
||||
IconDotsHorizontal,
|
||||
IconExternalLink,
|
||||
IconPlus,
|
||||
IconRefresh,
|
||||
IconTrash
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { Divider, Fieldset, Layout } from '@appwrite.io/pink-svelte';
|
||||
import RecordsCard from '../recordsCard.svelte';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import { afterNavigate, invalidate } from '$app/navigation';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import type { Domain } from '$lib/sdk/domains';
|
||||
|
||||
const backPage = `${base}/organization-${$page.params.organization}/domains`;
|
||||
let backPage = `${base}/organization-${$page.params.organization}/domains`;
|
||||
|
||||
let domainName = '';
|
||||
let domain: Domain;
|
||||
@@ -29,6 +29,10 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
afterNavigate(({ from }) => {
|
||||
backPage = from.url?.pathname ?? `${base}/`;
|
||||
});
|
||||
</script>
|
||||
|
||||
<Wizard title="Add domain" href={backPage} column columnSize="s" hideFooter>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { Confirm } from '$lib/components';
|
||||
import type { Domain } from '$lib/sdk/domains';
|
||||
|
||||
export let show = false;
|
||||
export let selectedDomain: Models.Domain;
|
||||
export let selectedDomain: Domain;
|
||||
|
||||
let error = '';
|
||||
|
||||
|
||||
-1
@@ -1,6 +1,5 @@
|
||||
import { PAGE_LIMIT, Dependencies } from '$lib/constants';
|
||||
import { getSearch, pageToOffset, getLimit, getPage } from '$lib/helpers/load';
|
||||
import { sdk } from '$lib/stores/sdk.js';
|
||||
|
||||
export const load = async ({ parent, depends, url, route }) => {
|
||||
depends(Dependencies.DOMAIN);
|
||||
|
||||
+9
-18
@@ -18,27 +18,18 @@
|
||||
let error = '';
|
||||
async function fetchPreset() {
|
||||
switch (selectedPreset.toLowerCase()) {
|
||||
//TODO: finish switch statement
|
||||
case 'zoho':
|
||||
records = await sdk.forConsole.domains.getPresetZoho($page.params.domain);
|
||||
return records;
|
||||
case 'google workspace':
|
||||
records = await sdk.forConsole.domains.getPresetGoogleWorkspace(
|
||||
$page.params.domain
|
||||
);
|
||||
return records;
|
||||
case 'outlook':
|
||||
records = await sdk.forConsole.domains.getPresetOutlook($page.params.domain);
|
||||
return records;
|
||||
case 'proton mail':
|
||||
records = await sdk.forConsole.domains.getPresetProtonMail($page.params.domain);
|
||||
return records;
|
||||
return await sdk.forConsole.domains.getPresetZoho($page.params.domain);
|
||||
case 'mailgun':
|
||||
records = await sdk.forConsole.domains.getPresetMailgun($page.params.domain);
|
||||
return records;
|
||||
return await sdk.forConsole.domains.getPresetMailgun($page.params.domain);
|
||||
case 'outlook':
|
||||
return await sdk.forConsole.domains.getPresetOutlook($page.params.domain);
|
||||
case 'proton mail':
|
||||
return await sdk.forConsole.domains.getPresetProtonMail($page.params.domain);
|
||||
case 'icloud':
|
||||
records = await sdk.forConsole.domains.getPresetICloud($page.params.domain);
|
||||
return records;
|
||||
return await sdk.forConsole.domains.getPresetICloud($page.params.domain);
|
||||
case 'google workspace':
|
||||
return await sdk.forConsole.domains.getPresetGoogleWorkspace($page.params.domain);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
description: 'Registrar'
|
||||
},
|
||||
{
|
||||
value: domain?.nameservers || '-',
|
||||
value: domain?.nameservers ? domain?.nameservers : '-',
|
||||
description: 'Nameservers'
|
||||
},
|
||||
{
|
||||
|
||||
+4
-1
@@ -2,11 +2,14 @@
|
||||
import { Container } from '$lib/layout';
|
||||
import ChangeOrganization from './changeOrganization.svelte';
|
||||
import DeleteDomain from './deleteDomain.svelte';
|
||||
import type { OrganizationList } from '$lib/stores/organization';
|
||||
|
||||
export let data;
|
||||
// cloud only, so OrganizationList is returned!
|
||||
let organizations: OrganizationList = data.organizations as OrganizationList;
|
||||
</script>
|
||||
|
||||
<Container>
|
||||
<ChangeOrganization domain={data.domain} organizations={data.organizations} />
|
||||
<ChangeOrganization domain={data.domain} {organizations} />
|
||||
<DeleteDomain domain={data.domain} />
|
||||
</Container>
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
import { BoxAvatar, CardGrid } from '$lib/components';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { toLocaleDateTime } from '$lib/helpers/date';
|
||||
import type { Models } from '@appwrite.io/console';
|
||||
import Delete from '../../deleteDomainModal.svelte';
|
||||
import type { Domain } from '$lib/sdk/domains';
|
||||
|
||||
export let domain: Models.Domain;
|
||||
export let domain: Domain;
|
||||
let show = false;
|
||||
</script>
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { invalidate } from '$app/navigation';
|
||||
import type { Domain } from '$lib/sdk/domains';
|
||||
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
|
||||
import { Dependencies } from '$lib/constants';
|
||||
import { Input, InteractiveText, Layout, Table, Typography } from '@appwrite.io/pink-svelte';
|
||||
import { Link } from '$lib/elements';
|
||||
import { consoleVariables } from '$routes/(console)/store';
|
||||
import type { Domain } from '$lib/sdk/domains';
|
||||
|
||||
export let show = false;
|
||||
export let selectedDomain: Domain;
|
||||
@@ -52,7 +52,6 @@
|
||||
<Layout.Stack gap="s" direction="row" alignItems="center">
|
||||
<Typography.Text variant="l-500" color="--fgcolor-neutral-primary"
|
||||
>{selectedDomain.domain}</Typography.Text>
|
||||
\
|
||||
</Layout.Stack>
|
||||
<Typography.Text variant="m-400">
|
||||
Add the following nameservers on your DNS provider. Note that DNS changes may take time
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { goto } from '$app/navigation';
|
||||
import { base } from '$app/paths';
|
||||
import { page } from '$app/stores';
|
||||
import { AvatarGroup, Tab, Tabs } from '$lib/components';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { Pill } from '$lib/elements';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { toLocaleDate } from '$lib/helpers/date';
|
||||
import { isTabSelected } from '$lib/helpers/load';
|
||||
import { Cover } from '$lib/layout';
|
||||
import { daysLeftInTrial, getServiceLimit, plansInfo, readOnly } from '$lib/stores/billing';
|
||||
import { members, newMemberModal, newOrgModal, organization } from '$lib/stores/organization';
|
||||
import { members, newMemberModal, organization } from '$lib/stores/organization';
|
||||
import {
|
||||
canSeeBilling,
|
||||
canSeeDomains,
|
||||
canSeeProjects,
|
||||
canSeeTeams,
|
||||
isBilling,
|
||||
@@ -31,14 +28,6 @@
|
||||
isCloud &&
|
||||
(($readOnly && !GRACE_PERIOD_OVERRIDE) || (isLimited && $members?.total >= limit));
|
||||
});
|
||||
let showDropdown = false;
|
||||
|
||||
function createOrg() {
|
||||
showDropdown = false;
|
||||
if (isCloud) {
|
||||
goto(`${base}/create-organization`);
|
||||
} else newOrgModal.set(true);
|
||||
}
|
||||
|
||||
$: avatars = $members.memberships?.map((m) => m.userName || m.userEmail) ?? [];
|
||||
$: organizationId = $page.params.organization;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
|
||||
import { AvatarInitials, DropList, DropListItem, PaginationWithLimit } from '$lib/components';
|
||||
import { AvatarInitials, PaginationWithLimit } from '$lib/components';
|
||||
import { Button as ConsoleButton } from '$lib/elements/forms';
|
||||
import { Container } from '$lib/layout';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
|
||||
@@ -77,16 +77,15 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Modal title="Edit role" {error} size="big" bind:show={showEdit} onSubmit={submit}>
|
||||
<FormList>
|
||||
<InputSelect
|
||||
popover={Roles}
|
||||
id="role"
|
||||
label="Role"
|
||||
required
|
||||
options={roles}
|
||||
bind:value={role} />
|
||||
</FormList>
|
||||
<Modal title="Edit role" {error} size="s" bind:show={showEdit} onSubmit={submit}>
|
||||
<InputSelect
|
||||
popover={Roles}
|
||||
id="role"
|
||||
label="Role"
|
||||
required
|
||||
options={roles}
|
||||
bind:value={role} />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button secondary on:click={() => (showEdit = false)}>Cancel</Button>
|
||||
<Button submit submissionLoader>Update</Button>
|
||||
|
||||
@@ -94,30 +94,29 @@
|
||||
</script>
|
||||
|
||||
<Modal bind:error bind:show onSubmit={handleSubmit} title="Request BAA">
|
||||
<FormList>
|
||||
<InputEmail label="Email" placeholder="Enter email" id="email" bind:value={email} />
|
||||
<InputSelect
|
||||
label="Number of employees"
|
||||
id="employees"
|
||||
placeholder="Select number of employees"
|
||||
required
|
||||
options={employeesOptions}
|
||||
bind:value={employees} />
|
||||
<InputSelect
|
||||
label="Country"
|
||||
id="country"
|
||||
options={countryOptions}
|
||||
placeholder="Select country"
|
||||
required
|
||||
bind:value={country} />
|
||||
<InputText
|
||||
label="Your role"
|
||||
placeholder="Enter your role"
|
||||
id="role"
|
||||
bind:value={role}
|
||||
required />
|
||||
<InputText label="Website" placeholder="Enter website" id="website" bind:value={website} />
|
||||
</FormList>
|
||||
<InputEmail label="Email" placeholder="Enter email" id="email" bind:value={email} />
|
||||
<InputSelect
|
||||
label="Number of employees"
|
||||
id="employees"
|
||||
placeholder="Select number of employees"
|
||||
required
|
||||
options={employeesOptions}
|
||||
bind:value={employees} />
|
||||
<InputSelect
|
||||
label="Country"
|
||||
id="country"
|
||||
options={countryOptions}
|
||||
placeholder="Select country"
|
||||
required
|
||||
bind:value={country} />
|
||||
<InputText
|
||||
label="Your role"
|
||||
placeholder="Enter your role"
|
||||
id="role"
|
||||
bind:value={role}
|
||||
required />
|
||||
<InputText label="Website" placeholder="Enter website" id="website" bind:value={website} />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button submit>
|
||||
<span class="text">Send request</span>
|
||||
|
||||
@@ -96,30 +96,29 @@
|
||||
</script>
|
||||
|
||||
<Modal bind:error bind:show onSubmit={handleSubmit} title="Request SOC-2">
|
||||
<FormList>
|
||||
<InputEmail label="Email" placeholder="Enter email" id="email" bind:value={email} />
|
||||
<InputSelect
|
||||
label="Number of employees"
|
||||
id="employees"
|
||||
placeholder="Select number of employees"
|
||||
required
|
||||
options={employeesOptions}
|
||||
bind:value={employees} />
|
||||
<InputSelect
|
||||
label="Country"
|
||||
id="country"
|
||||
options={countryOptions}
|
||||
placeholder="Select country"
|
||||
required
|
||||
bind:value={country} />
|
||||
<InputText
|
||||
label="Your role"
|
||||
placeholder="Enter your role"
|
||||
id="role"
|
||||
bind:value={role}
|
||||
required />
|
||||
<InputText label="Website" placeholder="Enter website" id="website" bind:value={website} />
|
||||
</FormList>
|
||||
<InputEmail label="Email" placeholder="Enter email" id="email" bind:value={email} />
|
||||
<InputSelect
|
||||
label="Number of employees"
|
||||
id="employees"
|
||||
placeholder="Select number of employees"
|
||||
required
|
||||
options={employeesOptions}
|
||||
bind:value={employees} />
|
||||
<InputSelect
|
||||
label="Country"
|
||||
id="country"
|
||||
options={countryOptions}
|
||||
placeholder="Select country"
|
||||
required
|
||||
bind:value={country} />
|
||||
<InputText
|
||||
label="Your role"
|
||||
placeholder="Enter your role"
|
||||
id="role"
|
||||
bind:value={role}
|
||||
required />
|
||||
<InputText label="Website" placeholder="Enter website" id="website" bind:value={website} />
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button submit>
|
||||
<span class="text">Send request</span>
|
||||
|
||||
+1
-6
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Modal, SecondaryTabs, SecondaryTabsItem } from '$lib/components';
|
||||
import { Modal } from '$lib/components';
|
||||
import { Button, InputText } from '$lib/elements/forms';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
@@ -156,11 +156,6 @@
|
||||
</Modal>
|
||||
|
||||
<style>
|
||||
.box {
|
||||
padding: unset;
|
||||
border-radius: var(--border-radius-medium, 8px);
|
||||
}
|
||||
|
||||
:global(.max-height-dialog dialog) {
|
||||
max-height: 650px;
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
label="Authentik Base-Domain"
|
||||
placeholder="Your Authentik domain"
|
||||
bind:value={authentikDomain} />
|
||||
<Alert.Inline type="info">
|
||||
<Alert.Inline status="info">
|
||||
To complete set up, add this OAuth2 redirect URI to your {provider.name} app configuration.
|
||||
</Alert.Inline>
|
||||
<div>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { CopyInput, Modal } from '$lib/components';
|
||||
import { Button, FormList, InputPassword, InputSwitch, InputText } from '$lib/elements/forms';
|
||||
import { Button, InputPassword, InputSwitch, InputText } from '$lib/elements/forms';
|
||||
import { oAuthProviders, type Provider } from '$lib/stores/oauth-providers';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { onMount } from 'svelte';
|
||||
@@ -61,7 +61,6 @@
|
||||
label="App Secret"
|
||||
placeholder="Enter App Secret"
|
||||
minlength={0}
|
||||
showPasswordButton
|
||||
bind:value={clientSecret} />
|
||||
<InputText
|
||||
id="endpoint"
|
||||
|
||||
@@ -39,40 +39,40 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<Modal {error} size="big" bind:show onSubmit={update} on:close>
|
||||
<Modal {error} size="l" bind:show onSubmit={update} on:close>
|
||||
<svelte:fragment slot="title">{provider.name} OAuth2 settings</svelte:fragment>
|
||||
<FormList>
|
||||
<p>
|
||||
To use {provider.name} authentication in your application, first fill in this form. For more
|
||||
info you can
|
||||
<a class="link" href={oAuthProvider?.docs} target="_blank" rel="noopener noreferrer"
|
||||
>visit the docs.</a>
|
||||
</p>
|
||||
<InputSwitch id="state" bind:value={enabled} label={enabled ? 'Enabled' : 'Disabled'} />
|
||||
<InputText
|
||||
id="appID"
|
||||
label="App ID"
|
||||
autofocus={true}
|
||||
placeholder="Enter ID"
|
||||
bind:value={appId} />
|
||||
<InputPassword
|
||||
id="secret"
|
||||
label="App Secret"
|
||||
placeholder="Enter App Secret"
|
||||
minlength={0}
|
||||
bind:value={secret} />
|
||||
<Alert.Inline status="info">
|
||||
To complete the setup, create an OAuth2 client ID with "Web application" as the
|
||||
application type, then add this redirect URI to your {provider.name} configuration.
|
||||
</Alert.Inline>
|
||||
<div>
|
||||
<p>URI</p>
|
||||
<CopyInput
|
||||
value={`${
|
||||
sdk.forConsole.client.config.endpoint
|
||||
}/account/sessions/oauth2/callback/${provider.name.toLocaleLowerCase()}/${projectId}`} />
|
||||
</div>
|
||||
</FormList>
|
||||
|
||||
<p>
|
||||
To use {provider.name} authentication in your application, first fill in this form. For more
|
||||
info you can
|
||||
<a class="link" href={oAuthProvider?.docs} target="_blank" rel="noopener noreferrer"
|
||||
>visit the docs.</a>
|
||||
</p>
|
||||
<InputSwitch id="state" bind:value={enabled} label={enabled ? 'Enabled' : 'Disabled'} />
|
||||
<InputText
|
||||
id="appID"
|
||||
label="App ID"
|
||||
autofocus={true}
|
||||
placeholder="Enter ID"
|
||||
bind:value={appId} />
|
||||
<InputPassword
|
||||
id="secret"
|
||||
label="App Secret"
|
||||
placeholder="Enter App Secret"
|
||||
minlength={0}
|
||||
bind:value={secret} />
|
||||
<Alert.Inline status="info">
|
||||
To complete the setup, create an OAuth2 client ID with "Web application" as the application
|
||||
type, then add this redirect URI to your {provider.name} configuration.
|
||||
</Alert.Inline>
|
||||
<div>
|
||||
<p>URI</p>
|
||||
<CopyInput
|
||||
value={`${
|
||||
sdk.forConsole.client.config.endpoint
|
||||
}/account/sessions/oauth2/callback/${provider.name.toLocaleLowerCase()}/${projectId}`} />
|
||||
</div>
|
||||
|
||||
<svelte:fragment slot="footer">
|
||||
<Button secondary on:click={() => (provider = null)}>Cancel</Button>
|
||||
<Button
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { CopyInput, Modal } from '$lib/components';
|
||||
import { Button, FormList, InputPassword, InputSwitch, InputText } from '$lib/elements/forms';
|
||||
import { Button, InputPassword, InputSwitch, InputText } from '$lib/elements/forms';
|
||||
import { oAuthProviders, type Provider } from '$lib/stores/oauth-providers';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { CopyInput, Modal } from '$lib/components';
|
||||
import { Button, FormList, InputPassword, InputSwitch, InputText } from '$lib/elements/forms';
|
||||
import { Button, InputPassword, InputSwitch, InputText } from '$lib/elements/forms';
|
||||
import { oAuthProviders, type Provider } from '$lib/stores/oauth-providers';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
import { onMount } from 'svelte';
|
||||
@@ -65,7 +65,7 @@
|
||||
: provider.secret;
|
||||
</script>
|
||||
|
||||
<Modal {error} onSubmit={update} size="big" bind:show on:close>
|
||||
<Modal {error} onSubmit={update} size="l" bind:show on:close>
|
||||
<svelte:fragment slot="title">{provider.name} OAuth2 settings</svelte:fragment>
|
||||
<p>
|
||||
To use {provider.name} authentication in your application, first fill in this form. For more
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
: provider.secret;
|
||||
</script>
|
||||
|
||||
<Modal {error} onSubmit={update} size="big" bind:show on:close>
|
||||
<Modal {error} onSubmit={update} size="l" bind:show on:close>
|
||||
<svelte:fragment slot="title">{provider.name} OAuth2 settings</svelte:fragment>
|
||||
<p>
|
||||
To use {provider.name} authentication in your application, first fill in this form. For more
|
||||
|
||||
Loaded 100 of 275 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user