From 1ad7ed80b8929dd68f04e174d267cde9ce6ab00e Mon Sep 17 00:00:00 2001 From: TeakIvy Date: Sat, 7 Dec 2024 20:09:52 -0500 Subject: [PATCH 1/3] Remove settings when DISABLE_NEW=TRUE --- frontend/src/components/Toolbar.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/Toolbar.svelte b/frontend/src/components/Toolbar.svelte index 4c97363..ae24214 100755 --- a/frontend/src/components/Toolbar.svelte +++ b/frontend/src/components/Toolbar.svelte @@ -26,8 +26,8 @@ - {#if !$disableNew} + {/if} From b9bd9cf5a6ae2d3744cfba98d9b5f91bdbc37be0 Mon Sep 17 00:00:00 2001 From: TeakIvy Date: Sat, 7 Dec 2024 20:13:07 -0500 Subject: [PATCH 2/3] Made /settings Error 404 when DISABLE_NEW=TRUE --- frontend/src/routes/settings/+page.server.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 frontend/src/routes/settings/+page.server.ts diff --git a/frontend/src/routes/settings/+page.server.ts b/frontend/src/routes/settings/+page.server.ts new file mode 100644 index 0000000..2bf9c44 --- /dev/null +++ b/frontend/src/routes/settings/+page.server.ts @@ -0,0 +1,10 @@ +import { error } from "@sveltejs/kit"; + +export async function load() { + if (process.env.DISABLE_NEW?.toLowerCase() === "true") { + console.log("Disabled"); + error(404, { + message: "Not Found", + }); + } +} \ No newline at end of file From e5c9fa2622d79e55f30faf2005c9be76a1994bbc Mon Sep 17 00:00:00 2001 From: TeakIvy Date: Sat, 7 Dec 2024 20:15:31 -0500 Subject: [PATCH 3/3] Remove debugs --- frontend/src/routes/new/+page.server.ts | 1 - frontend/src/routes/settings/+page.server.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/frontend/src/routes/new/+page.server.ts b/frontend/src/routes/new/+page.server.ts index 2bf9c44..ca392f0 100644 --- a/frontend/src/routes/new/+page.server.ts +++ b/frontend/src/routes/new/+page.server.ts @@ -2,7 +2,6 @@ import { error } from "@sveltejs/kit"; export async function load() { if (process.env.DISABLE_NEW?.toLowerCase() === "true") { - console.log("Disabled"); error(404, { message: "Not Found", }); diff --git a/frontend/src/routes/settings/+page.server.ts b/frontend/src/routes/settings/+page.server.ts index 2bf9c44..ca392f0 100644 --- a/frontend/src/routes/settings/+page.server.ts +++ b/frontend/src/routes/settings/+page.server.ts @@ -2,7 +2,6 @@ import { error } from "@sveltejs/kit"; export async function load() { if (process.env.DISABLE_NEW?.toLowerCase() === "true") { - console.log("Disabled"); error(404, { message: "Not Found", });