Skip to content
4 changes: 4 additions & 0 deletions resources/js/components/fieldtypes/FieldDisplayFieldtype.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
size="sm"
:icon="hidden ? 'eye-closed' : 'eye'"
variant="ghost"
v-tooltip="hideDisplayTooltip"
@click="toggleHidden"
/>
</template>
Expand All @@ -34,6 +35,9 @@ export default {
hidden() {
return this.getFieldSettingsValue('hide_display');
},
hideDisplayTooltip() {
return this.hidden ? __('Show Display label') : __('Hide Display Label');
},
},

mounted() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
:index="index"
:enabled="canAddSet"
:is-first="index === 0"
:show-connector="!(index === 0 && config.hide_display)"
:loading-set="loadingSet"
@added="addSet"
/>
Expand Down
4 changes: 4 additions & 0 deletions resources/js/components/ui/Publish/Field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ const shouldShowLabelText = computed(() => !props.config.hide_display);
const shouldShowLabel = computed(
() =>
shouldShowLabelText.value || // Need to see the text
props.config.hide_display || // Need label for accessibility (visually hidden)
isLocked.value || // Need to see the avatar
isSyncable.value, // Need to see the icon
);
Expand Down Expand Up @@ -239,6 +240,9 @@ const fieldtypeComponentEvents = computed(() => ({
{{ __(config.display) }}
</span>
</template>
<template v-else-if="config.hide_display">
<span class="sr-only">{{ __(config.display) }}</span>
</template>
<ui-button size="xs" inset icon="synced" variant="ghost" v-tooltip="__('messages.field_synced_with_origin')" v-if="!isReadOnly && isSyncable" v-show="isSynced" @click="desync" />
<ui-button size="xs" inset icon="unsynced" variant="ghost" v-tooltip="__('messages.field_desynced_from_origin')" v-if="!isReadOnly && isSyncable" v-show="!isSynced" @click="sync" />
</Label>
Expand Down