mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2026-06-10 11:16:48 +00:00
Merge pull request #204 from smeinecke/fix/various
fix: multiple minor fixes (#198, #188, #190, #200)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ _加密鸽_ 是一个受 [_PrivNote_](https://privnote.com)项目启发的安全
|
||||
| `ALLOW_ADVANCED` | `true` | 是否允许自定义设置,该项如果设为`false`,则不会显示自定义设置模块 |
|
||||
| `THEME_IMAGE` | `""` | 自定义 Logo 图片,你在这里填写的的图片链接必须是可以公开访问的。 |
|
||||
| `THEME_TEXT` | `""` | 自定义在 Logo 下方的文本。 |
|
||||
| `THEME_HOME_LINK` | `true` | 是否在页脚显示 `/home` 链接。默认为 `true`。 |
|
||||
|
||||
## 部署
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
<footer>
|
||||
<ThemeToggle />
|
||||
<nav>
|
||||
<a href="/">/home</a>
|
||||
{#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>
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
<header>
|
||||
<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} />
|
||||
{:else}
|
||||
<svg
|
||||
|
||||
Generated
+1636
-993
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user