fix: added color picker
This commit is contained in:
parent
28217968e1
commit
d520586e87
@ -67,6 +67,18 @@
|
|||||||
<div class="flex justify-between items-center">
|
<div class="flex justify-between items-center">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="flex items-center gap-x-2">
|
<div class="flex items-center gap-x-2">
|
||||||
|
<ColorPicker v-model="_event.color">
|
||||||
|
<template #target="{ togglePopover }">
|
||||||
|
<Button variant="ghost" @click="togglePopover">
|
||||||
|
<div
|
||||||
|
class="w-4 h-4 rounded-sm border"
|
||||||
|
:style="{
|
||||||
|
background: _event.color ? _event.color : '#e4faeb',
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
|
</template>
|
||||||
|
</ColorPicker>
|
||||||
<Button variant="ghost" @click="updateEventType">
|
<Button variant="ghost" @click="updateEventType">
|
||||||
<FeatherIcon
|
<FeatherIcon
|
||||||
:name="_event.eventType == 'Private' ? 'lock' : 'unlock'"
|
:name="_event.eventType == 'Private' ? 'lock' : 'unlock'"
|
||||||
@ -102,6 +114,7 @@ import {
|
|||||||
TextInput,
|
TextInput,
|
||||||
TextEditor,
|
TextEditor,
|
||||||
DatePicker,
|
DatePicker,
|
||||||
|
ColorPicker,
|
||||||
TimePicker,
|
TimePicker,
|
||||||
} from 'frappe-ui'
|
} from 'frappe-ui'
|
||||||
import { getFormat } from '@/utils'
|
import { getFormat } from '@/utils'
|
||||||
@ -146,6 +159,9 @@ watch(
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
title.value.el.focus()
|
title.value.el.focus()
|
||||||
_event.value = { ...event.value }
|
_event.value = { ...event.value }
|
||||||
|
if (!_event.value.color) {
|
||||||
|
_event.value.color = '#e4faeb'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user