mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
feat: more logic fixes
This commit is contained in:
1 parent
6878780be8
commit
20b6f207b1
4 files changed
+28
-19
No files matched your search
@@ -4,15 +4,16 @@
|
||||
import AppwriteLogoLight from '$lib/images/appwrite-logo-light.svg';
|
||||
import LoginDark from '$lib/images/login/login-dark-mode.png';
|
||||
import LoginLight from '$lib/images/login/login-light-mode.png';
|
||||
import type { Coupon } from '$lib/sdk/billing';
|
||||
import { app } from '$lib/stores/app';
|
||||
import { user } from '$lib/stores/user';
|
||||
|
||||
export const imgLight = LoginLight;
|
||||
export const imgDark = LoginDark;
|
||||
|
||||
export let campaign: string = null;
|
||||
export let coupon: Coupon = null;
|
||||
|
||||
$: variation = campaign ? 'card' : 'default';
|
||||
$: variation = coupon?.code ? 'card' : 'default';
|
||||
</script>
|
||||
|
||||
<main class="grid-1-1 is-full-page" id="main">
|
||||
@@ -52,19 +53,19 @@
|
||||
{:else if variation === 'card'}
|
||||
<div class="u-flex u-flex-vertical u-main-center u-cross-center" style=" height: 100%">
|
||||
<img
|
||||
src={`/images/campaigns/${campaign}/${$app.themeInUse}.png`}
|
||||
class="u-block"
|
||||
src={`/images/campaigns/${coupon.campaign}/${$app.themeInUse}.png`}
|
||||
class="u-block u-image-object-fit-cover"
|
||||
width="401"
|
||||
height="243"
|
||||
alt="promo" />
|
||||
|
||||
<div class="u-text-center">
|
||||
<Heading size="4" tag="h3" class="u-margin-block-start-56">
|
||||
You've received $15 in credits
|
||||
You've received ${coupon.credits} in credits
|
||||
</Heading>
|
||||
<p class="body-text-1 u-margin-block-start-8">
|
||||
Get $15 in credits when you sign up and create an organization with a Pro
|
||||
plan.
|
||||
Get ${coupon.credits} in credits when you upgrade or create an organization with
|
||||
a Pro plan.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
WizardSecondaryHeader
|
||||
} from '$lib/layout';
|
||||
import { type PaymentList } from '$lib/sdk/billing';
|
||||
import { app } from '$lib/stores/app';
|
||||
import { addNotification } from '$lib/stores/notifications';
|
||||
import { organizationList, type Organization } from '$lib/stores/organization';
|
||||
import { sdk } from '$lib/stores/sdk';
|
||||
@@ -180,16 +181,23 @@
|
||||
</Form>
|
||||
{/if}
|
||||
<svelte:fragment slot="aside">
|
||||
{#if selectedOrg?.billingPlan}
|
||||
<div class="card">
|
||||
<img src="/images/3D-card-illust-light.png" alt="" />
|
||||
</div>
|
||||
<EstimatedTotalBox
|
||||
bind:billingPlan={selectedOrg.billingPlan}
|
||||
{collaborators}
|
||||
bind:couponData={data.couponData}
|
||||
bind:billingBudget />
|
||||
{/if}
|
||||
<div class="card">
|
||||
<!-- <img
|
||||
src={`/images/campaigns/${data?.couponData?.campaign}/${$app.themeInUse}.png`}
|
||||
class="u-block"
|
||||
width="401"
|
||||
height="243"
|
||||
alt="promo" /> -->
|
||||
<img
|
||||
src={`/images/campaigns/startup/${$app.themeInUse}.png`}
|
||||
class="u-block u-image-object-fit-cover"
|
||||
alt="promo" />
|
||||
</div>
|
||||
<EstimatedTotalBox
|
||||
billingPlan={BillingPlan.PRO}
|
||||
{collaborators}
|
||||
bind:couponData={data.couponData}
|
||||
bind:billingBudget />
|
||||
</svelte:fragment>
|
||||
</WizardSecondaryContent>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export const load = async ({ url }) => {
|
||||
}
|
||||
}
|
||||
if (!couponData?.campaign) {
|
||||
redirect(303, `${base}/console`);
|
||||
// redirect(303, `${base}/console`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<title>Sign in - Appwrite</title>
|
||||
</svelte:head>
|
||||
|
||||
<Unauthenticated campaign={data?.couponData?.campaign}>
|
||||
<Unauthenticated coupon={data?.couponData}>
|
||||
<svelte:fragment slot="title">Sign in</svelte:fragment>
|
||||
<svelte:fragment>
|
||||
<Form onSubmit={login}>
|
||||
|
||||
Reference in new issue
Block a user