refactor(core): 将 菜单项生成 从Mixly.ContextMenu调整到Mixly.Menu
This commit is contained in:
@@ -1 +1 @@
|
||||
<script defer=defer src=main.bundle.ec93e14c.js></script><link href=styles/main.b29a8ee0.css rel=stylesheet><xml></xml>
|
||||
<script defer=defer src=main.bundle.ed4e6fc5.js></script><link href=styles/main.b29a8ee0.css rel=stylesheet><xml></xml>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
import * as goog from 'goog';
|
||||
import { Msg } from 'blockly/core';
|
||||
import { Workspace, ContextMenu } from 'mixly';
|
||||
import { Workspace, Menu } from 'mixly';
|
||||
import FSArduEsp32Handler from './fs-board-handler';
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function addBoardFSItem () {
|
||||
},
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.BOARD_FS, ''),
|
||||
name: Menu.getItem(Msg.BOARD_FS),
|
||||
callback: () => {
|
||||
statusBarsManager.add({
|
||||
type: 'board-fs',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as goog from 'goog';
|
||||
import { Msg } from 'blockly/core';
|
||||
import { Workspace, ContextMenu } from 'mixly';
|
||||
import { Workspace, Menu } from 'mixly';
|
||||
import FSArduEsp8266Handler from './fs-board-handler';
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function addBoardFSItem () {
|
||||
},
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.BOARD_FS, ''),
|
||||
name: Menu.getItem(Msg.BOARD_FS),
|
||||
callback: () => {
|
||||
statusBarsManager.add({
|
||||
type: 'board-fs',
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
HTMLTemplate,
|
||||
DragV,
|
||||
StatusBar,
|
||||
ContextMenu,
|
||||
Menu,
|
||||
Debug,
|
||||
StatusBarsManager,
|
||||
Workspace
|
||||
@@ -155,7 +155,7 @@ export default class StatusBarFileSystem extends PageBase {
|
||||
type: 'copy_path',
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.Lang['fileTree.copyPath'], ''),
|
||||
name: Menu.getItem(Msg.Lang['fileTree.copyPath']),
|
||||
callback: (_, { $trigger }) => {
|
||||
let outPath = null;
|
||||
let type = $trigger.attr('type');
|
||||
@@ -198,7 +198,7 @@ export default class StatusBarFileSystem extends PageBase {
|
||||
},
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.Lang['statusbar.ampy.refresh'], ''),
|
||||
name: Menu.getItem(Msg.Lang['statusbar.ampy.refresh']),
|
||||
callback: (_, { $trigger }) => {
|
||||
let type = $trigger.attr('type');
|
||||
if (type === 'root') {
|
||||
@@ -235,7 +235,7 @@ export default class StatusBarFileSystem extends PageBase {
|
||||
},
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.Lang['statusbar.ampy.exit'], ''),
|
||||
name: Menu.getItem(Msg.Lang['statusbar.ampy.exit']),
|
||||
callback: () => {
|
||||
this.closeFS();
|
||||
}
|
||||
@@ -257,7 +257,7 @@ export default class StatusBarFileSystem extends PageBase {
|
||||
type: 'cut',
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.Lang['editor.contextMenu.cut'], 'Ctrl+X'),
|
||||
name: Menu.getItem(Msg.Lang['editor.contextMenu.cut'], 'Ctrl+X'),
|
||||
callback: () => this.#editor_.cut()
|
||||
}
|
||||
});
|
||||
@@ -266,7 +266,7 @@ export default class StatusBarFileSystem extends PageBase {
|
||||
type: 'copy',
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.Lang['editor.contextMenu.copy'], 'Ctrl+C'),
|
||||
name: Menu.getItem(Msg.Lang['editor.contextMenu.copy'], 'Ctrl+C'),
|
||||
callback: () => this.#editor_.copy()
|
||||
}
|
||||
});
|
||||
@@ -275,7 +275,7 @@ export default class StatusBarFileSystem extends PageBase {
|
||||
type: 'paste',
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.Lang['editor.contextMenu.paste'], 'Ctrl+V'),
|
||||
name: Menu.getItem(Msg.Lang['editor.contextMenu.paste'], 'Ctrl+V'),
|
||||
callback: () => this.#editor_.paste()
|
||||
}
|
||||
});
|
||||
@@ -289,7 +289,7 @@ export default class StatusBarFileSystem extends PageBase {
|
||||
type: 'togglecomment',
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.Lang['editor.contextMenu.togglecomment'], 'Ctrl+/'),
|
||||
name: Menu.getItem(Msg.Lang['editor.contextMenu.togglecomment'], 'Ctrl+/'),
|
||||
callback: () => this.#editor_.commentLine()
|
||||
}
|
||||
});
|
||||
@@ -311,7 +311,7 @@ export default class StatusBarFileSystem extends PageBase {
|
||||
},
|
||||
data: {
|
||||
isHtmlName: true,
|
||||
name: ContextMenu.getItem(Msg.Lang['file.save'], 'Ctrl+S'),
|
||||
name: Menu.getItem(Msg.Lang['file.save'], 'Ctrl+S'),
|
||||
callback: async () => {
|
||||
await this.put();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user