0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Mention alert toggle only visible to admins

refs https://ghost.slack.com/archives/C02G9E68C/p1675916876727609

- Added the mentions alert toggle to only be visible to owners and
  admins, since it will not have any effect for non-admins staff users.
This commit is contained in:
Ronald Langeveld 2023-02-10 17:24:02 +08:00
parent 3df19235b0
commit b37aff52ca

View file

@ -265,6 +265,27 @@
</div>
</div>
{{#if this.user.isAdmin}}
{{#if (feature 'webmentions')}}
<div class="user-setting-toggle">
<div>
<label for="user-email">New Mentions</label>
<p>When you receive a new webmention</p>
</div>
<div class="for-switch small">
<label class="switch" for="mention-notifications" data-test-label="mention-notifications">
<input
id="mention-notifications"
type="checkbox"
checked={{this.user.mentionNotifications}}
class="gh-input"
{{on "change" this.toggleMentionNotifications}}
data-test-checkbox="mention-notifications"
>
<span class="input-toggle-component"></span>
</label>
</div>
</div>
{{/if}}
{{#if this.canToggleMemberAlerts}}
<div class="user-setting-toggle">
<div>
@ -327,27 +348,6 @@
{{/if}}
{{/if}}
{{/if}}
{{#if (feature 'webmentions')}}
<div class="user-setting-toggle">
<div>
<label for="user-email">New Mentions</label>
<p>When you receive a new webmention</p>
</div>
<div class="for-switch small">
<label class="switch" for="mention-notifications" data-test-label="mention-notifications">
<input
id="mention-notifications"
type="checkbox"
checked={{this.user.mentionNotifications}}
class="gh-input"
{{on "change" this.toggleMentionNotifications}}
data-test-checkbox="mention-notifications"
>
<span class="input-toggle-component"></span>
</label>
</div>
</div>
{{/if}}
</GhFormGroup>
</div>
{{/if}}