Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
20748590
Commit
20748590
authored
Apr 02, 2016
by
antoor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimization of the back-end module loading scheme
优化后端模块加载方案
parent
0d3c8bb6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
30 deletions
+11
-30
CHANGELOG.md
CHANGELOG.md
+1
-2
app.js
app.js
+10
-28
No files found.
CHANGELOG.md
View file @
20748590
...
...
@@ -49,7 +49,6 @@
# 待做事项
*
数据高级搜索功能
*
数据库配置编辑功能
*
在线检测/下载/安装更新
*
虚拟终端复制粘贴tab补全
*
插件模块 //实时编写插件执行、UI以及各种操作API设计
*
扩展模块 //用于扩展一些高级的功能,懒人必备
...
...
@@ -57,4 +56,4 @@
*
中文开发文档
*
英文说明+开发文档
*
nodejs服务端脚本支持
*
python服务端脚本支持
*
python服务端脚本支持
\ No newline at end of file
app.js
View file @
20748590
...
...
@@ -4,15 +4,6 @@ const electron = require('electron');
const
app
=
electron
.
app
;
const
BrowserWindow
=
electron
.
BrowserWindow
;
// 导入模块
const
Cache
=
require
(
'./modules/cache'
);
const
Update
=
require
(
'./modules/update'
);
const
Menubar
=
require
(
'./modules/menubar'
);
const
Request
=
require
(
'./modules/request'
);
const
Database
=
require
(
'./modules/database'
);
// electron.crashReporter.start();
app
.
on
(
'window-all-closed'
,
app
.
quit
)
.
on
(
'ready'
,
()
=>
{
...
...
@@ -22,12 +13,10 @@ app
minWidth
:
1040
,
minHeight
:
699
,
webgl
:
false
,
title
:
'AntSword'
,
// autoHideMenuBar: true,
// transparent: false,
// frame: false
// resizable: false
title
:
'AntSword'
});
// 加载views
mainWindow
.
loadURL
(
`file:\/\/
${
__dirname
}
/views/index.html`
);
// 调整部分UI
...
...
@@ -37,7 +26,9 @@ app
antSword.modules.shellmanager.category.cell.setWidth(222);
}, 500);
`
);
}
};
// 窗口事件监听
mainWindow
.
on
(
'closed'
,
()
=>
{
mainWindow
=
null
})
.
on
(
'resize'
,
reloadUI
)
...
...
@@ -49,18 +40,9 @@ app
// 打开调试控制台
// mainWindow.webContents.openDevTools();
new
Menubar
(
electron
,
app
,
mainWindow
);
// 监听Request请求
new
Request
(
electron
);
// 初始化数据库
new
Database
(
electron
);
// 初始化缓存模块
new
Cache
(
electron
);
// 监听更新请求
new
Update
(
electron
);
// 初始化模块
[
'menubar'
,
'request'
,
'database'
,
'cache'
,
'update'
].
map
((
_
)
=>
{
new
(
require
(
`./modules/
${
_
}
`
)
)(
electron
,
app
,
mainWindow
);
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment