Add files via upload

This commit is contained in:
AMIAY
2026-01-18 15:42:24 +01:00
committed by GitHub
parent be1a24a992
commit 7ede6c2f27
5 changed files with 110 additions and 9 deletions

View File

@@ -196,8 +196,26 @@ function setupFirstLaunchHandlers() {
updateProgress(data);
});
let lockButtonTimeout = null;
window.electronAPI.onLockPlayButton((locked) => {
lockPlayButton(locked);
if (locked) {
if (lockButtonTimeout) {
clearTimeout(lockButtonTimeout);
}
lockButtonTimeout = setTimeout(() => {
console.warn('Play button has been locked for too long, forcing unlock');
lockPlayButton(false);
lockButtonTimeout = null;
}, 20000);
} else {
if (lockButtonTimeout) {
clearTimeout(lockButtonTimeout);
lockButtonTimeout = null;
}
}
});
}
@@ -448,6 +466,17 @@ function setupUI() {
lockPlayButton(true);
setTimeout(() => {
const playButton = document.getElementById('homePlayBtn');
if (playButton && playButton.getAttribute('data-locked') === 'true') {
const spanElement = playButton.querySelector('span');
if (spanElement && spanElement.textContent === 'CHECKING...') {
console.warn('Play button still locked after startup timeout, forcing unlock');
lockPlayButton(false);
}
}
}, 25000);
handleNavigation();
setupWindowControls();
setupSidebarLogo();