keep migrating to vuetify

This commit is contained in:
les
2021-01-11 00:17:56 +01:00
parent 539c0fa933
commit 3abb39f62b
24 changed files with 1382 additions and 1389 deletions

View File

@@ -3,7 +3,7 @@
v-calendar(
title-position='left'
:is-dark="settings['theme.is_dark']"
:columns="$screens({ default: 1, md: 2 })"
:columns="2"
@update:from-page='updatePage'
:locale='$i18n.locale'
:attributes='attributes'
@@ -21,7 +21,7 @@ import { take, get } from 'lodash'
export default {
name: 'Calendar',
props: {
events: { type: Array, default: [] }
events: { type: Array, default: () => [] }
},
data () {
const month = dayjs().month() + 1
@@ -35,13 +35,14 @@ export default {
// TODO: could be better
attributes () {
return []
const colors = ['blue', 'orange', 'yellow', 'teal', 'indigo', 'green', 'red', 'purple', 'pink', 'gray']
const tags = take(this.tags, 10).map(t => t.tag)
let attributes = []
attributes.push({ key: 'today', dates: new Date(), highlight: { color: 'green', fillMode: 'outline' } })
function getColor (event) {
const color = { class: 'vc-rounded-full', color: 'blue', fillMode: 'outline' }
const color = { class: 'vc-rounded-full', color: 'blue', fillMode: 'normal' }
const tag = get(event, 'tags[0]')
if (!tag) { return color }
const idx = tags.indexOf(tag)