Present the local file backup as a card with labelled password fields
CI / verify (push) Canceled after 0s
CI / verify (push) Canceled after 0s
This commit is contained in:
1 parent
d412903e01
commit
0a463694a1
3 files changed
+80
-18
No files matched your search
+22
-14
@@ -6800,21 +6800,29 @@ function renderSettings() {
|
||||
</section>
|
||||
</section>
|
||||
<div class="settings-section-label">Lokales Datei-Backup</div>
|
||||
<div class="settings-row local-backup-password-row">
|
||||
<div class="settings-copy">
|
||||
<label for="protectLocalBackupInput">Mit eigenem Passwort schützen</label>
|
||||
<span class="hint">Ohne dieses Passwort kann das Backup nicht importiert werden.</span>
|
||||
<section class="online-backup-module local-backup-module" aria-label="Lokales Datei-Backup">
|
||||
<label class="local-backup-toggle" for="protectLocalBackupInput">
|
||||
<span class="local-backup-toggle-copy">
|
||||
<span class="local-backup-toggle-title">Mit eigenem Passwort schützen</span>
|
||||
<span class="local-backup-toggle-hint">Ohne dieses Passwort kann das Backup nicht importiert werden.</span>
|
||||
</span>
|
||||
<input type="checkbox" id="protectLocalBackupInput">
|
||||
</label>
|
||||
<div class="local-backup-password-fields" id="localBackupPasswordFields" hidden>
|
||||
<label class="local-backup-field" for="localBackupPasswordInput">
|
||||
<span>Passwort</span>
|
||||
<input type="password" class="key-input" id="localBackupPasswordInput" minlength="8" maxlength="1024" autocomplete="new-password" placeholder="Mindestens 8 Zeichen">
|
||||
</label>
|
||||
<label class="local-backup-field" for="localBackupPasswordConfirmInput">
|
||||
<span>Passwort wiederholen</span>
|
||||
<input type="password" class="key-input" id="localBackupPasswordConfirmInput" minlength="8" maxlength="1024" autocomplete="new-password" placeholder="Passwort erneut eingeben">
|
||||
</label>
|
||||
</div>
|
||||
<input type="checkbox" id="protectLocalBackupInput">
|
||||
</div>
|
||||
<div class="local-backup-password-fields" id="localBackupPasswordFields" hidden>
|
||||
<input type="password" class="key-input" id="localBackupPasswordInput" minlength="8" maxlength="1024" autocomplete="new-password" placeholder="Passwort (mindestens 8 Zeichen)">
|
||||
<input type="password" class="key-input" id="localBackupPasswordConfirmInput" minlength="8" maxlength="1024" autocomplete="new-password" placeholder="Passwort wiederholen">
|
||||
</div>
|
||||
<div class="backup-file-actions">
|
||||
<button class="btn btn-secondary" id="exportBackupBtn" data-settings-search-entry data-settings-search-section="Lokales Datei-Backup" data-settings-search-label="Datei exportieren">Datei exportieren</button>
|
||||
<button class="btn btn-secondary" id="importBackupBtn" data-settings-search-entry data-settings-search-section="Lokales Datei-Backup" data-settings-search-label="Datei importieren">Datei importieren</button>
|
||||
</div>
|
||||
<footer class="online-backup-footer backup-file-actions">
|
||||
<button class="btn btn-secondary" id="importBackupBtn" data-settings-search-entry data-settings-search-section="Lokales Datei-Backup" data-settings-search-label="Datei importieren">Datei importieren</button>
|
||||
<button class="btn btn-primary" id="exportBackupBtn" data-settings-search-entry data-settings-search-section="Lokales Datei-Backup" data-settings-search-label="Datei exportieren">Datei exportieren</button>
|
||||
</footer>
|
||||
</section>
|
||||
`;
|
||||
|
||||
const activateSettingsPage = (target, focus = false) => {
|
||||
|
||||
@@ -417,6 +417,8 @@
|
||||
['Ohne dieses Passwort kann das Backup nicht importiert werden.', 'The backup cannot be imported without this password.'],
|
||||
['Passwort (mindestens 8 Zeichen)', 'Password (at least 8 characters)'],
|
||||
['Passwort wiederholen', 'Repeat password'],
|
||||
['Mindestens 8 Zeichen', 'At least 8 characters'],
|
||||
['Passwort erneut eingeben', 'Enter the password again'],
|
||||
['Das Backup-Passwort muss mindestens 8 Zeichen lang sein.', 'The backup password must be at least 8 characters long.'],
|
||||
['Die beiden Backup-Passwörter stimmen nicht überein.', 'The two backup passwords do not match.'],
|
||||
['Passwort prüfen', 'Check password'],
|
||||
|
||||
+56
-4
@@ -2515,15 +2515,63 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.local-backup-password-row {
|
||||
margin-bottom: 10px;
|
||||
.local-backup-module {
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.local-backup-toggle {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.local-backup-toggle-copy {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.local-backup-toggle-title {
|
||||
color: var(--text);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.local-backup-toggle-hint {
|
||||
color: var(--text-dim);
|
||||
font-size: 13px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.local-backup-toggle input[type="checkbox"] {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.local-backup-password-fields {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 10px;
|
||||
margin-bottom: 10px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.local-backup-field {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
color: var(--text-muted);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.local-backup-field .key-input {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
min-height: 40px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.local-backup-password-fields[hidden] {
|
||||
@@ -4154,6 +4202,10 @@ input[type="checkbox"] {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.local-backup-password-fields {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.online-backup-footer .btn {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user