mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2026-06-10 11:16:48 +00:00
- 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:
@@ -70,4 +70,8 @@ lazy_static! {
|
|||||||
.unwrap_or("true".to_string())
|
.unwrap_or("true".to_string())
|
||||||
.parse()
|
.parse()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
pub static ref THEME_HOME_LINK: bool = std::env::var("THEME_HOME_LINK")
|
||||||
|
.unwrap_or("true".to_string())
|
||||||
|
.parse()
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ pub struct Status {
|
|||||||
pub theme_page_title: String,
|
pub theme_page_title: String,
|
||||||
pub theme_favicon: String,
|
pub theme_favicon: String,
|
||||||
pub theme_new_note_notice: bool,
|
pub theme_new_note_notice: bool,
|
||||||
|
pub theme_home_link: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn get_status() -> (StatusCode, Json<Status>) {
|
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_url: config::IMPRINT_URL.to_string(),
|
||||||
imprint_html: config::IMPRINT_HTML.to_string(),
|
imprint_html: config::IMPRINT_HTML.to_string(),
|
||||||
theme_new_note_notice: *config::THEME_NEW_NOTE_NOTICE,
|
theme_new_note_notice: *config::THEME_NEW_NOTE_NOTICE,
|
||||||
|
theme_home_link: *config::THEME_HOME_LINK,
|
||||||
theme_image: config::THEME_IMAGE.to_string(),
|
theme_image: config::THEME_IMAGE.to_string(),
|
||||||
theme_text: config::THEME_TEXT.to_string(),
|
theme_text: config::THEME_TEXT.to_string(),
|
||||||
theme_page_title: config::THEME_PAGE_TITLE.to_string(),
|
theme_page_title: config::THEME_PAGE_TITLE.to_string(),
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ export type Status = {
|
|||||||
theme_favicon: string
|
theme_favicon: string
|
||||||
theme_page_title: string
|
theme_page_title: string
|
||||||
theme_new_note_notice: boolean
|
theme_new_note_notice: boolean
|
||||||
|
theme_home_link: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
async function status() {
|
async function status() {
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
"create": "utwórz",
|
"create": "utwórz",
|
||||||
"loading": "ładowanie",
|
"loading": "ładowanie",
|
||||||
"mode": "tryb",
|
"mode": "tryb",
|
||||||
"views": "{n, plural, =0 {wyświetleń} =1 {1 wyświetlenie} other {# wyświetleń}}",
|
"views": "{n, plural, =0 {wyświetleń} =1 {1 wyświetlenie} other {{n} wyświetleń}}",
|
||||||
"minutes": "{n, plural, =0 {minut} =1 {1 minuta} other {# minuty}}",
|
"minutes": "{n, plural, =0 {minut} =1 {1 minuta} other {{n} minuty}}",
|
||||||
"max": "maks.",
|
"max": "maks.",
|
||||||
"share_link": "link udostępniania",
|
"share_link": "link udostępniania",
|
||||||
"copy_clipboard": "kopiuj do schowka",
|
"copy_clipboard": "kopiuj do schowka",
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"check": "svelte-check --tsconfig tsconfig.json",
|
"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",
|
"locale:download": "node scripts/locale.js",
|
||||||
"test:prepare": "pnpm run build"
|
"test:prepare": "pnpm run build"
|
||||||
},
|
},
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
"@zerodevx/svelte-toast": "^0.9.6",
|
"@zerodevx/svelte-toast": "^0.9.6",
|
||||||
"adm-zip": "^0.5.17",
|
"adm-zip": "^0.5.17",
|
||||||
"dotenv": "^17.4.2",
|
"dotenv": "^17.4.2",
|
||||||
|
"license-checker-evergreen": "^6.2.1",
|
||||||
"svelte": "^5.55.9",
|
"svelte": "^5.55.9",
|
||||||
"svelte-check": "^4.4.8",
|
"svelte-check": "^4.4.8",
|
||||||
"svelte-intl-precompile": "^0.12.3",
|
"svelte-intl-precompile": "^0.12.3",
|
||||||
|
|||||||
@@ -6,7 +6,9 @@
|
|||||||
<footer>
|
<footer>
|
||||||
<ThemeToggle />
|
<ThemeToggle />
|
||||||
<nav>
|
<nav>
|
||||||
<a href="/">/home</a>
|
{#if $status?.theme_home_link !== false}
|
||||||
|
<a href="/">/home</a>
|
||||||
|
{/if}
|
||||||
<a href="/about">/about</a>
|
<a href="/about">/about</a>
|
||||||
{#if $status?.imprint_url}
|
{#if $status?.imprint_url}
|
||||||
<a href={$status.imprint_url} target="_blank" rel="noopener noreferrer">/imprint</a>
|
<a href={$status.imprint_url} target="_blank" rel="noopener noreferrer">/imprint</a>
|
||||||
|
|||||||
Generated
+851
-1009
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user