fix(backup): exclude upload history from export and import — Verlauf stays local

This commit is contained in:
Administrator 2026-06-10 15:42:09 +02:00
parent 99a2c2fe96
commit e69635bcf7
2 changed files with 3 additions and 2 deletions

View File

@ -2046,6 +2046,7 @@ ipcMain.handle('export-backup', async () => {
}); });
if (canceled || !filePath) return { ok: false, canceled: true }; if (canceled || !filePath) return { ok: false, canceled: true };
const config = configStore.load(); const config = configStore.load();
config.history = [];
if (filePath.toLowerCase().endsWith('.json')) { if (filePath.toLowerCase().endsWith('.json')) {
fs.writeFileSync(filePath, JSON.stringify(config, null, 2), 'utf-8'); fs.writeFileSync(filePath, JSON.stringify(config, null, 2), 'utf-8');
} else { } else {
@ -2126,7 +2127,7 @@ ipcMain.handle('import-backup', async (_event, legacyPassword) => {
hosters: imported.hosters, hosters: imported.hosters,
hosterSettings: imported.hosterSettings, hosterSettings: imported.hosterSettings,
globalSettings: importedGlobal, globalSettings: importedGlobal,
history: imported.history || [] history: []
}; };
await configStore._atomicWrite(configStore._serializeForDisk(merged)); await configStore._atomicWrite(configStore._serializeForDisk(merged));
return { ok: true, config: configStore.load() }; return { ok: true, config: configStore.load() };

View File

@ -3109,7 +3109,7 @@ function renderSettings() {
<span class="panel-status active">System</span> <span class="panel-status active">System</span>
</div> </div>
<div class="hoster-panel-body" data-panel="backup" style="display:none"> <div class="hoster-panel-body" data-panel="backup" style="display:none">
<p class="hint" style="margin:0 0 10px">Alle Accounts, Einstellungen und den Upload-Verlauf verschlüsselt exportieren oder importieren.</p> <p class="hint" style="margin:0 0 10px">Alle Accounts und Einstellungen exportieren oder importieren. Der Upload-Verlauf bleibt lokal und wird nicht übertragen; nach einem Import ist der Verlauf-Tab leer.</p>
<div style="display:flex;gap:8px"> <div style="display:flex;gap:8px">
<button class="btn btn-secondary" id="exportBackupBtn">Backup exportieren</button> <button class="btn btn-secondary" id="exportBackupBtn">Backup exportieren</button>
<button class="btn btn-secondary" id="importBackupBtn">Backup importieren</button> <button class="btn btn-secondary" id="importBackupBtn">Backup importieren</button>