This commit is contained in:
@@ -3,23 +3,38 @@
|
|||||||
<!-- todo: need type icon and badge with count options in title bar (badge is icon?) -->
|
<!-- todo: need type icon and badge with count options in title bar (badge is icon?) -->
|
||||||
<slot name="dash-title">
|
<slot name="dash-title">
|
||||||
<v-toolbar flat dense>
|
<v-toolbar flat dense>
|
||||||
<v-btn text icon to="/home-notifications" data-cy="notification">
|
<template v-if="hasUrl">
|
||||||
<template v-if="showCount">
|
<v-btn text icon :to="moreUrl">
|
||||||
<v-badge :value="23 > 0">
|
<template v-if="showCount && count > 0">
|
||||||
|
<v-badge overlap>
|
||||||
|
<template v-slot:badge>
|
||||||
|
{{ count }}
|
||||||
|
</template>
|
||||||
|
<v-icon>{{ icon }}</v-icon>
|
||||||
|
</v-badge>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<v-icon>{{ icon }}</v-icon>
|
||||||
|
</template>
|
||||||
|
</v-btn>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<template v-if="showCount && count > 0">
|
||||||
|
<v-badge overlap class="mr-4">
|
||||||
<template v-slot:badge>
|
<template v-slot:badge>
|
||||||
23
|
{{ count }}
|
||||||
</template>
|
</template>
|
||||||
<v-icon>$ayiSplotch</v-icon>
|
<v-icon>{{ icon }}</v-icon>
|
||||||
</v-badge>
|
</v-badge>
|
||||||
</template>
|
</template>
|
||||||
<template v-else> <v-icon>$ayiSplotch</v-icon> </template>
|
<template v-else>
|
||||||
</v-btn>
|
<v-icon class="mr-4">{{ icon }}</v-icon>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
<v-toolbar-title> {{ title }}</v-toolbar-title>
|
<v-toolbar-title> {{ title }}</v-toolbar-title>
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
|
||||||
<v-spacer></v-spacer>
|
|
||||||
|
|
||||||
<!-- <v-btn icon>
|
<!-- <v-btn icon>
|
||||||
<v-icon>mdi-heart</v-icon>
|
<v-icon>mdi-heart</v-icon>
|
||||||
</v-btn> -->
|
</v-btn> -->
|
||||||
@@ -105,7 +120,15 @@ export default {
|
|||||||
},
|
},
|
||||||
title: String,
|
title: String,
|
||||||
moreUrl: String,
|
moreUrl: String,
|
||||||
showCount: Boolean
|
showCount: Boolean,
|
||||||
|
count: { type: Number, default: 0 },
|
||||||
|
updateFrequency: { type: Number, default: 60000 },
|
||||||
|
icon: String
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
hasUrl: function() {
|
||||||
|
return this.moreUrl && this.moreUrl != "";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -52,6 +52,10 @@
|
|||||||
<gz-dash
|
<gz-dash
|
||||||
:title="item.title"
|
:title="item.title"
|
||||||
:id="item.id"
|
:id="item.id"
|
||||||
|
:showCount="true"
|
||||||
|
:count="3"
|
||||||
|
moreUrl="/home-dashboard"
|
||||||
|
icon="$ayiRobot"
|
||||||
v-on:dash-remove="dashRemove"
|
v-on:dash-remove="dashRemove"
|
||||||
v-on:dash-move-start="dashMoveStart"
|
v-on:dash-move-start="dashMoveStart"
|
||||||
v-on:dash-move-back="dashMoveBack"
|
v-on:dash-move-back="dashMoveBack"
|
||||||
|
|||||||
Reference in New Issue
Block a user