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>
|
||||||
</section>
|
</section>
|
||||||
<div class="settings-section-label">Lokales Datei-Backup</div>
|
<div class="settings-section-label">Lokales Datei-Backup</div>
|
||||||
<div class="settings-row local-backup-password-row">
|
<section class="online-backup-module local-backup-module" aria-label="Lokales Datei-Backup">
|
||||||
<div class="settings-copy">
|
<label class="local-backup-toggle" for="protectLocalBackupInput">
|
||||||
<label for="protectLocalBackupInput">Mit eigenem Passwort schützen</label>
|
<span class="local-backup-toggle-copy">
|
||||||
<span class="hint">Ohne dieses Passwort kann das Backup nicht importiert werden.</span>
|
<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>
|
</div>
|
||||||
<input type="checkbox" id="protectLocalBackupInput">
|
<footer class="online-backup-footer backup-file-actions">
|
||||||
</div>
|
<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 class="local-backup-password-fields" id="localBackupPasswordFields" hidden>
|
<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>
|
||||||
<input type="password" class="key-input" id="localBackupPasswordInput" minlength="8" maxlength="1024" autocomplete="new-password" placeholder="Passwort (mindestens 8 Zeichen)">
|
</footer>
|
||||||
<input type="password" class="key-input" id="localBackupPasswordConfirmInput" minlength="8" maxlength="1024" autocomplete="new-password" placeholder="Passwort wiederholen">
|
</section>
|
||||||
</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>
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const activateSettingsPage = (target, focus = false) => {
|
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.'],
|
['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 (mindestens 8 Zeichen)', 'Password (at least 8 characters)'],
|
||||||
['Passwort wiederholen', 'Repeat password'],
|
['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.'],
|
['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.'],
|
['Die beiden Backup-Passwörter stimmen nicht überein.', 'The two backup passwords do not match.'],
|
||||||
['Passwort prüfen', 'Check password'],
|
['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;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.local-backup-password-row {
|
.local-backup-module {
|
||||||
margin-bottom: 10px;
|
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 {
|
.local-backup-password-fields {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
gap: 10px;
|
gap: 12px;
|
||||||
margin-bottom: 10px;
|
}
|
||||||
|
|
||||||
|
.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] {
|
.local-backup-password-fields[hidden] {
|
||||||
@@ -4154,6 +4202,10 @@ input[type="checkbox"] {
|
|||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.local-backup-password-fields {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
|
||||||
.online-backup-footer .btn {
|
.online-backup-footer .btn {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user