mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Hid launch-site link on dashboard once wizard is completed
refs https://github.com/TryGhost/Team/issues/460 - use the `user.accessibility` field via the `feature` service to add a `launchComplete` property - this is the best place we have currently for UI-specific concerns - toggle the property to `true` when the "Launch!" button is clicked in the final wizard step - hide the launch site wizard link on the dashboard if launch has been completed
This commit is contained in:
parent
5092e936cc
commit
f470549e80
@ -6,6 +6,12 @@
|
||||
</div>
|
||||
<div class="gh-launch-wizard-nav-buttons">
|
||||
<button type="button" class="gh-btn gh-btn-icon gh-btn-large mr2" {{on "click" @backStep}}><span>{{svg-jar "arrow-left"}}</span></button>
|
||||
<LinkTo @route="dashboard" class="gh-btn gh-btn-black gh-btn-large"><span>Launch your site!</span></LinkTo>
|
||||
<GhTaskButton
|
||||
@task={{this.finaliseTask}}
|
||||
@buttonText="Launch your site!"
|
||||
@runningText="Launching..."
|
||||
@class="gh-btn gh-btn-black gh-btn-large gh-btn-icon"
|
||||
data-test-button="wizard-finish"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
14
ghost/admin/app/components/gh-launch-wizard/finalise.js
Normal file
14
ghost/admin/app/components/gh-launch-wizard/finalise.js
Normal file
@ -0,0 +1,14 @@
|
||||
import Component from '@glimmer/component';
|
||||
import {inject as service} from '@ember/service';
|
||||
import {task} from 'ember-concurrency-decorators';
|
||||
|
||||
export default class GhLaunchWizardFinaliseComponent extends Component {
|
||||
@service feature;
|
||||
@service router;
|
||||
|
||||
@task
|
||||
*finaliseTask() {
|
||||
yield this.feature.set('launchComplete', true);
|
||||
this.router.transitionTo('dashboard');
|
||||
}
|
||||
}
|
@ -2,5 +2,6 @@ import Controller from '@ember/controller';
|
||||
import {inject as service} from '@ember/service';
|
||||
|
||||
export default class DashboardController extends Controller {
|
||||
@service feature;
|
||||
@service session;
|
||||
}
|
@ -52,6 +52,7 @@ export default Service.extend({
|
||||
|
||||
emailAnalytics: feature('emailAnalytics'),
|
||||
nightShift: feature('nightShift', {user: true, onChange: '_setAdminTheme'}),
|
||||
launchComplete: feature('launchComplete', {user: true}),
|
||||
|
||||
_user: null,
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
</GhCanvasHeader>
|
||||
|
||||
<section class="view-container gh-main-width">
|
||||
{{#if this.session.user.isOwner}}
|
||||
{{#if (and this.session.user.isOwner (not this.feature.launchComplete))}}
|
||||
<LinkTo @route="launch">Launch site - Finish setup</LinkTo>
|
||||
{{/if}}
|
||||
</section>
|
||||
|
Loading…
Reference in New Issue
Block a user