mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update sync dialogs
This commit is contained in:
parent
db403c3cd4
commit
f5ad0dbc21
12 changed files with 124 additions and 147 deletions
|
@ -21,43 +21,14 @@
|
|||
}];
|
||||
}
|
||||
|
||||
function initSupporterInfo(view, params) {
|
||||
|
||||
view.querySelector('.supporterPromotion .mainText').innerHTML = globalize.translate('HeaderSyncRequiresSupporterMembership');
|
||||
|
||||
var apiClient = ApiClient;
|
||||
apiClient.getPluginSecurityInfo().then(function (regInfo) {
|
||||
|
||||
if (regInfo.IsMBSupporter) {
|
||||
view.querySelector('.supporterPromotionContainer').classList.add('hide');
|
||||
} else {
|
||||
view.querySelector('.supporterPromotionContainer').classList.remove('hide');
|
||||
}
|
||||
|
||||
}, function () {
|
||||
|
||||
view.querySelector('.supporterPromotionContainer').classList.remove('hide');
|
||||
});
|
||||
}
|
||||
|
||||
return function (view, params) {
|
||||
|
||||
initSupporterInfo(view, params);
|
||||
var mySyncJobList = new syncJobList({
|
||||
isLocalSync: params.mode === 'offline',
|
||||
serverId: ApiClient.serverId(),
|
||||
userId: params.mode === 'offline' ? null : ApiClient.getCurrentUserId(),
|
||||
element: view.querySelector('.syncActivity')
|
||||
});
|
||||
|
||||
events.on(mySyncJobList, 'jobedit', function (e, jobId, serverId) {
|
||||
|
||||
require(['syncJobEditor'], function (syncJobEditor) {
|
||||
syncJobEditor.show({
|
||||
serverId: ApiClient.serverId(),
|
||||
jobId: jobId
|
||||
});
|
||||
});
|
||||
element: view.querySelector('.syncActivity'),
|
||||
mode: params.mode
|
||||
});
|
||||
|
||||
view.addEventListener('viewshow', function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue