This commit is contained in:
2020-11-03 20:15:11 +00:00
parent 51f485acbe
commit bbd80cc1ea
5 changed files with 44 additions and 29 deletions

View File

@@ -2,7 +2,7 @@
<v-sheet color="white" elevation="4" height="300px" style="overflow: hidden;">
<slot name="dash-title">
<v-toolbar flat dense>
<template v-if="hasUrl">
<template v-if="hasMoreUrl">
<v-btn text icon :to="moreUrl">
<template v-if="count > 0">
<v-badge overlap>
@@ -46,6 +46,15 @@
</template>
<v-list>
<v-list-item v-if="hasAddUrl" :to="addUrl">
<v-list-item-icon>
<v-icon>$ayiPlus</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title>{{ $ay.t("New") }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item @click="$emit('dash-refresh', id)">
<v-list-item-icon>
<v-icon>$ayiSync</v-icon>
@@ -123,6 +132,7 @@ export default {
},
title: String,
moreUrl: String,
addUrl: String,
count: { type: Number, default: 0 },
updateFrequency: { type: Number, default: 60000 },
maxListItems: { type: Number, default: 10 },
@@ -140,8 +150,11 @@ export default {
clearInterval(this.timer);
},
computed: {
hasUrl: function() {
hasMoreUrl: function() {
return this.moreUrl && this.moreUrl != "";
},
hasAddUrl: function() {
return this.addUrl && this.addUrl != "";
}
},
methods: {