Skip to content

Commit

Permalink
Added alert to indicate a successful import
Browse files Browse the repository at this point in the history
  • Loading branch information
oas committed Jun 26, 2019
1 parent b0d6423 commit f51ab82
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions client/src/views/settings.vue
@@ -1,5 +1,10 @@
<template>
<div class="container-fluid">
<div class="row mb-4" v-if="alert.message !== null">
<div class="col-12">
<alert v-bind:alert="alert"></alert>
</div>
</div>
<div class="row mb-2">
<div class="col-12">
<h3 class="mb-0">Settings</h3>
Expand Down Expand Up @@ -29,15 +34,29 @@
<script>
import Network from "../helpers/network";
import Alert from "../components/alert.vue";
export default {
components: {
"alert": Alert,
},
data() {
return {
alert: {
message: null,
state: null
},
endpoint: Network._endpoint,
};
},
methods: {
async importBackup(event) {
await Network.importBackup(event.target.files[0]);
this.alert = {
message: "The backup was successfully imported.",
state: "success"
};
}
}
};
Expand Down

0 comments on commit f51ab82

Please sign in to comment.