fix: more base paths

This commit is contained in:
Torsten Dittmann
2025-09-18 15:40:49 +04:00
parent 760890893e
commit 4756fb7ec8
8 changed files with 16 additions and 12 deletions
@@ -23,7 +23,7 @@
}
</script>
{#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')}
<GradientBanner on:close={handleClose}>
<Layout.Stack
gap="m"
+1 -1
View File
@@ -620,7 +620,7 @@ export const billingURL = derived(
($page) => `${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 {
+6 -6
View File
@@ -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 @@
<Shell
showSideNavigation={page.url.pathname !== '/' &&
!page?.params.organization &&
!page.url.pathname.includes('/console/account') &&
!page.url.pathname.includes('/console/card') &&
!page.url.pathname.includes('/console/onboarding')}
showHeader={!page.url.pathname.includes('/console/onboarding/create-project')}
showFooter={!page.url.pathname.includes('/console/onboarding/create-project')}
!page.url.pathname.includes(base + '/account') &&
!page.url.pathname.includes(base + '/card') &&
!page.url.pathname.includes(base + '/onboarding')}
showHeader={!page.url.pathname.includes(base + '/onboarding/create-project')}
showFooter={!page.url.pathname.includes(base + '/onboarding/create-project')}
selectedProject={page.data?.project}>
<!-- <Header slot="header" />-->
<slot />
@@ -277,7 +277,7 @@
'',
clientSecret,
paymentMethodId,
'/console/change-plan?' + params.toString()
base + '/change-plan?' + params.toString()
);
await validate(org.teamId, collaborators);
}
@@ -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']
});
}
+1
View File
@@ -1,4 +1,5 @@
<script lang="ts">
import { base } from '$app/paths';
import { app } from '$lib/stores/app';
import { loading } from '$routes/store';
import { Typography } from '@appwrite.io/pink-svelte';
@@ -1,4 +1,5 @@
<script lang="ts">
import { base } from '$app/paths';
import { app } from '$lib/stores/app';
let { children } = $props();
@@ -5,13 +5,14 @@ import { isCloud } from '$lib/system.js';
import { error, redirect } from '@sveltejs/kit';
import type { OrganizationList } from '$lib/stores/organization.js';
import { redirectTo } from '$routes/store.js';
import { base } from '$app/paths';
export const load = async ({ parent, url, params }) => {
const { account } = await parent();
if (!account && !isCloud) {
redirectTo.set(url.pathname + url.search);
redirect(302, '/console/login?redirect=' + url.pathname + url.search);
redirect(302, base + '/login?redirect=' + url.pathname + url.search);
}
if (!url.searchParams.has('type')) {