split uploaded and generated backups
This commit is contained in:
parent
f8fb222ebb
commit
5cb68d92ce
11 changed files with 188 additions and 21 deletions
|
@ -15,12 +15,17 @@
|
|||
<option v-for="section in backupSections" :value="section">{{ section }}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div v-if="!partial" class="flex flex-row items-center gap-2">
|
||||
<input type="checkbox" id="overwrite" checked />
|
||||
<label for="overwrite">Daten entfernen und importieren</label>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<p class="flex">
|
||||
<InformationCircleIcon class="min-h-5 h-5 min-w-5 w-5" />Je nach Auswahl, werden die entsprechenden
|
||||
Bestandsdaten ersetzt. Dadurch können Daten, die seit diesem Backup erstellt wurden, verloren gehen.
|
||||
</p>
|
||||
<p class="flex">Das Laden eines vollständigen Backups wird zur Vermeidung von Inkonsistenzen empfohlen.</p>
|
||||
|
||||
<div class="flex flex-row gap-2">
|
||||
<button primary type="submit" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
|
@ -83,6 +88,7 @@ export default defineComponent({
|
|||
include: Array.from(formData?.sections?.selectedOptions ?? []).map(
|
||||
(t) => (t as HTMLOptionElement).value
|
||||
) as Array<BackupSection>,
|
||||
overwrite: !formData?.overwrite.checked,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.restoreBackup(restoreBackup)
|
||||
|
|
|
@ -18,7 +18,12 @@
|
|||
type="file"
|
||||
ref="fileSelect"
|
||||
accept="application/JSON"
|
||||
@change="(e) => uploadFile((e.target as HTMLInputElement)?.files?.[0])"
|
||||
@change="
|
||||
(e) => {
|
||||
uploadFile((e.target as HTMLInputElement)?.files?.[0]);
|
||||
e.target.value = null;
|
||||
}
|
||||
"
|
||||
multiple
|
||||
/>
|
||||
<button primary @click="openFileSelect">Datei auswählen</button>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue