-
Notifications
You must be signed in to change notification settings - Fork 183
New layout for support and add subject #1564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
bc20be4
add: subject to support wizard form.
ItzNotABug 7ff085d
new: support layout.
ItzNotABug e1fa344
address comments, fix colors.
ItzNotABug 25f5bd0
ci: empty commit
ItzNotABug 7ebad3c
Merge branch 'main' into `fix-support`.
ItzNotABug c51bf9c
ci: empty commit
ItzNotABug 5294517
address comments, fix styles.
ItzNotABug 0b404df
address comments, fix styles.
ItzNotABug 9c2154b
address comments.
ItzNotABug 3c6f2eb
update: color tokens.
ItzNotABug c75db74
address comment: `add a comment explaining why we need this workaround`.
ItzNotABug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,123 +1,159 @@ | ||
<script lang="ts"> | ||
import { Button } from '$lib/elements/forms'; | ||
import { app } from '$lib/stores/app'; | ||
import { wizard } from '$lib/stores/wizard'; | ||
import SupportWizard from '$routes/(console)/supportWizard.svelte'; | ||
import { showSupportModal } from '$routes/(console)/wizard/support/store'; | ||
import { isCloud } from '$lib/system'; | ||
import { isSupportOnline, showSupportModal } from '$routes/(console)/wizard/support/store'; | ||
import { organization } from '$lib/stores/organization'; | ||
import { BillingPlan } from '$lib/constants'; | ||
import { trackEvent } from '$lib/actions/analytics'; | ||
import { localeTimezoneName, utcHourToLocaleHour } from '$lib/helpers/date'; | ||
import { localeShortTimezoneName, utcHourToLocaleHour } from '$lib/helpers/date'; | ||
import { upgradeURL } from '$lib/stores/billing'; | ||
import { Card } from '$lib/components/index'; | ||
import { app } from '$lib/stores/app'; | ||
|
||
export let show = false; | ||
|
||
$: isPaid = | ||
$organization?.billingPlan === BillingPlan.PRO || | ||
$organization?.billingPlan === BillingPlan.SCALE; | ||
|
||
$: supportTimings = `${utcHourToLocaleHour('16:00')} - ${utcHourToLocaleHour('00:00')} ${localeTimezoneName()}`; | ||
$: supportTimings = `${utcHourToLocaleHour('16:00')} - ${utcHourToLocaleHour('00:00')} ${localeShortTimezoneName()}`; | ||
|
||
type SupportOption = { | ||
cta?: string; | ||
icon: string; | ||
label: string; | ||
link?: string; | ||
description: string; | ||
showSupport: boolean; | ||
}; | ||
|
||
const supportOptions: SupportOption[] = [ | ||
{ | ||
showSupport: true, | ||
icon: 'support', | ||
label: 'Premium support', | ||
description: 'Get priority email support from the Appwrite team' | ||
}, | ||
|
||
{ | ||
icon: 'discord', | ||
cta: 'Discord', | ||
showSupport: false, | ||
label: 'Community support', | ||
link: 'https://appwrite.io/discord', | ||
description: 'Get support from our community through Discord' | ||
}, | ||
{ | ||
icon: 'github', | ||
cta: 'Open issue', | ||
showSupport: false, | ||
label: 'Open GitHub issue', | ||
link: 'https://github.com/appwrite', | ||
description: 'Report a bug or pitch a new feature' | ||
} | ||
]; | ||
</script> | ||
|
||
{#if isCloud} | ||
ItzNotABug marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<section class="drop-section u-grid u-gap-24 u-padding-24"> | ||
<div> | ||
<h4 class="eyebrow-heading-3">Premium support</h4> | ||
{#if isPaid} | ||
<section class="drop-section support-section"> | ||
<h4 class="heading-level-6">Support</h4> | ||
|
||
{#each supportOptions as option} | ||
<Card | ||
isTile | ||
class="restore-modal-inner-card u-flex u-flex-vertical u-gap-12" | ||
style="border-radius: var(--border-radius-small, 8px); padding: 0.65rem;"> | ||
<div class="u-flex u-flex-vertical u-gap-4"> | ||
<h4 class="body-text-2 u-bold">{option.label}</h4> | ||
|
||
<p class="u-line-height-1-5 u-margin-block-start-8"> | ||
Get personalized support from the Appwrite team from <b>{supportTimings}</b> | ||
{option.description} | ||
</p> | ||
{/if} | ||
</div> | ||
{#if $organization?.billingPlan === BillingPlan.FREE} | ||
<Button | ||
fullWidth | ||
href={$upgradeURL} | ||
on:click={() => { | ||
trackEvent('click_organization_upgrade', { | ||
from: 'button', | ||
source: 'support_menu' | ||
}); | ||
}}> | ||
<span class="text">Get Premium support</span> | ||
</Button> | ||
{:else} | ||
<Button | ||
secondary | ||
fullWidth | ||
on:click={() => { | ||
show = false; | ||
$showSupportModal = false; | ||
wizard.start(SupportWizard); | ||
}}> | ||
<span class="text">Contact our Support Team</span> | ||
</Button> | ||
{/if} | ||
</section> | ||
{/if} | ||
<section class="drop-section u-grid u-gap-24 u-padding-24"> | ||
<div> | ||
<h4 class="eyebrow-heading-3">Troubleshooting</h4> | ||
</div> | ||
|
||
<div class="u-margin-block-start-8 u-width-full-line"> | ||
{#key $app.themeInUse} | ||
<iframe | ||
style="color-scheme: none" | ||
title="Appwrite Status" | ||
src={`https://status.appwrite.online/badge?theme=${ | ||
$app.themeInUse === 'dark' ? 'dark' : 'light' | ||
}`} | ||
width="250" | ||
height="30" | ||
frameborder="0" | ||
scrolling="no"> | ||
</iframe> | ||
{/key} | ||
</div> | ||
</div> | ||
{#if option.showSupport} | ||
<div class="u-flex u-gap-12 u-cross-center"> | ||
{#if !isPaid} | ||
ItzNotABug marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<Button | ||
href={$upgradeURL} | ||
on:click={() => { | ||
trackEvent('click_organization_upgrade', { | ||
from: 'button', | ||
source: 'support_menu' | ||
}); | ||
}} | ||
><span class="text">Get Premium support</span> | ||
</Button> | ||
{:else} | ||
<Button | ||
secondary | ||
on:click={() => { | ||
show = false; | ||
$showSupportModal = false; | ||
wizard.start(SupportWizard); | ||
}}> | ||
<span class="text">Contact support</span> | ||
</Button> | ||
{/if} | ||
|
||
<div class="u-flex u-gap-16"> | ||
<a | ||
href="https://appwrite.io/docs" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
class="button is-secondary u-padding-inline-12 u-stretch u-main-center u-gap-4 u-flex-basis-auto"> | ||
<span class="icon-book-open" aria-hidden="true" /> | ||
<span class="text">Docs</span> | ||
</a> | ||
<a | ||
href="https://github.com/appwrite/appwrite/issues" | ||
aria-label="Open issue on GitHub" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
class="button is-secondary u-padding-inline-12 u-stretch u-main-center u-gap-4 u-flex-basis-auto"> | ||
<span class="icon-github" aria-hidden="true" /> | ||
<span class="text">Open issue</span> | ||
</a> | ||
</div> | ||
</section> | ||
<section class="drop-section u-grid u-gap-8 u-padding-24"> | ||
<div> | ||
<h4 class="eyebrow-heading-3">Community support</h4> | ||
<p class="text u-margin-block-start-8">Get help from our community</p> | ||
<div class="u-flex u-gap-4 u-cross-center"> | ||
{#if isSupportOnline()} | ||
<span | ||
class="icon-check-circle u-color-text-success" | ||
aria-hidden="true" /> | ||
{/if} | ||
|
||
{supportTimings} | ||
</div> | ||
</div> | ||
{:else} | ||
<Button | ||
href={option.link} | ||
external | ||
secondary | ||
class="u-flex u-cross-center u-gap-6" | ||
on:click={() => { | ||
trackEvent('click_organization_upgrade', { | ||
from: 'button', | ||
source: 'support_menu' | ||
}); | ||
}}> | ||
<span class={`icon-${option.icon}`} /> | ||
<span>{option.cta}</span> | ||
</Button> | ||
{/if} | ||
</Card> | ||
{/each} | ||
|
||
<div class="u-width-full-line"> | ||
{#key $app.themeInUse} | ||
<iframe | ||
style="color-scheme: none" | ||
title="Appwrite Status" | ||
src={`https://status.appwrite.online/badge?theme=${ | ||
$app.themeInUse === 'dark' ? 'dark' : 'light' | ||
}`} | ||
width="250" | ||
height="30" | ||
frameborder="0" | ||
scrolling="no"> | ||
</iframe> | ||
{/key} | ||
</div> | ||
<ul class="u-flex u-gap-8"> | ||
<li> | ||
<Button href="https://github.com/appwrite" text noMargin external ariaLabel="Github"> | ||
<span class="icon-github" aria-hidden="true" /> | ||
</Button> | ||
</li> | ||
<li> | ||
<Button | ||
href="https://appwrite.io/discord" | ||
round | ||
text | ||
noMargin | ||
external | ||
ariaLabel="Discord"> | ||
<span class="icon-discord" aria-hidden="true" /> | ||
</Button> | ||
</li> | ||
</ul> | ||
</section> | ||
|
||
<style> | ||
.support-section { | ||
gap: 1rem; | ||
padding: 20px; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.support-section { | ||
gap: 1.25rem; | ||
padding: 0.5rem; | ||
} | ||
} | ||
</style> | ||
ItzNotABug marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.