Added in-app login
This commit is contained in:
parent
77b202d88e
commit
a32ba2e455
File diff suppressed because one or more lines are too long
@ -33,6 +33,7 @@ function initClient() {
|
|||||||
window.clientMode = true
|
window.clientMode = true
|
||||||
document.querySelector(`#open_downloads_folder`).classList.remove('hide')
|
document.querySelector(`#open_downloads_folder`).classList.remove('hide')
|
||||||
document.querySelector(`#select_downloads_folder`).classList.remove('hide')
|
document.querySelector(`#select_downloads_folder`).classList.remove('hide')
|
||||||
|
document.querySelector(`#settings_btn_applogin`).classList.remove('hide')
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', startApp)
|
document.addEventListener('DOMContentLoaded', startApp)
|
||||||
|
@ -26,6 +26,9 @@
|
|||||||
<a href="https://codeberg.org/RemixDev/deemix/wiki/Getting-your-own-ARL" target="_blank">
|
<a href="https://codeberg.org/RemixDev/deemix/wiki/Getting-your-own-ARL" target="_blank">
|
||||||
{{ $t('settings.login.arl.question') }}
|
{{ $t('settings.login.arl.question') }}
|
||||||
</a>
|
</a>
|
||||||
|
<a id="settings_btn_applogin" class="hide" href="#" @click="applogin">
|
||||||
|
Automated login
|
||||||
|
</a>
|
||||||
<button id="settings_btn_updateArl" @click="login" style="width: 100%;">
|
<button id="settings_btn_updateArl" @click="login" style="width: 100%;">
|
||||||
{{ $t('settings.login.arl.update') }}
|
{{ $t('settings.login.arl.update') }}
|
||||||
</button>
|
</button>
|
||||||
@ -678,6 +681,7 @@ export default {
|
|||||||
socket.on('accountChanged', this.accountChanged)
|
socket.on('accountChanged', this.accountChanged)
|
||||||
socket.on('familyAccounts', this.initAccounts)
|
socket.on('familyAccounts', this.initAccounts)
|
||||||
socket.on('downloadFolderSelected', this.downloadFolderSelected)
|
socket.on('downloadFolderSelected', this.downloadFolderSelected)
|
||||||
|
socket.on('applogin_arl', this.setArl)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
revertSettings() {
|
revertSettings() {
|
||||||
@ -742,6 +746,14 @@ export default {
|
|||||||
socket.emit('login', arl, true, this.accountNum)
|
socket.emit('login', arl, true, this.accountNum)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
applogin(e) {
|
||||||
|
e.preventDefault()
|
||||||
|
if (window.clientMode) socket.emit('applogin')
|
||||||
|
},
|
||||||
|
setArl(arl) {
|
||||||
|
this.$refs.loginInput.value = arl
|
||||||
|
this.login()
|
||||||
|
},
|
||||||
changeAccount() {
|
changeAccount() {
|
||||||
socket.emit('changeAccount', this.accountNum)
|
socket.emit('changeAccount', this.accountNum)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user