From 7ff085d0870f428d1f27eb3a6ff29e483fb1bdd8 Mon Sep 17 00:00:00 2001 From: Darshan Date: Mon, 16 Dec 2024 11:15:38 +0530 Subject: [PATCH] new: support layout. --- src/lib/components/support.svelte | 236 +++++++++++++++++------------- src/lib/helpers/date.ts | 5 + src/lib/layout/header.svelte | 2 +- 3 files changed, 142 insertions(+), 101 deletions(-) diff --git a/src/lib/components/support.svelte b/src/lib/components/support.svelte index 66d922d41..8ed77f6ec 100644 --- a/src/lib/components/support.svelte +++ b/src/lib/components/support.svelte @@ -1,15 +1,15 @@ -{#if isCloud} -
-
-

Premium support

- {#if isPaid} +
+

Support

+ + {#each supportOptions as option} + +
+

{option.label}

+

- Get personalized support from the Appwrite team from {supportTimings} + {option.description}

+
+ + {#if option.showSupport} +
+ {#if !isPaid} + + {:else} + + {/if} + +
+ {#if isSupportOnline()} +
+
+ {:else} + {/if} -
- {#if $organization?.billingPlan === BillingPlan.FREE} - - {:else} - - {/if} -
-{/if} -
-
-

Troubleshooting

+ + {/each} -
- {#key $app.themeInUse} - - {/key} -
-
- -
- - - - +
+ {#key $app.themeInUse} + + {/key}
-
-
-

Community support

-

Get help from our community

-
- -
+ + diff --git a/src/lib/helpers/date.ts b/src/lib/helpers/date.ts index f8275753b..87bc7dc5f 100644 --- a/src/lib/helpers/date.ts +++ b/src/lib/helpers/date.ts @@ -128,6 +128,11 @@ export const localeTimezoneName = () => { return dateWithTimezone.split(', ')[1]; }; +export const localeShortTimezoneName = () => { + const timezone = localeTimezoneName(); + return timezone.match(/[A-Z]/g)?.join('') || timezone; +}; + export const isSameDay = (date1: Date, date2: Date) => { return ( date1.getFullYear() === date2.getFullYear() && diff --git a/src/lib/layout/header.svelte b/src/lib/layout/header.svelte index 390cad41b..124cbba96 100644 --- a/src/lib/layout/header.svelte +++ b/src/lib/layout/header.svelte @@ -127,7 +127,7 @@ {#if isCloud} - +