mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add remember me option
This commit is contained in:
parent
18da0bbdcf
commit
5018f2190b
6 changed files with 43 additions and 20 deletions
|
@ -182,6 +182,17 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cardImage {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-size: contain;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center bottom;
|
||||||
|
}
|
||||||
|
|
||||||
.coveredImage {
|
.coveredImage {
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
|
@ -248,17 +259,6 @@
|
||||||
white-space: normal;
|
white-space: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cardImage {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background-size: contain;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: center bottom;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cardImageIcon {
|
.cardImageIcon {
|
||||||
width: 12vh;
|
width: 12vh;
|
||||||
height: 12vh;
|
height: 12vh;
|
||||||
|
|
|
@ -13,10 +13,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="inputContainer">
|
<div class="inputContainer">
|
||||||
<input is="emby-input" id="txtManualPassword" type="password" label="${LabelPassword}" />
|
<input is="emby-input" id="txtManualPassword" type="password" label="${LabelPassword}"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<label class="checkboxContainer">
|
||||||
|
<input is="emby-checkbox" type="checkbox" class="chkRememberLogin" checked />
|
||||||
|
<span>${RememberMe}</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
<button is="emby-button" type="submit" class="raised accent block">
|
<button is="emby-button" type="submit" class="raised accent block">
|
||||||
<i class="md-icon">check</i>
|
<i class="md-icon">check</i>
|
||||||
<span>${ButtonSignIn}</span>
|
<span>${ButtonSignIn}</span>
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
define([], function () {
|
define(['appSettings'], function (appSettings) {
|
||||||
|
|
||||||
function login(page, username, password) {
|
function login(page, username, password) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
appSettings.enableAutoLogin(true);
|
||||||
|
|
||||||
ConnectionManager.loginToConnect(username, password).then(function () {
|
ConnectionManager.loginToConnect(username, password).then(function () {
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
@ -77,7 +79,11 @@
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ConnectionManager.connect().then(function (result) {
|
ConnectionManager.connect({
|
||||||
|
|
||||||
|
enableAutoLogin: appSettings.enableAutoLogin()
|
||||||
|
|
||||||
|
}).then(function (result) {
|
||||||
|
|
||||||
handleConnectionResult(page, result);
|
handleConnectionResult(page, result);
|
||||||
|
|
||||||
|
@ -177,7 +183,11 @@
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ConnectionManager.connectToAddress(host).then(function (result) {
|
ConnectionManager.connectToAddress(host, {
|
||||||
|
|
||||||
|
enableAutoLogin: appSettings.enableAutoLogin()
|
||||||
|
|
||||||
|
}).then(function (result) {
|
||||||
|
|
||||||
handleConnectionResult(page, result);
|
handleConnectionResult(page, result);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['libraryBrowser', 'cardStyle'], function (libraryBrowser) {
|
define(['appSettings', 'cardStyle', 'emby-checkbox'], function (appSettings) {
|
||||||
|
|
||||||
function getApiClient() {
|
function getApiClient() {
|
||||||
|
|
||||||
|
@ -82,6 +82,8 @@
|
||||||
|
|
||||||
function showManualForm(context, showCancel, focusPassword) {
|
function showManualForm(context, showCancel, focusPassword) {
|
||||||
|
|
||||||
|
context.querySelector('.chkRememberLogin').checked = appSettings.enableAutoLogin();
|
||||||
|
|
||||||
context.querySelector('.manualLoginForm').classList.remove('hide');
|
context.querySelector('.manualLoginForm').classList.remove('hide');
|
||||||
context.querySelector('.visualLoginForm').classList.add('hide');
|
context.querySelector('.visualLoginForm').classList.add('hide');
|
||||||
|
|
||||||
|
@ -225,6 +227,8 @@
|
||||||
|
|
||||||
view.querySelector('.manualLoginForm').addEventListener('submit', function (e) {
|
view.querySelector('.manualLoginForm').addEventListener('submit', function (e) {
|
||||||
|
|
||||||
|
appSettings.enableAutoLogin(view.querySelector('.chkRememberLogin').checked);
|
||||||
|
|
||||||
var apiClient = getApiClient();
|
var apiClient = getApiClient();
|
||||||
LoginPage.authenticateUserByName(view, apiClient, view.querySelector('#txtManualName').value, view.querySelector('#txtManualPassword').value);
|
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) {
|
function updatePageStyle(page) {
|
||||||
|
|
||||||
|
@ -98,7 +98,11 @@
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ConnectionManager.connectToServer(server).then(function (result) {
|
ConnectionManager.connectToServer(server, {
|
||||||
|
|
||||||
|
enableAutoLogin: appSettings.enableAutoLogin()
|
||||||
|
|
||||||
|
}).then(function (result) {
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
|
||||||
|
|
|
@ -2318,5 +2318,6 @@
|
||||||
"RemoveDownload": "Remove download",
|
"RemoveDownload": "Remove download",
|
||||||
"SyncToOtherDevices": "Sync to other devices",
|
"SyncToOtherDevices": "Sync to other devices",
|
||||||
"ManageOfflineDownloads": "Manage offline downloads",
|
"ManageOfflineDownloads": "Manage offline downloads",
|
||||||
"MessageDownloadScheduled": "Download scheduled"
|
"MessageDownloadScheduled": "Download scheduled",
|
||||||
|
"RememberMe": "Remember me"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue