Revert "Added easy login in the GUI"

This reverts commit f4d01e2067.
CEF doesn't support intents so this method doesn't work on Windows
This commit is contained in:
RemixDev 2020-05-17 18:21:40 +02:00
parent f4d01e2067
commit 336d3dd8a8
5 changed files with 2 additions and 31 deletions

View File

@ -585,7 +585,6 @@ <h2 class="page_heading">Settings</h2>
<h3 class="settings-group__header settings-group__header--with-icon"> <h3 class="settings-group__header settings-group__header--with-icon">
<i class="material-icons">person</i>Login <i class="material-icons">person</i>Login
</h3> </h3>
<button id="settings_btn_appLogin" @click="applogin" style="width:100%;" disabled>Login with Deezer</button>
<div class="inline-flex"> <div class="inline-flex">
<input autocomplete="off" type="password" id="login_input_arl" ref="loginInput" placeholder="ARL" /> <input autocomplete="off" type="password" id="login_input_arl" ref="loginInput" placeholder="ARL" />
<button id="settings_btn_copyArl" @click="copyARLtoClipboard"> <button id="settings_btn_copyArl" @click="copyARLtoClipboard">

View File

@ -41596,9 +41596,6 @@ const SettingsTab = new Vue({
logout() { logout() {
socket.emit('logout'); socket.emit('logout');
}, },
applogin() {
if (window.clientMode) socket.emit('applogin');
},
initSettings(settings, credentials, defaults) { initSettings(settings, credentials, defaults) {
this.loadSettings(settings, credentials, defaults); this.loadSettings(settings, credentials, defaults);
toast('Settings loaded!', 'settings'); toast('Settings loaded!', 'settings');
@ -42102,13 +42099,6 @@ function startApp() {
TrackPreview.init(); TrackPreview.init();
} }
function initClient(){
console.log("ClientMode");
document.getElementById("settings_btn_appLogin").removeAttribute("disabled");
window.clientMode = true;
}
window.addEventListener('pywebviewready', initClient);
document.addEventListener('DOMContentLoaded', startApp); document.addEventListener('DOMContentLoaded', startApp);
/* ===== General functions ===== */ /* ===== General functions ===== */
@ -42165,7 +42155,6 @@ socket.on('logged_in', function (data) {
document.getElementById('logged_in_info').classList.remove('hide'); document.getElementById('logged_in_info').classList.remove('hide');
} }
document.getElementById('home_not_logged_in').classList.add('hide'); document.getElementById('home_not_logged_in').classList.add('hide');
document.getElementById('settings_btn_appLogin').classList.add('hide');
break break
case 2: case 2:
toast('Already logged in', 'done', true, 'login-toast'); toast('Already logged in', 'done', true, 'login-toast');
@ -42179,7 +42168,6 @@ socket.on('logged_in', function (data) {
document.getElementById('logged_in_info').classList.remove('hide'); document.getElementById('logged_in_info').classList.remove('hide');
} }
document.getElementById('home_not_logged_in').classList.add('hide'); document.getElementById('home_not_logged_in').classList.add('hide');
document.getElementById('settings_btn_appLogin').classList.add('hide');
break break
case 0: case 0:
toast("Couldn't log in", 'close', true, 'login-toast'); toast("Couldn't log in", 'close', true, 'login-toast');
@ -42191,7 +42179,6 @@ socket.on('logged_in', function (data) {
jquery('#settings_username').text('Not Logged'); jquery('#settings_username').text('Not Logged');
jquery('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`); jquery('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`);
document.getElementById('home_not_logged_in').classList.remove('hide'); document.getElementById('home_not_logged_in').classList.remove('hide');
document.getElementById('settings_btn_appLogin').classList.remove('hide');
break break
} }
}); });
@ -42205,6 +42192,5 @@ socket.on('logged_out', function () {
jquery('#settings_username').text('Not Logged'); jquery('#settings_username').text('Not Logged');
jquery('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`); jquery('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`);
document.getElementById('home_not_logged_in').classList.remove('hide'); document.getElementById('home_not_logged_in').classList.remove('hide');
document.getElementById('settings_btn_appLogin').classList.remove('hide');
}); });
//# sourceMappingURL=bundle.js.map //# sourceMappingURL=bundle.js.map

File diff suppressed because one or more lines are too long

View File

@ -20,13 +20,6 @@ function startApp() {
TrackPreview.init() TrackPreview.init()
} }
function initClient(){
console.log("ClientMode")
document.getElementById("settings_btn_appLogin").removeAttribute("disabled")
window.clientMode = true;
}
window.addEventListener('pywebviewready', initClient)
document.addEventListener('DOMContentLoaded', startApp) document.addEventListener('DOMContentLoaded', startApp)
/* ===== General functions ===== */ /* ===== General functions ===== */
@ -83,7 +76,6 @@ socket.on('logged_in', function (data) {
document.getElementById('logged_in_info').classList.remove('hide') document.getElementById('logged_in_info').classList.remove('hide')
} }
document.getElementById('home_not_logged_in').classList.add('hide') document.getElementById('home_not_logged_in').classList.add('hide')
document.getElementById('settings_btn_appLogin').classList.add('hide')
break break
case 2: case 2:
toast('Already logged in', 'done', true, 'login-toast') toast('Already logged in', 'done', true, 'login-toast')
@ -97,7 +89,6 @@ socket.on('logged_in', function (data) {
document.getElementById('logged_in_info').classList.remove('hide') document.getElementById('logged_in_info').classList.remove('hide')
} }
document.getElementById('home_not_logged_in').classList.add('hide') document.getElementById('home_not_logged_in').classList.add('hide')
document.getElementById('settings_btn_appLogin').classList.add('hide')
break break
case 0: case 0:
toast("Couldn't log in", 'close', true, 'login-toast') toast("Couldn't log in", 'close', true, 'login-toast')
@ -109,7 +100,6 @@ socket.on('logged_in', function (data) {
$('#settings_username').text('Not Logged') $('#settings_username').text('Not Logged')
$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`) $('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)
document.getElementById('home_not_logged_in').classList.remove('hide') document.getElementById('home_not_logged_in').classList.remove('hide')
document.getElementById('settings_btn_appLogin').classList.remove('hide')
break break
} }
}) })
@ -123,5 +113,4 @@ socket.on('logged_out', function () {
$('#settings_username').text('Not Logged') $('#settings_username').text('Not Logged')
$('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`) $('#settings_picture').attr('src', `https://e-cdns-images.dzcdn.net/images/user/125x125-000000-80-0-0.jpg`)
document.getElementById('home_not_logged_in').classList.remove('hide') document.getElementById('home_not_logged_in').classList.remove('hide')
document.getElementById('settings_btn_appLogin').classList.remove('hide')
}) })

View File

@ -69,9 +69,6 @@ const SettingsTab = new Vue({
logout() { logout() {
socket.emit('logout') socket.emit('logout')
}, },
applogin() {
if (window.clientMode) socket.emit('applogin')
},
initSettings(settings, credentials, defaults) { initSettings(settings, credentials, defaults) {
this.loadSettings(settings, credentials, defaults) this.loadSettings(settings, credentials, defaults)
toast('Settings loaded!', 'settings') toast('Settings loaded!', 'settings')