add remember me option
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
define([], function () {
|
||||
define(['appSettings'], function (appSettings) {
|
||||
|
||||
function login(page, username, password) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
appSettings.enableAutoLogin(true);
|
||||
|
||||
ConnectionManager.loginToConnect(username, password).then(function () {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
@@ -77,7 +79,11 @@
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ConnectionManager.connect().then(function (result) {
|
||||
ConnectionManager.connect({
|
||||
|
||||
enableAutoLogin: appSettings.enableAutoLogin()
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
handleConnectionResult(page, result);
|
||||
|
||||
@@ -177,7 +183,11 @@
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ConnectionManager.connectToAddress(host).then(function (result) {
|
||||
ConnectionManager.connectToAddress(host, {
|
||||
|
||||
enableAutoLogin: appSettings.enableAutoLogin()
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
handleConnectionResult(page, result);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
define(['libraryBrowser', 'cardStyle'], function (libraryBrowser) {
|
||||
define(['appSettings', 'cardStyle', 'emby-checkbox'], function (appSettings) {
|
||||
|
||||
function getApiClient() {
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
|
||||
function showManualForm(context, showCancel, focusPassword) {
|
||||
|
||||
context.querySelector('.chkRememberLogin').checked = appSettings.enableAutoLogin();
|
||||
|
||||
context.querySelector('.manualLoginForm').classList.remove('hide');
|
||||
context.querySelector('.visualLoginForm').classList.add('hide');
|
||||
|
||||
@@ -225,6 +227,8 @@
|
||||
|
||||
view.querySelector('.manualLoginForm').addEventListener('submit', function (e) {
|
||||
|
||||
appSettings.enableAutoLogin(view.querySelector('.chkRememberLogin').checked);
|
||||
|
||||
var apiClient = getApiClient();
|
||||
LoginPage.authenticateUserByName(view, apiClient, view.querySelector('#txtManualName').value, view.querySelector('#txtManualPassword').value);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
define(['paper-icon-button-light'], function () {
|
||||
define(['appSettings', 'paper-icon-button-light'], function (appSettings) {
|
||||
|
||||
function updatePageStyle(page) {
|
||||
|
||||
@@ -98,7 +98,11 @@
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ConnectionManager.connectToServer(server).then(function (result) {
|
||||
ConnectionManager.connectToServer(server, {
|
||||
|
||||
enableAutoLogin: appSettings.enableAutoLogin()
|
||||
|
||||
}).then(function (result) {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user