Skip to content

Commit

Permalink
基于production版本重新进行功能迭代
Browse files Browse the repository at this point in the history
+ 增加Ctrl+I定位输入
+ 去掉菜单上面的Download区域
  • Loading branch information
ChenYarong committed Nov 5, 2019
1 parent 7224a9f commit 21ffa1d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Common.MENU = {
reload: 'Reload This Window',
toggleFullScreen:'Toggle Full Screen',
searchContacts:'Search Contacts',
inputContents: 'input Contents',
devtool: 'Toggle DevTools',
window: 'Window',
min: 'Minimize',
Expand Down
1 change: 1 addition & 0 deletions src/common_cn.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Common.MENU = {
reload: '重新加载当前窗口',
toggleFullScreen:'切换全屏',
searchContacts:'搜索联系人',
inputContents: '输入聊天内容',
devtool: '开发者工具',
window: '窗口',
min: '最小化',
Expand Down
7 changes: 7 additions & 0 deletions src/handlers/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ class MenuHandler {
$('#search_bar input')[0].focus();
},
},
{
label: Common.MENU.inputContents,
accelerator: 'Ctrl+I',
click: () => {
$('#editArea').focus();
}
},
{
label: Common.MENU.devtool,
accelerator: 'Ctrl+Shift+I',
Expand Down
6 changes: 6 additions & 0 deletions src/inject/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ class CSSInjector {
}

CSSInjector.commonCSS = `
div.download_entry {
display: none;
}
div.nav_view {
top: 154px !important;
}
div.header, div.title_wrap {
-webkit-app-region: drag;
}
Expand Down
2 changes: 1 addition & 1 deletion src/inject/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Injector {
this.initAngularInjection();
this.lastUser = null;
this.initIPC();
webFrame.setZoomLevelLimits(1, 1);
webFrame.setZoomLevel(0)

new MenuHandler().create();
}
Expand Down
2 changes: 1 addition & 1 deletion src/windows/controllers/wechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class WeChatWindow {
resizeWindow(isLogged, splashWindow) {
const size = isLogged ? Common.WINDOW_SIZE : Common.WINDOW_SIZE_LOGIN;

this.wechatWindow.setResizable(isLogged);
this.wechatWindow.setSize(size.width, size.height);
this.wechatWindow.setResizable(isLogged);
if (this.loginState.current === 1 - isLogged || this.loginState.current === this.loginState.WAITING) {
splashWindow.hide();
this.show();
Expand Down

0 comments on commit 21ffa1d

Please sign in to comment.