@lvce-editor/about-view 4.9.0 → 4.10.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.
@@ -831,6 +831,7 @@ const DiffFocus = {
831
831
  };
832
832
 
833
833
  const modules = [DiffAbout, DiffFocus];
834
+
834
835
  const diff = (oldState, newState) => {
835
836
  const diffResult = [];
836
837
  for (const module of modules) {
@@ -1273,7 +1274,7 @@ const DialogContentRight = 'DialogContentRight';
1273
1274
  const DialogHeading$1 = 'DialogHeading';
1274
1275
  const DialogMessage = 'DialogMessage';
1275
1276
  const DialogMessageRow = 'DialogMessageRow';
1276
- const About = 'About';
1277
+ const About$1 = 'About';
1277
1278
  const Viewlet = 'Viewlet';
1278
1279
  const DialogToolBarRow = 'DialogToolBarRow';
1279
1280
  const MaskIcon = 'MaskIcon';
@@ -1418,7 +1419,7 @@ const getAboutVirtualDom = (productName, lines, closeMessage, okMessage, copyMes
1418
1419
  const content = getAboutContentVirtualDom(lines);
1419
1420
  return [{
1420
1421
  type: Div,
1421
- className: mergeClassNames(Viewlet, About),
1422
+ className: mergeClassNames(Viewlet, About$1),
1422
1423
  onContextMenu: HandleContextMenu,
1423
1424
  childCount: 1
1424
1425
  }, ...getDialogVirtualDom(content, closeMessage, infoMessage, okMessage, copyMessage, productName)];
@@ -1576,6 +1577,14 @@ const renderEventListeners = () => {
1576
1577
  }];
1577
1578
  };
1578
1579
 
1580
+ const Electron = 2;
1581
+
1582
+ const About = 'About';
1583
+
1584
+ const showAboutDefault = async () => {
1585
+ await invoke('Viewlet.openWidget', About);
1586
+ };
1587
+
1579
1588
  const getWindowId = async () => {
1580
1589
  return invoke('GetWindowId.getWindowId');
1581
1590
  };
@@ -1617,6 +1626,20 @@ const showAboutElectron = async () => {
1617
1626
  }
1618
1627
  };
1619
1628
 
1629
+ const getAboutHandler = platform => {
1630
+ switch (platform) {
1631
+ case Electron:
1632
+ return showAboutElectron;
1633
+ default:
1634
+ return showAboutDefault;
1635
+ }
1636
+ };
1637
+
1638
+ const showAbout = async platform => {
1639
+ const fn = getAboutHandler(platform);
1640
+ await fn();
1641
+ };
1642
+
1620
1643
  const commandMap = {
1621
1644
  'About.diff': diff,
1622
1645
  'About.focusNext': focusNext,
@@ -1633,6 +1656,7 @@ const commandMap = {
1633
1656
  'About.loadContent': loadContent,
1634
1657
  'About.render': doRender,
1635
1658
  'About.renderEventListeners': renderEventListeners,
1659
+ 'About.showAbout': showAbout,
1636
1660
  'About.showAboutElectron': showAboutElectron
1637
1661
  };
1638
1662
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/about-view",
3
- "version": "4.9.0",
3
+ "version": "4.10.0",
4
4
  "description": "About View Worker",
5
5
  "keywords": [
6
6
  "about-view"