diff --git a/src/lib/images/login/login-studio.png b/src/lib/images/login/login-studio.png
new file mode 100644
index 000000000..d43c0c887
Binary files /dev/null and b/src/lib/images/login/login-studio.png differ
diff --git a/src/lib/layout/index.ts b/src/lib/layout/index.ts
index 11a2f4fc8..931204b06 100644
--- a/src/lib/layout/index.ts
+++ b/src/lib/layout/index.ts
@@ -9,7 +9,6 @@ export { default as Shell } from './shell.svelte';
export { default as WizardWithSteps } from './wizardWithSteps.svelte';
export { default as WizardStep } from './wizardStep.svelte';
export { default as Breadcrumbs } from './breadcrumbs.svelte';
-export { default as Unauthenticated } from './unauthenticated.svelte';
export { default as Usage, type UsagePeriods } from './usage.svelte';
export { default as UsageMultiple } from './usageMultiple.svelte';
export { default as Activity } from './activity.svelte';
diff --git a/src/lib/layout/unauthenticated.svelte b/src/lib/profiles/(unauthenticated)/appwrite.svelte
similarity index 97%
rename from src/lib/layout/unauthenticated.svelte
rename to src/lib/profiles/(unauthenticated)/appwrite.svelte
index f9ad9552b..2e5e89273 100644
--- a/src/lib/layout/unauthenticated.svelte
+++ b/src/lib/profiles/(unauthenticated)/appwrite.svelte
@@ -1,5 +1,5 @@
+
+
+
+
+
+
+
Welcome to Imagine
+
+
+
+
+
+
+
diff --git a/src/lib/profiles/index.svelte.ts b/src/lib/profiles/index.svelte.ts
index 0e60735fb..8003fbfe4 100644
--- a/src/lib/profiles/index.svelte.ts
+++ b/src/lib/profiles/index.svelte.ts
@@ -3,6 +3,9 @@ import type { ResolvedPathname } from '$app/types';
import { Platform } from '@appwrite.io/console';
import { env } from '$env/dynamic/public';
import { BillingPlan } from '@appwrite.io/console';
+import type { Component } from 'svelte';
+import UnauthenticatedAppwrite from './(unauthenticated)/appwrite.svelte';
+import UnauthenticatedStudio from './(unauthenticated)/studio.svelte';
export const enum ProfileMode {
STUDIO = 'studio',
@@ -41,6 +44,9 @@ export type Profile = {
showOrgInBreadcrumbs: boolean;
minimalOrgHeader: boolean;
getProjectRoute: (params: { region: string; project: string }) => ResolvedPathname;
+ component: {
+ unauthenticated: Component;
+ };
};
export const base: Profile = {
@@ -55,6 +61,9 @@ export const base: Profile = {
},
alt: 'Logo Appwrite'
},
+ component: {
+ unauthenticated: UnauthenticatedAppwrite
+ },
showOnboarding: true,
useCommandCenter: true,
showGithubIssueSupport: true,
@@ -94,6 +103,9 @@ export const studio: Profile = {
},
alt: 'Imagine Appwrite'
},
+ component: {
+ unauthenticated: UnauthenticatedStudio
+ },
showOnboarding: false,
useCommandCenter: false,
showGithubIssueSupport: false,
diff --git a/src/lib/stores/feedback.ts b/src/lib/stores/feedback.ts
index c41af9369..981c2df1b 100644
--- a/src/lib/stores/feedback.ts
+++ b/src/lib/stores/feedback.ts
@@ -1,6 +1,4 @@
import { VARS } from '$lib/system';
-import { resolvedProfile } from '$lib/profiles/index.svelte';
-
import type { Component } from 'svelte';
import { browser } from '$app/environment';
import { get, writable } from 'svelte/store';
@@ -31,12 +29,12 @@ export type FeedbackOption = {
export const feedbackOptions: FeedbackOption[] = [
{
type: 'general',
- desc: `${resolvedProfile.platform} evolves with your input. Share your thoughts and help us improve ${resolvedProfile.platform}.`,
+ desc: `Appwrite evolves with your input. Share your thoughts and help us improve Appwrite.`,
component: FeedbackGeneral
},
{
type: 'nps',
- desc: `How likely are you to recommend ${resolvedProfile.platform} to a friend or colleague?`,
+ desc: `How likely are you to recommend Appwrite to a friend or colleague?`,
component: FeedbackNps
}
];
diff --git a/src/lib/studio/studio-widget.ts b/src/lib/studio/studio-widget.ts
index 05dca3680..b54308a63 100644
--- a/src/lib/studio/studio-widget.ts
+++ b/src/lib/studio/studio-widget.ts
@@ -10,7 +10,6 @@ import { getSessionId } from '$lib/sentry';
const COMPONENT_SELECTOR = 'imagine-web-components-wrapper[data-appwrite-studio]';
const STYLE_ATTRIBUTE = 'data-appwrite-studio-style';
const BLOCK_START_BASE_OFFSET = 48;
-const INLINE_START_BASE_OFFSET = 8;
export const CDN_URL = env?.PUBLIC_IMAGINE_CDN_URL + '/web-components.js';
export const CDN_CSS_URL = env?.PUBLIC_IMAGINE_CDN_URL + '/web-components.css';
const DEV_OVERRIDE_WEB_COMPONENTS = env?.PUBLIC_AI_OVERRIDE_WEB_COMPONENTS === 'true';
diff --git a/src/routes/(authenticated)/mfa/+page.svelte b/src/routes/(authenticated)/mfa/+page.svelte
index 55aa2c2df..c078fea78 100644
--- a/src/routes/(authenticated)/mfa/+page.svelte
+++ b/src/routes/(authenticated)/mfa/+page.svelte
@@ -3,7 +3,6 @@
import { base } from '$app/paths';
import { Button, Form } from '$lib/elements/forms';
import { sdk } from '$lib/stores/sdk';
- import { Unauthenticated } from '$lib/layout';
import type { Models } from '@appwrite.io/console';
import MfaChallengeFormList, { verify } from '$lib/components/mfaChallengeFormList.svelte';
import { page } from '$app/state';
@@ -13,7 +12,7 @@
import { resolvedProfile } from '$lib/profiles/index.svelte';
export let data;
-
+ const Unauthenticated = resolvedProfile.component.unauthenticated;
const factors = data.factors as Models.MfaFactors & { recoveryCode: boolean };
let disabled = false;
diff --git a/src/routes/(console)/project-[region]-[project]/+layout.ts b/src/routes/(console)/project-[region]-[project]/+layout.ts
index 46da10b98..c5e02c45d 100644
--- a/src/routes/(console)/project-[region]-[project]/+layout.ts
+++ b/src/routes/(console)/project-[region]-[project]/+layout.ts
@@ -9,7 +9,7 @@ import { get } from 'svelte/store';
import { headerAlert } from '$lib/stores/headerAlert';
import PaymentFailed from '$lib/components/billing/alerts/paymentFailed.svelte';
import { loadAvailableRegions } from '$routes/(console)/regions';
-import type { Organization, OrganizationList } from '$lib/stores/organization';
+import type { Organization } from '$lib/stores/organization';
import { redirect } from '@sveltejs/kit';
import { resolvedProfile } from '$lib/profiles/index.svelte';
import { resolve } from '$app/paths';
@@ -46,9 +46,7 @@ export const load: LayoutLoad = async ({ params, route, depends, parent }) => {
project.region ??= 'default';
// fast path without a network call!
- let organization = (organizations as OrganizationList)?.teams?.find(
- (org) => org.$id === project.teamId
- );
+ let organization = organizations?.teams?.find((org) => org.$id === project.teamId);
const includedInBasePlans = plansInfo.has(organization.billingPlan);
diff --git a/src/routes/(public)/(guest)/login/+page.svelte b/src/routes/(public)/(guest)/login/+page.svelte
index 99d72b817..6bea8b6fd 100644
--- a/src/routes/(public)/(guest)/login/+page.svelte
+++ b/src/routes/(public)/(guest)/login/+page.svelte
@@ -4,7 +4,6 @@
import { Button, Form, InputEmail, InputPassword } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
- import { Unauthenticated } from '$lib/layout';
import { Dependencies } from '$lib/constants';
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
import { isCloud } from '$lib/system';
@@ -18,6 +17,7 @@
let mail: string, pass: string, disabled: boolean;
export let data;
+ const Unauthenticated = resolvedProfile.component.unauthenticated;
async function login() {
try {
diff --git a/src/routes/(public)/(guest)/register/+page.svelte b/src/routes/(public)/(guest)/register/+page.svelte
index fbcb41ff4..8c91e9eef 100644
--- a/src/routes/(public)/(guest)/register/+page.svelte
+++ b/src/routes/(public)/(guest)/register/+page.svelte
@@ -11,7 +11,6 @@
} from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
- import { Unauthenticated } from '$lib/layout';
import { Dependencies } from '$lib/constants';
import { Submit, trackError, trackEvent } from '$lib/actions/analytics';
import { ID, OAuthProvider } from '@appwrite.io/console';
@@ -114,6 +113,8 @@
scopes: ['read:user', 'user:email']
});
}
+
+ const Unauthenticated = resolvedProfile.component.unauthenticated;
diff --git a/src/routes/(public)/(guest)/register/invite/[slug]/+page.svelte b/src/routes/(public)/(guest)/register/invite/[slug]/+page.svelte
index 23834b4fc..b640b1f18 100644
--- a/src/routes/(public)/(guest)/register/invite/[slug]/+page.svelte
+++ b/src/routes/(public)/(guest)/register/invite/[slug]/+page.svelte
@@ -11,7 +11,6 @@
} from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
- import { Unauthenticated } from '$lib/layout';
import { Dependencies } from '$lib/constants';
import { Submit, trackEvent } from '$lib/actions/analytics';
import { onMount } from 'svelte';
@@ -96,6 +95,7 @@
});
}
}
+ const Unauthenticated = resolvedProfile.component.unauthenticated;
diff --git a/src/routes/(public)/invite/+page.svelte b/src/routes/(public)/invite/+page.svelte
index b9c7bd1bb..050b9ebef 100644
--- a/src/routes/(public)/invite/+page.svelte
+++ b/src/routes/(public)/invite/+page.svelte
@@ -4,7 +4,6 @@
import { Button, Form, InputChoice } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
- import { Unauthenticated } from '$lib/layout';
import { page } from '$app/state';
import { onMount } from 'svelte';
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
@@ -43,6 +42,7 @@
trackError(error, Submit.MembershipUpdateStatus);
}
};
+ const Unauthenticated = resolvedProfile.component.unauthenticated;
diff --git a/src/routes/(public)/recover/+page.svelte b/src/routes/(public)/recover/+page.svelte
index e32d016d8..1d368a438 100644
--- a/src/routes/(public)/recover/+page.svelte
+++ b/src/routes/(public)/recover/+page.svelte
@@ -3,7 +3,6 @@
import { Button, Form, InputEmail, InputPassword } from '$lib/elements/forms';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
- import { Unauthenticated } from '$lib/layout';
import { Submit, trackEvent, trackError } from '$lib/actions/analytics';
import { onMount } from 'svelte';
import { page } from '$app/state';
@@ -65,6 +64,7 @@
});
}
}
+ const Unauthenticated = resolvedProfile.component.unauthenticated;
diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte
index 9892099a1..c05ab389f 100644
--- a/src/routes/+error.svelte
+++ b/src/routes/+error.svelte
@@ -1,8 +1,10 @@
diff --git a/src/routes/+layout.ts b/src/routes/+layout.ts
index 26c101392..669f51ba7 100644
--- a/src/routes/+layout.ts
+++ b/src/routes/+layout.ts
@@ -13,6 +13,7 @@ import { isCloud, VARS } from '$lib/system';
import { checkPricingRefAndRedirect } from '$lib/helpers/pricingRedirect';
import { identify } from '$lib/sentry';
import { resolvedProfile } from '$lib/profiles/index.svelte';
+import type { OrganizationList } from '$lib/stores/organization';
export const ssr = false;
@@ -41,14 +42,17 @@ export const load: LayoutLoad = async ({ depends, url, route }) => {
redirect(303, resolve('/verify-email'));
}
}
-
- return {
- account: account,
- organizations: !isCloud
+ const organizations = (
+ !isCloud
? await sdk.forConsole.teams.list()
: await sdk.forConsole.billing.listOrganization([
Query.equal('platform', resolvedProfile.organizationPlatform)
])
+ ) as OrganizationList;
+
+ return {
+ account: account,
+ organizations
};
}