From 4756fb7ec8dc5c30e65edd95a8e5d64f53a8bc3e Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Thu, 18 Sep 2025 15:40:49 +0400 Subject: [PATCH] fix: more base paths --- .../billing/alerts/newDevUpgradePro.svelte | 2 +- src/lib/stores/billing.ts | 2 +- src/routes/(console)/+layout.svelte | 12 ++++++------ .../change-plan/+page.svelte | 2 +- src/routes/(public)/(guest)/education/+page.svelte | 5 +++-- src/routes/(public)/auth/+layout.svelte | 1 + .../(public)/template-[template]/+layout.svelte | 1 + src/routes/(public)/template-[template]/+page.ts | 3 ++- 8 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/lib/components/billing/alerts/newDevUpgradePro.svelte b/src/lib/components/billing/alerts/newDevUpgradePro.svelte index 4631c1721..733736f02 100644 --- a/src/lib/components/billing/alerts/newDevUpgradePro.svelte +++ b/src/lib/components/billing/alerts/newDevUpgradePro.svelte @@ -23,7 +23,7 @@ } -{#if show && $organization?.$id && $organization?.billingPlan === BillingPlan.FREE && !page.url.pathname.includes('/console/account')} +{#if show && $organization?.$id && $organization?.billingPlan === BillingPlan.FREE && !page.url.pathname.includes(base + '/account')} `${base}/organization-${$page.data?.organization?.$id}/billing` ); -export const hideBillingHeaderRoutes = ['/console/create-organization', '/console/account']; +export const hideBillingHeaderRoutes = [base + '/create-organization', base + '/account']; export function calculateExcess(addon: AggregationTeam, plan: Plan) { return { diff --git a/src/routes/(console)/+layout.svelte b/src/routes/(console)/+layout.svelte index 73846afa2..a8e6e30c7 100644 --- a/src/routes/(console)/+layout.svelte +++ b/src/routes/(console)/+layout.svelte @@ -82,7 +82,7 @@ keys: ['g', 'p'], group: 'navigation', disabled: - (page.url.pathname.includes('/console/organization-') && + (page.url.pathname.includes(base + '/organization-') && !page.url.pathname.endsWith('/members') && !page.url.pathname.endsWith('/settings')) || !$canSeeProjects, @@ -335,11 +335,11 @@ diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index 364014828..153e85c5a 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -277,7 +277,7 @@ '', clientSecret, paymentMethodId, - '/console/change-plan?' + params.toString() + base + '/change-plan?' + params.toString() ); await validate(org.teamId, collaborators); } diff --git a/src/routes/(public)/(guest)/education/+page.svelte b/src/routes/(public)/(guest)/education/+page.svelte index 88ce060a8..7ed9fbf93 100644 --- a/src/routes/(public)/(guest)/education/+page.svelte +++ b/src/routes/(public)/(guest)/education/+page.svelte @@ -7,13 +7,14 @@ import AppwriteLogoLight from '$lib/images/appwrite-logo-light.svg'; import GithubLogoDark from '$lib/images/github-logo-dark.svg'; import GithubLogoLight from '$lib/images/github-logo-light.svg'; + import { base } from '$app/paths'; function onGithubLogin() { localStorage.setItem('githubEducationProgram', 'true'); sdk.forConsole.account.createOAuth2Session({ provider: OAuthProvider.Github, - success: window.location.origin + '/console/education?success', - failure: window.location.origin + '/console/education?failure', + success: window.location.origin + base + '/education?success', + failure: window.location.origin + base + '/education?failure', scopes: ['read:user', 'user:email'] }); } diff --git a/src/routes/(public)/auth/+layout.svelte b/src/routes/(public)/auth/+layout.svelte index 5cf954074..da38c1dc4 100644 --- a/src/routes/(public)/auth/+layout.svelte +++ b/src/routes/(public)/auth/+layout.svelte @@ -1,4 +1,5 @@