mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Changed post publish menu copy with "send" state
refs https://github.com/TryGhost/Team/issues/947 - Before making a bigger changes - introducing an inline component with send/send&publish/publish dropdown, have made minimal copy changes to reflect what's about to happen after the publish menu submit button is pressed
This commit is contained in:
parent
d0576beac3
commit
f23e8bc801
3 changed files with 12 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<div {{did-insert (fn this.setSaveType "publish")}} ...attributes>
|
||||
<header class="gh-publishmenu-heading">Ready to publish your {{@post.displayName}}?</header>
|
||||
<header class="gh-publishmenu-heading">Ready to {{this.nextActionName}} this {{@post.displayName}}?</header>
|
||||
<section class="gh-publishmenu-content">
|
||||
<div class="gh-publishmenu-section">
|
||||
<div class="gh-publishmenu-radio {{if (eq @saveType "publish") "active"}}" {{on "click" (fn this.setSaveType "publish")}}>
|
||||
|
|
|
@ -24,6 +24,10 @@ export default class GhPublishMenuDraftComponent extends Component {
|
|||
return this.session.user.isAdmin && (this.totalMemberCount === 0 || this.countTotalMembersTask.isRunning);
|
||||
}
|
||||
|
||||
get nextActionName() {
|
||||
return this.args.post.get('emailOnly') ? 'send' : 'publish';
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.args.post.set('publishedAtBlogTZ', this.args.post.publishedAtUTC);
|
||||
|
|
|
@ -95,14 +95,19 @@ export default Component.extend({
|
|||
return runningText || 'Publishing';
|
||||
}),
|
||||
|
||||
buttonText: computed('postState', 'saveType', function () {
|
||||
buttonText: computed('postState', 'saveType', 'post.emailOnly', function () {
|
||||
let saveType = this.saveType;
|
||||
let postState = this.postState;
|
||||
let emailOnly = this.get('post.emailOnly');
|
||||
let buttonText;
|
||||
|
||||
if (postState === 'draft') {
|
||||
if (emailOnly) {
|
||||
buttonText = saveType === 'publish' ? 'Send' : 'Schedule';
|
||||
} else {
|
||||
buttonText = saveType === 'publish' ? 'Publish' : 'Schedule';
|
||||
}
|
||||
}
|
||||
|
||||
if (postState === 'published') {
|
||||
buttonText = saveType === 'publish' ? 'Update' : 'Unpublish';
|
||||
|
|
Loading…
Add table
Reference in a new issue