@@ -102,35 +102,7 @@ function getDivider(): MenuItem {
102
102
* Generates menu items for a given project.
103
103
*/
104
104
function getMenuItems ( t : ( key : string ) => string , project : storageProject . Project , currentLanguage : string ) : MenuItem [ ] {
105
- const mechanisms : MenuItem [ ] = [ ] ;
106
- const opmodes : MenuItem [ ] = [ ] ;
107
-
108
- // Build mechanisms menu items
109
- project . mechanisms . forEach ( ( mechanism ) => {
110
- mechanisms . push ( getItem (
111
- mechanism . className ,
112
- mechanism . modulePath ,
113
- < BlockOutlined />
114
- ) ) ;
115
- } ) ;
116
- if ( mechanisms . length > 0 ) {
117
- mechanisms . push ( getDivider ( ) ) ;
118
- }
119
- mechanisms . push ( getItem ( 'Manage...' , 'manageMechanisms' ) ) ;
120
-
121
- // Build opmodes menu items
122
- project . opModes . forEach ( ( opmode ) => {
123
- opmodes . push ( getItem (
124
- opmode . className ,
125
- opmode . modulePath ,
126
- < CodeOutlined />
127
- ) ) ;
128
- } ) ;
129
- if ( opmodes . length > 0 ) {
130
- opmodes . push ( getDivider ( ) ) ;
131
- }
132
- opmodes . push ( getItem ( 'Manage...' , 'manageOpmodes' ) ) ;
133
-
105
+
134
106
return [
135
107
getItem ( t ( 'PROJECT' ) , 'project' , < FolderOutlined /> , [
136
108
getItem ( t ( 'SAVE' ) , 'save' , < SaveOutlined /> ) ,
@@ -140,8 +112,8 @@ function getMenuItems(t: (key: string) => string, project: storageProject.Projec
140
112
] ) ,
141
113
getItem ( t ( 'EXPLORER' ) , 'explorer' , < FileOutlined /> , [
142
114
getItem ( t ( 'ROBOT' ) , project . robot . modulePath , < RobotOutlined /> ) ,
143
- getItem ( t ( 'MECHANISMS' ) , 'mechanisms ' , < BlockOutlined /> , mechanisms ) ,
144
- getItem ( t ( 'OPMODES' ) , 'opmodes ' , < CodeOutlined /> , opmodes ) ,
115
+ getItem ( t ( 'MECHANISMS' ) + '...' , 'manageMechanisms ' , < BlockOutlined /> ) ,
116
+ getItem ( t ( 'OPMODES' ) + '...' , 'manageOpmodes ' , < CodeOutlined /> ) ,
145
117
] ) ,
146
118
getItem ( t ( 'SETTINGS' ) , 'settings' , < SettingOutlined /> , [
147
119
getItem ( t ( 'WPI_TOOLBOX' ) , 'wpi_toolbox' ) ,
0 commit comments