mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
fixed boolean, color display and repeater options
This commit is contained in:
966
api/package-lock.json
generated
966
api/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<div class="boolean" :style="styles">
|
||||
<value-null v-if="value === null" />
|
||||
<v-icon v-if="iconOn !== null && iconOff !== null" :name="value ? iconOn : iconOff"></v-icon>
|
||||
<span v-if="labelOn !== null && labelOff !== null">{{ value ? labelOn : labelOff }}</span>
|
||||
<template v-else>
|
||||
<v-icon v-if="iconOn !== null && iconOff !== null" :name="value ? iconOn : iconOff"></v-icon>
|
||||
<span v-if="labelOn !== null && labelOff !== null">{{ value ? labelOn : labelOff }}</span>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -31,11 +33,11 @@ export default defineComponent({
|
||||
},
|
||||
iconOn: {
|
||||
type: String,
|
||||
default: null,
|
||||
default: 'check',
|
||||
},
|
||||
iconOff: {
|
||||
type: String,
|
||||
default: null,
|
||||
default: 'close',
|
||||
},
|
||||
colorOn: {
|
||||
type: String,
|
||||
|
||||
@@ -8,7 +8,7 @@ export default defineInterface(({ i18n }) => ({
|
||||
icon: 'palette',
|
||||
component: InterfaceColor,
|
||||
types: ['string'],
|
||||
recommendedDisplays: ['color-dot'],
|
||||
recommendedDisplays: ['color'],
|
||||
options: [
|
||||
{
|
||||
field: 'presets',
|
||||
|
||||
@@ -6,17 +6,13 @@
|
||||
</div>
|
||||
|
||||
<div class="grid-element half">
|
||||
<p class="type-label">{{ $t('interfaces.repeater.edit_fields') }}</p>
|
||||
<repeater
|
||||
v-model="repeaterValue"
|
||||
:template="`{{ field }} — {{ interface }}`"
|
||||
:fields="repeaterFields"
|
||||
/>
|
||||
<p class="type-label">{{ $t('interfaces.repeater.add_label') }}</p>
|
||||
<v-input class="input" v-model="addLabel" :placeholder="$t('add_a_new_item')" />
|
||||
</div>
|
||||
|
||||
<div class="grid-element full">
|
||||
<p class="type-label">{{ $t('interfaces.repeater.add_label') }}</p>
|
||||
<v-input class="input" v-model="addLabel" :placeholder="$t('add_a_new_item')" />
|
||||
<p class="type-label">{{ $t('interfaces.repeater.edit_fields') }}</p>
|
||||
<repeater v-model="repeaterValue" :template="`{{ field }} — {{ interface }}`" :fields="repeaterFields" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
"description": "Display a collection",
|
||||
"icon_label": "Show the collection's icon"
|
||||
},
|
||||
"color-dot": {
|
||||
"color-dot": "Color Dot",
|
||||
"color": {
|
||||
"color": "Color",
|
||||
"description": "Display a colored dot",
|
||||
"default_color": "Default Color",
|
||||
"choices_note": "Set colors relative to the text"
|
||||
|
||||
Reference in New Issue
Block a user