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:
parent
3b403bc22d
commit
46776f1eac
9 changed files with 122 additions and 282 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue