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") {
|
if(typeof response.data == "string") {
|
||||||
Notify.error("Request failed - invalid response");
|
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;
|
return response;
|
||||||
|
|
|
@ -32,7 +32,9 @@
|
||||||
<v-card-title primary-title>
|
<v-card-title primary-title>
|
||||||
<div>
|
<div>
|
||||||
<h3 class="title mb-3">No albums matched your search</h3>
|
<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>
|
</div>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
@ -59,7 +61,8 @@
|
||||||
justify-center
|
justify-center
|
||||||
ma-0
|
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-layout>
|
||||||
</v-img>
|
</v-img>
|
||||||
|
|
||||||
|
@ -69,11 +72,14 @@
|
||||||
lazy
|
lazy
|
||||||
@save="onSave(album)"
|
@save="onSave(album)"
|
||||||
@cancel="onCancel"
|
@cancel="onCancel"
|
||||||
@open="onDialogOpen"
|
|
||||||
@close="onDialogClose"
|
|
||||||
class="p-inline-edit"
|
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>
|
<template v-slot:input>
|
||||||
<div class="mt-3 title">Change Title</div>
|
<div class="mt-3 title">Change Title</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -107,6 +113,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Album from "model/album";
|
import Album from "model/album";
|
||||||
|
import Notify from "common/notify";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'p-page-albums',
|
name: 'p-page-albums',
|
||||||
|
@ -256,17 +263,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onSave(album) {
|
onSave(album) {
|
||||||
console.log('onSave', album);
|
album.update().then(() => Notify.success("All changes saved"));
|
||||||
album.update().then(() => this.$notify.success("All changes saved"));
|
|
||||||
},
|
|
||||||
onCancel () {
|
|
||||||
console.log('onCancel', arguments)
|
|
||||||
},
|
|
||||||
onDialogOpen () {
|
|
||||||
console.log('onDialogOpen', arguments)
|
|
||||||
},
|
|
||||||
onDialogClose () {
|
|
||||||
console.log('onDialogClose', arguments)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
|
@ -15,8 +15,12 @@
|
||||||
"value": "default"
|
"value": "default"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Whale",
|
"text": "Charcoal",
|
||||||
"value": "whale"
|
"value": "charcoal"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Lavender",
|
||||||
|
"value": "lavender"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Raspberry",
|
"text": "Raspberry",
|
||||||
|
@ -27,12 +31,8 @@
|
||||||
"value": "seaweed"
|
"value": "seaweed"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "Lavender",
|
"text": "Whale",
|
||||||
"value": "lavender"
|
"value": "whale"
|
||||||
},
|
|
||||||
{
|
|
||||||
"text": "Charcoal",
|
|
||||||
"value": "charcoal"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"secondary-light": "#ECEFF1",
|
"secondary-light": "#ECEFF1",
|
||||||
"accent": "#9E9E9E",
|
"accent": "#9E9E9E",
|
||||||
"error": "#E57373",
|
"error": "#E57373",
|
||||||
"info": "#0097A7",
|
"info": "#00ACC1",
|
||||||
"success": "#00BFA5",
|
"success": "#00BFA5",
|
||||||
"warning": "#FFD600",
|
"warning": "#FFD600",
|
||||||
"delete": "#E57373",
|
"delete": "#E57373",
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
"secondary-light": "#EEEEEE",
|
"secondary-light": "#EEEEEE",
|
||||||
"accent": "#9E9E9E",
|
"accent": "#9E9E9E",
|
||||||
"error": "#E57373",
|
"error": "#E57373",
|
||||||
"info": "#0097A7",
|
"info": "#00ACC1",
|
||||||
"success": "#00BFA5",
|
"success": "#00BFA5",
|
||||||
"warning": "#FFD600",
|
"warning": "#FFD600",
|
||||||
"delete": "#E57373",
|
"delete": "#E57373",
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
"secondary-light": "#EEEEEE",
|
"secondary-light": "#EEEEEE",
|
||||||
"accent": "#9E9E9E",
|
"accent": "#9E9E9E",
|
||||||
"error": "#E57373",
|
"error": "#E57373",
|
||||||
"info": "#0097A7",
|
"info": "#00ACC1",
|
||||||
"success": "#00BFA5",
|
"success": "#00BFA5",
|
||||||
"warning": "#FFD600",
|
"warning": "#FFD600",
|
||||||
"delete": "#E57373",
|
"delete": "#E57373",
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
"secondary-light": "#B0BEC5",
|
"secondary-light": "#B0BEC5",
|
||||||
"accent": "#B0BEC5",
|
"accent": "#B0BEC5",
|
||||||
"error": "#E57373",
|
"error": "#E57373",
|
||||||
"info": "#0097A7",
|
"info": "#00ACC1",
|
||||||
"success": "#00BFA5",
|
"success": "#00BFA5",
|
||||||
"warning": "#FFD600",
|
"warning": "#FFD600",
|
||||||
"delete": "#E57373",
|
"delete": "#E57373",
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
"secondary-light": "#B0BEC5",
|
"secondary-light": "#B0BEC5",
|
||||||
"accent": "#B0BEC5",
|
"accent": "#B0BEC5",
|
||||||
"error": "#E57373",
|
"error": "#E57373",
|
||||||
"info": "#0097A7",
|
"info": "#00ACC1",
|
||||||
"success": "#00BFA5",
|
"success": "#00BFA5",
|
||||||
"warning": "#FFD600",
|
"warning": "#FFD600",
|
||||||
"delete": "#E57373",
|
"delete": "#E57373",
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
"secondary-light": "#E0E0E0",
|
"secondary-light": "#E0E0E0",
|
||||||
"accent": "#757575",
|
"accent": "#757575",
|
||||||
"error": "#E57373",
|
"error": "#E57373",
|
||||||
"info": "#0097A7",
|
"info": "#00ACC1",
|
||||||
"success": "#00BFA5",
|
"success": "#00BFA5",
|
||||||
"warning": "#FFD600",
|
"warning": "#FFD600",
|
||||||
"delete": "#E57373",
|
"delete": "#E57373",
|
||||||
|
|
Loading…
Reference in a new issue