refactor(frontend): 🚧 Migrate Dashboard to Nuxt

Add API and Functinality for Admin Dashboard. Stills needs to clean-up. See // TODO's
This commit is contained in:
hay-kot 2021-08-07 15:12:25 -08:00
parent 41a6916771
commit 9386cc320b
32 changed files with 671 additions and 113 deletions

View file

@ -1,3 +1,5 @@
// TODO: Fix Download Links
<template>
<div class="text-center">
<BaseDialog
@ -39,7 +41,6 @@
</template>
<script>
import { api } from "@/api";
import AdminBackupImportOptions from "./AdminBackupImportOptions";
const IMPORT_EVENT = "import";
export default {
@ -86,7 +87,7 @@ export default {
close() {
this.dialog = false;
},
async raiseEvent() {
raiseEvent() {
const eventData = {
name: this.name,
force: this.forceImport,
@ -99,18 +100,9 @@ export default {
notifications: this.options.notifications,
};
this.loading = true;
const importData = await this.importBackup(eventData);
this.$emit(IMPORT_EVENT, importData);
this.$emit(IMPORT_EVENT, eventData);
this.loading = false;
},
async importBackup(data) {
this.loading = true;
const response = await api.backups.import(data.name, data);
if (response) {
return response.data;
}
},
},
};
</script>