fix(backup): exclude upload history from export and import — Verlauf stays local
This commit is contained in:
parent
99a2c2fe96
commit
e69635bcf7
3
main.js
3
main.js
@ -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() };
|
||||||
|
|||||||
@ -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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user