mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Updated portal preview to use default icon
refs https://github.com/TryGhost/members.js/issues/77 - By default, if there is no icon button selected, we fallback to show the first icon in list as selected in both preview and portal
This commit is contained in:
parent
5cce6138e5
commit
6df368ed3b
@ -136,6 +136,9 @@ export default ModalComponent.extend({
|
||||
this.iconExtensions = ICON_EXTENSIONS;
|
||||
const portalButtonIcon = this.settings.get('portalButtonIcon') || '';
|
||||
const defaultIconKeys = this.defaultButtonIcons.map(buttonIcon => buttonIcon.value);
|
||||
if (!portalButtonIcon) {
|
||||
this.set('buttonIcon', defaultIconKeys[0]);
|
||||
}
|
||||
if (portalButtonIcon && !defaultIconKeys.includes(portalButtonIcon)) {
|
||||
this.set('customIcon', this.settings.get('portalButtonIcon'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user