Fix missing and incorrectly bound snackbar (#539)

* Fix missing and incorrectly bound snackbar

* Add 5 second timeout
This commit is contained in:
Jack
2022-10-29 05:52:59 -05:00
committed by GitHub
parent c4500ce12b
commit bd4d74c192

View File

@@ -66,6 +66,14 @@
> >
Save Save
</v-btn> </v-btn>
<v-snackbar
v-model="snack"
top
:color="snackbar.color"
timeout="5000"
>
<span>{{ snackbar.text }}</span>
</v-snackbar>
<v-divider class="mt-4 mb-4" /> <v-divider class="mt-4 mb-4" />
<!-- TEMP - RIO finder is not currently enabled <!-- TEMP - RIO finder is not currently enabled
<v-row> <v-row>
@@ -239,7 +247,7 @@ export default {
}, },
sendGeneralSettings() { sendGeneralSettings() {
this.axios.post("http://" + this.$address + "/api/settings/general", this.settings).then( this.axios.post("http://" + this.$address + "/api/settings/general", this.settings).then(
function (response) { response => {
if (response.status === 200) { if (response.status === 200) {
this.snackbar = { this.snackbar = {
color: "success", color: "success",
@@ -248,7 +256,7 @@ export default {
this.snack = true; this.snack = true;
} }
}, },
function (error) { error => {
this.snackbar = { this.snackbar = {
color: "error", color: "error",
text: (error.response || {data: "Couldn't save settings"}).data text: (error.response || {data: "Couldn't save settings"}).data