@@ -24,12 +24,11 @@ function createIconImg() {
2424 } )
2525 return IMG
2626}
27+ const MENU_ID = `${ PACKAGE . name } :menu` as `animated_java:menu`
2728const BLOCKBENCH_MENU_BAR = document . querySelector ( '#menu_bar' ) as HTMLDivElement
28- export const MENU = createBarMenu (
29- `${ PACKAGE . name } :menu` ,
30- [ ] ,
31- ( ) => Format === BLUEPRINT_FORMAT
32- ) as BarMenu & { label : HTMLDivElement }
29+ export const MENU = createBarMenu ( MENU_ID , [ ] , ( ) => Format === BLUEPRINT_FORMAT ) as BarMenu & {
30+ label : HTMLDivElement
31+ }
3332MENU . label . style . display = 'inline-block'
3433MENU . label . innerHTML = 'Animated Java'
3534MENU . label . prepend ( createIconImg ( ) )
@@ -74,19 +73,30 @@ MenuBar.addAction(
7473 MENU . id
7574)
7675
76+ MenuBar . menus [ MENU_ID ] . structure . push ( {
77+ id : 'animated_java:extract-open' ,
78+ name : translate ( 'action.extract.name' ) ,
79+ icon : 'fa-trash-can' ,
80+ searchable : false ,
81+ children : [ ] ,
82+ condition ( ) {
83+ return Format === BLUEPRINT_FORMAT
84+ } ,
85+ } )
86+
7787MenuBar . addAction (
7888 createAction ( `${ PACKAGE . name } :extract` , {
7989 icon : 'fa-trash-can' ,
8090 category : 'animated_java' ,
81- name : translate ( 'action.extract.name ' ) ,
91+ name : translate ( 'action.extract.confirm ' ) ,
8292 condition ( ) {
8393 return Format === BLUEPRINT_FORMAT
8494 } ,
8595 click ( ) {
8696 void cleanupExportedFiles ( )
8797 } ,
8898 } ) ,
89- MENU . id
99+ MENU_ID + '.animated_java:extract-open'
90100)
91101
92102MenuBar . addAction (
0 commit comments