1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

3.0.5641.4

This commit is contained in:
Luke Pulverenti 2015-06-15 00:17:12 -04:00
parent 3b403bc22d
commit 46776f1eac
9 changed files with 122 additions and 282 deletions

View file

@ -119,6 +119,7 @@
$('.connectLoginForm', page).hide();
$('.welcomeContainer', page).hide();
$('.signupForm', page).show();
initSignup(page);
}
}
@ -145,6 +146,10 @@
function onSignupFormSubmit() {
if (!supportInAppSignup()) {
return false;
}
var page = $(this).parents('.page');
ConnectionManager.signupForConnect($('#txtSignupEmail', page).val(), $('#txtSignupUsername', page).val(), $('#txtSignupPassword', page).val(), $('#txtSignupPasswordConfirm', page).val()).done(function () {
@ -183,6 +188,30 @@
return false;
}
function requireCaptcha() {
return !AppInfo.isNativeApp && getWindowUrl().toLowerCase().indexOf('https') == 0;
}
function supportInAppSignup() {
return AppInfo.isNativeApp;
return AppInfo.isNativeApp || getWindowUrl().toLowerCase().indexOf('https') == 0;
}
function initSignup(page) {
if (!supportInAppSignup()) {
return;
}
if (!requireCaptcha()) {
return;
}
require(['https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit'], function () {
});
}
$(document).on('pageinitdepends', "#connectLoginPage", function () {
var page = this;
@ -195,6 +224,14 @@
$('.manualServerForm').off('submit', onManualServerSubmit).on('submit', onManualServerSubmit);
$('.signupForm').off('submit', onSignupFormSubmit).on('submit', onSignupFormSubmit);
$('.btnSignupForConnect', page).on('click', function () {
if (supportInAppSignup()) {
Dashboard.navigate('connectlogin.html?mode=signup');
return false;
}
});
}).on('pagebeforeshowready', "#connectLoginPage", function () {
var page = this;

View file

@ -2968,7 +2968,7 @@
renderDetailPageBackdrop: function (page, item) {
var screenWidth = Math.max(screen.height, screen.width);
var screenWidth = screen.availWidth;
var imgUrl;

View file

@ -687,7 +687,7 @@
function getBackdropUrl(item) {
var screenWidth = Math.max(screen.height, screen.width);
var screenWidth = screen.availWidth;
if (item.BackdropImageTags && item.BackdropImageTags.length) {

View file

@ -1643,7 +1643,7 @@ var AppInfo = {};
AppInfo.enableUserImage = true;
AppInfo.hasPhysicalVolumeButtons = isCordova || isMobile;
AppInfo.enableBackButton = (isIOS && window.navigator.standalone) || (isCordova && isIOS);
AppInfo.enableBackButton = isIOS && window.navigator.standalone && !AppInfo.isNativeApp;
AppInfo.supportsFullScreen = isCordova && isAndroid;
AppInfo.supportsSyncPathSetting = isCordova && isAndroid;
@ -1725,6 +1725,10 @@ var AppInfo = {};
function onDocumentReady() {
if (AppInfo.enableBottomTabs) {
$(document.body).addClass('bottomSecondaryNav');
}
if (AppInfo.isTouchPreferred) {
$(document.body).addClass('touch');
}
@ -1765,10 +1769,6 @@ var AppInfo = {};
$(document.body).addClass('movieTrailersTabDisabled');
}
if (AppInfo.enableBottomTabs) {
$(document.body).addClass('bottomSecondaryNav');
}
if (!AppInfo.enableSupporterMembership) {
$(document.body).addClass('supporterMembershipDisabled');
}
@ -2008,11 +2008,7 @@ var AppInfo = {};
function initCordovaWithDeviceId(deferred, deviceId) {
if ($.browser.android) {
requirejs(['thirdparty/cordova/android/imagestore.js']);
} else {
requirejs(['thirdparty/cordova/imagestore.js']);
}
requirejs(['thirdparty/cordova/imagestore.js']);
var capablities = Dashboard.capabilities();