mirror of
https://github.com/kaythomas0/noisedash.git
synced 2025-11-15 04:38:00 +00:00
Cleanup UI
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
class="mx-3 mb-5"
|
class="mx-3 mb-5"
|
||||||
fab
|
fab
|
||||||
large
|
large
|
||||||
color="secondary"
|
color="primary"
|
||||||
@click="stop"
|
@click="stop"
|
||||||
>
|
>
|
||||||
<v-icon>mdi-stop</v-icon>
|
<v-icon>mdi-stop</v-icon>
|
||||||
@@ -68,23 +68,6 @@
|
|||||||
Save Profile
|
Save Profile
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<v-snackbar
|
|
||||||
v-model="infoSnackbar"
|
|
||||||
timeout="3000"
|
|
||||||
>
|
|
||||||
{{ infoSnackbarText }}
|
|
||||||
|
|
||||||
<template v-slot:action="{ attrs }">
|
|
||||||
<v-btn
|
|
||||||
text
|
|
||||||
v-bind="attrs"
|
|
||||||
@click="infoSnackbar = false"
|
|
||||||
>
|
|
||||||
Close
|
|
||||||
</v-btn>
|
|
||||||
</template>
|
|
||||||
</v-snackbar>
|
|
||||||
|
|
||||||
<v-dialog
|
<v-dialog
|
||||||
v-model="profileDialog"
|
v-model="profileDialog"
|
||||||
max-width="600px"
|
max-width="600px"
|
||||||
@@ -555,6 +538,23 @@
|
|||||||
</v-dialog>
|
</v-dialog>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
|
<v-snackbar
|
||||||
|
v-model="infoSnackbar"
|
||||||
|
timeout="3000"
|
||||||
|
>
|
||||||
|
{{ infoSnackbarText }}
|
||||||
|
|
||||||
|
<template v-slot:action="{ attrs }">
|
||||||
|
<v-btn
|
||||||
|
text
|
||||||
|
v-bind="attrs"
|
||||||
|
@click="infoSnackbar = false"
|
||||||
|
>
|
||||||
|
Close
|
||||||
|
</v-btn>
|
||||||
|
</template>
|
||||||
|
</v-snackbar>
|
||||||
|
|
||||||
<v-snackbar
|
<v-snackbar
|
||||||
v-model="errorSnackbar"
|
v-model="errorSnackbar"
|
||||||
color="error"
|
color="error"
|
||||||
|
|||||||
@@ -255,10 +255,14 @@ export default {
|
|||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
this.profileDialog = false
|
this.profileDialog = false
|
||||||
this.populateProfileItems(response.data.id)
|
this.populateProfileItems(response.data.id)
|
||||||
|
this.infoSnackbarText = 'Profile Saved'
|
||||||
|
this.infoSnackbar = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error(error.response)
|
console.error(error.response)
|
||||||
|
this.errorSnackbarText = 'Error Saving Profile'
|
||||||
|
this.errorSnackbar = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
updateProfile () {
|
updateProfile () {
|
||||||
@@ -323,10 +327,14 @@ export default {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
this.populateProfileItems(0)
|
this.populateProfileItems(0)
|
||||||
|
this.infoSnackbarText = 'Profile Deleted'
|
||||||
|
this.infoSnackbar = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error(error.response)
|
console.error(error.response)
|
||||||
|
this.errorSnackbarText = 'Error Deleting Profile'
|
||||||
|
this.errorSnackbar = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getSamples () {
|
getSamples () {
|
||||||
@@ -359,11 +367,13 @@ export default {
|
|||||||
.then(response => {
|
.then(response => {
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
this.getSamples()
|
this.getSamples()
|
||||||
|
this.infoSnackbarText = 'Sample Uploaded'
|
||||||
|
this.infoSnackbar = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
if (error.response.status === 409) {
|
if (error.response.status === 409) {
|
||||||
this.errorSnackbarText = 'Upload Failed: Duplicate Sample Name'
|
this.errorSnackbarText = 'Error Uploading Sample: Duplicate Sample Name'
|
||||||
this.errorSnackbar = true
|
this.errorSnackbar = true
|
||||||
}
|
}
|
||||||
console.error(error.response)
|
console.error(error.response)
|
||||||
|
|||||||
@@ -1,7 +1,19 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Vuetify from 'vuetify/lib/framework'
|
import Vuetify from 'vuetify/lib/framework'
|
||||||
|
|
||||||
|
import colors from 'vuetify/lib/util/colors'
|
||||||
|
|
||||||
Vue.use(Vuetify)
|
Vue.use(Vuetify)
|
||||||
|
|
||||||
export default new Vuetify({
|
export default new Vuetify({
|
||||||
|
theme: {
|
||||||
|
themes: {
|
||||||
|
light: {
|
||||||
|
primary: colors.blueGrey
|
||||||
|
},
|
||||||
|
dark: {
|
||||||
|
primary: colors.blueGrey
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user