Commit 58adad37 authored by antoor's avatar antoor

修改版本信息为从package.json中提取

parent 474dc45f
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
'use strict'; 'use strict';
const fs = global.require('fs');
const electron = global.require('electron'); const electron = global.require('electron');
const remote = electron.remote; const remote = electron.remote;
const ipcRenderer = electron.ipcRenderer; const ipcRenderer = electron.ipcRenderer;
...@@ -57,6 +58,7 @@ ipcRenderer.send('aproxy', { ...@@ -57,6 +58,7 @@ ipcRenderer.send('aproxy', {
antSword['ipcRenderer'] = ipcRenderer; antSword['ipcRenderer'] = ipcRenderer;
antSword['CacheManager'] = CacheManager; antSword['CacheManager'] = CacheManager;
antSword['menubar'] = new Menubar(); antSword['menubar'] = new Menubar();
antSword['package'] = JSON.parse(fs.readFileSync('./package.json'));
// 加载模块列表 // 加载模块列表
// antSword['tabbar'] = new dhtmlXTabBar(document.getElementById('container')); // antSword['tabbar'] = new dhtmlXTabBar(document.getElementById('container'));
......
...@@ -22,11 +22,11 @@ class Update { ...@@ -22,11 +22,11 @@ class Update {
// status // status
cell.attachHTMLString(` cell.attachHTMLString(`
当前版本:1.0.0 当前版本:${antSword['package']['version']}
<br/> <br/>
暂不支持在线更新! 暂不支持在线更新!
<br /> <br />
请访问<strong style="color:#0099FF">https://github.com/antoor/antSword</strong>获取最新版本! 请访问<strong style="color:#0099FF">${antSword['package']['repository']['url']}</strong>获取最新版本!
`); `);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment