Implemented electron integration

This commit is contained in:
RemixDev 2021-05-28 12:39:00 +02:00
parent 513f6ca1c2
commit bab72e36d0
6 changed files with 6247 additions and 1370 deletions

View File

@ -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",

File diff suppressed because one or more lines are too long

View File

@ -68,7 +68,9 @@ function initClient() {
}
document.addEventListener('DOMContentLoaded', startApp)
window.addEventListener('pywebviewready', initClient)
if (window.api){
initClient()
}
/* ===== Global shortcuts ===== */

View File

@ -382,7 +382,7 @@ export default {
},
openDownloadsFolder() {
// if (this.clientMode) {
socket.emit('openDownloadsFolder')
window.api.send('openDownloadsFolder')
// }
},
handleDrag(event) {

View File

@ -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)

4876
yarn.lock Normal file

File diff suppressed because it is too large Load Diff