File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,6 @@ export default class OsfNavbar extends Component {
54
54
indexRoute : string = 'dashboard' ;
55
55
showNavLinks : boolean = false ;
56
56
57
- // @ts -ignore - we can be sure we have institutions route
58
57
@computed ( `features.${ camelize ( config . featureFlags . routes . institutions ) } ` )
59
58
get osfApps ( this : OsfNavbar ) {
60
59
return osfServices . filter ( each => ! each . flag || this . features . isEnabled ( each . flag ) ) ;
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ import { inject as service } from '@ember/service';
3
3
import config from 'ember-get-config' ;
4
4
import { Blocker } from 'ember-osf-web/services/ready' ;
5
5
6
+ const {
7
+ featureFlags : {
8
+ routes,
9
+ } ,
10
+ } = config as { featureFlags : { routes : { [ index : string ] : string } } } ; // eslint-disable-line no-use-before-define
11
+
6
12
const Router = EmberRouter . extend ( {
7
13
currentUser : service ( 'current-user' ) ,
8
14
statusMessages : service ( 'status-messages' ) ,
@@ -13,7 +19,7 @@ const Router = EmberRouter.extend({
13
19
rootURL : config . rootURL ,
14
20
15
21
async willTransition ( oldInfo : any , newInfo : any , transition : { targetName : string } ) {
16
- const flag = config . featureFlags . routes [ transition . targetName ] ;
22
+ const flag = routes [ transition . targetName ] ;
17
23
18
24
if ( flag ) {
19
25
const enabled = await this . get ( 'currentUser' ) . getWaffle ( flag ) ;
Original file line number Diff line number Diff line change @@ -118,7 +118,13 @@ declare const config: {
118
118
noteworthyNode : string ;
119
119
} ;
120
120
featureFlags : {
121
- routes : { [ index : string ] : string | undefined } ;
121
+ routes : {
122
+ support : string ;
123
+ dashboard : string ;
124
+ home : string ;
125
+ institutions : string ;
126
+ 'guid-node.forks' : string ;
127
+ } ;
122
128
} ;
123
129
gReCaptcha : {
124
130
siteKey : string ;
Original file line number Diff line number Diff line change @@ -181,6 +181,7 @@ module.exports = function(environment) {
181
181
dashboard : 'ember_home_page' ,
182
182
home : 'ember_home_page' ,
183
183
institutions : 'ember_institutional_landing_page' ,
184
+ 'guid-node.forks' : 'ember_project_forks_page' ,
184
185
} ,
185
186
} ,
186
187
gReCaptcha : {
You can’t perform that action at this time.
0 commit comments