From e8c3b53e49650b115f54efb819f7802796f3c487 Mon Sep 17 00:00:00 2001 From: Stefan Meinecke Date: Tue, 12 May 2026 19:17:20 +0200 Subject: [PATCH 1/4] fix: multiple minor fixes (#198, #188, #190) - https://github.com/cupcakearmy/cryptgeon/issues/198: Replace abandoned license-checker with license-checker-evergreen - https://github.com/cupcakearmy/cryptgeon/issues/188: Fix Polish locale number formatting by using {n} instead of # in ICU plural forms - https://github.com/cupcakearmy/cryptgeon/issues/190: Add THEME_HOME_LINK env var to conditionally hide the /home link (defaults to true) - Fix Rust 2024 never-type-fallback compatibility in store.rs --- packages/backend/src/config.rs | 4 + packages/backend/src/status/mod.rs | 2 + packages/cli/src/shared/api.ts | 1 + packages/frontend/locales/pl.json | 4 +- packages/frontend/package.json | 3 +- packages/frontend/src/lib/views/Footer.svelte | 4 +- pnpm-lock.yaml | 1860 ++++++++--------- 7 files changed, 865 insertions(+), 1013 deletions(-) diff --git a/packages/backend/src/config.rs b/packages/backend/src/config.rs index 318b66f..91ff8cb 100644 --- a/packages/backend/src/config.rs +++ b/packages/backend/src/config.rs @@ -70,4 +70,8 @@ lazy_static! { .unwrap_or("true".to_string()) .parse() .unwrap(); + pub static ref THEME_HOME_LINK: bool = std::env::var("THEME_HOME_LINK") + .unwrap_or("true".to_string()) + .parse() + .unwrap(); } diff --git a/packages/backend/src/status/mod.rs b/packages/backend/src/status/mod.rs index fcec5d2..e15941a 100644 --- a/packages/backend/src/status/mod.rs +++ b/packages/backend/src/status/mod.rs @@ -20,6 +20,7 @@ pub struct Status { pub theme_page_title: String, pub theme_favicon: String, pub theme_new_note_notice: bool, + pub theme_home_link: bool, } pub async fn get_status() -> (StatusCode, Json) { @@ -33,6 +34,7 @@ pub async fn get_status() -> (StatusCode, Json) { imprint_url: config::IMPRINT_URL.to_string(), imprint_html: config::IMPRINT_HTML.to_string(), theme_new_note_notice: *config::THEME_NEW_NOTE_NOTICE, + theme_home_link: *config::THEME_HOME_LINK, theme_image: config::THEME_IMAGE.to_string(), theme_text: config::THEME_TEXT.to_string(), theme_page_title: config::THEME_PAGE_TITLE.to_string(), diff --git a/packages/cli/src/shared/api.ts b/packages/cli/src/shared/api.ts index 6f8f010..f8a9936 100644 --- a/packages/cli/src/shared/api.ts +++ b/packages/cli/src/shared/api.ts @@ -120,6 +120,7 @@ export type Status = { theme_favicon: string theme_page_title: string theme_new_note_notice: boolean + theme_home_link: boolean } async function status() { diff --git a/packages/frontend/locales/pl.json b/packages/frontend/locales/pl.json index 2dfe320..a92a0ee 100644 --- a/packages/frontend/locales/pl.json +++ b/packages/frontend/locales/pl.json @@ -6,8 +6,8 @@ "create": "utwórz", "loading": "ładowanie", "mode": "tryb", - "views": "{n, plural, =0 {wyświetleń} =1 {1 wyświetlenie} other {# wyświetleń}}", - "minutes": "{n, plural, =0 {minut} =1 {1 minuta} other {# minuty}}", + "views": "{n, plural, =0 {wyświetleń} =1 {1 wyświetlenie} other {{n} wyświetleń}}", + "minutes": "{n, plural, =0 {minut} =1 {1 minuta} other {{n} minuty}}", "max": "maks.", "share_link": "link udostępniania", "copy_clipboard": "kopiuj do schowka", diff --git a/packages/frontend/package.json b/packages/frontend/package.json index f47f64e..d4a6da7 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -7,7 +7,7 @@ "build": "vite build", "preview": "vite preview", "check": "svelte-check --tsconfig tsconfig.json", - "licenses": "license-checker --summary > licenses.csv", + "licenses": "license-checker-evergreen --summary > licenses.csv", "locale:download": "node scripts/locale.js", "test:prepare": "pnpm run build" }, @@ -20,6 +20,7 @@ "@zerodevx/svelte-toast": "^0.9.6", "adm-zip": "^0.5.17", "dotenv": "^17.4.2", + "license-checker-evergreen": "^6.2.1", "svelte": "^5.55.9", "svelte-check": "^4.4.8", "svelte-intl-precompile": "^0.12.3", diff --git a/packages/frontend/src/lib/views/Footer.svelte b/packages/frontend/src/lib/views/Footer.svelte index 6a19497..1577df2 100644 --- a/packages/frontend/src/lib/views/Footer.svelte +++ b/packages/frontend/src/lib/views/Footer.svelte @@ -6,7 +6,9 @@