From f8d9b9f6c86d600e732af20506a2c65bc7194ac6 Mon Sep 17 00:00:00 2001 From: zombieFox Date: Sun, 23 Jun 2024 22:23:40 +0100 Subject: [PATCH] theme random colour --- src/component/control/checkbox/index.js | 7 +++---- src/component/control/color/index.js | 3 +-- src/component/menuContent/themeSetting/index.js | 3 +++ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/component/control/checkbox/index.js b/src/component/control/checkbox/index.js index 0d517517..29b8ea2a 100644 --- a/src/component/control/checkbox/index.js +++ b/src/component/control/checkbox/index.js @@ -10,10 +10,9 @@ export const Control_checkbox = function ({ labelText = 'Label', description = false, action = false, - //FIXME deprecated properties - inputButton = false, //eslint-disable-line - inputHide = false, //eslint-disable-line - inputButtonStyle = false //eslint-disable-line + inputButton = false, + inputHide = false, + inputButtonStyle = false } = {}) { this.checkbox = form.input.checkbox({ diff --git a/src/component/control/color/index.js b/src/component/control/color/index.js index af1c69e3..e1e84ff1 100644 --- a/src/component/control/color/index.js +++ b/src/component/control/color/index.js @@ -15,8 +15,7 @@ export const Control_color = function ({ id = 'name', labelText = 'Label', srOnly = false, - //FIXME deprecated property - value = '#000000', //eslint-disable-line + value = '#000000', defaultValue = false, action = false, randomColor = false, diff --git a/src/component/menuContent/themeSetting/index.js b/src/component/menuContent/themeSetting/index.js index e974f999..2cf99bbc 100644 --- a/src/component/menuContent/themeSetting/index.js +++ b/src/component/menuContent/themeSetting/index.js @@ -1782,6 +1782,7 @@ themeSetting.layout = (parent) => { labelText: message.get('menuContentThemeLayoutColorColor'), defaultValue: state.get.default().theme.layout.color.rgb, minMaxObject: state.get.minMax(), + randomColor: true, action: () => { applyCSSVar([ 'theme.layout.color.rgb.r', @@ -1919,6 +1920,7 @@ themeSetting.header = (parent) => { labelText: message.get('menuContentThemeHeaderColorColor'), defaultValue: state.get.default().theme.header.color.rgb, minMaxObject: state.get.minMax(), + randomColor: true, action: () => { applyCSSVar([ 'theme.header.color.rgb.r', @@ -2008,6 +2010,7 @@ themeSetting.bookmark = (parent) => { labelText: message.get('menuContentThemeBookmarkColorColor'), defaultValue: state.get.default().theme.bookmark.color.rgb, minMaxObject: state.get.minMax(), + randomColor: true, action: () => { applyCSSVar([ 'theme.bookmark.color.rgb.r',