@lvce-editor/about-view 6.1.0 → 7.0.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.
- package/dist/aboutWorkerMain.js +22 -40
- package/package.json +1 -1
package/dist/aboutWorkerMain.js
CHANGED
|
@@ -842,6 +842,8 @@ const Div = 4;
|
|
|
842
842
|
const Text = 12;
|
|
843
843
|
const Br = 55;
|
|
844
844
|
|
|
845
|
+
const TargetName = 'event.target.name';
|
|
846
|
+
|
|
845
847
|
const Tab = 2;
|
|
846
848
|
const Escape = 8;
|
|
847
849
|
|
|
@@ -1208,6 +1210,10 @@ const handleFocusIn = async state => {
|
|
|
1208
1210
|
};
|
|
1209
1211
|
};
|
|
1210
1212
|
|
|
1213
|
+
const commit = 'unknown commit';
|
|
1214
|
+
|
|
1215
|
+
const commitDate = '';
|
|
1216
|
+
|
|
1211
1217
|
const OneSecondAgo = '1 second ago';
|
|
1212
1218
|
const SomeSecondsAgo = '{PH1} seconds ago';
|
|
1213
1219
|
const OneMinuteAgo = '1 minute ago';
|
|
@@ -1498,8 +1504,15 @@ const getBrowser = () => {
|
|
|
1498
1504
|
};
|
|
1499
1505
|
|
|
1500
1506
|
const version = '0.0.0-dev';
|
|
1501
|
-
|
|
1502
|
-
const
|
|
1507
|
+
|
|
1508
|
+
const getDetailStringWeb = () => {
|
|
1509
|
+
const now = Date.now();
|
|
1510
|
+
const formattedDate = formatAboutDate(commitDate, now);
|
|
1511
|
+
const browser = getBrowser();
|
|
1512
|
+
const lines = [`Version: ${version}`, `Commit: ${commit}`, `Date: ${formattedDate}`, `Browser: ${browser}`];
|
|
1513
|
+
return lines;
|
|
1514
|
+
};
|
|
1515
|
+
|
|
1503
1516
|
const getElectronVersion = getElectronVersion$1;
|
|
1504
1517
|
const getNodeVersion = getNodeVersion$1;
|
|
1505
1518
|
const getChromeVersion = getChromeVersion$1;
|
|
@@ -1511,50 +1524,18 @@ const getCommit = () => {
|
|
|
1511
1524
|
};
|
|
1512
1525
|
const getV8Version = getV8Version$1;
|
|
1513
1526
|
const getDate = () => {
|
|
1514
|
-
return
|
|
1527
|
+
return commitDate;
|
|
1515
1528
|
};
|
|
1516
1529
|
const productNameLong$1 = 'Lvce Editor - OSS';
|
|
1517
1530
|
|
|
1518
|
-
const
|
|
1519
|
-
__proto__: null,
|
|
1520
|
-
commit,
|
|
1521
|
-
date,
|
|
1522
|
-
getChromeVersion,
|
|
1523
|
-
getCommit,
|
|
1524
|
-
getDate,
|
|
1525
|
-
getElectronVersion,
|
|
1526
|
-
getNodeVersion,
|
|
1527
|
-
getV8Version,
|
|
1528
|
-
getVersion,
|
|
1529
|
-
productNameLong: productNameLong$1,
|
|
1530
|
-
version
|
|
1531
|
-
};
|
|
1532
|
-
|
|
1533
|
-
const getDetailStringWeb = () => {
|
|
1534
|
-
const {
|
|
1535
|
-
date,
|
|
1536
|
-
commit,
|
|
1537
|
-
version
|
|
1538
|
-
} = Process;
|
|
1539
|
-
const now = Date.now();
|
|
1540
|
-
const formattedDate = formatAboutDate(date, now);
|
|
1541
|
-
const browser = getBrowser();
|
|
1542
|
-
const lines = [`Version: ${version}`, `Commit: ${commit}`, `Date: ${formattedDate}`, `Browser: ${browser}`];
|
|
1543
|
-
return lines;
|
|
1544
|
-
};
|
|
1545
|
-
|
|
1546
|
-
const loadContent2 = uid => {
|
|
1531
|
+
const loadContent2 = state => {
|
|
1547
1532
|
const lines = getDetailStringWeb();
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
} = get(uid);
|
|
1551
|
-
const newState = {
|
|
1552
|
-
...oldState,
|
|
1533
|
+
return {
|
|
1534
|
+
...state,
|
|
1553
1535
|
productName: productNameLong$1,
|
|
1554
1536
|
lines,
|
|
1555
1537
|
focusId: Ok$2
|
|
1556
1538
|
};
|
|
1557
|
-
set(uid, oldState, newState);
|
|
1558
1539
|
};
|
|
1559
1540
|
|
|
1560
1541
|
const Ok = 'Ok';
|
|
@@ -1795,7 +1776,7 @@ const doRender = (uid, diffResult) => {
|
|
|
1795
1776
|
const renderEventListeners = () => {
|
|
1796
1777
|
return [{
|
|
1797
1778
|
name: HandleClickButton,
|
|
1798
|
-
params: ['handleClickButton',
|
|
1779
|
+
params: ['handleClickButton', TargetName]
|
|
1799
1780
|
}, {
|
|
1800
1781
|
name: HandleClickClose,
|
|
1801
1782
|
params: ['handleClickClose'] // TODO
|
|
@@ -1835,6 +1816,7 @@ const showMessageBox = async options => {
|
|
|
1835
1816
|
|
|
1836
1817
|
const Info = 'info';
|
|
1837
1818
|
|
|
1819
|
+
/* eslint-disable @typescript-eslint/await-thenable */
|
|
1838
1820
|
const getDetailString = async () => {
|
|
1839
1821
|
const [electronVersion, nodeVersion, chromeVersion, version, commit, v8Version, date] = await Promise.all([getElectronVersion(), getNodeVersion(), getChromeVersion(), getVersion(), getCommit(), getV8Version(), getDate()]);
|
|
1840
1822
|
const now = Date.now();
|
|
@@ -1889,7 +1871,7 @@ const commandMap = {
|
|
|
1889
1871
|
'About.handleClickCopy': wrapCommand(handleClickCopy),
|
|
1890
1872
|
'About.handleClickOk': wrapCommand(handleClickOk),
|
|
1891
1873
|
'About.handleFocusIn': wrapCommand(handleFocusIn),
|
|
1892
|
-
'About.loadContent2': loadContent2,
|
|
1874
|
+
'About.loadContent2': wrapCommand(loadContent2),
|
|
1893
1875
|
'About.render2': doRender,
|
|
1894
1876
|
'About.renderEventListeners': renderEventListeners,
|
|
1895
1877
|
'About.showAbout': showAbout,
|