Skip to content

Commit

Permalink
Pass along the icon. Continuation of a00c1e4 ...
Browse files Browse the repository at this point in the history
The previous commit only appeared to work. For fieldtypes where the icon isn't the same as the  handle, you'd still get nothing.
  • Loading branch information
jasonvarga committed Sep 22, 2020
1 parent 255ac14 commit 36527f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions resources/js/components/blueprints/Fields.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export default {
_id: uniqid(),
type: 'inline',
fieldtype: field.type,
icon: field.icon,
handle,
config: {
...field,
Expand Down
6 changes: 1 addition & 5 deletions resources/js/components/blueprints/RegularField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="blueprint-drag-handle w-4 border-r"></div>
<div class="flex flex-1 items-center justify-between">
<div class="flex items-center flex-1 pr-2 py-1 pl-1">
<svg-icon class="text-grey-70 mr-1" :name="fieldIcon" v-tooltip="tooltipText" />
<svg-icon class="text-grey-70 mr-1" :name="field.icon" v-tooltip="tooltipText" />
<a v-text="labelText" @click="$emit('edit')" />
<svg-icon name="hyperlink" v-if="isReferenceField" class="text-grey-60 text-3xs ml-1" v-tooltip="__('Imported from fieldset') + ': ' + field.field_reference" />
</div>
Expand Down Expand Up @@ -89,10 +89,6 @@ export default {
|| Vue.options.filters.titleize(Vue.options.filters.deslugify(this.field.handle));
},
fieldIcon() {
return this.field.icon || this.field.fieldtype
},
width: {
get() {
return this.field.config.width;
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/fields/FieldtypeSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export default {
let field = {
display: fieldtype.title,
type: fieldtype.handle,
icon: fieldtype.icon,
instructions: null,
localizable: false,
width: 100,
Expand Down

0 comments on commit 36527f7

Please sign in to comment.