mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 00:15:11 +03:00
Pre-filled email address input in post preview modal for current user
no issue - when viewing the email preview in the post preview modal having your email address pre-filled makes sending yourself an email preview much quicker as there's no need to type anything
This commit is contained in:
parent
a274ac3912
commit
a8abc3a366
@ -12,7 +12,7 @@
|
||||
<div class="gh-post-preview-email-footer">
|
||||
<span class="mr3 nowrap fw6 f8 darkgrey">Send a test newsletter</span>
|
||||
|
||||
<div class="gh-post-preview-email-input {{if this.sendPreviewEmailError "error"}}">
|
||||
<div class="gh-post-preview-email-input {{if this.sendPreviewEmailError "error"}}" {{did-insert this.initPreviewEmailAddress}}>
|
||||
<Input
|
||||
@value={{this.previewEmailAddress}}
|
||||
class="gh-input gh-post-preview-email-input"
|
||||
|
@ -23,6 +23,7 @@ export default class ModalPostPreviewEmailComponent extends Component {
|
||||
@service ajax;
|
||||
@service config;
|
||||
@service ghostPaths;
|
||||
@service session;
|
||||
@service settings;
|
||||
|
||||
@tracked html = '';
|
||||
@ -48,6 +49,12 @@ export default class ModalPostPreviewEmailComponent extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
async initPreviewEmailAddress() {
|
||||
const user = await this.session.user;
|
||||
this.previewEmailAddress = user.email;
|
||||
}
|
||||
|
||||
@task({drop: true})
|
||||
*sendPreviewEmailTask() {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user