mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update connect
This commit is contained in:
parent
2696d8eb73
commit
0910dce389
7 changed files with 97 additions and 46 deletions
|
@ -26,6 +26,12 @@
|
||||||
$('#fldConnectInfo', page).hide();
|
$('#fldConnectInfo', page).hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user.ConnectLinkType == 'Guest') {
|
||||||
|
$('#txtUserName', page).prop("disabled", "disabled");
|
||||||
|
} else {
|
||||||
|
$('#txtUserName', page).prop("disabled", "").removeAttr('disabled');
|
||||||
|
}
|
||||||
|
|
||||||
if (!loggedInUser.Configuration.IsAdministrator || !user.Id) {
|
if (!loggedInUser.Configuration.IsAdministrator || !user.Id) {
|
||||||
|
|
||||||
$('.lnkEditUserPreferencesContainer', page).hide();
|
$('.lnkEditUserPreferencesContainer', page).hide();
|
||||||
|
@ -254,8 +260,6 @@
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
loadData(page);
|
loadData(page);
|
||||||
|
|
||||||
$("form input:first", page).focus();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
|
@ -23,10 +23,21 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#fldImage', page).show().html('').html("<img height='200px' src='" + imageUrl + "' />");
|
$('#fldImage', page).show().html('').html("<img height='200px' src='" + imageUrl + "' />");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user.ConnectLinkType == 'Guest') {
|
||||||
|
|
||||||
|
$('.newImageSection', page).hide();
|
||||||
|
$('#fldDeleteImage', page).hide();
|
||||||
|
}
|
||||||
|
else if (user.PrimaryImageTag) {
|
||||||
|
|
||||||
$('#fldDeleteImage', page).show();
|
$('#fldDeleteImage', page).show();
|
||||||
$('#headerUploadNewImage', page).show();
|
$('#headerUploadNewImage', page).show();
|
||||||
|
$('.newImageSection', page).show();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
$('.newImageSection', page).show();
|
||||||
$('#fldImage', page).hide().html('');
|
$('#fldImage', page).hide().html('');
|
||||||
$('#fldDeleteImage', page).hide();
|
$('#fldDeleteImage', page).hide();
|
||||||
$('#headerUploadNewImage', page).hide();
|
$('#headerUploadNewImage', page).hide();
|
||||||
|
|
|
@ -8,16 +8,22 @@
|
||||||
|
|
||||||
Dashboard.setPageTitle(user.Name);
|
Dashboard.setPageTitle(user.Name);
|
||||||
|
|
||||||
if (user.HasConfiguredPassword) {
|
if (user.ConnectLinkType == 'Guest') {
|
||||||
|
$('.localAccessSection', page).show().collapsible("option", "collapsed", false);
|
||||||
|
$('.passwordSection', page).hide();
|
||||||
|
}
|
||||||
|
else if (user.HasConfiguredPassword) {
|
||||||
$('#btnResetPassword', page).show();
|
$('#btnResetPassword', page).show();
|
||||||
$('#fldCurrentPassword', page).show();
|
$('#fldCurrentPassword', page).show();
|
||||||
$('.formheader', page).hide();
|
$('.formheader', page).hide();
|
||||||
$('.localAccessSection', page).show();
|
$('.localAccessSection', page).show();
|
||||||
|
$('.passwordSection', page).show();
|
||||||
} else {
|
} else {
|
||||||
$('#btnResetPassword', page).hide();
|
$('#btnResetPassword', page).hide();
|
||||||
$('#fldCurrentPassword', page).hide();
|
$('#fldCurrentPassword', page).hide();
|
||||||
$('.formheader', page).show();
|
$('.formheader', page).show();
|
||||||
$('.localAccessSection', page).hide();
|
$('.localAccessSection', page).hide();
|
||||||
|
$('.passwordSection', page).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#chkEnableLocalAccessWithoutPassword', page).checked(user.Configuration.EnableLocalPassword).checkboxradio('refresh');
|
$('#chkEnableLocalAccessWithoutPassword', page).checked(user.Configuration.EnableLocalPassword).checkboxradio('refresh');
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
var cssClass = "card homePageSquareCard alternateHover bottomPaddedCard";
|
var cssClass = "card squareCard alternateHover bottomPaddedCard";
|
||||||
|
|
||||||
if (user.Configuration.IsDisabled) {
|
if (user.Configuration.IsDisabled) {
|
||||||
cssClass += ' grayscale';
|
cssClass += ' grayscale';
|
||||||
|
@ -150,7 +150,13 @@
|
||||||
|
|
||||||
function renderUsers(page, users) {
|
function renderUsers(page, users) {
|
||||||
|
|
||||||
renderUsersIntoElement($('.users', page), users);
|
renderUsersIntoElement($('.localUsers', page), users.filter(function (u) {
|
||||||
|
return u.ConnectLinkType != 'Guest';
|
||||||
|
}));
|
||||||
|
|
||||||
|
renderUsersIntoElement($('.connectUsers', page), users.filter(function (u) {
|
||||||
|
return u.ConnectLinkType == 'Guest';
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
function showPendingUserMenu(elem) {
|
function showPendingUserMenu(elem) {
|
||||||
|
@ -190,7 +196,7 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
var cssClass = "card homePageSquareCard alternateHover bottomPaddedCard";
|
var cssClass = "card squareCard alternateHover bottomPaddedCard";
|
||||||
|
|
||||||
html += "<div data-id='" + user.Id + "' class='" + cssClass + "'>";
|
html += "<div data-id='" + user.Id + "' class='" + cssClass + "'>";
|
||||||
|
|
||||||
|
@ -255,7 +261,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function cancelAuthorization(page, id) {
|
function cancelAuthorization(page, id) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
// Add/Update connect info
|
// Add/Update connect info
|
||||||
|
@ -284,7 +290,7 @@
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
|
|
||||||
ApiClient.getJSON(ApiClient.getUrl('Connect/Pending')).done(function(pending) {
|
ApiClient.getJSON(ApiClient.getUrl('Connect/Pending')).done(function (pending) {
|
||||||
|
|
||||||
renderPendingGuests(page, pending);
|
renderPendingGuests(page, pending);
|
||||||
});
|
});
|
||||||
|
@ -315,7 +321,24 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).on('pagebeforeshow', "#userProfilesPage", function () {
|
function showInvitePopup(page) {
|
||||||
|
|
||||||
|
$('#popupInvite', page).popup('open');
|
||||||
|
|
||||||
|
$('#txtConnectUsername', page).val('');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$(document).on('pageinit', "#userProfilesPage", function () {
|
||||||
|
|
||||||
|
var page = this;
|
||||||
|
|
||||||
|
$('.btnInvite', page).on('click', function () {
|
||||||
|
|
||||||
|
showInvitePopup(page);
|
||||||
|
});
|
||||||
|
|
||||||
|
}).on('pagebeforeshow', "#userProfilesPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
|
|
@ -23,25 +23,27 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 id="headerUploadNewImage" style="display: none;">${HeaderUploadNewImage}</h2>
|
<div class="newImageSection" style="display:none;">
|
||||||
<form id="uploadUserImageForm">
|
<h2 id="headerUploadNewImage" style="display: none;">${HeaderUploadNewImage}</h2>
|
||||||
<ul data-role="listview" class="ulForm">
|
<form id="uploadUserImageForm">
|
||||||
<li id="fldNewImage">
|
<ul data-role="listview" class="ulForm">
|
||||||
<p>${ImageUploadAspectRatioHelp}</p>
|
<li id="fldNewImage">
|
||||||
<input type="file" accept="image/*" id="uploadUserImage" name="uploadUserImage" onchange="UserImagePage.onFileUploadChange(this);" />
|
<p>${ImageUploadAspectRatioHelp}</p>
|
||||||
|
<input type="file" accept="image/*" id="uploadUserImage" name="uploadUserImage" onchange="UserImagePage.onFileUploadChange(this);" />
|
||||||
|
|
||||||
<div id="userImageDropZone" class="imageDropZone">
|
<div id="userImageDropZone" class="imageDropZone">
|
||||||
<h3>${LabelDropImageHere}</h3>
|
<h3>${LabelDropImageHere}</h3>
|
||||||
<output id="userImageOutput"></output>
|
<output id="userImageOutput"></output>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
<li id="fldNewImagePreview"></li>
|
<li id="fldNewImagePreview"></li>
|
||||||
<li id="fldUpload" style="display: none;">
|
<li id="fldUpload" style="display: none;">
|
||||||
<button type="submit" data-icon="picture">${ButtonUpload}</button>
|
<button type="submit" data-icon="picture">${ButtonUpload}</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="readOnlyContent">
|
<div class="readOnlyContent">
|
||||||
<div data-role="collapsible" data-collapsed="false">
|
<div data-role="collapsible" data-collapsed="false" class="passwordSection" style="display:none;">
|
||||||
<h2>${HeaderPassword}</h2>
|
<h2>${HeaderPassword}</h2>
|
||||||
<div>
|
<div>
|
||||||
<br />
|
<br />
|
||||||
|
|
|
@ -9,35 +9,40 @@
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div class="content-primary">
|
<div class="content-primary">
|
||||||
|
|
||||||
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true">
|
<div data-role="controlgroup" data-type="horizontal" class="localnav" data-mini="true" style="margin-bottom:30px!important;">
|
||||||
<a href="#" data-role="button" class="ui-btn-active">${TabUsers}</a>
|
<a href="#" data-role="button" class="ui-btn-active">${TabUsers}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="readOnlyContent">
|
<div class="ui-bar-a" style="padding: 0 1em;">
|
||||||
<div>
|
<h3 style="margin:.6em 0;font-size:16px;font-weight:500;">
|
||||||
<a data-role="button" data-icon="plus" href="#popupInvite" data-rel="popup" data-position-to="window" data-inline="true" data-mini="true">
|
<span style="vertical-align:middle;">${HeaderUsers}</span>
|
||||||
|
<a data-role="button" data-icon="plus" href="useredit.html" data-inline="true" data-mini="true" data-iconpos="notext" style="margin: 0 .5em; vertical-align:middle;">
|
||||||
|
${ButtonAddUser}
|
||||||
|
</a>
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
<div class="itemsContainer localUsers" style="text-align:left;margin-top:.5em;"></div>
|
||||||
|
<br /><br />
|
||||||
|
|
||||||
|
<div class="ui-bar-a" style="padding: 0 1em;">
|
||||||
|
<h3 style="margin:.6em 0;font-size:16px;font-weight:500;">
|
||||||
|
<span style="vertical-align:middle;">${HeaderGuests}</span>
|
||||||
|
<a class="btnInvite" data-role="button" data-icon="plus" href="#" data-rel="popup" data-position-to="window" data-inline="true" data-mini="true" data-iconpos="notext" style="margin: 0 0 0 .5em; vertical-align:middle;">
|
||||||
${ButtonInviteUser}
|
${ButtonInviteUser}
|
||||||
</a>
|
</a>
|
||||||
<a data-role="button" data-icon="plus" href="useredit.html" data-inline="true" data-mini="true">
|
</h3>
|
||||||
${ButtonAddLocalUser}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="itemsContainer connectUsers" style="text-align:left;margin-top:.5em;"></div>
|
||||||
|
<br /><br />
|
||||||
|
|
||||||
<div class="itemsContainer users" style="text-align:left;">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="sectionPendingGuests" style="display:none;">
|
<div class="sectionPendingGuests" style="display:none;">
|
||||||
<br />
|
<div class="ui-bar-a" style="padding: 0 1em;"><h3 style="font-size:16px;font-weight:500;">${HeaderPendingInvitations}</h3></div>
|
||||||
<br />
|
<div class="itemsContainer pending" style="text-align:left;margin-top:.5em;"></div>
|
||||||
<div class="ui-bar-a" style="padding: 0 1em;"><h3>Pending Invitations</h3></div>
|
|
||||||
<div class="itemsContainer pending" style="text-align:left;"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div data-role="popup" id="popupInvite" data-theme="a">
|
<div data-role="popup" id="popupInvite" data-theme="a">
|
||||||
|
|
||||||
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">${ButtonClose}</a>
|
<a href="#" data-rel="back" class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">${ButtonClose}</a>
|
||||||
|
|
||||||
<div class="ui-bar-a" style="text-align: center; padding: 5px 20px;">
|
<div class="ui-bar-a" style="text-align: center; padding: 5px 20px;">
|
||||||
|
@ -46,13 +51,13 @@
|
||||||
|
|
||||||
<div style="padding:10px 20px;">
|
<div style="padding:10px 20px;">
|
||||||
|
|
||||||
<p>${HeaderInviteUserHelp}</p>
|
<p style="margin:1em 0 1.25em;">${HeaderInviteUserHelp}</p>
|
||||||
<form class="addUserForm">
|
<form class="addUserForm">
|
||||||
<div>
|
<div>
|
||||||
<label for="txtConnectUsername">${LabelConnectUserName}</label>
|
<label for="txtConnectUsername">${LabelConnectUserName}</label>
|
||||||
<input type="text" id="txtConnectUsername" value="" placeholder="Username" required="required">
|
<input type="text" id="txtConnectUsername" value="" placeholder="Username" required="required">
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
<div>${LabelConnectInviteHelp}</div>
|
<div>${LabelConnectInviteUserHelp}</div>
|
||||||
<div style="margin-top: .75em;"><a href="http://mediabrowser.tv/connect" target="_blank">${ButtonLearnMoreAboutMediaBrowserConnect}</a></div>
|
<div style="margin-top: .75em;"><a href="http://mediabrowser.tv/connect" target="_blank">${ButtonLearnMoreAboutMediaBrowserConnect}</a></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue