Skip to content

Commit

Permalink
🐛 Compatible with new apps
Browse files Browse the repository at this point in the history
  • Loading branch information
tw93 committed Apr 15, 2024
1 parent 379c9e9 commit 6edc99f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Binary file added src-tauri/icons/juchats.icns
Binary file not shown.
11 changes: 7 additions & 4 deletions src-tauri/src/inject/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ document.addEventListener('DOMContentLoaded', () => {
const appWindow = tauri.window.appWindow;
const invoke = tauri.tauri.invoke;

const topDom = document.createElement('div');
topDom.id = 'pack-top-dom';
document.body.appendChild(topDom);
const domEl = document.getElementById('pack-top-dom');
if(!document.getElementById('pake-top-dom')){
const topDom = document.createElement('div');
topDom.id = 'pake-top-dom';
document.body.appendChild(topDom);
}

const domEl = document.getElementById('pake-top-dom');

domEl.addEventListener('touchstart', () => {
appWindow.startDragging().then();
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/src/inject/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@ window.addEventListener('DOMContentLoaded', _event => {
top: 28px;
}
#pack-top-dom:active {
#pake-top-dom:active {
cursor: grabbing;
cursor: -webkit-grabbing;
}
#pack-top-dom{
#pake-top-dom{
position:fixed;
background:transparent;
top:0;
Expand All @@ -398,7 +398,7 @@ window.addEventListener('DOMContentLoaded', _event => {
-webkit-app-region: drag;
user-select: none;
-webkit-user-select: none;
z-index: 90000;
z-index: 99999;
}
@media (max-width:767px){
Expand Down

0 comments on commit 6edc99f

Please sign in to comment.