diff --git a/src/main/menu.ts b/src/main/menu.ts index ba0fb77..bef0bb9 100644 --- a/src/main/menu.ts +++ b/src/main/menu.ts @@ -194,91 +194,103 @@ export default class MenuBuilder { buildDefaultTemplate() { const templateDefault = [ + // { + // label: '&File', + // submenu: [ + // { + // label: '&Open', + // accelerator: 'Ctrl+O', + // }, + // { + // label: '&Close', + // accelerator: 'Ctrl+W', + // click: () => { + // this.mainWindow.close(); + // }, + // }, + // ], + // }, + // { + // label: '&View', + // submenu: + // process.env.NODE_ENV === 'development' || + // process.env.DEBUG_PROD === 'true' + // ? [ + // { + // label: '&Reload', + // accelerator: 'Ctrl+R', + // click: () => { + // this.mainWindow.webContents.reload(); + // }, + // }, + // { + // label: 'Toggle &Full Screen', + // accelerator: 'F11', + // click: () => { + // this.mainWindow.setFullScreen( + // !this.mainWindow.isFullScreen(), + // ); + // }, + // }, + // { + // label: 'Toggle &Developer Tools', + // accelerator: 'Alt+Ctrl+I', + // click: () => { + // this.mainWindow.webContents.toggleDevTools(); + // }, + // }, + // ] + // : [ + // { + // label: 'Toggle &Full Screen', + // accelerator: 'F11', + // click: () => { + // this.mainWindow.setFullScreen( + // !this.mainWindow.isFullScreen(), + // ); + // }, + // }, + // ], + // }, + // { + // label: 'Help', + // submenu: [ + // { + // label: 'Learn More', + // click() { + // shell.openExternal('https://electronjs.org'); + // }, + // }, + // { + // label: 'Documentation', + // click() { + // shell.openExternal( + // 'https://github.com/electron/electron/tree/main/docs#readme', + // ); + // }, + // }, + // { + // label: 'Community Discussions', + // click() { + // shell.openExternal('https://www.electronjs.org/community'); + // }, + // }, + // { + // label: 'Search Issues', + // click() { + // shell.openExternal('https://github.com/electron/electron/issues'); + // }, + // }, + // ], + // }, { - label: '&File', + label: '菜单', submenu: [ { - label: '&Open', - accelerator: 'Ctrl+O', - }, - { - label: '&Close', - accelerator: 'Ctrl+W', - click: () => { - this.mainWindow.close(); - }, - }, - ], - }, - { - label: '&View', - submenu: - process.env.NODE_ENV === 'development' || - process.env.DEBUG_PROD === 'true' - ? [ - { - label: '&Reload', - accelerator: 'Ctrl+R', - click: () => { - this.mainWindow.webContents.reload(); - }, - }, - { - label: 'Toggle &Full Screen', - accelerator: 'F11', - click: () => { - this.mainWindow.setFullScreen( - !this.mainWindow.isFullScreen(), - ); - }, - }, - { - label: 'Toggle &Developer Tools', - accelerator: 'Alt+Ctrl+I', - click: () => { - this.mainWindow.webContents.toggleDevTools(); - }, - }, - ] - : [ - { - label: 'Toggle &Full Screen', - accelerator: 'F11', - click: () => { - this.mainWindow.setFullScreen( - !this.mainWindow.isFullScreen(), - ); - }, - }, - ], - }, - { - label: 'Help', - submenu: [ - { - label: 'Learn More', + label: '公众号: 异度世界', click() { - shell.openExternal('https://electronjs.org'); - }, - }, - { - label: 'Documentation', - click() { - shell.openExternal( - 'https://github.com/electron/electron/tree/main/docs#readme', - ); - }, - }, - { - label: 'Community Discussions', - click() { - shell.openExternal('https://www.electronjs.org/community'); - }, - }, - { - label: 'Search Issues', - click() { - shell.openExternal('https://github.com/electron/electron/issues'); + // 打开网址 + shell.openExternal('https://www.hackrobot.cn'); }, }, ], diff --git a/src/renderer/App.tsx b/src/renderer/App.tsx index dafec8a..4e97765 100644 --- a/src/renderer/App.tsx +++ b/src/renderer/App.tsx @@ -1,6 +1,6 @@ import { Component, useRef } from 'react'; import { Input } from 'antd'; -import { Button, Flex } from 'antd'; +import { Button, Flex,Modal, Space } from 'antd'; // import Taro from "@tarojs/taro"; // import { // View, @@ -182,7 +182,6 @@ renderer.blockquote = function (quote) { //   // return `\t 👉${content}
` return `
\t 👉${content}
\n`; - ; }; renderer.table = function (header, body) { @@ -290,7 +289,6 @@ const Index = () => { const htmlContent = divRef.current.innerText; // const htmlContent = divRef.current.textContent; - navigator.clipboard .writeText(htmlContent) .then(() => { @@ -302,11 +300,26 @@ const Index = () => { } }; + const info = () => { + Modal.info({ + title: 'This is a notification message', + content: ( +
+

some messages...some messages...

+

some messages...some messages...

+
+ ), + onOk() {}, + }); + }; + return (
- {/* */} + {/* */}
{/* */}