better spacebar control, disable it completely in dev mode

This commit is contained in:
vapormusic 2022-02-09 23:33:42 +07:00
parent 47e25ae2f2
commit 6ea19e49f7
2 changed files with 12 additions and 2 deletions

View file

@ -3572,6 +3572,16 @@ const app = new Vue({
darwinShare(url) {
ipcRenderer.send('share-menu', url)
},
SpacePause() {
const elems = document.querySelectorAll('input');
for (elem of elems){
if (elem === document.activeElement) {
return;
}
}
if (!this.isDev) // disable in dev mode to keep my sanity
MusicKitInterop.playPause();
}
}
})