mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	Merge pull request #410 from Unleash/fix/project-link-mobile
fix: show project link in mobile nav
This commit is contained in:
		
						commit
						60cce3749f
					
				| @ -2,161 +2,6 @@ | ||||
| 
 | ||||
| exports[`returns all baseRoutes 1`] = ` | ||||
| Array [ | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/features", | ||||
|     "path": "/features/:activeTab/:name", | ||||
|     "title": ":name", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/features", | ||||
|     "title": "Feature Toggles", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/strategies", | ||||
|     "path": "/strategies/create", | ||||
|     "title": "Create", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/strategies", | ||||
|     "path": "/strategies/:activeTab/:strategyName", | ||||
|     "title": ":strategyName", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "advanced": true, | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/strategies", | ||||
|     "title": "Strategies", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/environments", | ||||
|     "path": "/environments/create", | ||||
|     "title": "Environments", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "flag": "E", | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "advanced": true, | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/environments", | ||||
|     "title": "Environments", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/history", | ||||
|     "path": "/history/:toggleName", | ||||
|     "title": ":toggleName", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "adminSettings": true, | ||||
|     }, | ||||
|     "path": "/history", | ||||
|     "title": "Event History", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/archive", | ||||
|     "path": "/projects/:id/archived/:name/:activeTab", | ||||
|     "title": ":name", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "path": "/archive", | ||||
|     "title": "Archived Toggles", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/applications", | ||||
|     "path": "/applications/:name", | ||||
|     "title": ":name", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "advanced": true, | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/applications", | ||||
|     "title": "Applications", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/context", | ||||
|     "path": "/context/create", | ||||
|     "title": "Create", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/context", | ||||
|     "path": "/context/edit/:name", | ||||
|     "title": ":name", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "flag": "C", | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "advanced": true, | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/context", | ||||
|     "title": "Context Fields", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
| @ -243,7 +88,6 @@ Array [ | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "flag": "P", | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "mobile": true, | ||||
| @ -252,6 +96,125 @@ Array [ | ||||
|     "title": "Projects", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/features", | ||||
|     "path": "/features/:activeTab/:name", | ||||
|     "title": ":name", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/features", | ||||
|     "title": "Feature Toggles", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/applications", | ||||
|     "path": "/applications/:name", | ||||
|     "title": ":name", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "advanced": true, | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/applications", | ||||
|     "title": "Applications", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/context", | ||||
|     "path": "/context/create", | ||||
|     "title": "Create", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/context", | ||||
|     "path": "/context/edit/:name", | ||||
|     "title": ":name", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "flag": "C", | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "advanced": true, | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/context", | ||||
|     "title": "Context Fields", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/strategies", | ||||
|     "path": "/strategies/create", | ||||
|     "title": "Create", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/strategies", | ||||
|     "path": "/strategies/:activeTab/:strategyName", | ||||
|     "title": ":strategyName", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "advanced": true, | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/strategies", | ||||
|     "title": "Strategies", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/environments", | ||||
|     "path": "/environments/create", | ||||
|     "title": "Environments", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "flag": "E", | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "advanced": true, | ||||
|       "mobile": true, | ||||
|     }, | ||||
|     "path": "/environments", | ||||
|     "title": "Environments", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
| @ -320,6 +283,42 @@ Array [ | ||||
|     "title": "Addons", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/history", | ||||
|     "path": "/history/:toggleName", | ||||
|     "title": ":toggleName", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object { | ||||
|       "adminSettings": true, | ||||
|     }, | ||||
|     "path": "/history", | ||||
|     "title": "Event History", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "parent": "/archive", | ||||
|     "path": "/projects/:id/archived/:name/:activeTab", | ||||
|     "title": ":name", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|     "menu": Object {}, | ||||
|     "path": "/archive", | ||||
|     "title": "Archived Toggles", | ||||
|     "type": "protected", | ||||
|   }, | ||||
|   Object { | ||||
|     "component": [Function], | ||||
|     "layout": "main", | ||||
|  | ||||
| @ -42,157 +42,6 @@ import CreateEnvironment from '../environments/CreateEnvironment/CreateEnvironme | ||||
| import FeatureView2 from '../feature/FeatureView2/FeatureView2'; | ||||
| 
 | ||||
| export const routes = [ | ||||
|     // Features
 | ||||
|     { | ||||
|         path: '/features/:activeTab/:name', | ||||
|         parent: '/features', | ||||
|         title: ':name', | ||||
|         component: RedirectFeatureViewPage, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/features', | ||||
|         title: 'Feature Toggles', | ||||
|         component: Features, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Strategies
 | ||||
|     { | ||||
|         path: '/strategies/create', | ||||
|         title: 'Create', | ||||
|         parent: '/strategies', | ||||
|         component: CreateStrategies, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/strategies/:activeTab/:strategyName', | ||||
|         title: ':strategyName', | ||||
|         parent: '/strategies', | ||||
|         component: StrategyView, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/strategies', | ||||
|         title: 'Strategies', | ||||
|         component: Strategies, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
|     { | ||||
|         path: '/environments/create', | ||||
|         title: 'Environments', | ||||
|         component: CreateEnvironment, | ||||
|         parent: '/environments', | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/environments', | ||||
|         title: 'Environments', | ||||
|         component: EnvironmentList, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         flag: E, | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // History
 | ||||
|     { | ||||
|         path: '/history/:toggleName', | ||||
|         title: ':toggleName', | ||||
|         parent: '/history', | ||||
|         component: HistoryTogglePage, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/history', | ||||
|         title: 'Event History', | ||||
|         component: HistoryPage, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { adminSettings: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Archive
 | ||||
|     { | ||||
|         path: '/projects/:id/archived/:name/:activeTab', | ||||
|         title: ':name', | ||||
|         parent: '/archive', | ||||
|         component: ShowArchive, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/archive', | ||||
|         title: 'Archived Toggles', | ||||
|         component: Archive, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
| 
 | ||||
|     // Applications
 | ||||
|     { | ||||
|         path: '/applications/:name', | ||||
|         title: ':name', | ||||
|         parent: '/applications', | ||||
|         component: ApplicationView, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/applications', | ||||
|         title: 'Applications', | ||||
|         component: Applications, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Context
 | ||||
|     { | ||||
|         path: '/context/create', | ||||
|         parent: '/context', | ||||
|         title: 'Create', | ||||
|         component: CreateContextField, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/context/edit/:name', | ||||
|         parent: '/context', | ||||
|         title: ':name', | ||||
|         component: EditContextField, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/context', | ||||
|         title: 'Context Fields', | ||||
|         component: ContextFields, | ||||
|         type: 'protected', | ||||
|         flag: C, | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Project
 | ||||
|     { | ||||
|         path: '/projects/create', | ||||
| @ -282,12 +131,125 @@ export const routes = [ | ||||
|         path: '/projects', | ||||
|         title: 'Projects', | ||||
|         component: ProjectListNew, | ||||
|         flag: P, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Features
 | ||||
|     { | ||||
|         path: '/features/:activeTab/:name', | ||||
|         parent: '/features', | ||||
|         title: ':name', | ||||
|         component: RedirectFeatureViewPage, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/features', | ||||
|         title: 'Feature Toggles', | ||||
|         component: Features, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true }, | ||||
|     }, | ||||
|      | ||||
|     // Applications
 | ||||
|     { | ||||
|         path: '/applications/:name', | ||||
|         title: ':name', | ||||
|         parent: '/applications', | ||||
|         component: ApplicationView, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/applications', | ||||
|         title: 'Applications', | ||||
|         component: Applications, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Context
 | ||||
|     { | ||||
|         path: '/context/create', | ||||
|         parent: '/context', | ||||
|         title: 'Create', | ||||
|         component: CreateContextField, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/context/edit/:name', | ||||
|         parent: '/context', | ||||
|         title: ':name', | ||||
|         component: EditContextField, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/context', | ||||
|         title: 'Context Fields', | ||||
|         component: ContextFields, | ||||
|         type: 'protected', | ||||
|         flag: C, | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Strategies
 | ||||
|     { | ||||
|         path: '/strategies/create', | ||||
|         title: 'Create', | ||||
|         parent: '/strategies', | ||||
|         component: CreateStrategies, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/strategies/:activeTab/:strategyName', | ||||
|         title: ':strategyName', | ||||
|         parent: '/strategies', | ||||
|         component: StrategyView, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/strategies', | ||||
|         title: 'Strategies', | ||||
|         component: Strategies, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
|     { | ||||
|         path: '/environments/create', | ||||
|         title: 'Environments', | ||||
|         component: CreateEnvironment, | ||||
|         parent: '/environments', | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/environments', | ||||
|         title: 'Environments', | ||||
|         component: EnvironmentList, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         flag: E, | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Tags
 | ||||
|     { | ||||
|         path: '/tag-types/create', | ||||
|         parent: '/tag-types', | ||||
| @ -314,7 +276,6 @@ export const routes = [ | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
| 
 | ||||
|     { | ||||
|         path: '/tags/create', | ||||
|         parent: '/tags', | ||||
| @ -334,8 +295,8 @@ export const routes = [ | ||||
|         menu: {}, | ||||
|     }, | ||||
| 
 | ||||
|     // Addons
 | ||||
|     { | ||||
|      // Addons
 | ||||
|      { | ||||
|         path: '/addons/create/:provider', | ||||
|         parent: '/addons', | ||||
|         title: 'Create', | ||||
| @ -362,6 +323,45 @@ export const routes = [ | ||||
|         layout: 'main', | ||||
|         menu: { mobile: true, advanced: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // History
 | ||||
|     { | ||||
|         path: '/history/:toggleName', | ||||
|         title: ':toggleName', | ||||
|         parent: '/history', | ||||
|         component: HistoryTogglePage, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/history', | ||||
|         title: 'Event History', | ||||
|         component: HistoryPage, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: { adminSettings: true }, | ||||
|     }, | ||||
| 
 | ||||
|     // Archive
 | ||||
|     { | ||||
|         path: '/projects/:id/archived/:name/:activeTab', | ||||
|         title: ':name', | ||||
|         parent: '/archive', | ||||
|         component: ShowArchive, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
|     { | ||||
|         path: '/archive', | ||||
|         title: 'Archived Toggles', | ||||
|         component: Archive, | ||||
|         type: 'protected', | ||||
|         layout: 'main', | ||||
|         menu: {}, | ||||
|     }, | ||||
| 
 | ||||
|     // Admin
 | ||||
|     { | ||||
|         path: '/admin/api', | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| import { createMuiTheme } from '@material-ui/core/styles'; | ||||
| import { createTheme } from '@material-ui/core/styles'; | ||||
| 
 | ||||
| const theme = createMuiTheme({ | ||||
| const theme = createTheme({ | ||||
|     typography: { | ||||
|         fontFamily: ['Sen', 'Roboto, sans-serif'], | ||||
|         fontWeightBold: '700', | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user