Ghost/ghost/admin/app/components/gh-launch-wizard/finalise.js
Kevin Ansfield 15d5096275 Added success notification on launch wizard completion
no issue

- provide an indication of success and a "next step" option
2021-02-23 10:18:57 +00:00

21 lines
659 B
JavaScript

import Component from '@glimmer/component';
import {htmlSafe} from '@ember/string';
import {inject as service} from '@ember/service';
import {task} from 'ember-concurrency-decorators';
export default class GhLaunchWizardFinaliseComponent extends Component {
@service feature;
@service notifications;
@service router;
@task
*finaliseTask() {
yield this.feature.set('launchComplete', true);
this.router.transitionTo('dashboard');
this.notifications.showNotification(
'Launch complete!',
{type: 'success', actions: htmlSafe('<a href="#/posts">Start creating content</a>')}
);
}
}