1
0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-30 14:22:07 +03:00
Ghost/ghost/admin/app/components/editor/modals/update-flow.js
Kevin Ansfield f76d7e9cd2 Renamed editor-labs component directory to editor
no issue

- cleanup now the old publish flow is no more
2022-05-25 09:13:08 +01:00

28 lines
961 B
JavaScript

import Component from '@glimmer/component';
import {task} from 'ember-concurrency';
export default class UpdateFlowModalComponent extends Component {
static modalOptions = {
className: 'fullscreen-modal-total-overlay publish-modal',
omitBackdrop: true,
ignoreBackdropClick: true
};
// We only show the newsletter name in the app if there's more than the single default newsletter.
// However, here we can show historic email data so it could have been sent to a now-archived
// newsletter in which case we want to force display of the newsletter name to avoid confusion.
get showNewsletterName() {
const {publishOptions} = this.args.data;
return !publishOptions.onlyDefaultNewsletter
|| publishOptions.post.newsletter?.status === 'archived';
}
@task
*saveTask() {
yield this.args.data.saveTask.perform();
this.args.close();
return true;
}
}