Albums: Code clean-up & small improvements #15
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
c584a79a6f
commit
fd9942b525
4 changed files with 30 additions and 33 deletions
|
@ -28,7 +28,7 @@ Api.interceptors.response.use(function (response) {
|
|||
|
||||
if(typeof response.data == "string") {
|
||||
Notify.error("Request failed - invalid response");
|
||||
console.warn("WARNING: Server returned HTML instead of JSON - API not implemented?")
|
||||
console.warn("WARNING: Server returned HTML instead of JSON - API not implemented?");
|
||||
}
|
||||
|
||||
return response;
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
<v-card-title primary-title>
|
||||
<div>
|
||||
<h3 class="title mb-3">No albums matched your search</h3>
|
||||
<div>Try again using a different term or <v-btn @click.prevent.stop="create" small>create a new album</v-btn></div>
|
||||
<div>Try again using a different term or
|
||||
<v-btn @click.prevent.stop="create" small>create a new album</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
</v-card-title>
|
||||
</v-card>
|
||||
|
@ -59,7 +61,8 @@
|
|||
justify-center
|
||||
ma-0
|
||||
>
|
||||
<v-progress-circular indeterminate color="accent lighten-5"></v-progress-circular>
|
||||
<v-progress-circular indeterminate
|
||||
color="accent lighten-5"></v-progress-circular>
|
||||
</v-layout>
|
||||
</v-img>
|
||||
|
||||
|
@ -69,11 +72,14 @@
|
|||
lazy
|
||||
@save="onSave(album)"
|
||||
@cancel="onCancel"
|
||||
@open="onDialogOpen"
|
||||
@close="onDialogClose"
|
||||
class="p-inline-edit"
|
||||
>
|
||||
{{ album.AlbumName | capitalize }}
|
||||
<span v-if="album.AlbumName">
|
||||
{{ album.AlbumName }}
|
||||
</span>
|
||||
<span v-else>
|
||||
<v-icon>edit</v-icon>
|
||||
</span>
|
||||
<template v-slot:input>
|
||||
<div class="mt-3 title">Change Title</div>
|
||||
</template>
|
||||
|
@ -107,6 +113,7 @@
|
|||
|
||||
<script>
|
||||
import Album from "model/album";
|
||||
import Notify from "common/notify";
|
||||
|
||||
export default {
|
||||
name: 'p-page-albums',
|
||||
|
@ -114,7 +121,7 @@
|
|||
staticFilter: Object
|
||||
},
|
||||
watch: {
|
||||
'$route' () {
|
||||
'$route'() {
|
||||
const query = this.$route.query;
|
||||
|
||||
this.filter.q = query['q'];
|
||||
|
@ -255,18 +262,8 @@
|
|||
this.search();
|
||||
})
|
||||
},
|
||||
onSave (album) {
|
||||
console.log('onSave', album);
|
||||
album.update().then(() => this.$notify.success("All changes saved"));
|
||||
},
|
||||
onCancel () {
|
||||
console.log('onCancel', arguments)
|
||||
},
|
||||
onDialogOpen () {
|
||||
console.log('onDialogOpen', arguments)
|
||||
},
|
||||
onDialogClose () {
|
||||
console.log('onDialogClose', arguments)
|
||||
onSave(album) {
|
||||
album.update().then(() => Notify.success("All changes saved"));
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -15,8 +15,12 @@
|
|||
"value": "default"
|
||||
},
|
||||
{
|
||||
"text": "Whale",
|
||||
"value": "whale"
|
||||
"text": "Charcoal",
|
||||
"value": "charcoal"
|
||||
},
|
||||
{
|
||||
"text": "Lavender",
|
||||
"value": "lavender"
|
||||
},
|
||||
{
|
||||
"text": "Raspberry",
|
||||
|
@ -27,12 +31,8 @@
|
|||
"value": "seaweed"
|
||||
},
|
||||
{
|
||||
"text": "Lavender",
|
||||
"value": "lavender"
|
||||
},
|
||||
{
|
||||
"text": "Charcoal",
|
||||
"value": "charcoal"
|
||||
"text": "Whale",
|
||||
"value": "whale"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"secondary-light": "#ECEFF1",
|
||||
"accent": "#9E9E9E",
|
||||
"error": "#E57373",
|
||||
"info": "#0097A7",
|
||||
"info": "#00ACC1",
|
||||
"success": "#00BFA5",
|
||||
"warning": "#FFD600",
|
||||
"delete": "#E57373",
|
||||
|
@ -22,7 +22,7 @@
|
|||
"secondary-light": "#EEEEEE",
|
||||
"accent": "#9E9E9E",
|
||||
"error": "#E57373",
|
||||
"info": "#0097A7",
|
||||
"info": "#00ACC1",
|
||||
"success": "#00BFA5",
|
||||
"warning": "#FFD600",
|
||||
"delete": "#E57373",
|
||||
|
@ -38,7 +38,7 @@
|
|||
"secondary-light": "#EEEEEE",
|
||||
"accent": "#9E9E9E",
|
||||
"error": "#E57373",
|
||||
"info": "#0097A7",
|
||||
"info": "#00ACC1",
|
||||
"success": "#00BFA5",
|
||||
"warning": "#FFD600",
|
||||
"delete": "#E57373",
|
||||
|
@ -54,7 +54,7 @@
|
|||
"secondary-light": "#B0BEC5",
|
||||
"accent": "#B0BEC5",
|
||||
"error": "#E57373",
|
||||
"info": "#0097A7",
|
||||
"info": "#00ACC1",
|
||||
"success": "#00BFA5",
|
||||
"warning": "#FFD600",
|
||||
"delete": "#E57373",
|
||||
|
@ -70,7 +70,7 @@
|
|||
"secondary-light": "#B0BEC5",
|
||||
"accent": "#B0BEC5",
|
||||
"error": "#E57373",
|
||||
"info": "#0097A7",
|
||||
"info": "#00ACC1",
|
||||
"success": "#00BFA5",
|
||||
"warning": "#FFD600",
|
||||
"delete": "#E57373",
|
||||
|
@ -86,7 +86,7 @@
|
|||
"secondary-light": "#E0E0E0",
|
||||
"accent": "#757575",
|
||||
"error": "#E57373",
|
||||
"info": "#0097A7",
|
||||
"info": "#00ACC1",
|
||||
"success": "#00BFA5",
|
||||
"warning": "#FFD600",
|
||||
"delete": "#E57373",
|
||||
|
|
Loading…
Reference in a new issue