- 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
27
src/base.js
27
src/base.js
|
@ -267,11 +267,16 @@ document.onkeydown = function (e) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// prevent text select for double click action
|
// 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 = () => {
|
document.getElementById("nav-area").onmousedown = () => {
|
||||||
|
console.log("nav-area mounse down");
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
document.getElementById("nav-area").ondblclick = () => {
|
document.getElementById("nav-area").ondblclick = () => {
|
||||||
|
console.log("dbclick");
|
||||||
|
|
||||||
if (
|
if (
|
||||||
window.innerWidth === screen.width ||
|
window.innerWidth === screen.width ||
|
||||||
window.innerHeight === screen.height
|
window.innerHeight === screen.height
|
||||||
|
@ -290,7 +295,7 @@ document.getElementById("nav-area").ondblclick = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
document.getElementById("logo").onclick = () => {
|
document.getElementById("logo").onclick = () => {
|
||||||
shell.openExternal("https://github.com/xenkuo/comNG");
|
shell.openExternal("https://gitee.com/xenkuo/comNG");
|
||||||
};
|
};
|
||||||
|
|
||||||
document.getElementById("min-btn").onclick = () => {
|
document.getElementById("min-btn").onclick = () => {
|
||||||
|
@ -298,13 +303,21 @@ document.getElementById("min-btn").onclick = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
document.getElementById("max-btn").onclick = () => {
|
document.getElementById("max-btn").onclick = () => {
|
||||||
configUpdate("window.widthBefore", window.innerWidth);
|
if (
|
||||||
configUpdate("window.heightBefore", window.innerHeight);
|
window.innerWidth === screen.width ||
|
||||||
configUpdate("window.xBefore", window.screenX);
|
window.innerHeight === screen.height
|
||||||
configUpdate("window.yBefore", window.screenY);
|
) {
|
||||||
|
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);
|
||||||
|
configUpdate("window.yBefore", window.screenY);
|
||||||
|
|
||||||
window.resizeTo(screen.width, screen.height);
|
window.resizeTo(screen.width, screen.height);
|
||||||
window.moveTo(0, 0);
|
window.moveTo(0, 0);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
document.getElementById("close-btn").onclick = () => {
|
document.getElementById("close-btn").onclick = () => {
|
||||||
|
|
|
@ -160,6 +160,7 @@ input {
|
||||||
}
|
}
|
||||||
|
|
||||||
#logo {
|
#logo {
|
||||||
|
-webkit-app-region: no-drag;
|
||||||
zoom: 80%;
|
zoom: 80%;
|
||||||
height: 20px !important;
|
height: 20px !important;
|
||||||
line-height: 24px !important;
|
line-height: 24px !important;
|
||||||
|
|
Loading…
Reference in New Issue