- change logo click link to gitee
- events of drag region are all captured by Windows, so app can not catch them. seems like Mac has different behavior.
This commit is contained in:
parent
b0484f26ce
commit
9fea4d660f
15
src/base.js
15
src/base.js
|
@ -267,11 +267,16 @@ document.onkeydown = function (e) {
|
|||
};
|
||||
|
||||
// prevent text select for double click action
|
||||
// Note: all click event is eaten by system for drag element on Windows,
|
||||
// so, nav-area mousedown and dbclick event can't be captured by below code
|
||||
document.getElementById("nav-area").onmousedown = () => {
|
||||
console.log("nav-area mounse down");
|
||||
return false;
|
||||
};
|
||||
|
||||
document.getElementById("nav-area").ondblclick = () => {
|
||||
console.log("dbclick");
|
||||
|
||||
if (
|
||||
window.innerWidth === screen.width ||
|
||||
window.innerHeight === screen.height
|
||||
|
@ -290,7 +295,7 @@ document.getElementById("nav-area").ondblclick = () => {
|
|||
};
|
||||
|
||||
document.getElementById("logo").onclick = () => {
|
||||
shell.openExternal("https://github.com/xenkuo/comNG");
|
||||
shell.openExternal("https://gitee.com/xenkuo/comNG");
|
||||
};
|
||||
|
||||
document.getElementById("min-btn").onclick = () => {
|
||||
|
@ -298,6 +303,13 @@ document.getElementById("min-btn").onclick = () => {
|
|||
};
|
||||
|
||||
document.getElementById("max-btn").onclick = () => {
|
||||
if (
|
||||
window.innerWidth === screen.width ||
|
||||
window.innerHeight === screen.height
|
||||
) {
|
||||
window.resizeTo(config.window.widthBefore, config.window.heightBefore);
|
||||
window.moveTo(config.window.xBefore, config.window.yBefore);
|
||||
} else {
|
||||
configUpdate("window.widthBefore", window.innerWidth);
|
||||
configUpdate("window.heightBefore", window.innerHeight);
|
||||
configUpdate("window.xBefore", window.screenX);
|
||||
|
@ -305,6 +317,7 @@ document.getElementById("max-btn").onclick = () => {
|
|||
|
||||
window.resizeTo(screen.width, screen.height);
|
||||
window.moveTo(0, 0);
|
||||
}
|
||||
};
|
||||
|
||||
document.getElementById("close-btn").onclick = () => {
|
||||
|
|
|
@ -160,6 +160,7 @@ input {
|
|||
}
|
||||
|
||||
#logo {
|
||||
-webkit-app-region: no-drag;
|
||||
zoom: 80%;
|
||||
height: 20px !important;
|
||||
line-height: 24px !important;
|
||||
|
|
Loading…
Reference in New Issue