mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-29 07:09:48 +03:00
Hid tour throbbers when opening launch wizard
refs https://github.com/TryGhost/Team/issues/460 - add `showTour` property to `ui` service - updated `<GhTourItem>` to not render anything if `ui.showTour` is `false` - updated launch wizard template to hide tour when open and re-enable when closed
This commit is contained in:
parent
fc317cd75d
commit
b4e750466d
@ -70,6 +70,7 @@ const GhTourItemComponent = Component.extend({
|
||||
|
||||
mediaQueries: service(),
|
||||
tour: service(),
|
||||
ui: service(),
|
||||
|
||||
tagName: '',
|
||||
|
||||
@ -88,11 +89,12 @@ const GhTourItemComponent = Component.extend({
|
||||
_popoverOffset: null,
|
||||
|
||||
isMobile: reads('mediaQueries.isMobile'),
|
||||
isVisible: computed('isMobile', '_throbber', function () {
|
||||
isVisible: computed('isMobile', '_throbber', 'ui.showTour', function () {
|
||||
let showTour = this.ui.showTour;
|
||||
let isMobile = this.isMobile;
|
||||
let hasThrobber = !isBlank(this._throbber);
|
||||
|
||||
return !isMobile && hasThrobber;
|
||||
return showTour && !isMobile && hasThrobber;
|
||||
}),
|
||||
|
||||
init() {
|
||||
|
@ -7,6 +7,7 @@ export default class LaunchController extends Controller {
|
||||
@service config;
|
||||
@service router;
|
||||
@service settings;
|
||||
@service ui;
|
||||
|
||||
queryParams = ['step'];
|
||||
|
||||
@ -99,9 +100,15 @@ export default class LaunchController extends Controller {
|
||||
this.router.transitionTo('dashboard');
|
||||
}
|
||||
|
||||
@action
|
||||
setup() {
|
||||
this.ui.set('showTour', false);
|
||||
}
|
||||
|
||||
@action
|
||||
reset() {
|
||||
this.step = 'customise-design';
|
||||
this.skippedSteps = [];
|
||||
this.ui.set('showTour', true);
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ export default Service.extend({
|
||||
isFullScreen: false,
|
||||
showMobileMenu: false,
|
||||
showSettingsMenu: false,
|
||||
showTour: true,
|
||||
mainClass: '',
|
||||
|
||||
hasSideNav: not('isSideNavHidden'),
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="fullscreen-wizard-container" {{will-destroy this.reset}}>
|
||||
<div class="fullscreen-wizard-container" {{did-insert this.setup}} {{will-destroy this.reset}}>
|
||||
<div class="pt7 pb5 pl12 pr12 flex justify-between items-center bb b--whitegrey">
|
||||
<div class="flex flex-column">
|
||||
<div class="ttu gh-launch-wizard-step-indicator">{{this.currentStep.position}}</div>
|
||||
|
Loading…
Reference in New Issue
Block a user