diff --git a/src/lib/elements/forms/inputURL.svelte b/src/lib/elements/forms/inputURL.svelte index 560314410f..8ea497448f 100644 --- a/src/lib/elements/forms/inputURL.svelte +++ b/src/lib/elements/forms/inputURL.svelte @@ -15,6 +15,7 @@ export let autocomplete = false; export let maxlength: number = null; export let leadingIcon: ComponentType | undefined = undefined; + export let helper: string = undefined; let error: string; @@ -52,7 +53,7 @@ type="url" autofocus={autofocus || undefined} autocomplete={autocomplete ? 'on' : 'off'} - helper={error} + helper={error || helper} state={error ? 'error' : 'default'} on:invalid={handleInvalid} on:input diff --git a/src/lib/helpers/tooltipContent.ts b/src/lib/helpers/tooltipContent.ts new file mode 100644 index 0000000000..101d776e7b --- /dev/null +++ b/src/lib/helpers/tooltipContent.ts @@ -0,0 +1,7 @@ +export const BODY_TOOLTIP_MAX_WIDTH = 'min(22rem, calc(100vw - 2rem))'; + +export const BODY_TOOLTIP_WRAPPER_STYLE = + 'min-width: 0; max-width: 100%; overflow-wrap: break-word; white-space: normal'; + +export const BODY_TOOLTIP_WRAPPER_STYLE_PRELINE = + 'min-width: 0; max-width: 100%; overflow-wrap: break-word; white-space: pre-line'; diff --git a/src/lib/layout/containerButton.svelte b/src/lib/layout/containerButton.svelte index c331c2eb74..370abfe349 100644 --- a/src/lib/layout/containerButton.svelte +++ b/src/lib/layout/containerButton.svelte @@ -1,5 +1,9 @@ - + -
{tooltipContent}
+
{tooltipContent}
diff --git a/src/routes/(console)/account/organizations/+page.svelte b/src/routes/(console)/account/organizations/+page.svelte index 2ed7d57dc3..4d748e1e15 100644 --- a/src/routes/(console)/account/organizations/+page.svelte +++ b/src/routes/(console)/account/organizations/+page.svelte @@ -17,6 +17,10 @@ import type { Models } from '@appwrite.io/console'; import { daysLeftInTrial, billingIdToPlan } from '$lib/stores/billing'; import { toLocaleDate } from '$lib/helpers/date'; + import { + BODY_TOOLTIP_MAX_WIDTH, + BODY_TOOLTIP_WRAPPER_STYLE + } from '$lib/helpers/tooltipContent'; import { goto } from '$app/navigation'; import { Icon, Tooltip, Typography } from '@appwrite.io/pink-svelte'; import { IconPlus } from '@appwrite.io/pink-icons-svelte'; @@ -132,29 +136,30 @@ {#await planName} {:then name} - + - +
You are limited to 1 free organization per account - +
{/await} {/if} {/if} {#if isOrganizationOnTrial(organization)} - +
- {`Your trial ends on ${toLocaleDate( +
+ {`Your trial ends on ${toLocaleDate( organization.billingStartDate - )}. ${$daysLeftInTrial} days remaining.`} + )}. ${$daysLeftInTrial} days remaining.`} +
{/if} diff --git a/src/routes/(console)/organization-[organization]/+page.svelte b/src/routes/(console)/organization-[organization]/+page.svelte index b022f8f879..7e8582095d 100644 --- a/src/routes/(console)/organization-[organization]/+page.svelte +++ b/src/routes/(console)/organization-[organization]/+page.svelte @@ -35,6 +35,10 @@ } from '@appwrite.io/pink-icons-svelte'; import type { PageProps } from './$types'; import { getPlatformInfo } from '$lib/helpers/platform'; + import { + BODY_TOOLTIP_MAX_WIDTH, + BODY_TOOLTIP_WRAPPER_STYLE + } from '$lib/helpers/tooltipContent'; import CreateProjectCloud from './createProjectCloud.svelte'; import { regions as regionsStore } from '$lib/stores/organization'; @@ -147,16 +151,16 @@ {#if $canWriteProjects} {#if projectCreationDisabled && reachedProjectLimit} - +
- +
You have reached your limit of {projectsLimit} projects. - +
{:else} -
+
You have reached the maximum number of functions for your plan.
diff --git a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/+page.svelte b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/+page.svelte index b1b9e7f6ef..8cce6b5c19 100644 --- a/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/functions/function-[function]/executions/+page.svelte @@ -2,6 +2,10 @@ import { invalidate } from '$app/navigation'; import { Empty, EmptyFilter, PaginationWithLimit } from '$lib/components'; import { Dependencies } from '$lib/constants'; + import { + BODY_TOOLTIP_MAX_WIDTH, + BODY_TOOLTIP_WRAPPER_STYLE_PRELINE + } from '$lib/helpers/tooltipContent'; import { Button } from '$lib/elements/forms'; import { Container, ResponsiveContainerHeader } from '$lib/layout'; import { realtime } from '$lib/stores/sdk'; @@ -27,7 +31,7 @@ - +
- +
Execution cannot be created because there is no active deployment. - +
@@ -63,7 +67,7 @@ event="empty_documentation" size="s" ariaLabel="create execution">Documentation - +
- +
Execution cannot be created because there is no active deployment. - +
diff --git a/src/routes/(console)/project-[region]-[project]/overview/platforms/action.svelte b/src/routes/(console)/project-[region]-[project]/overview/platforms/action.svelte index f08d2f0cc7..740f792ebb 100644 --- a/src/routes/(console)/project-[region]-[project]/overview/platforms/action.svelte +++ b/src/routes/(console)/project-[region]-[project]/overview/platforms/action.svelte @@ -14,13 +14,17 @@ import { isServiceLimited } from '$lib/stores/billing'; import { organization } from '$lib/stores/organization'; import { page } from '$app/state'; + import { + BODY_TOOLTIP_MAX_WIDTH, + BODY_TOOLTIP_WRAPPER_STYLE_PRELINE + } from '$lib/helpers/tooltipContent'; $: isLimited = isServiceLimited('platforms', $organization, page.data.platforms.total); {#if $canWritePlatforms} {#if isLimited} - +
-
+
You have reached the maximum number of platforms for your plan in a project.
diff --git a/src/routes/(console)/project-[region]-[project]/settings/webhooks/+page.svelte b/src/routes/(console)/project-[region]-[project]/settings/webhooks/+page.svelte index 4a2f324ae2..3667ce4224 100644 --- a/src/routes/(console)/project-[region]-[project]/settings/webhooks/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/settings/webhooks/+page.svelte @@ -18,6 +18,10 @@ import { goto } from '$app/navigation'; import { isServiceLimited } from '$lib/stores/billing'; import { organization } from '$lib/stores/organization'; + import { + BODY_TOOLTIP_MAX_WIDTH, + BODY_TOOLTIP_WRAPPER_STYLE_PRELINE + } from '$lib/helpers/tooltipContent'; export let data: PageData; @@ -39,7 +43,7 @@ {#if $canWriteWebhooks} - +
-
+
You have reached the maximum number of webhooks for your plan.
diff --git a/src/routes/(console)/project-[region]-[project]/settings/webhooks/create/+page.svelte b/src/routes/(console)/project-[region]-[project]/settings/webhooks/create/+page.svelte index 3c95e0fed4..672093e9ed 100644 --- a/src/routes/(console)/project-[region]-[project]/settings/webhooks/create/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/settings/webhooks/create/+page.svelte @@ -49,8 +49,11 @@ `${base}/project-${page.params.region}-${page.params.project}/settings/webhooks/${webhook.$id}` ); } catch (error) { - trackError(error.message, Submit.DomainCreate); - throw new Error(error.message); + addNotification({ + type: 'error', + message: error.message + }); + trackError(error, Submit.WebhookCreate); } } diff --git a/src/routes/(console)/project-[region]-[project]/settings/webhooks/create/step1.svelte b/src/routes/(console)/project-[region]-[project]/settings/webhooks/create/step1.svelte index e4595151ed..274d114726 100644 --- a/src/routes/(console)/project-[region]-[project]/settings/webhooks/create/step1.svelte +++ b/src/routes/(console)/project-[region]-[project]/settings/webhooks/create/step1.svelte @@ -13,6 +13,7 @@ label="POST URL" id="url" placeholder="https://example.com/callback" + helper="Must be https (or http) and a public domain — localhost and private URLs are not accepted on Appwrite Cloud." bind:value={url} required /> diff --git a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.svelte b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.svelte index 45a17fc3bb..2d8db89b04 100644 --- a/src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/sites/site-[site]/+page.svelte @@ -10,6 +10,10 @@ import { realtime } from '$lib/stores/sdk'; import { invalidate } from '$app/navigation'; import { Dependencies } from '$lib/constants'; + import { + BODY_TOOLTIP_MAX_WIDTH, + BODY_TOOLTIP_WRAPPER_STYLE + } from '$lib/helpers/tooltipContent'; import { onMount } from 'svelte'; import { page } from '$app/state'; import { base } from '$app/paths'; @@ -44,7 +48,9 @@ Visit {/if} - +
- +
Rollback is possible only if there is a deployment that is ready and was active. - +
{/snippet} diff --git a/src/routes/(console)/project-[region]-[project]/storage/+page.svelte b/src/routes/(console)/project-[region]-[project]/storage/+page.svelte index aa629e2003..bc3f408da3 100644 --- a/src/routes/(console)/project-[region]-[project]/storage/+page.svelte +++ b/src/routes/(console)/project-[region]-[project]/storage/+page.svelte @@ -21,6 +21,10 @@ import { isServiceLimited } from '$lib/stores/billing'; import type { PageProps } from './$types'; import { organization } from '$lib/stores/organization'; + import { + BODY_TOOLTIP_MAX_WIDTH, + BODY_TOOLTIP_WRAPPER_STYLE_PRELINE + } from '$lib/helpers/tooltipContent'; let { data }: PageProps = $props(); @@ -44,7 +48,7 @@ view={data.view} searchPlaceholder="Search by name or ID"> {#if $canWriteBuckets} - +
-
+
You have reached the maximum number of buckets for your plan.