Compare commits
No commits in common. "a0ca9a5e9fd4b67064101275d8475980ef1f0dca" and "513937792a4e6068162523e76f0b6efa8a8c0ed2" have entirely different histories.
a0ca9a5e9f
...
513937792a
@ -216,20 +216,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="backup-modal" id="backup-delete-location-modal">
|
|
||||||
<div class="backup-modal-inner">
|
|
||||||
<div class="backup-modal-header">
|
|
||||||
<h3>Delete backup location</h3>
|
|
||||||
<button class="backup-modal-close" data-close-modal>×</button>
|
|
||||||
</div>
|
|
||||||
<div class="backup-modal-body" id="backup-delete-location-modal-body"></div>
|
|
||||||
<div class="backup-modal-footer">
|
|
||||||
<button class="backup-secondary-btn" data-close-modal>Cancel</button>
|
|
||||||
<button class="backup-danger-btn" id="backup-delete-location-confirm">Delete location</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="backup-modal" id="backup-migrate-modal">
|
<div class="backup-modal" id="backup-migrate-modal">
|
||||||
<div class="backup-modal-inner">
|
<div class="backup-modal-inner">
|
||||||
<div class="backup-modal-header">
|
<div class="backup-modal-header">
|
||||||
|
|||||||
@ -293,7 +293,6 @@ class BackupPage {
|
|||||||
if (e.target.closest('#backup-migrate-confirm')) { this.confirmMigrate(); return; }
|
if (e.target.closest('#backup-migrate-confirm')) { this.confirmMigrate(); return; }
|
||||||
if (e.target.closest('#backup-restore-confirm')) { this.confirmRestore(); return; }
|
if (e.target.closest('#backup-restore-confirm')) { this.confirmRestore(); return; }
|
||||||
if (e.target.closest('#backup-delete-confirm')) { this.confirmDelete(); return; }
|
if (e.target.closest('#backup-delete-confirm')) { this.confirmDelete(); return; }
|
||||||
if (e.target.closest('#backup-delete-location-confirm')) { this.confirmDeleteLocation(); return; }
|
|
||||||
if (e.target.closest('#backup-add-location-confirm')) { this.confirmAddLocation(); return; }
|
if (e.target.closest('#backup-add-location-confirm')) { this.confirmAddLocation(); return; }
|
||||||
const engineBtn = e.target.closest('[data-action="open-engine-details"]');
|
const engineBtn = e.target.closest('[data-action="open-engine-details"]');
|
||||||
if (engineBtn) { this.openEngineDetailsModal(engineBtn); return; }
|
if (engineBtn) { this.openEngineDetailsModal(engineBtn); return; }
|
||||||
@ -966,25 +965,10 @@ class BackupPage {
|
|||||||
await this.saveSection(`location-${idx}`);
|
await this.saveSection(`location-${idx}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteInlineLocation(idx) {
|
async deleteInlineLocation(idx) {
|
||||||
const loc = (this.locations?.locations || []).find(l => l.idx === idx);
|
const loc = (this.locations?.locations || []).find(l => l.idx === idx);
|
||||||
const name = loc?.name || `Location ${idx}`;
|
const name = loc?.name || `Location ${idx}`;
|
||||||
const modal = document.getElementById('backup-delete-location-modal');
|
if (!confirm(`Delete location "${name}"?\n\nBackup data already stored at this location is not deleted — only LibrePortal's reference to it. The password file on disk also stays in place.`)) return;
|
||||||
const body = document.getElementById('backup-delete-location-modal-body');
|
|
||||||
if (!modal || !body) return;
|
|
||||||
body.innerHTML = `
|
|
||||||
<p>Delete location <strong>${this.escape(name)}</strong>?</p>
|
|
||||||
<p class="backup-card-hint">Backup data already stored at this location is not deleted — only LibrePortal's reference to it. The password file on disk also stays in place.</p>
|
|
||||||
`;
|
|
||||||
modal.dataset.locIdx = String(idx);
|
|
||||||
modal.classList.add('open');
|
|
||||||
}
|
|
||||||
|
|
||||||
async confirmDeleteLocation() {
|
|
||||||
const modal = document.getElementById('backup-delete-location-modal');
|
|
||||||
if (!modal) return;
|
|
||||||
const idx = parseInt(modal.dataset.locIdx, 10);
|
|
||||||
this.closeAllModals();
|
|
||||||
this.expandedLocs.delete(idx);
|
this.expandedLocs.delete(idx);
|
||||||
await this.runTask(`libreportal backup location remove ${idx}`, 'backup', null);
|
await this.runTask(`libreportal backup location remove ${idx}`, 'backup', null);
|
||||||
setTimeout(() => this.reloadAfterSave(), 2000);
|
setTimeout(() => this.reloadAfterSave(), 2000);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user