mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
This change introduces `LOCKDOWN_TITLE` and `LOCKDOWN_MESSAGE` constants in `config/instance-config.js` and exposes them via `js/config.js`. It updates `components/lockdown-modal.html` to include IDs for the title and message elements, and modifies `js/index.js` to dynamically populate these elements with the configured text when initializing the lockdown interface. This allows instance operators to customize the maintenance mode appearance. No new tests were added as this is a configuration and UI text update, but `tests/auth-service.test.mjs` was run to ensure no regressions in auth logic during lockdown.
81 lines
3.6 KiB
HTML
81 lines
3.6 KiB
HTML
<div
|
|
id="lockdownModal"
|
|
class="bv-modal hidden items-center justify-center"
|
|
role="dialog"
|
|
aria-modal="true"
|
|
aria-labelledby="lockdownModalTitle"
|
|
aria-describedby="lockdownModalDescription"
|
|
data-ds="new"
|
|
>
|
|
<div class="bv-modal-backdrop"></div>
|
|
|
|
<div class="modal-sheet max-h-modal-shell overflow-hidden" tabindex="-1">
|
|
<div class="modal-body space-y-8 text-center">
|
|
<div class="flex justify-center">
|
|
<span class="inline-flex h-16 items-center text-text bv-logo" role="img" aria-label="bitvid logo">
|
|
<svg class="h-full w-auto" viewBox="0 0 318.32 108.98" aria-hidden="true" focusable="false">
|
|
<g class="bv-logo__accent">
|
|
<rect x="7.1" y="7.8" width="5.84" height="5.48" />
|
|
<rect x="7.1" y="18.78" width="24.02" height="5.48" />
|
|
<rect x="7.1" y="29.77" width="42.85" height="5.48" />
|
|
<rect x="7.1" y="40.76" width="61.68" height="5.48" />
|
|
<rect x="7.1" y="51.75" width="80.88" height="5.48" />
|
|
<rect x="7.1" y="62.74" width="61.68" height="5.48" />
|
|
<rect x="7.1" y="73.73" width="42.85" height="5.48" />
|
|
<rect x="7.1" y="84.72" width="24.02" height="5.48" />
|
|
<rect x="7.1" y="95.71" width="5.84" height="5.48" />
|
|
</g>
|
|
<g class="bv-logo__wordmark">
|
|
<path d="M121.28 25.08v44.54c0 5.67 2.79 8.54 8.22 8.54h11.57c5.51 0 8.3-2.87 8.3-8.54v-13.09c0-5.67-2.79-8.46-8.3-8.46h-16.6v-5.83h17.72c8.7 0 13.01 4.47 13.01 13.33v15.01c0 8.86-4.31 13.33-13.01 13.33h-13.73c-8.7 0-13.01-4.47-13.01-13.33V25.08h5.83Z" />
|
|
<path d="M168.53 25.08v6.26h-5.83v-6.26h5.83Zm0 17.56v41.27h-5.83v-41.27h5.83Z" />
|
|
<path d="M191.36 25.08v17.16h9.02v5.19h-9.02v36.48h-5.83v-36.48h-9.82v-5.19h9.82V25.08h5.83Z" />
|
|
<path d="M212.88 42.24l16.84 35.68 16.6-35.68h6.07l-19.56 41.67h-6.31l-20.04-41.67h6.39Z" />
|
|
<path d="M264.05 25.08v6.26h-5.83v-6.26h5.83Zm0 17.16v41.67h-5.83v-41.67h5.83Z" />
|
|
<path d="M311.21 25.08v45.5c0 8.86-4.31 13.33-13.01 13.33h-13.73c-8.7 0-13.01-4.47-13.01-13.33v-15.01c0-8.86 4.31-13.33 13.01-13.33h17.72v5.83h-16.6c-5.51 0-8.3 2.79-8.3 8.46v13.09c0 5.67 2.79 8.54 8.3 8.54h11.49c5.51 0 8.3-2.87 8.3-8.54V25.08h5.83Z" />
|
|
</g>
|
|
</svg>
|
|
</span>
|
|
</div>
|
|
|
|
<div id="lockdownModalDescription" class="space-y-4">
|
|
<h2 id="lockdownModalTitle" class="text-2xl font-semibold tracking-tight text-text">
|
|
bitvid is in lockdown mode
|
|
</h2>
|
|
<p id="lockdownModalMessage" class="text-base leading-relaxed text-text-frosted">
|
|
Only approved administrators and moderators can access the app while lockdown is active. Sign in with an authorized Nostr profile to continue.
|
|
</p>
|
|
<p id="lockdownModalHint" class="text-sm text-text-muted">
|
|
You will be prompted by your NIP-07 browser extension. Make sure it is installed, unlocked, and ready to approve the request.
|
|
</p>
|
|
</div>
|
|
|
|
<div class="space-y-2">
|
|
<p
|
|
id="lockdownStatusMessage"
|
|
class="text-sm text-text"
|
|
data-lockdown-status
|
|
aria-live="polite"
|
|
>
|
|
Administrator access is required to proceed.
|
|
</p>
|
|
<p
|
|
id="lockdownErrorMessage"
|
|
class="hidden text-sm text-critical"
|
|
data-lockdown-error
|
|
role="alert"
|
|
></p>
|
|
</div>
|
|
|
|
<button
|
|
id="lockdownLoginButton"
|
|
class="btn w-full"
|
|
data-variant="danger"
|
|
data-lockdown-login
|
|
type="button"
|
|
>
|
|
Login with Nostr
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|