mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-03 03:01:40 +00:00
Fix missing and incorrectly bound snackbar (#539)
* Fix missing and incorrectly bound snackbar * Add 5 second timeout
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user