Skip to content

Commit

Permalink
add a click event for reconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Oct 23, 2023
1 parent 297092f commit dcd5da2
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 174 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
},
"devDependencies": {
"@triadica/touch-control": "^0.0.4-a1",
"@types/ws": "^8.5.5",
"@types/ws": "^8.5.8",
"git-describe": "^4.1.1",
"query-string": "^8.1.0",
"vite": "^4.3.9"
"vite": "^4.5.0"
},
"dependencies": {
"ws": "^8.13.0"
"ws": "^8.14.2"
}
}
5 changes: 5 additions & 0 deletions src/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ let main = () => {
})
);
});
document.querySelector(".status-text")?.addEventListener("click", () => {
if (!connected) {
connect();
}
});

window.addEventListener("visibilitychange", () => {
if (document.visibilityState === "visible") {
Expand Down
Loading

0 comments on commit dcd5da2

Please sign in to comment.