feat(ext/settings): backup section (opens vault tab)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { sendMessage, escapeHtml } from '../../shared/state';
|
||||
import { sendMessage, escapeHtml, openVaultTab } from '../../shared/state';
|
||||
import type { VaultSettings, DeviceSettings, TrashRetention, HistoryRetention } from '../../shared/types';
|
||||
import type { ColorScheme } from '../../shared/color-scheme';
|
||||
import {
|
||||
@@ -385,7 +385,19 @@ function valueToHistoryRetention(v: string): HistoryRetention {
|
||||
}
|
||||
|
||||
function renderBackupSection(content: HTMLElement): void {
|
||||
content.innerHTML = '<p class="muted" style="padding:20px;font-size:12px;">Backup — coming soon</p>';
|
||||
content.innerHTML = `
|
||||
<h3 class="settings-section-title">Backup & restore</h3>
|
||||
<div class="setting-row">
|
||||
<div class="setting-row__info">
|
||||
<div class="setting-row__title">Export & restore backup</div>
|
||||
<div class="setting-row__desc">Download an encrypted backup or restore from a file. Opens in the vault tab.</div>
|
||||
</div>
|
||||
<div class="setting-row__control">
|
||||
<button class="btn" id="open-backup-tab" style="font-size:11px;">Open backup ▸</button>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
document.getElementById('open-backup-tab')?.addEventListener('click', () => openVaultTab('backup'));
|
||||
}
|
||||
|
||||
function renderImportSection(content: HTMLElement): void {
|
||||
|
||||
Reference in New Issue
Block a user