guest password protect

This commit is contained in:
Mateusz Gruszczyński
2026-08-04 16:41:45 +02:00
parent 8d58549d11
commit 6fc408ddf7
18 changed files with 527 additions and 43 deletions
+29 -15
View File
@@ -54,6 +54,19 @@
class="public-task-toggle"
title="Allow the published page to open without the resource password or private access"><input
id="unprotect-public-page" type="checkbox"> Unprotect Page</label>
<p id="page-password-requirement" class="page-password-requirement" hidden>Access to page
options requires a password-protected note.</p>
<form id="set-page-password-form" class="page-password-inline" hidden>
<div class="page-password-inline__heading">
<label id="set-page-password-label" for="set-page-password">Set password</label>
<small id="set-page-password-help">Minimum 8 characters.</small>
</div>
<div class="page-password-inline__controls"><input id="set-page-password" type="password"
minlength="8" maxlength="128" autocomplete="new-password" placeholder="Min. 8 chars"
aria-describedby="set-page-password-help" required><button type="submit"
class="page-password-inline__save">Set</button></div>
<small id="set-page-password-error" class="error"></small>
</form>
</div>
</details><button id="files-button" class="secondary-button">Files</button><button id="delete-note"
class="secondary-button danger-button" hidden>Delete</button><button id="history-button"
@@ -123,15 +136,16 @@
Compact</label><label class="line-toggle"><input id="line-links-toggle" type="checkbox">
Line links</label>
<div class="toolbar-fill"></div><button id="mode-toggle" class="toolbar-action active"
aria-pressed="true" aria-label="Markdown" title="Markdown"><span class="control-label-full">Markdown</span><span
class="control-label-short" aria-hidden="true">M</span></button>
<div class="view-switch" aria-label="Editor view"><button data-view="edit" aria-label="Edit" title="Edit"><span
class="control-label-full">Edit</span><span class="control-label-short"
aria-hidden="true">E</span></button><button data-view="split" class="active" aria-label="Split"
title="Split"><span class="control-label-full">Split</span><span class="control-label-short"
aria-hidden="true">S</span></button><button data-view="preview" aria-label="Preview" title="Preview"><span
class="control-label-full">Preview</span><span class="control-label-short"
aria-hidden="true">P</span></button></div>
aria-pressed="true" aria-label="Markdown" title="Markdown"><span
class="control-label-full">Markdown</span><span class="control-label-short"
aria-hidden="true">M</span></button>
<div class="view-switch" aria-label="Editor view"><button data-view="edit" aria-label="Edit"
title="Edit"><span class="control-label-full">Edit</span><span class="control-label-short"
aria-hidden="true">E</span></button><button data-view="split" class="active"
aria-label="Split" title="Split"><span class="control-label-full">Split</span><span
class="control-label-short" aria-hidden="true">S</span></button><button data-view="preview"
aria-label="Preview" title="Preview"><span class="control-label-full">Preview</span><span
class="control-label-short" aria-hidden="true">P</span></button></div>
</div>
<div id="connection-notice" class="connection-notice" role="status" aria-live="polite" hidden>
<span class="connection-notice__signal"
@@ -283,12 +297,12 @@
guest</button><button id="show-register" class="text-button" type="button">Register</button><button
id="show-login" class="text-button" type="button">Log in</button></div>
<section id="auth-panel" class="auth-panel" hidden>
<h3 id="auth-mode-title">Log in</h3><label id="auth-email-field"><span id="auth-email-label">E-mail</span><input
id="auth-email" name="username" type="email" maxlength="320" autocomplete="username"
placeholder="you@example.com"></label><label>Password<input
id="auth-password" name="password" type="password" minlength="8" maxlength="128"
autocomplete="current-password"></label><button id="auth-submit" class="primary-button"
type="submit">Log in and continue</button>
<h3 id="auth-mode-title">Log in</h3><label id="auth-email-field"><span
id="auth-email-label">E-mail</span><input id="auth-email" name="username" type="email"
maxlength="320" autocomplete="username"
placeholder="you@example.com"></label><label>Password<input id="auth-password" name="password"
type="password" minlength="8" maxlength="128" autocomplete="current-password"></label><button
id="auth-submit" class="primary-button" type="submit">Log in and continue</button>
<div class="identity-links"><button id="show-reset" class="text-button" type="button">Forgot
password?</button><button id="auth-back" class="text-button" type="button">Back to
nickname</button><button id="logout-account" class="text-button" type="button">Log out saved