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
</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" />
<!-- TEMP - RIO finder is not currently enabled
<v-row>
@@ -239,7 +247,7 @@ export default {
},
sendGeneralSettings() {
this.axios.post("http://" + this.$address + "/api/settings/general", this.settings).then(
function (response) {
response => {
if (response.status === 200) {
this.snackbar = {
color: "success",
@@ -248,7 +256,7 @@ export default {
this.snack = true;
}
},
function (error) {
error => {
this.snackbar = {
color: "error",
text: (error.response || {data: "Couldn't save settings"}).data