@lvce-editor/about-view 4.1.1 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1385,6 +1385,29 @@ const getKeyBindings = () => {
1385
1385
  }];
1386
1386
  };
1387
1387
 
1388
+ const handleClickClose = async state => {
1389
+ await invoke('Viewlet.closeWidget', 'About');
1390
+ return state;
1391
+ };
1392
+
1393
+ const writeText = async text => {
1394
+ await invoke('ClipBoard.writeText', /* text */text);
1395
+ };
1396
+
1397
+ const handleClickCopy = async state => {
1398
+ const {
1399
+ lines
1400
+ } = state;
1401
+ const message = joinLines(lines);
1402
+ await writeText(message);
1403
+ return state;
1404
+ };
1405
+
1406
+ const handleClickOk = async state => {
1407
+ await invoke('Viewlet.closeWidget', 'About');
1408
+ return state;
1409
+ };
1410
+
1388
1411
  const loadContent = state => {
1389
1412
  const lines = getDetailStringWeb();
1390
1413
  return {
@@ -1477,10 +1500,6 @@ const renderEventListeners = () => {
1477
1500
  }];
1478
1501
  };
1479
1502
 
1480
- const writeText = async text => {
1481
- await invoke('ClipBoard.writeText', /* text */text);
1482
- };
1483
-
1484
1503
  const getWindowId = async () => {
1485
1504
  return invoke('GetWindowId.getWindowId');
1486
1505
  };
@@ -1529,6 +1548,9 @@ const commandMap = {
1529
1548
  'About.getDetailStringWeb': getDetailStringWeb,
1530
1549
  'About.getKeyBindings': getKeyBindings,
1531
1550
  'About.getVirtualDom': getAboutVirtualDom,
1551
+ 'About.handleClickClose': handleClickClose,
1552
+ 'About.handleClickCopy': handleClickCopy,
1553
+ 'About.handleClickOk': handleClickOk,
1532
1554
  'About.loadContent': loadContent,
1533
1555
  'About.render': doRender,
1534
1556
  'About.renderEventListeners': renderEventListeners,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/about-view",
3
- "version": "4.1.1",
3
+ "version": "4.2.0",
4
4
  "description": "About View Worker",
5
5
  "main": "dist/aboutWorkerMain.js",
6
6
  "type": "module",