diff --git a/packages/server/src/routes/default.ts b/packages/server/src/routes/default.ts index a21c77cf6..e43568b72 100644 --- a/packages/server/src/routes/default.ts +++ b/packages/server/src/routes/default.ts @@ -6,6 +6,7 @@ import { pathExists } from 'fs-extra'; import * as fs from 'fs-extra'; import { AppContext, RouteType } from '../utils/types'; import { localFileFromUrl } from '../utils/joplinUtils'; +import { homeUrl, loginUrl } from '../utils/urlUtils'; const { mime } = require('@joplin/lib/mime-utils.js'); const publicDir = `${dirname(dirname(__dirname))}/public`; @@ -58,9 +59,9 @@ router.get('', async (path: SubPath, ctx: AppContext) => { // Redirect to either /login or /home when trying to access the root if (!path.id && !path.link) { if (ctx.joplin.owner) { - return redirect(ctx, 'home'); + return redirect(ctx, homeUrl()); } else { - return redirect(ctx, 'login'); + return redirect(ctx, loginUrl()); } } diff --git a/packages/server/src/utils/urlUtils.ts b/packages/server/src/utils/urlUtils.ts index bcd81423d..cb42c26d5 100644 --- a/packages/server/src/utils/urlUtils.ts +++ b/packages/server/src/utils/urlUtils.ts @@ -34,3 +34,11 @@ export function confirmUrl(userId: Uuid, validationToken: string): string { export function stripePortalUrl(): string { return `${config().baseUrl}/stripe/portal`; } + +export function homeUrl(): string { + return `${config().baseUrl}/home`; +} + +export function loginUrl(): string { + return `${config().baseUrl}/login`; +} diff --git a/packages/server/src/views/index/home.mustache b/packages/server/src/views/index/home.mustache index 95dea0841..7eacc1544 100644 --- a/packages/server/src/views/index/home.mustache +++ b/packages/server/src/views/index/home.mustache @@ -26,6 +26,6 @@ {{#showUpgradeProButton}}

- Upgrade to a Pro account to benefit from collaborate on notebooks, to increase the max note size, or the max total size. + Upgrade to a Pro account to collaborate on notebooks with other people, to increase the max note size, or the max total size.

{{/showUpgradeProButton}}