update
This commit is contained in:
174
src/main/menu.ts
174
src/main/menu.ts
@@ -194,91 +194,103 @@ export default class MenuBuilder {
|
|||||||
|
|
||||||
buildDefaultTemplate() {
|
buildDefaultTemplate() {
|
||||||
const templateDefault = [
|
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: [
|
submenu: [
|
||||||
{
|
{
|
||||||
label: '&Open',
|
label: '公众号: 异度世界',
|
||||||
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() {
|
click() {
|
||||||
shell.openExternal('https://electronjs.org');
|
// 打开网址
|
||||||
},
|
shell.openExternal('https://www.hackrobot.cn');
|
||||||
},
|
|
||||||
{
|
|
||||||
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');
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Component, useRef } from 'react';
|
import { Component, useRef } from 'react';
|
||||||
import { Input } from 'antd';
|
import { Input } from 'antd';
|
||||||
import { Button, Flex } from 'antd';
|
import { Button, Flex,Modal, Space } from 'antd';
|
||||||
// import Taro from "@tarojs/taro";
|
// import Taro from "@tarojs/taro";
|
||||||
// import {
|
// import {
|
||||||
// View,
|
// View,
|
||||||
@@ -182,7 +182,6 @@ renderer.blockquote = function (quote) {
|
|||||||
//
|
//
|
||||||
// return `<span style="white-space:pre;" class="blockquote">\t 👉${content}</span><br/> `
|
// return `<span style="white-space:pre;" class="blockquote">\t 👉${content}</span><br/> `
|
||||||
return `<div style="white-space:pre;" class="blockquote">\t 👉${content}</div>\n`;
|
return `<div style="white-space:pre;" class="blockquote">\t 👉${content}</div>\n`;
|
||||||
;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
renderer.table = function (header, body) {
|
renderer.table = function (header, body) {
|
||||||
@@ -290,7 +289,6 @@ const Index = () => {
|
|||||||
const htmlContent = divRef.current.innerText;
|
const htmlContent = divRef.current.innerText;
|
||||||
// const htmlContent = divRef.current.textContent;
|
// const htmlContent = divRef.current.textContent;
|
||||||
|
|
||||||
|
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
.writeText(htmlContent)
|
.writeText(htmlContent)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -302,11 +300,26 @@ const Index = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const info = () => {
|
||||||
|
Modal.info({
|
||||||
|
title: 'This is a notification message',
|
||||||
|
content: (
|
||||||
|
<div>
|
||||||
|
<p>some messages...some messages...</p>
|
||||||
|
<p>some messages...some messages...</p>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
onOk() {},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.index}>
|
<div className={styles.index}>
|
||||||
<div className={styles.up}>
|
<div className={styles.up}>
|
||||||
<div className={styles.upLeft}>
|
<div className={styles.upLeft}>
|
||||||
{/* <button onClick={copyToClipboard}>Copy to Clipboardl</button> */}
|
{/* <Button type="text" danger>
|
||||||
|
公众号: 异度世界
|
||||||
|
</Button> */}
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.upRight}>
|
<div className={styles.upRight}>
|
||||||
{/* <button onClick={copyToClipboard}>Copy to Clipboarrd</button> */}
|
{/* <button onClick={copyToClipboard}>Copy to Clipboarrd</button> */}
|
||||||
|
|||||||
Reference in New Issue
Block a user