Merge branch 'main' into feat/image-paste

This commit is contained in:
2026-06-07 12:54:32 +02:00
committed by GitHub
12 changed files with 1671 additions and 1004 deletions
+1
View File
@@ -86,6 +86,7 @@ of the notes even if it tried to.
| `THEME_PAGE_TITLE` | `""` | Custom text the page title | | `THEME_PAGE_TITLE` | `""` | Custom text the page title |
| `THEME_FAVICON` | `""` | Custom url for the favicon. Must be publicly reachable | | `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_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_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. | | `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 ## Deployment
+1
View File
@@ -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_TEXT` | `""` | Texto personalizado para reemplazar la descripción bajo el logo. |
| `THEME_PAGE_TITLE` | `""` | Texto personalizado para el título | | `THEME_PAGE_TITLE` | `""` | Texto personalizado para el título |
| `THEME_FAVICON` | `""` | Url personalizada para el favicon. Debe ser accesible públicamente. | | `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 ## Despliegue
+1
View File
@@ -56,6 +56,7 @@ _加密鸽_ 是一个受 [_PrivNote_](https://privnote.com)项目启发的安全
| `ALLOW_ADVANCED` | `true` | 是否允许自定义设置,该项如果设为`false`,则不会显示自定义设置模块 | | `ALLOW_ADVANCED` | `true` | 是否允许自定义设置,该项如果设为`false`,则不会显示自定义设置模块 |
| `THEME_IMAGE` | `""` | 自定义 Logo 图片,你在这里填写的的图片链接必须是可以公开访问的。 | | `THEME_IMAGE` | `""` | 自定义 Logo 图片,你在这里填写的的图片链接必须是可以公开访问的。 |
| `THEME_TEXT` | `""` | 自定义在 Logo 下方的文本。 | | `THEME_TEXT` | `""` | 自定义在 Logo 下方的文本。 |
| `THEME_HOME_LINK` | `true` | 是否在页脚显示 `/home` 链接。默认为 `true`。 |
## 部署 ## 部署
+4
View File
@@ -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();
} }
+2
View File
@@ -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(),
+1
View File
@@ -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() {
+15 -6
View File
@@ -1,8 +1,17 @@
├─ MIT: 13 ├─ MIT: 324
├─ ISC: 2 ├─ ISC: 84
├─ BSD-3-Clause: 1 ├─ Apache-2.0: 21
├─ (MPL-2.0 OR Apache-2.0): 1 ├─ BlueOak-1.0.0: 14
├─ BSD-2-Clause: 1 ├─ 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 ├─ 0BSD: 1
└─ Apache-2.0: 1 └─ (MIT OR CC0-1.0): 1
1 ├─ MIT: 13 ├─ MIT: 324
2 ├─ ISC: 2 ├─ ISC: 84
3 ├─ BSD-3-Clause: 1 ├─ Apache-2.0: 21
4 ├─ (MPL-2.0 OR Apache-2.0): 1 ├─ BlueOak-1.0.0: 14
5 ├─ BSD-2-Clause: 1 ├─ BSD-3-Clause: 6
6 ├─ BSD-2-Clause: 4
7 ├─ OFL-1.1: 1
8 ├─ Python-2.0: 1
9 ├─ CC-BY-4.0: 1
10 ├─ UNKNOWN: 1
11 ├─ MPL-2.0: 1
12 ├─ CC-BY-3.0: 1
13 ├─ CC0-1.0: 1
14 ├─ (MIT AND CC-BY-3.0): 1
15 ├─ 0BSD: 1 ├─ 0BSD: 1
16 └─ Apache-2.0: 1 └─ (MIT OR CC0-1.0): 1
17
+2 -2
View File
@@ -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",
+2 -1
View File
@@ -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-rseidelsohn --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-rseidelsohn": "^5.0.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>
{#if $status?.theme_home_link !== false}
<a href="/">/home</a> <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>
@@ -8,7 +8,9 @@
<header> <header>
<a onclick={reset} href="/"> <a onclick={reset} href="/">
{#if $status?.theme_image} {#if $status === null}
<!-- waiting for status to load to avoid flashing default logo -->
{:else if $status.theme_image}
<img alt="logo" src={$status.theme_image} /> <img alt="logo" src={$status.theme_image} />
{:else} {:else}
<svg <svg
+1636 -993
View File
File diff suppressed because it is too large Load Diff