mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
45 lines
1.0 KiB
JavaScript
45 lines
1.0 KiB
JavaScript
define(['jQuery'], function ($) {
|
|
'use strict';
|
|
|
|
function loadUser(page, user) {
|
|
|
|
LibraryMenu.setTitle(user.Name);
|
|
|
|
if (user.ConnectLinkType == 'Guest') {
|
|
|
|
$('.connectMessage', page).show();
|
|
}
|
|
else {
|
|
$('.connectMessage', page).hide();
|
|
}
|
|
|
|
Dashboard.hideLoadingMsg();
|
|
}
|
|
|
|
function loadData(page) {
|
|
|
|
Dashboard.showLoadingMsg();
|
|
|
|
var userId = getParameterByName("userId");
|
|
|
|
ApiClient.getUser(userId).then(function (user) {
|
|
|
|
loadUser(page, user);
|
|
|
|
});
|
|
}
|
|
|
|
$(document).on('pageinit', "#userPasswordPage", function () {
|
|
|
|
$('.adminUpdatePasswordForm').off('submit', UpdatePasswordPage.onSubmit).on('submit', UpdatePasswordPage.onSubmit);
|
|
$('.adminLocalAccessForm').off('submit', UpdatePasswordPage.onLocalAccessSubmit).on('submit', UpdatePasswordPage.onLocalAccessSubmit);
|
|
|
|
}).on('pagebeforeshow', "#userPasswordPage", function () {
|
|
|
|
var page = this;
|
|
|
|
loadData(page);
|
|
|
|
});
|
|
|
|
}); |