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
This commit is contained in:
Stefan Meinecke
2026-05-12 19:17:20 +02:00
parent d40bbd25ea
commit e8c3b53e49
7 changed files with 865 additions and 1013 deletions
+4
View File
@@ -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();
}
+2
View File
@@ -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<Status>) {
@@ -33,6 +34,7 @@ pub async fn get_status() -> (StatusCode, Json<Status>) {
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(),
+1
View File
@@ -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() {
+2 -2
View File
@@ -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",
+2 -1
View File
@@ -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",
@@ -6,7 +6,9 @@
<footer>
<ThemeToggle />
<nav>
{#if $status?.theme_home_link !== false}
<a href="/">/home</a>
{/if}
<a href="/about">/about</a>
{#if $status?.imprint_url}
<a href={$status.imprint_url} target="_blank" rel="noopener noreferrer">/imprint</a>
+851 -1009
View File
File diff suppressed because it is too large Load Diff