Added basic email notification for comment in staff

This commit is contained in:
Peter Zimon 2022-07-06 17:55:44 +02:00
parent 385000d4ce
commit 27212475f3
2 changed files with 50 additions and 0 deletions

View File

@ -160,4 +160,29 @@
.fullscreen-modal-change-role .modal-content {
box-shadow: none !important;
}
}
/* Notifications */
.user-settings-heading {
border-top: 1px solid var(--lightgrey);
padding-top: 4vw;
margin-top: 4vw;
font-size: 1.55rem;
font-weight: 700;
line-height: 1.3em;
}
.user-setting-toggle {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 12px;
}
.user-setting-toggle label {
margin-bottom: 0;
}
.user-setting-toggle p {
margin-top: 0;
}

View File

@ -297,6 +297,31 @@
</p>
</GhFormGroup>
{{#if (feature 'comments')}}
<h4 class="user-settings-heading">Email notifications</h4>
<GhFormGroup @errors={{this.user.errors}} @hasValidated={{this.user.hasValidated}} @property="email">
<div class="user-setting-toggle">
<div>
<label for="user-email">Comments</label>
<p>Send notifications on members commenting on your posts</p>
</div>
<div class="for-switch">
<label class="switch" for={{notifications.comment}}>
<Input
{{!-- @checked={{newsletter.subscribed}} --}}
@type="checkbox"
id={{notifications.comment}}
name="comment-emails"
data-test-checkbox="member-subscribed"
{{!-- {{on "click" (fn this.updateNewsletterPreference newsletter)}} --}}
/>
<span class="input-toggle-component"></span>
</label>
</div>
</div>
</GhFormGroup>
{{/if}}
</fieldset>
</div>