mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-01 02:41:39 -05:00
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
This commit is contained in:
parent
267d677705
commit
2a119cc4a4
3 changed files with 1 additions and 35 deletions
ghost/admin/app/components/dashboard
|
@ -75,6 +75,6 @@
|
|||
<p class="gh-onboarding-help">More questions? Check out our <a href="https://ghost.org/help?utm_source=admin&utm_campaign=onboarding" target="_blank" rel="noopener noreferrer">Help Center</a>.</p>
|
||||
|
||||
{{#unless this.onboarding.allStepsCompleted}}
|
||||
<a href="#" class="gh-onboarding-skip" {{on "click" this.confirmDismiss}}>Skip onboarding</a>
|
||||
<a href="#" class="gh-onboarding-skip" {{on "click" this.onboarding.dismissChecklist}}>Skip onboarding</a>
|
||||
{{/unless}}
|
||||
</div>
|
|
@ -1,5 +1,4 @@
|
|||
import Component from '@glimmer/component';
|
||||
import DismissModal from './onboarding/dismiss-modal';
|
||||
import ShareModal from './onboarding/share-modal';
|
||||
import {action} from '@ember/object';
|
||||
import {inject} from 'ghost-admin/decorators/inject';
|
||||
|
@ -11,7 +10,6 @@ export default class OnboardingChecklist extends Component {
|
|||
|
||||
@inject config;
|
||||
|
||||
dismissModal = null;
|
||||
shareModal = null;
|
||||
|
||||
willDestroy() {
|
||||
|
@ -29,17 +27,4 @@ export default class OnboardingChecklist extends Component {
|
|||
this.onboarding.markStepCompleted('share-publication');
|
||||
this.shareModal = this.modals.open(ShareModal);
|
||||
}
|
||||
|
||||
@action
|
||||
async confirmDismiss() {
|
||||
this.dismissModal = this.modals.open(DismissModal, {}, {backgroundBlur: true});
|
||||
|
||||
const reallyDismiss = await this.dismissModal;
|
||||
|
||||
if (reallyDismiss === true) {
|
||||
this.onboarding.dismissChecklist();
|
||||
} else {
|
||||
this.dismissModal = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
<div class="modal-content">
|
||||
<header class="modal-header">
|
||||
<h1>Are you sure you want to skip onboarding?</h1>
|
||||
</header>
|
||||
<button class="close" title="Close" type="button" {{on "click" @close}}>{{svg-jar "close"}}<span
|
||||
class="hidden">Close</span></button>
|
||||
|
||||
<div class="modal-body">
|
||||
<p>
|
||||
We're here to guide you every step of the way, but if you're ready
|
||||
to explore on your own, that's okay, too.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="gh-btn" type="button" {{on "click" @close}}><span>Cancel</span></button>
|
||||
<button class="gh-btn gh-btn-black" type="button" {{on "click" (fn @close true)}}><span>Skip onboarding</span></button>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Reference in a new issue