mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 05:50:35 +03:00
5cb85ff58f
part of https://linear.app/tryghost/issue/IPC-81/remove-setupdone-screen-from-signup-flow - when the `onboardingChecklist` flag is enabled the `setup/done` screen shown after install or signup will initiate the onboarding checklist and redirect straight to the dashboard effectively replacing the previous onboarding flow
33 lines
839 B
JavaScript
33 lines
839 B
JavaScript
import Route from '@ember/routing/route';
|
|
import {inject as service} from '@ember/service';
|
|
|
|
export default class SetupFinishingTouchesRoute extends Route {
|
|
@service feature;
|
|
@service onboarding;
|
|
@service router;
|
|
@service session;
|
|
@service settings;
|
|
@service themeManagement;
|
|
|
|
beforeModel() {
|
|
if (!this.session.user.isOwnerOnly) {
|
|
return;
|
|
}
|
|
|
|
if (this.feature.onboardingChecklist) {
|
|
this.onboarding.startChecklist();
|
|
return this.router.transitionTo('dashboard');
|
|
}
|
|
}
|
|
|
|
model() {
|
|
this.themeManagement.setPreviewType('homepage');
|
|
this.themeManagement.updatePreviewHtmlTask.perform();
|
|
}
|
|
|
|
deactivate() {
|
|
// rollback any unsaved setting changes when leaving
|
|
this.settings.rollbackAttributes();
|
|
}
|
|
}
|