Clean up radio button options

This commit is contained in:
rijkvanzanten
2020-08-13 15:54:29 -04:00
parent 0bfa3ba1cc
commit 47085e4128
3 changed files with 53 additions and 33 deletions

View File

@@ -24,7 +24,7 @@ export default defineInterface(({ i18n }) => ({
name: i18n.t('text'),
meta: {
interface: 'text-input',
}
},
},
{
field: 'value',
@@ -33,33 +33,13 @@ export default defineInterface(({ i18n }) => ({
meta: {
interface: 'text-input',
options: {
font: 'monospace'
font: 'monospace',
},
}
},
},
]
}
}
},
{
field: 'allowOther',
name: i18n.t('allow_other'),
type: 'string',
meta: {
width: 'half',
interface: 'toggle',
default_value: false,
}
},
{
field: 'iconOff',
name: i18n.t('icon_off'),
type: 'string',
meta: {
width: 'half',
interface: 'icon',
default_value: 'check_box_outline_blank',
}
],
},
},
},
{
field: 'iconOn',
@@ -68,8 +48,22 @@ export default defineInterface(({ i18n }) => ({
meta: {
width: 'half',
interface: 'icon',
default_value: 'check_box',
}
},
schema: {
default_value: 'radio_button_checked',
},
},
{
field: 'iconOff',
name: i18n.t('icon_off'),
type: 'string',
meta: {
width: 'half',
interface: 'icon',
},
schema: {
default_value: 'radio_button_unchecked',
},
},
{
field: 'color',
@@ -78,8 +72,25 @@ export default defineInterface(({ i18n }) => ({
meta: {
width: 'half',
interface: 'color',
default_value: 'var(--primary)',
}
},
schema: {
default_value: '#2f80ed',
},
},
{
field: 'allowOther',
name: i18n.t('allow_other'),
type: 'string',
meta: {
width: 'half',
interface: 'toggle',
options: {
label: i18n.t('enable_custom_values'),
},
},
schema: {
default_value: false,
},
},
],
}));

View File

@@ -14,6 +14,9 @@ export default defineInterface(({ i18n }) => ({
meta: {
width: 'half',
interface: 'text-input',
options: {
placeholder: i18n.t('text_shown_when_no_value'),
},
},
},
{

View File

@@ -209,9 +209,13 @@
"last_page": "Last Page",
"last_login": "Last Login",
"choose_a_collection": "Choose a Collection...",
"choose_a_collection": "Choose a collection...",
"choose_a_field": "Choose a Field...",
"text_shown_when_no_value": "Text shown when no value...",
"enable_custom_values": "Enable custom values",
"submit": "Submit",
"move_to_folder": "Move to Folder",
@@ -575,6 +579,8 @@
"all_activity": "All Activity",
"badge": "Badge",
"none": "None",
"choose_a_color": "Choose a Color...",
@@ -636,8 +642,8 @@
"subdued": "Subdued",
"toggle": "Toggle",
"icon_on": "Icon (On)",
"icon_off": "Icon (Off)",
"icon_on": "Icon On",
"icon_off": "Icon Off",
"label": "Label",
"wysiwyg": "WYSIWYG",
"toolbar": "Toolbar",