From 4e76c07a5cc5088c9b837c1ed03e5519eb4a92df Mon Sep 17 00:00:00 2001 From: ernstmul Date: Tue, 11 Mar 2025 10:52:04 +0100 Subject: [PATCH 1/5] WIP --- src/routes/(console)/supportWizard.svelte | 171 +++++++++++++++++----- 1 file changed, 136 insertions(+), 35 deletions(-) diff --git a/src/routes/(console)/supportWizard.svelte b/src/routes/(console)/supportWizard.svelte index d2e6a7fbc..c3d956e2a 100644 --- a/src/routes/(console)/supportWizard.svelte +++ b/src/routes/(console)/supportWizard.svelte @@ -1,4 +1,11 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + How can we help you? + Please describe your request in detail. If applicable, include steps for + reproduction of any in-app issues. + + + Choose a topic + + { + $supportData.category = 'general'; + }} + selected={$supportData.category === 'general'}>general + { + $supportData.category = 'billing'; + }} + selected={$supportData.category === 'billing'}>billing + { + $supportData.category = 'technical'; + }} + selected={$supportData.category === 'technical'}>technical + + + + + + + Submit + + + -

Contact the Appwrite Team

-

- If you found a bug or have questions, please reach out to the Appwrite team. We try to - respond to all messages within our office hours. -

-

- Available: {supportWeekDays}, {supportTimings} -

-
- Currently: - {#if isSupportOnline()} -
+ + Contact the Appwrite Team + If you found a bug or have questions, please reach out to the Appwrite team. We try + to respond to all messages within our office hours. + + Available: + {supportWeekDays}, {supportTimings} + + + Currently: + {#if isSupportOnline()} + + + Online + {:else} + + + Offline + + {/if} + +
-
+ From bbc947582efa599c6da8dec7055121e18ca2f8b7 Mon Sep 17 00:00:00 2001 From: ernstmul Date: Tue, 11 Mar 2025 11:08:53 +0100 Subject: [PATCH 2/5] Support wizard to V2 --- src/routes/(console)/supportWizard.svelte | 146 +++++++++------------- 1 file changed, 56 insertions(+), 90 deletions(-) diff --git a/src/routes/(console)/supportWizard.svelte b/src/routes/(console)/supportWizard.svelte index c3d956e2a..1caae890a 100644 --- a/src/routes/(console)/supportWizard.svelte +++ b/src/routes/(console)/supportWizard.svelte @@ -4,7 +4,7 @@ import { supportData, isSupportOnline } from './wizard/support/store'; import { onMount } from 'svelte'; import { sdk } from '$lib/stores/sdk'; - import { InputSelect, InputText, InputTextarea } from '$lib/elements/forms/index.js'; + import { Form, InputSelect, InputText, InputTextarea } from '$lib/elements/forms/index.js'; import { Submit, trackError, trackEvent } from '$lib/actions/analytics'; import { @@ -41,21 +41,6 @@ }); async function handleSubmit() { - console.log({ - email: $user.email, - subject: $supportData.subject, - firstName: $user?.name || 'Unknown', - message: $supportData.message, - tags: ['cloud'], - customFields: [ - { id: '41612', value: $supportData.category }, - { id: '48493', value: $user?.name ?? '' }, - { id: '48492', value: $organization?.$id ?? '' }, - { id: '48491', value: $supportData?.project ?? '' }, - { id: '48490', value: $user?.$id ?? '' } - ] - }); - return; const response = await fetch(`${VARS.GROWTH_ENDPOINT}/support`, { method: 'POST', headers: { @@ -118,83 +103,64 @@ $: supportWeekDays = `${utcWeekDayToLocaleWeekDay(workTimings.startDay, workTimings.start)} - ${utcWeekDayToLocaleWeekDay(workTimings.endDay, workTimings.end)}`; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - How can we help you? - Please describe your request in detail. If applicable, include steps for - reproduction of any in-app issues. - - - Choose a topic - - +
+ + + How can we help you? + Please describe your request in detail. If applicable, include steps for + reproduction of any in-app issues. + + + Choose a topic + + { + $supportData.category = 'general'; + }} + selected={$supportData.category === 'general'}>general + { + $supportData.category = 'billing'; + }} + selected={$supportData.category === 'billing'}>billing + { + $supportData.category = 'technical'; + }} + selected={$supportData.category === 'technical'}>technical + + + + + + + { - $supportData.category = 'general'; - }} - selected={$supportData.category === 'general'}>general - { - $supportData.category = 'billing'; - }} - selected={$supportData.category === 'billing'}>billing - { - $supportData.category = 'technical'; - }} - selected={$supportData.category === 'technical'}>technical + wizard.hide(); + }}>Cancel + Submit - - - - - Submit - - + From 6ceada073b5987056ddfbfb7d3f62ce24b8e9c0d Mon Sep 17 00:00:00 2001 From: ernstmul Date: Tue, 11 Mar 2025 11:15:24 +0100 Subject: [PATCH 3/5] Add card for aside --- src/routes/(console)/supportWizard.svelte | 50 ++++++++++++----------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/src/routes/(console)/supportWizard.svelte b/src/routes/(console)/supportWizard.svelte index 1caae890a..865260851 100644 --- a/src/routes/(console)/supportWizard.svelte +++ b/src/routes/(console)/supportWizard.svelte @@ -1,6 +1,6 @@ - - - How can we help you? - - Please describe your request in detail. If applicable, include steps for reproduction of any - in-app issues. - -
-

Choose a topic

-
- {#each ['general', 'billing', 'technical'] as topic} - { - $supportData.category = topic; - }}>{topic} - {/each} -
-
-
- - {#if options?.length} - - {/if} - - - - -
-