mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 06:23:34 -07:00
set loader for migration
This commit is contained in:
parent
0be23a3985
commit
e8ef542b4a
1 changed files with 9 additions and 3 deletions
|
@ -40,7 +40,13 @@
|
||||||
<v-btn color="error" text @click="deleteMigration(migration.name)">
|
<v-btn color="error" text @click="deleteMigration(migration.name)">
|
||||||
{{ $t("general.delete") }}
|
{{ $t("general.delete") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn color="accent" text @click="importMigration(migration.name)">
|
<v-btn
|
||||||
|
color="accent"
|
||||||
|
text
|
||||||
|
@click="importMigration(migration.name)"
|
||||||
|
:loading="loading"
|
||||||
|
:disabled="loading"
|
||||||
|
>
|
||||||
{{ $t("general.import") }}
|
{{ $t("general.import") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
@ -82,10 +88,10 @@ export default {
|
||||||
this.$emit("refresh");
|
this.$emit("refresh");
|
||||||
},
|
},
|
||||||
async importMigration(file_name) {
|
async importMigration(file_name) {
|
||||||
this.loading == true;
|
this.loading = true;
|
||||||
let response = await api.migrations.import(this.folder, file_name);
|
let response = await api.migrations.import(this.folder, file_name);
|
||||||
this.$emit("imported", response.successful, response.failed);
|
this.$emit("imported", response.successful, response.failed);
|
||||||
this.loading == false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
readableTime(timestamp) {
|
readableTime(timestamp) {
|
||||||
let date = new Date(timestamp);
|
let date = new Date(timestamp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue