diff --git a/packages/frontend/src/app.css b/packages/frontend/src/app.css index 2310eeb..97ff57f 100644 --- a/packages/frontend/src/app.css +++ b/packages/frontend/src/app.css @@ -92,7 +92,7 @@ button { } *:disabled, -*[disabled='true'] { +.disabled { opacity: 0.5; } @@ -126,3 +126,13 @@ fieldset { .tr { text-align: right; } + +hr { + border: none; + border-bottom: 2px solid var(--ui-bg-1); + margin: 1rem 0; +} + +p { + margin: 0; +} diff --git a/packages/frontend/src/lib/ui/AdvancedParameters.svelte b/packages/frontend/src/lib/ui/AdvancedParameters.svelte index 442e38a..88672e7 100644 --- a/packages/frontend/src/lib/ui/AdvancedParameters.svelte +++ b/packages/frontend/src/lib/ui/AdvancedParameters.svelte @@ -8,48 +8,69 @@ export let note: Note export let timeExpiration = false + + let customPassword = false + + $: if (!customPassword) note.password = undefined -
- - ($status && v <= $status?.max_views && v > 0) || - $t('home.errors.max', { values: { n: $status?.max_views ?? 0 } })} - /> -
+
+
+ + ($status && v <= $status?.max_views && v > 0) || + $t('home.errors.max', { values: { n: $status?.max_views ?? 0 } })} + /> + + ($status && v < $status?.max_expiration) || + $t('home.errors.max', { values: { n: $status?.max_expiration ?? 0 } })} + /> +
+
+ + +
+
+ {$t('home.advanced.explanation')}
- - ($status && v < $status?.max_expiration) || - $t('home.errors.max', { values: { n: $status?.max_expiration ?? 0 } })} - />
diff --git a/packages/frontend/src/lib/ui/NoteResult.svelte b/packages/frontend/src/lib/ui/NoteResult.svelte index 73884dc..8246e75 100644 --- a/packages/frontend/src/lib/ui/NoteResult.svelte +++ b/packages/frontend/src/lib/ui/NoteResult.svelte @@ -1,7 +1,7 @@ @@ -14,7 +14,8 @@ export let result: NoteResult - $: url = `${window.location.origin}/note/${result.id}#${result.password}` + let url = `${window.location.origin}/note/${result.id}` + if (result.password) url += `#${result.password}` function reset() { window.location.reload() diff --git a/packages/frontend/src/lib/ui/Switch.svelte b/packages/frontend/src/lib/ui/Switch.svelte index ec419da..d74be32 100644 --- a/packages/frontend/src/lib/ui/Switch.svelte +++ b/packages/frontend/src/lib/ui/Switch.svelte @@ -4,43 +4,35 @@ export let color = true -
- -
+