mirror of
https://github.com/directus/directus.git
synced 2026-01-30 04:58:17 -05:00
Use variables for default colors in boolean interface/display (#10346)
* Use variables for default colors in boolean interface/display Fixes #10333 * Fix translations name
This commit is contained in:
@@ -35,11 +35,11 @@ export default defineComponent({
|
||||
},
|
||||
colorOn: {
|
||||
type: String,
|
||||
default: '#00C897',
|
||||
default: 'var(--primary)',
|
||||
},
|
||||
colorOff: {
|
||||
type: String,
|
||||
default: '#B0BEC5',
|
||||
default: 'var(--foreground-subdued)',
|
||||
},
|
||||
},
|
||||
setup(props) {
|
||||
|
||||
@@ -65,9 +65,6 @@ export default defineDisplay({
|
||||
interface: 'select-color',
|
||||
width: 'half',
|
||||
},
|
||||
schema: {
|
||||
default_value: '#00C897',
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'colorOff',
|
||||
@@ -77,9 +74,6 @@ export default defineDisplay({
|
||||
interface: 'select-color',
|
||||
width: 'half',
|
||||
},
|
||||
schema: {
|
||||
default_value: '#B0BEC5',
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
@@ -43,11 +43,11 @@ export default defineComponent({
|
||||
},
|
||||
colorOn: {
|
||||
type: String,
|
||||
default: '#00C897',
|
||||
default: 'var(--primary)',
|
||||
},
|
||||
colorOff: {
|
||||
type: String,
|
||||
default: '#B0BEC5',
|
||||
default: 'var(--foreground-subdued)',
|
||||
},
|
||||
},
|
||||
emits: ['input'],
|
||||
|
||||
@@ -40,11 +40,8 @@ export default defineInterface({
|
||||
name: '$t:interfaces.boolean.color_on',
|
||||
type: 'string',
|
||||
meta: {
|
||||
width: 'half',
|
||||
interface: 'select-color',
|
||||
},
|
||||
schema: {
|
||||
default_value: '#00C897',
|
||||
width: 'half',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -52,11 +49,8 @@ export default defineInterface({
|
||||
name: '$t:interfaces.boolean.color_off',
|
||||
type: 'string',
|
||||
meta: {
|
||||
width: 'half',
|
||||
interface: 'select-color',
|
||||
},
|
||||
schema: {
|
||||
default_value: '#B0BEC5',
|
||||
width: 'half',
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user