Implemented electron integration
This commit is contained in:
parent
513f6ca1c2
commit
bab72e36d0
@ -37,7 +37,7 @@
|
||||
"eslint": "7.23.0",
|
||||
"eslint-config-prettier": "^8.1.0",
|
||||
"eslint-plugin-prettier": "3.3.1",
|
||||
"node-sass": "^5.0.0",
|
||||
"node-sass": "^6.0.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"postcss": "^8.2.1",
|
||||
"prettier": "2.2.1",
|
||||
|
2724
public/js/bundle.js
2724
public/js/bundle.js
File diff suppressed because one or more lines are too long
@ -68,7 +68,9 @@ function initClient() {
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', startApp)
|
||||
window.addEventListener('pywebviewready', initClient)
|
||||
if (window.api){
|
||||
initClient()
|
||||
}
|
||||
|
||||
/* ===== Global shortcuts ===== */
|
||||
|
||||
|
@ -382,7 +382,7 @@ export default {
|
||||
},
|
||||
openDownloadsFolder() {
|
||||
// if (this.clientMode) {
|
||||
socket.emit('openDownloadsFolder')
|
||||
window.api.send('openDownloadsFolder')
|
||||
// }
|
||||
},
|
||||
handleDrag(event) {
|
||||
|
@ -896,14 +896,13 @@ export default {
|
||||
socket.on('updateSettings', this.updateSettings)
|
||||
socket.on('accountChanged', this.accountChanged)
|
||||
socket.on('familyAccounts', this.initAccounts)
|
||||
socket.on('downloadFolderSelected', this.downloadFolderSelected)
|
||||
socket.on('applogin_arl', this.loggedInViaDeezer)
|
||||
window.api.receive('downloadFolderSelected', this.downloadFolderSelected)
|
||||
window.api.receive('applogin_arl', this.loggedInViaDeezer)
|
||||
|
||||
this.$on('hook:destroyed', () => {
|
||||
socket.off('updateSettings')
|
||||
socket.off('accountChanged')
|
||||
socket.off('familyAccounts')
|
||||
socket.off('downloadFolderSelected')
|
||||
socket.off('applogin_arl')
|
||||
})
|
||||
},
|
||||
@ -961,7 +960,7 @@ export default {
|
||||
})
|
||||
},
|
||||
selectDownloadFolder() {
|
||||
socket.emit('selectDownloadFolder')
|
||||
window.api.send('selectDownloadFolder', this.settings.downloadLocation)
|
||||
},
|
||||
downloadFolderSelected(folder) {
|
||||
this.$set(this.settings, 'downloadLocation', folder)
|
||||
@ -997,7 +996,7 @@ export default {
|
||||
console.log({ response })
|
||||
},
|
||||
appLogin() {
|
||||
socket.emit('applogin')
|
||||
window.api.send('applogin')
|
||||
},
|
||||
changeAccount() {
|
||||
socket.emit('changeAccount', this.accountNum)
|
||||
|
Loading…
Reference in New Issue
Block a user