🐛 Compatible with new apps

This commit is contained in:
Tw93
2024-04-15 20:55:53 +08:00
parent 379c9e9452
commit 6edc99f231
3 changed files with 10 additions and 7 deletions

Binary file not shown.

View File

@@ -63,10 +63,13 @@ document.addEventListener('DOMContentLoaded', () => {
const appWindow = tauri.window.appWindow; const appWindow = tauri.window.appWindow;
const invoke = tauri.tauri.invoke; const invoke = tauri.tauri.invoke;
const topDom = document.createElement('div'); if(!document.getElementById('pake-top-dom')){
topDom.id = 'pack-top-dom'; const topDom = document.createElement('div');
document.body.appendChild(topDom); topDom.id = 'pake-top-dom';
const domEl = document.getElementById('pack-top-dom'); document.body.appendChild(topDom);
}
const domEl = document.getElementById('pake-top-dom');
domEl.addEventListener('touchstart', () => { domEl.addEventListener('touchstart', () => {
appWindow.startDragging().then(); appWindow.startDragging().then();

View File

@@ -383,12 +383,12 @@ window.addEventListener('DOMContentLoaded', _event => {
top: 28px; top: 28px;
} }
#pack-top-dom:active { #pake-top-dom:active {
cursor: grabbing; cursor: grabbing;
cursor: -webkit-grabbing; cursor: -webkit-grabbing;
} }
#pack-top-dom{ #pake-top-dom{
position:fixed; position:fixed;
background:transparent; background:transparent;
top:0; top:0;
@@ -398,7 +398,7 @@ window.addEventListener('DOMContentLoaded', _event => {
-webkit-app-region: drag; -webkit-app-region: drag;
user-select: none; user-select: none;
-webkit-user-select: none; -webkit-user-select: none;
z-index: 90000; z-index: 99999;
} }
@media (max-width:767px){ @media (max-width:767px){