Skip to content

Commit 36527f7

Browse files
committed
Pass along the icon. Continuation of a00c1e4 ...
The previous commit only appeared to work. For fieldtypes where the icon isn't the same as the handle, you'd still get nothing.
1 parent 255ac14 commit 36527f7

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

resources/js/components/blueprints/Fields.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ export default {
115115
_id: uniqid(),
116116
type: 'inline',
117117
fieldtype: field.type,
118+
icon: field.icon,
118119
handle,
119120
config: {
120121
...field,

resources/js/components/blueprints/RegularField.vue

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="blueprint-drag-handle w-4 border-r"></div>
66
<div class="flex flex-1 items-center justify-between">
77
<div class="flex items-center flex-1 pr-2 py-1 pl-1">
8-
<svg-icon class="text-grey-70 mr-1" :name="fieldIcon" v-tooltip="tooltipText" />
8+
<svg-icon class="text-grey-70 mr-1" :name="field.icon" v-tooltip="tooltipText" />
99
<a v-text="labelText" @click="$emit('edit')" />
1010
<svg-icon name="hyperlink" v-if="isReferenceField" class="text-grey-60 text-3xs ml-1" v-tooltip="__('Imported from fieldset') + ': ' + field.field_reference" />
1111
</div>
@@ -89,10 +89,6 @@ export default {
8989
|| Vue.options.filters.titleize(Vue.options.filters.deslugify(this.field.handle));
9090
},
9191
92-
fieldIcon() {
93-
return this.field.icon || this.field.fieldtype
94-
},
95-
9692
width: {
9793
get() {
9894
return this.field.config.width;

resources/js/components/fields/FieldtypeSelector.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ export default {
201201
let field = {
202202
display: fieldtype.title,
203203
type: fieldtype.handle,
204+
icon: fieldtype.icon,
204205
instructions: null,
205206
localizable: false,
206207
width: 100,

0 commit comments

Comments
 (0)