fix: UI improvements

This commit is contained in:
qier222 2020-12-09 20:01:59 +08:00
parent 6954d91907
commit 5f0828342c
3 changed files with 8 additions and 7 deletions

View File

@ -139,11 +139,6 @@ a {
}
}
// for electron
body.is-electron::-webkit-scrollbar {
width: 0;
}
/* Let's get this party started */
::-webkit-scrollbar {
width: 8px;
@ -152,6 +147,7 @@ body.is-electron::-webkit-scrollbar {
::-webkit-scrollbar-track {
background: transparent;
border-left: 1px solid rgba(128, 128, 128, 0.18);
background: var(--color-body-bg);
}
::-webkit-scrollbar-thumb {

View File

@ -120,6 +120,9 @@ nav {
height: 24px;
width: 24px;
}
button {
-webkit-app-region: no-drag;
}
}
.navigation-links {
flex: 1;
@ -127,6 +130,7 @@ nav {
justify-content: center;
text-transform: uppercase;
a {
-webkit-app-region: no-drag;
font-size: 18px;
font-weight: 700;
text-decoration: none;
@ -160,8 +164,8 @@ nav {
.search-box {
display: flex;
justify-content: flex-end;
-webkit-app-region: no-drag;
.container {
display: flex;
@ -224,6 +228,7 @@ nav {
height: 24px;
width: 24px;
color: var(--color-text);
-webkit-app-region: no-drag;
}
}
</style>

View File

@ -1,7 +1,7 @@
export function ipcRenderer(vueInstance) {
const self = vueInstance;
// 添加专有的类名
document.body.classList.add("is-electron");
document.body.setAttribute("data-electron", "yes");
// ipc message channel
const electron = window.require("electron");
const ipcRenderer = electron.ipcRenderer;