mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update local pin feature
This commit is contained in:
parent
cd9c4775c2
commit
b587424b5c
15 changed files with 152 additions and 13 deletions
|
@ -12,6 +12,13 @@
|
||||||
|
|
||||||
function initEpisodeForm(context, item) {
|
function initEpisodeForm(context, item) {
|
||||||
|
|
||||||
|
if (!item.ExtractedName || item.ExtractedName.length < 4) {
|
||||||
|
context.querySelector('.fldRemember').classList.add('hide');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
context.querySelector('.fldRemember').classList.remove('hide');
|
||||||
|
}
|
||||||
|
|
||||||
$('.inputFile', context).html(item.OriginalFileName);
|
$('.inputFile', context).html(item.OriginalFileName);
|
||||||
|
|
||||||
$('#txtSeason', context).val(item.ExtractedSeasonNumber);
|
$('#txtSeason', context).val(item.ExtractedSeasonNumber);
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<paper-input id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" label="${LabelEndingEpisodeNumber}"></paper-input>
|
<paper-input id="txtEndingEpisode" type="number" pattern="[0-9]*" min="0" label="${LabelEndingEpisodeNumber}"></paper-input>
|
||||||
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
|
<div class="fieldDescription">${LabelEndingEpisodeNumberHelp}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="fldRemember hide">
|
||||||
<br />
|
<br />
|
||||||
<paper-checkbox type="checkbox" id="chkRememberCorrection">${OptionRememberOrganizeCorrection}</paper-checkbox>
|
<paper-checkbox type="checkbox" id="chkRememberCorrection">${OptionRememberOrganizeCorrection}</paper-checkbox>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav, .libraryViewNav paper-tabs {
|
.libraryViewNav, .libraryViewNav paper-tabs {
|
||||||
background-color: transparent;
|
background-color: #161616;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
text-transform: lowercase;
|
text-transform: lowercase;
|
||||||
font-size: 240%;
|
font-size: 220%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryViewNav a, paper-tab {
|
.libraryViewNav a, paper-tab {
|
||||||
|
@ -20,3 +20,23 @@
|
||||||
.background-theme-b, paper-dialog.background-theme-b {
|
.background-theme-b, paper-dialog.background-theme-b {
|
||||||
background: #161616;
|
background: #161616;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.libraryViewNav #selectionBar {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.libraryViewNav .ui-btn-active, .libraryViewNav .iron-selected, .btnActiveCast {
|
||||||
|
color: #52B54B !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.libraryViewNav .ui-btn-active {
|
||||||
|
border-bottom-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.libraryPage:not(.noSecondaryNavPage) {
|
||||||
|
padding-top: 105px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pageWithAbsoluteTabs:not(.noSecondaryNavPage) {
|
||||||
|
padding-top: 108px !important;
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Emby</title>
|
<title>Emby</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Emby</title>
|
<title>Emby</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Emby</title>
|
<title>Emby</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Emby</title>
|
<title>Emby</title>
|
||||||
</head>
|
</head>
|
||||||
|
@ -73,6 +73,15 @@
|
||||||
</paper-item-body>
|
</paper-item-body>
|
||||||
</paper-icon-item>
|
</paper-icon-item>
|
||||||
</a>
|
</a>
|
||||||
|
<a href="pin.html" class="clearLink">
|
||||||
|
<paper-icon-item>
|
||||||
|
<paper-fab mini icon="lock" class="green" item-icon></paper-fab>
|
||||||
|
<paper-item-body two-line>
|
||||||
|
<div>${ButtonEnterPinCode}</div>
|
||||||
|
<div secondary>${ButtonEnterPinCodeHelp}</div>
|
||||||
|
</paper-item-body>
|
||||||
|
</paper-icon-item>
|
||||||
|
</a>
|
||||||
<paper-icon-item class="btnLogout">
|
<paper-icon-item class="btnLogout">
|
||||||
<paper-fab mini icon="lock" style="background-color: #444;" item-icon></paper-fab>
|
<paper-fab mini icon="lock" style="background-color: #444;" item-icon></paper-fab>
|
||||||
<paper-item-body two-line>
|
<paper-item-body two-line>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Emby</title>
|
<title>Emby</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
31
dashboard-ui/pin.html
Normal file
31
dashboard-ui/pin.html
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Emby</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="pinEntryPage" data-role="page" class="page libraryPage userPreferencesPage noSecondaryNavPage" data-contextname="${HeaderSettings}" data-require="scripts/pin,paper-input">
|
||||||
|
|
||||||
|
<div data-role="content">
|
||||||
|
<form style="margin: auto;">
|
||||||
|
<h1>${HeaderEnterPinCode}</h1>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<p>${ButtonEnterPinCodeHelp}</p>
|
||||||
|
|
||||||
|
<paper-input type="number" id="txtPin" pattern="[0-9]*" required="required" min="0" max="999999" step="1" label="${LabelPinCode}"></paper-input>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<button type="submit" data-role="none" class="clearButton">
|
||||||
|
<paper-button raised class="accent block"><iron-icon icon="check"></iron-icon><span>${ButtonSignIn}</span></paper-button>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<paper-button raised class="cancel block btnCancel" onclick="history.back();"><iron-icon icon="close"></iron-icon><span>${ButtonCancel}</span></paper-button>
|
||||||
|
<br />
|
||||||
|
<br />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -546,7 +546,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function showUserAtTop() {
|
function showUserAtTop() {
|
||||||
return AppInfo.isNativeApp;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var requiresLibraryMenuRefresh = false;
|
var requiresLibraryMenuRefresh = false;
|
||||||
|
|
60
dashboard-ui/scripts/pin.js
Normal file
60
dashboard-ui/scripts/pin.js
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
define([], function () {
|
||||||
|
|
||||||
|
function onSubmit(e) {
|
||||||
|
|
||||||
|
var form = e.target;
|
||||||
|
|
||||||
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
ApiClient.ajax({
|
||||||
|
|
||||||
|
type: "POST",
|
||||||
|
url: ApiClient.getUrl('Auth/Pin/Validate'),
|
||||||
|
data: JSON.stringify({
|
||||||
|
Pin: form.querySelector('#txtPin').value
|
||||||
|
}),
|
||||||
|
contentType: "application/json",
|
||||||
|
dataType: 'json'
|
||||||
|
|
||||||
|
}).then(function (result) {
|
||||||
|
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
Dashboard.alert({
|
||||||
|
message: Globalize.translate('PinCodeConfirmedMessage', result.AppName),
|
||||||
|
title: Globalize.translate('HeaderThankYou'),
|
||||||
|
callback: function () {
|
||||||
|
Dashboard.navigate('index.html');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}, function () {
|
||||||
|
|
||||||
|
Dashboard.hideLoadingMsg();
|
||||||
|
Dashboard.alert({
|
||||||
|
message: Globalize.translate('PinCodeInvalidMessage'),
|
||||||
|
title: Globalize.translate('PinCodeInvalid')
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Disable default form submission
|
||||||
|
e.preventDefault();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
pageIdOn('pageinit', 'pinEntryPage', function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
page.querySelector('form').addEventListener('submit', onSubmit);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
pageIdOn('pageshow', 'pinEntryPage', function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
var txtPin = page.querySelector('#txtPin');
|
||||||
|
txtPin.focus();
|
||||||
|
txtPin.value = '';
|
||||||
|
});
|
||||||
|
});
|
|
@ -60,6 +60,8 @@
|
||||||
"LabelAddConnectSupporterHelp": "To add a user who isn't listed, you'll need to first link their account to Emby Connect from their user profile page.",
|
"LabelAddConnectSupporterHelp": "To add a user who isn't listed, you'll need to first link their account to Emby Connect from their user profile page.",
|
||||||
"LabelPinCode": "Pin code:",
|
"LabelPinCode": "Pin code:",
|
||||||
"OptionHideWatchedContentFromLatestMedia": "Hide watched content from latest media",
|
"OptionHideWatchedContentFromLatestMedia": "Hide watched content from latest media",
|
||||||
|
"HeaderEnterPinCode": "Enter Pin Code",
|
||||||
|
"ButtonEnterPinCode": "Enter pin code",
|
||||||
"HeaderSync": "Sync",
|
"HeaderSync": "Sync",
|
||||||
"ButtonOk": "Ok",
|
"ButtonOk": "Ok",
|
||||||
"ButtonCancel": "Cancel",
|
"ButtonCancel": "Cancel",
|
||||||
|
@ -1531,5 +1533,6 @@
|
||||||
"HeaderNewRecording": "New Recording",
|
"HeaderNewRecording": "New Recording",
|
||||||
"ButtonAdvanced": "Advanced",
|
"ButtonAdvanced": "Advanced",
|
||||||
"LabelCodecIntrosPath": "Codec intros path:",
|
"LabelCodecIntrosPath": "Codec intros path:",
|
||||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature."
|
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
|
||||||
|
"ButtonEnterPinCodeHelp": "Sign in to an Emby TV app by entering the on-screen pin code."
|
||||||
}
|
}
|
|
@ -1368,6 +1368,8 @@
|
||||||
"TitleForgotPassword": "Forgot Password",
|
"TitleForgotPassword": "Forgot Password",
|
||||||
"TitlePasswordReset": "Password Reset",
|
"TitlePasswordReset": "Password Reset",
|
||||||
"LabelPasswordRecoveryPinCode": "Pin code:",
|
"LabelPasswordRecoveryPinCode": "Pin code:",
|
||||||
|
"HeaderEnterPinCode": "Enter Pin Code",
|
||||||
|
"ButtonEnterPinCode": "Enter pin code",
|
||||||
"HeaderPasswordReset": "Password Reset",
|
"HeaderPasswordReset": "Password Reset",
|
||||||
"HeaderParentalRatings": "Parental Ratings",
|
"HeaderParentalRatings": "Parental Ratings",
|
||||||
"HeaderVideoTypes": "Video Types",
|
"HeaderVideoTypes": "Video Types",
|
||||||
|
@ -1539,5 +1541,6 @@
|
||||||
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
|
"LabelCodecIntrosPathHelp": "A folder containing video files. If an intro video file name matches the video codec, audio codec, audio profile, or a tag, then it will be played prior to the main feature.",
|
||||||
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
|
"OptionConvertRecordingsToStreamingFormat": "Automatically convert recordings to a streaming friendly format",
|
||||||
"OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices.",
|
"OptionConvertRecordingsToStreamingFormatHelp": "Recordings will be converted on the fly to MP4 for easy playback on your devices.",
|
||||||
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription."
|
"FeatureRequiresEmbyPremiere": "This feature requires an active Emby Premiere subscription.",
|
||||||
|
"ButtonEnterPinCodeHelp": "Sign in to an Emby TV app by entering the on-screen pin code."
|
||||||
}
|
}
|
||||||
|
|
|
@ -958,5 +958,8 @@
|
||||||
"ButtonOff": "Off",
|
"ButtonOff": "Off",
|
||||||
"TitleHardwareAcceleration": "Hardware Acceleration",
|
"TitleHardwareAcceleration": "Hardware Acceleration",
|
||||||
"HardwareAccelerationWarning": "Enabling hardware acceleration may cause instability in some environments. If you have difficulty playing video after enabling this, you'll need to change the setting back to Auto.",
|
"HardwareAccelerationWarning": "Enabling hardware acceleration may cause instability in some environments. If you have difficulty playing video after enabling this, you'll need to change the setting back to Auto.",
|
||||||
"HeaderSelectCodecIntrosPath": "Select Codec Intros Path"
|
"HeaderSelectCodecIntrosPath": "Select Codec Intros Path",
|
||||||
|
"PinCodeInvalid": "Pin Code Error",
|
||||||
|
"PinCodeInvalidMessage": "Invalid or expired pin code entered. Please try again.",
|
||||||
|
"PinCodeConfirmedMessage": "Pin code confirmed. {0} will automatically sign you in."
|
||||||
}
|
}
|
|
@ -968,5 +968,8 @@
|
||||||
"HeaderSelectCodecIntrosPath": "Select Codec Intros Path",
|
"HeaderSelectCodecIntrosPath": "Select Codec Intros Path",
|
||||||
"ButtonLocalRefresh": "Local refresh",
|
"ButtonLocalRefresh": "Local refresh",
|
||||||
"ButtonAddMissingData": "Add missing data only",
|
"ButtonAddMissingData": "Add missing data only",
|
||||||
"ButtonFullRefresh": "Full refresh"
|
"ButtonFullRefresh": "Full refresh",
|
||||||
|
"PinCodeInvalid": "Pin Code Error",
|
||||||
|
"PinCodeInvalidMessage": "Invalid or expired pin code entered. Please try again.",
|
||||||
|
"PinCodeConfirmedMessage": "Pin code confirmed. {0} will automatically login."
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue