fix
parent
ef7033cac0
commit
fdd19068a8
|
@ -62,7 +62,7 @@ const defaultSetting: LX.AppSetting = {
|
||||||
'desktopLyric.style.lineGap': 15,
|
'desktopLyric.style.lineGap': 15,
|
||||||
'desktopLyric.style.lyricUnplayColor': 'rgba(255, 255, 255, 1)',
|
'desktopLyric.style.lyricUnplayColor': 'rgba(255, 255, 255, 1)',
|
||||||
'desktopLyric.style.lyricPlayedColor': 'rgba(7, 197, 86, 1)',
|
'desktopLyric.style.lyricPlayedColor': 'rgba(7, 197, 86, 1)',
|
||||||
'desktopLyric.style.lyricShadowColor': 'rgba(0, 0, 0, 0.15)',
|
'desktopLyric.style.lyricShadowColor': 'rgba(0, 0, 0, 0.18)',
|
||||||
// 'desktopLyric.style.fontWeight': false,
|
// 'desktopLyric.style.fontWeight': false,
|
||||||
'desktopLyric.style.opacity': 95,
|
'desktopLyric.style.opacity': 95,
|
||||||
'desktopLyric.style.ellipsis': false,
|
'desktopLyric.style.ellipsis': false,
|
||||||
|
|
|
@ -4,7 +4,7 @@ import '@simonwep/pickr/dist/themes/classic.min.css'
|
||||||
|
|
||||||
export interface PickrTools {
|
export interface PickrTools {
|
||||||
pickr: Pickr | null
|
pickr: Pickr | null
|
||||||
create: (dom: HTMLElement, color: string, swatches: string[] | null, change: (color: string) => void, reset: () => void) => PickrTools
|
create: (dom: HTMLElement, color: string, swatches: string[] | null, change: (color: string) => void, reset?: () => void) => PickrTools
|
||||||
destroy: () => void
|
destroy: () => void
|
||||||
setColor: (color: string) => void
|
setColor: (color: string) => void
|
||||||
}
|
}
|
||||||
|
@ -72,10 +72,9 @@ export const pickrTools: PickrTools = {
|
||||||
pickrTools.pickr.on('swatchselect', (color: any) => {
|
pickrTools.pickr.on('swatchselect', (color: any) => {
|
||||||
swatchselectColor = color
|
swatchselectColor = color
|
||||||
}).on('change', throttleChange).on('cancel', () => {
|
}).on('change', throttleChange).on('cancel', () => {
|
||||||
change(color)
|
|
||||||
console.log('cancel')
|
console.log('cancel')
|
||||||
}).on('cancel', () => {
|
change(color)
|
||||||
reset()
|
reset?.()
|
||||||
})
|
})
|
||||||
|
|
||||||
return pickrTools
|
return pickrTools
|
||||||
|
|
|
@ -215,7 +215,7 @@ const useLyricColor = () => {
|
||||||
const defaultSetting = {
|
const defaultSetting = {
|
||||||
'desktopLyric.style.lyricUnplayColor': 'rgba(255, 255, 255, 1)',
|
'desktopLyric.style.lyricUnplayColor': 'rgba(255, 255, 255, 1)',
|
||||||
'desktopLyric.style.lyricPlayedColor': 'rgba(7, 197, 86, 1)',
|
'desktopLyric.style.lyricPlayedColor': 'rgba(7, 197, 86, 1)',
|
||||||
'desktopLyric.style.lyricShadowColor': 'rgba(0, 0, 0, 0.15)',
|
'desktopLyric.style.lyricShadowColor': 'rgba(0, 0, 0, 0.18)',
|
||||||
}
|
}
|
||||||
updateSetting(defaultSetting)
|
updateSetting(defaultSetting)
|
||||||
setLyricUnplayColor(defaultSetting['desktopLyric.style.lyricUnplayColor'])
|
setLyricUnplayColor(defaultSetting['desktopLyric.style.lyricUnplayColor'])
|
||||||
|
|
Loading…
Reference in New Issue