mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Added icons to membership dropdown options
no issue - add icon + icon color to the subscription access and default post access option lists - updated templates to use icon in trigger and option display - fixed ember-power-select styles overriding svgs in trigger
This commit is contained in:
parent
4c736d1c80
commit
51536fb2ef
5 changed files with 24 additions and 8 deletions
|
@ -11,9 +11,11 @@
|
||||||
@selected={{this.selectedOption}}
|
@selected={{this.selectedOption}}
|
||||||
@onChange={{this.setDefaultContentVisibility}}
|
@onChange={{this.setDefaultContentVisibility}}
|
||||||
@disabled={{eq this.settings.membersSignupAccess "none"}}
|
@disabled={{eq this.settings.membersSignupAccess "none"}}
|
||||||
|
@triggerClass="gh-setting-dropdown"
|
||||||
as |option|
|
as |option|
|
||||||
>
|
>
|
||||||
<div class="flex ma2">
|
<div class="flex ma2">
|
||||||
|
{{svg-jar option.icon class=(concat "w8 h8 mr2 fill-" (or option.icon_color "green"))}}
|
||||||
<div class="gh-radio-label">
|
<div class="gh-radio-label">
|
||||||
{{option.name}}<br>
|
{{option.name}}<br>
|
||||||
<div class="gh-radio-desc">{{option.description}}</div>
|
<div class="gh-radio-desc">{{option.description}}</div>
|
||||||
|
|
|
@ -9,15 +9,21 @@ export default class SettingsMembersDefaultPostAccess extends Component {
|
||||||
return [{
|
return [{
|
||||||
name: 'Public',
|
name: 'Public',
|
||||||
description: 'All site visitors to your site, no login required',
|
description: 'All site visitors to your site, no login required',
|
||||||
value: 'public'
|
value: 'public',
|
||||||
|
icon: 'globe',
|
||||||
|
icon_color: 'green'
|
||||||
}, {
|
}, {
|
||||||
name: 'Members only',
|
name: 'Members only',
|
||||||
description: 'All logged-in members',
|
description: 'All logged-in members',
|
||||||
value: 'members'
|
value: 'members',
|
||||||
|
icon: 'globe',
|
||||||
|
icon_color: 'green'
|
||||||
}, {
|
}, {
|
||||||
name: 'Paid-members only',
|
name: 'Paid-members only',
|
||||||
description: 'Only logged-in mmembers with an active Stripe subscription',
|
description: 'Only logged-in mmembers with an active Stripe subscription',
|
||||||
value: 'paid'
|
value: 'paid',
|
||||||
|
icon: 'globe',
|
||||||
|
icon_color: 'green'
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@
|
||||||
@options={{this.options}}
|
@options={{this.options}}
|
||||||
@selected={{this.selectedOption}}
|
@selected={{this.selectedOption}}
|
||||||
@onChange={{this.setSignupAccess}}
|
@onChange={{this.setSignupAccess}}
|
||||||
|
@triggerClass="gh-setting-dropdown"
|
||||||
as |option|
|
as |option|
|
||||||
>
|
>
|
||||||
<div class="flex ma2">
|
<div class="flex ma2">
|
||||||
|
{{svg-jar option.icon class=(concat "w8 h8 mr2 fill-" (or option.icon_color "green"))}}
|
||||||
<div class="gh-radio-label">
|
<div class="gh-radio-label">
|
||||||
{{option.name}}<br>
|
{{option.name}}<br>
|
||||||
<div class="gh-radio-desc">{{option.description}}</div>
|
<div class="gh-radio-desc">{{option.description}}</div>
|
||||||
|
|
|
@ -9,15 +9,21 @@ export default class SettingsMembersSubscriptionAccess extends Component {
|
||||||
return [{
|
return [{
|
||||||
name: 'Anyone can sign up',
|
name: 'Anyone can sign up',
|
||||||
description: 'All visitors will be able to subscribe and sign in',
|
description: 'All visitors will be able to subscribe and sign in',
|
||||||
value: 'all'
|
value: 'all',
|
||||||
|
icon: 'globe',
|
||||||
|
icon_color: 'green'
|
||||||
}, {
|
}, {
|
||||||
name: 'Only people I invite',
|
name: 'Only people I invite',
|
||||||
description: 'People can sign in from your site but won\'t be able to sign up',
|
description: 'People can sign in from your site but won\'t be able to sign up',
|
||||||
value: 'invite'
|
value: 'invite',
|
||||||
|
icon: 'globe',
|
||||||
|
icon_color: 'green'
|
||||||
}, {
|
}, {
|
||||||
name: 'Nobody',
|
name: 'Nobody',
|
||||||
description: 'No one will be able to subscribe or sign in',
|
description: 'No one will be able to subscribe or sign in',
|
||||||
value: 'none'
|
value: 'none',
|
||||||
|
icon: 'globe',
|
||||||
|
icon_color: 'green'
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
border: 1px solid color-mod(var(--lightgrey) l(-5%) s(-5%));
|
border: 1px solid color-mod(var(--lightgrey) l(-5%) s(-5%));
|
||||||
}
|
}
|
||||||
|
|
||||||
.ember-power-select-trigger svg {
|
.ember-power-select-trigger:not(.gh-setting-dropdown) svg {
|
||||||
height: 4px;
|
height: 4px;
|
||||||
width: 6.11px;
|
width: 6.11px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ember-power-select-trigger svg path {
|
.ember-power-select-trigger:not(.gh-setting-dropdown) svg path {
|
||||||
stroke: var(--darkgrey);
|
stroke: var(--darkgrey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue