Added feature flag for new admin-x settings

refs https://github.com/TryGhost/Team/issues/3151

- allows toggling route to new settings screen in react

Co-authored-by: Peter Zimon <zimo@ghost.org>
This commit is contained in:
Rishabh 2023-05-16 12:04:06 +05:30 committed by Rishabh Garg
parent bf2a2eeb63
commit 31779c95b5
4 changed files with 25 additions and 4 deletions

View File

@ -117,6 +117,11 @@
</li>
{{/if}}
{{/if}}
{{#if (and (gh-user-can-admin this.session.user) (feature "adminXSettings"))}}
<li>
<LinkTo @route="settings-x" @current-when={{this.isSettingsRoute}} data-test-nav="settings">{{svg-jar "settings"}} AdminX Settings</LinkTo>
</li>
{{/if}}
</ul>
{{#if this.session.user.isOwnerOnly}}

View File

@ -76,6 +76,7 @@ export default class FeatureService extends Service {
@feature('imageEditor') imageEditor;
@feature('signupCard') signupCard;
@feature('collections') collections;
@feature('adminXSettings') adminXSettings;
_user = null;

View File

@ -218,9 +218,9 @@
<form>
<GhFormGroup>
<label for="feedback-lexical">Have any issues? Feedback? Let us know below!</label>
<GhTextarea
<GhTextarea
@id="feedback-lexical"
@name="feedback-lexical"
@name="feedback-lexical"
@value={{this.feedbackMessage}}
@placeholder="I've noticed that..."
@shouldFocus={{true}}
@ -228,7 +228,7 @@
/>
</GhFormGroup>
</form>
<GhTaskButton
<GhTaskButton
@buttonText="Send feedback"
@task={{this.submitFeedback}}
@class="gh-btn gh-btn-black gh-btn-icon"
@ -396,6 +396,20 @@
</div>
</div>
</div>
<div class="gh-expandable-block">
<div class="gh-expandable-header">
<div>
<h4 class="gh-expandable-title">Admin X</h4>
<p class="gh-expandable-description">
Enables Admin X, the new admin UI for Ghost
</p>
</div>
<div class="for-switch">
<GhFeatureFlag @flag="adminXSettings" />
</div>
</div>
</div>
</div>
</div>
{{/if}}

View File

@ -42,7 +42,8 @@ const ALPHA_FEATURES = [
'postDiffing',
'imageEditor',
'signupCard',
'collections'
'collections',
'adminXSettings'
];
module.exports.GA_KEYS = [...GA_FEATURES];