diff --git a/boards/default_src/arduino_avr/blocks/logic.js b/boards/default_src/arduino_avr/blocks/logic.js index 0c7f4c70..4e508342 100644 --- a/boards/default_src/arduino_avr/blocks/logic.js +++ b/boards/default_src/arduino_avr/blocks/logic.js @@ -23,7 +23,7 @@ export const logic_compare = { ['>', 'GT'], ['\u2265', 'GTE'] ]; - //this.setHelpUrl(Blockly.Msg.LOGIC_COMPARE_HELPURL); + this.setHelpUrl("https://mixly.readthedocs.io/zh-cn/latest/Arduino/AVR/04Logic.html#id2"); this.setColour(LOGIC_HUE); this.setOutput(true, Boolean); this.appendValueInput('A'); @@ -58,7 +58,7 @@ export const logic_operation = { [Blockly.Msg.LOGIC_OPERATION_AND, 'AND'], [Blockly.Msg.LOGIC_OPERATION_OR, 'OR'] ]; - //this.setHelpUrl(Blockly.Msg.LOGIC_OPERATION_HELPURL); + this.setHelpUrl("https://mixly.readthedocs.io/zh-cn/latest/Arduino/AVR/04Logic.html#id12"); this.setColour(LOGIC_HUE); this.setOutput(true, Boolean); this.appendValueInput('A') @@ -144,5 +144,6 @@ export const logic_true_or_false = { this.setOutput(true); this.setInputsInline(true); this.setTooltip(Blockly.Msg.MIXLY_TOOLTIP_LOGIT_TRUEORFALSE); + this.setHelpUrl("https://mixly.readthedocs.io/zh-cn/latest/Arduino/AVR/04Logic.html#id17"); } }; \ No newline at end of file diff --git a/main.js b/main.js index 9cfadb30..8a326e88 100644 --- a/main.js +++ b/main.js @@ -167,11 +167,11 @@ function createWindow(filePath = null, indexUrl = null) { //打开帮助页面 electronLocalshortcut.register(win, 'CmdOrCtrl+H', () => { - var sendObj = {}; - sendObj.type = "help"; - var sendStr = JSON.stringify(sendObj); - win.webContents.send('ping', sendStr); - //win.webContents.executeJavaScript('alert("this is a test!");'); + const winHelp = new BrowserWindow({ parent: win }); + //打开子窗口 + winHelp.loadURL("https://mixly.readthedocs.io/zh-cn/latest/contents.html"); + //直接调用系统默认浏览器打开 + //shell.openExternal("https://mixly.readthedocs.io/zh-cn/latest/contents.html") }); //创建一个新页面