mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 22:43:30 +03:00
Added active navigation state for all integrations related routes (#1069)
closes https://github.com/TryGhost/Ghost/issues/10136 - use a CP and `{{#link-to current-when}}` to add the `.active` class any time the current route name starts with `settings.integration` which covers built-in and custom integration screens
This commit is contained in:
parent
e802b06b77
commit
032fba8f7b
@ -31,6 +31,11 @@ export default Component.extend({
|
||||
return this.get('config.clientExtensions.script') && this.get('session.user.isOwner');
|
||||
}),
|
||||
|
||||
isIntegrationRoute: computed('router.currentRouteName', function () {
|
||||
let re = /^settings\.integration/;
|
||||
return re.test(this.router.currentRouteName);
|
||||
}),
|
||||
|
||||
// the menu has a rendering issue (#8307) when the the world is reloaded
|
||||
// during an import which we have worked around by not binding the icon
|
||||
// style directly. However we still need to keep track of changing icons
|
||||
|
@ -64,7 +64,7 @@
|
||||
<li>{{#link-to "settings.design" data-test-nav="design"}}{{svg-jar "compass"}}Design{{/link-to}}</li>
|
||||
<li>{{#link-to "settings.tags" data-test-nav="tags"}}{{svg-jar "tag"}}Tags{{/link-to}}</li>
|
||||
<li>{{#link-to "settings.code-injection" data-test-nav="code-injection"}}{{svg-jar "brackets"}}Code injection{{/link-to}}</li>
|
||||
<li>{{#link-to "settings.integrations" data-test-nav="integrations"}}{{svg-jar "box"}}Integrations{{/link-to}}</li>
|
||||
<li>{{#link-to "settings.integrations" current-when=isIntegrationRoute data-test-nav="integrations"}}{{svg-jar "box"}}Integrations{{/link-to}}</li>
|
||||
<li>{{#link-to "settings.labs" data-test-nav="labs"}}{{svg-jar "wrench-double"}}Labs{{/link-to}}</li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
|
Loading…
Reference in New Issue
Block a user