diff --git a/README.md b/README.md index 0d1fca1..c4a2fa5 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ of the notes even if it tried to. | `THEME_PAGE_TITLE` | `""` | Custom text the page title | | `THEME_FAVICON` | `""` | Custom url for the favicon. Must be publicly reachable | | `THEME_NEW_NOTE_NOTICE` | `true` | Show the message about how notes are stored in the memory and may be evicted after creating a new note. Defaults to `true`. | +| `THEME_HOME_LINK` | `true` | Show the `/home` link in the footer. Defaults to `true`. | | `IMPRINT_URL` | `""` | Custom url for an Imprint hosted somewhere else. Must be publicly reachable. Takes precedence above `IMPRINT_HTML`. | | `IMPRINT_HTML` | `""` | Alternative to `IMPRINT_URL`, this can be used to specify the HTML code to show on `/imprint`. Only `IMPRINT_HTML` or `IMPRINT_URL` should be specified, not both. | ## Deployment diff --git a/README_ES.md b/README_ES.md index e2e9642..f3d798c 100644 --- a/README_ES.md +++ b/README_ES.md @@ -72,6 +72,7 @@ se usa para guardar y recuperar la nota. Después la nota es encriptada con la < | `THEME_TEXT` | `""` | Texto personalizado para reemplazar la descripción bajo el logo. | | `THEME_PAGE_TITLE` | `""` | Texto personalizado para el título | | `THEME_FAVICON` | `""` | Url personalizada para el favicon. Debe ser accesible públicamente. | +| `THEME_HOME_LINK` | `true` | Mostrar el enlace `/home` en el pie de página. El valor predeterminado es `true`. | ## Despliegue diff --git a/README_zh-CN.md b/README_zh-CN.md index ea7200d..999b3df 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -56,6 +56,7 @@ _加密鸽_ 是一个受 [_PrivNote_](https://privnote.com)项目启发的安全 | `ALLOW_ADVANCED` | `true` | 是否允许自定义设置,该项如果设为`false`,则不会显示自定义设置模块 | | `THEME_IMAGE` | `""` | 自定义 Logo 图片,你在这里填写的的图片链接必须是可以公开访问的。 | | `THEME_TEXT` | `""` | 自定义在 Logo 下方的文本。 | +| `THEME_HOME_LINK` | `true` | 是否在页脚显示 `/home` 链接。默认为 `true`。 | ## 部署 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/licenses.csv b/packages/frontend/licenses.csv index a762e5c..59c9359 100644 --- a/packages/frontend/licenses.csv +++ b/packages/frontend/licenses.csv @@ -1,8 +1,17 @@ -├─ MIT: 13 -├─ ISC: 2 -├─ BSD-3-Clause: 1 -├─ (MPL-2.0 OR Apache-2.0): 1 -├─ BSD-2-Clause: 1 +├─ MIT: 324 +├─ ISC: 84 +├─ Apache-2.0: 21 +├─ BlueOak-1.0.0: 14 +├─ BSD-3-Clause: 6 +├─ BSD-2-Clause: 4 +├─ OFL-1.1: 1 +├─ Python-2.0: 1 +├─ CC-BY-4.0: 1 +├─ UNKNOWN: 1 +├─ MPL-2.0: 1 +├─ CC-BY-3.0: 1 +├─ CC0-1.0: 1 +├─ (MIT AND CC-BY-3.0): 1 ├─ 0BSD: 1 -└─ Apache-2.0: 1 +└─ (MIT OR CC0-1.0): 1 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..29a0a45 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-rseidelsohn --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-rseidelsohn": "^5.0.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 @@