Ghost/ghost/admin/app/components/dashboard/onboarding-checklist.js
Kevin Ansfield 2a119cc4a4
Removed confirmation modal when dismissing onboarding (#19979)
closes https://linear.app/tryghost/issue/IPC-138/skip-onboarding-confirmation

- removed confirmation modal
- changed button to directly call the dismiss action on the onboarding service
2024-04-03 16:46:38 +00:00

31 lines
757 B
JavaScript

import Component from '@glimmer/component';
import ShareModal from './onboarding/share-modal';
import {action} from '@ember/object';
import {inject} from 'ghost-admin/decorators/inject';
import {inject as service} from '@ember/service';
export default class OnboardingChecklist extends Component {
@service modals;
@service onboarding;
@inject config;
shareModal = null;
willDestroy() {
super.willDestroy(...arguments);
this.dismissModal?.close();
this.shareModal?.close();
}
get siteUrl() {
return this.config.blogTitle;
}
@action
openShareModal() {
this.onboarding.markStepCompleted('share-publication');
this.shareModal = this.modals.open(ShareModal);
}
}