mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
update sync dialogs
This commit is contained in:
parent
db403c3cd4
commit
f5ad0dbc21
@ -14,12 +14,12 @@
|
||||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.399",
|
||||
"_release": "1.4.399",
|
||||
"version": "1.4.400",
|
||||
"_release": "1.4.400",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.399",
|
||||
"commit": "b926b582df014a7b2b54e93dca167db73d59bbcb"
|
||||
"tag": "1.4.400",
|
||||
"commit": "8b3fe5c5f8044cccac68ca4535c2c818d160899e"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
@ -71,6 +71,13 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter',
|
||||
}
|
||||
}
|
||||
|
||||
if (item.CanDownload && appHost.supports('filedownload')) {
|
||||
commands.push({
|
||||
name: globalize.translate('sharedcomponents#Download'),
|
||||
id: 'download'
|
||||
});
|
||||
}
|
||||
|
||||
if (itemHelper.canEdit(user, item)) {
|
||||
|
||||
if (options.edit !== false && item.Type !== 'SeriesTimer') {
|
||||
@ -106,13 +113,6 @@ define(['apphost', 'globalize', 'connectionManager', 'itemHelper', 'embyRouter',
|
||||
}
|
||||
}
|
||||
|
||||
if (item.CanDownload && appHost.supports('filedownload')) {
|
||||
commands.push({
|
||||
name: globalize.translate('sharedcomponents#Download'),
|
||||
id: 'download'
|
||||
});
|
||||
}
|
||||
|
||||
if (options.identify !== false) {
|
||||
if (itemHelper.canIdentify(user, item.Type)) {
|
||||
commands.push({
|
||||
|
@ -765,11 +765,11 @@
|
||||
showElement('#fldParentIndexNumber');
|
||||
|
||||
if (item.Type === "Episode") {
|
||||
context.querySelector('#txtParentIndexNumber').label(globalize.translate('LabelSeasonNumber'));
|
||||
context.querySelector('#txtParentIndexNumber').label(globalize.translate('sharedcomponents#LabelSeasonNumber'));
|
||||
} else if (item.Type === "Audio") {
|
||||
context.querySelector('#txtParentIndexNumber').label(globalize.translate('LabelDiscNumber'));
|
||||
context.querySelector('#txtParentIndexNumber').label(globalize.translate('sharedcomponents#LabelDiscNumber'));
|
||||
} else {
|
||||
context.querySelector('#txtParentIndexNumber').label(globalize.translate('LabelParentNumber'));
|
||||
context.querySelector('#txtParentIndexNumber').label(globalize.translate('sharedcomponents#LabelParentNumber'));
|
||||
}
|
||||
} else {
|
||||
hideElement('#fldParentIndexNumber', context);
|
||||
|
@ -49,6 +49,8 @@
|
||||
"CloudSyncFeatureDescription": "Sync your media to the cloud for easy backup, archiving, and converting.",
|
||||
"CoverArtFeatureDescription": "Cover Art creates fun covers and other treatments to help you personalize your media images.",
|
||||
"CoverArt": "Cover Art",
|
||||
"ButtonCancelSyncJob": "Cancel sync",
|
||||
"CancelSyncJobConfirmation": "Cancelling the sync job will remove synced media from the device during the next sync process. Are you sure you wish to proceed?",
|
||||
"CinemaModeFeatureDescription": "Cinema Mode gives you the true cinema experience with trailers and custom intros before the feature.",
|
||||
"HeaderFreeApps": "Free Emby Apps",
|
||||
"FreeAppsFeatureDescription": "Enjoy free access to Emby apps for your devices.",
|
||||
@ -206,8 +208,8 @@
|
||||
"LabelEpisodeNumber": "Episode number:",
|
||||
"LabelTrackNumber": "Track number:",
|
||||
"LabelNumber": "Number:",
|
||||
"LabelDiscNumber": "Disc number",
|
||||
"LabelParentNumber": "Parent number",
|
||||
"LabelDiscNumber": "Disc number:",
|
||||
"LabelParentNumber": "Parent number:",
|
||||
"SortName": "Sort name",
|
||||
"ReleaseDate": "Release date",
|
||||
"Continuing": "Continuing",
|
||||
@ -232,11 +234,14 @@
|
||||
"GuestStar": "Guest star",
|
||||
"Producer": "Producer",
|
||||
"Writer": "Writer",
|
||||
"MessageNoSyncJobsFound": "No sync jobs found. Create sync jobs using the Sync buttons found throughout the app.",
|
||||
"MessageNoDownloadsFound": "No offline downloads. Make your media available offline by clicking Make Available Offline throughout the app.",
|
||||
"InstallingPackage": "Installing {0}",
|
||||
"PackageInstallCompleted": "{0} installation completed.",
|
||||
"PackageInstallFailed": "{0} installation failed.",
|
||||
"PackageInstallCancelled": "{0} installation cancelled.",
|
||||
"SeriesYearToPresent": "{0} - Present",
|
||||
"ValueOneItem": "1 item",
|
||||
"ValueOneSong": "1 song",
|
||||
"ValueSongCount": "{0} songs",
|
||||
"ValueOneMovie": "1 movie",
|
||||
@ -269,6 +274,7 @@
|
||||
"LabelQuality": "Quality:",
|
||||
"LabelSyncNoTargetsHelp": "It looks like you don't currently have any apps that support sync.",
|
||||
"DownloadScheduled": "Download scheduled",
|
||||
"HeaderSyncRequiresSub": "Sync requires an active Emby Premiere subscription.",
|
||||
"LearnMore": "Learn more",
|
||||
"LabelProfile": "Profile:",
|
||||
"LabelBitrateMbps": "Bitrate (Mbps):",
|
||||
@ -352,7 +358,23 @@
|
||||
"MessageDidYouKnowCinemaMode2": "Cinema Mode gives you the true cinema experience with trailers and custom intros before the main feature.",
|
||||
"HeaderPlayMyMedia": "Play my Media",
|
||||
"HeaderDiscoverEmbyPremiere": "Discover Emby Premiere",
|
||||
"Items": "Items",
|
||||
"OneChannel": "One channel",
|
||||
"ConfirmRemoveDownload": "Remove download?",
|
||||
"AddedOnValue": "Added {0}"
|
||||
"RemoveDownload": "Remove download",
|
||||
"AddedOnValue": "Added {0}",
|
||||
"RemovingFromDevice": "Removing from device",
|
||||
"RemoveFromDevice": "Remove from device",
|
||||
"KeepOnDevice": "Keep on device",
|
||||
"CancelDownload": "Cancel download",
|
||||
"SyncJobItemStatusReadyToTransfer": "Ready to Transfer",
|
||||
"SyncJobItemStatusSyncedMarkForRemoval": "Removing from device",
|
||||
"SyncJobItemStatusQueued": "Queued",
|
||||
"SyncJobItemStatusConverting": "Converting",
|
||||
"SyncJobItemStatusTransferring": "Transferring",
|
||||
"SyncJobItemStatusSynced": "Downloaded",
|
||||
"SyncJobItemStatusFailed": "Failed",
|
||||
"SyncJobItemStatusRemovedFromDevice": "Removed from device",
|
||||
"SyncJobItemStatusCancelled": "Cancelled",
|
||||
"Retry": "Retry"
|
||||
}
|
@ -62,10 +62,10 @@
|
||||
} else {
|
||||
html += '<div class="secondary">';
|
||||
}
|
||||
html += globalize.translate('SyncJobItemStatus' + jobItem.Status);
|
||||
html += globalize.translate('sharedcomponents#SyncJobItemStatus' + jobItem.Status);
|
||||
if (jobItem.Status == 'Synced' && jobItem.IsMarkedForRemoval) {
|
||||
html += '<br/>';
|
||||
html += globalize.translate('SyncJobItemStatusSyncedMarkForRemoval');
|
||||
html += globalize.translate('sharedcomponents#RemovingFromDevice');
|
||||
}
|
||||
html += '</div>';
|
||||
|
||||
@ -92,7 +92,7 @@
|
||||
|
||||
var html = '';
|
||||
|
||||
html += '<h1>' + globalize.translate('HeaderItems') + '</h1>';
|
||||
html += '<h1>' + globalize.translate('sharedcomponents#Items') + '</h1>';
|
||||
|
||||
html += '<div class="paperList">';
|
||||
|
||||
@ -133,33 +133,27 @@
|
||||
|
||||
var menuItems = [];
|
||||
|
||||
if (status == 'Failed') {
|
||||
if (status == 'Failed' || status == 'Cancelled') {
|
||||
menuItems.push({
|
||||
name: globalize.translate('ButtonQueueForRetry'),
|
||||
id: 'retry'
|
||||
});
|
||||
}
|
||||
else if (status == 'Cancelled') {
|
||||
menuItems.push({
|
||||
name: globalize.translate('ButtonReenable'),
|
||||
name: globalize.translate('sharedcomponents#Retry'),
|
||||
id: 'retry'
|
||||
});
|
||||
}
|
||||
else if (status == 'Queued' || status == 'Transferring' || status == 'Converting' || status == 'ReadyToTransfer') {
|
||||
menuItems.push({
|
||||
name: globalize.translate('ButtonCancelItem'),
|
||||
name: globalize.translate('sharedcomponents#CancelDownload'),
|
||||
id: 'cancel'
|
||||
});
|
||||
}
|
||||
else if (status == 'Synced' && remove) {
|
||||
menuItems.push({
|
||||
name: globalize.translate('ButtonUnmarkForRemoval'),
|
||||
name: globalize.translate('sharedcomponents#KeepOnDevice'),
|
||||
id: 'unmarkforremoval'
|
||||
});
|
||||
}
|
||||
else if (status == 'Synced') {
|
||||
menuItems.push({
|
||||
name: globalize.translate('ButtonMarkForRemoval'),
|
||||
name: globalize.translate('sharedcomponents#RemoveFromDevice'),
|
||||
id: 'markforremoval'
|
||||
});
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
define(['serverNotifications', 'events', 'loading', 'connectionManager', 'imageLoader', 'dom', 'globalize', 'listViewStyle'], function (serverNotifications, events, loading, connectionManager, imageLoader, dom, globalize) {
|
||||
define(['serverNotifications', 'events', 'loading', 'connectionManager', 'imageLoader', 'dom', 'globalize', 'registrationServices', 'listViewStyle'], function (serverNotifications, events, loading, connectionManager, imageLoader, dom, globalize, registrationServices) {
|
||||
'use strict';
|
||||
|
||||
function onSyncJobsUpdated(e, apiClient, data) {
|
||||
@ -20,10 +20,15 @@
|
||||
require(['confirm'], function (confirm) {
|
||||
|
||||
var msg = listInstance.options.isLocalSync ?
|
||||
globalize.translate('ConfirmRemoveDownload') :
|
||||
globalize.translate('CancelSyncJobConfirmation');
|
||||
globalize.translate('sharedcomponents#ConfirmRemoveDownload') :
|
||||
globalize.translate('sharedcomponents#CancelSyncJobConfirmation');
|
||||
|
||||
confirm(msg).then(function () {
|
||||
confirm({
|
||||
|
||||
text: msg,
|
||||
primary: 'cancel'
|
||||
|
||||
}).then(function () {
|
||||
|
||||
loading.show();
|
||||
var apiClient = getApiClient(listInstance);
|
||||
@ -94,10 +99,10 @@ globalize.translate('CancelSyncJobConfirmation');
|
||||
|
||||
textLines.push(job.Name);
|
||||
|
||||
if (job.ItemCount == 1) {
|
||||
textLines.push(globalize.translate('ValueItemCount', job.ItemCount));
|
||||
if (job.ItemCount === 1) {
|
||||
textLines.push(globalize.translate('sharedcomponents#ValueOneItem'));
|
||||
} else {
|
||||
textLines.push(globalize.translate('ValueItemCountPlural', job.ItemCount));
|
||||
textLines.push(globalize.translate('sharedcomponents#ItemCount', job.ItemCount));
|
||||
}
|
||||
|
||||
if (textLines >= 3) {
|
||||
@ -165,10 +170,10 @@ globalize.translate('CancelSyncJobConfirmation');
|
||||
|
||||
html += '<div class="detailSectionHeader">';
|
||||
|
||||
html += '<div>' + targetName + '</div>';
|
||||
html += '<h1>' + targetName + '</h1>';
|
||||
|
||||
html += '</div>';
|
||||
html += '<div class="itemsContainer vertical-list">';
|
||||
html += '<div class="itemsContainer vertical-list paperList">';
|
||||
hasOpenSection = true;
|
||||
}
|
||||
}
|
||||
@ -180,13 +185,13 @@ globalize.translate('CancelSyncJobConfirmation');
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
var elem = listInstance.options.element;
|
||||
var elem = listInstance.options.element.querySelector('.syncJobListContent');
|
||||
|
||||
if (!html) {
|
||||
if (isLocalSync) {
|
||||
html = '<div style="padding:1em .25em;">' + globalize.translate('MessageDownloadsFound') + '</div>';
|
||||
html = '<div style="padding:1em .25em;">' + globalize.translate('sharedcomponents#MessageNoDownloadsFound') + '</div>';
|
||||
} else {
|
||||
html = '<div style="padding:1em .25em;">' + globalize.translate('MessageNoSyncJobsFound') + '</div>';
|
||||
html = '<div style="padding:1em .25em;">' + globalize.translate('sharedcomponents#MessageNoSyncJobsFound') + '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,16 +265,16 @@ globalize.translate('CancelSyncJobConfirmation');
|
||||
|
||||
if (status == 'Cancelled') {
|
||||
menuItems.push({
|
||||
name: globalize.translate('ButtonDelete'),
|
||||
name: globalize.translate('sharedcomponents#Delete'),
|
||||
id: 'delete'
|
||||
});
|
||||
} else {
|
||||
var txt = listInstance.options.isLocalSync ?
|
||||
globalize.translate('RemoveDownload') :
|
||||
globalize.translate('ButtonCancelSyncJob');
|
||||
globalize.translate('sharedcomponents#RemoveDownload') :
|
||||
globalize.translate('sharedcomponents#ButtonCancelSyncJob');
|
||||
|
||||
menuItems.push({
|
||||
name: globalize.translate(txt),
|
||||
name: txt,
|
||||
id: 'cancel'
|
||||
});
|
||||
}
|
||||
@ -312,7 +317,14 @@ globalize.translate('ButtonCancelSyncJob');
|
||||
if (listItem) {
|
||||
var jobId = listItem.getAttribute('data-id');
|
||||
// edit job
|
||||
events.trigger(listInstance, 'jobedit', [jobId, listInstance.options.serverId]);
|
||||
require(['syncJobEditor'], function (syncJobEditor) {
|
||||
syncJobEditor.show({
|
||||
serverId: listInstance.options.serverId,
|
||||
jobId: jobId
|
||||
}).then(function () {
|
||||
fetchData(listInstance);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -327,8 +339,47 @@ globalize.translate('ButtonCancelSyncJob');
|
||||
options.element.addEventListener('click', onClickHandler);
|
||||
this.onClickHandler = onClickHandler;
|
||||
|
||||
options.element.innerHTML = '<div class="syncJobListContent"></div>';
|
||||
|
||||
fetchData(this);
|
||||
startListening(this);
|
||||
|
||||
initSupporterInfo(options.element, getApiClient(this));
|
||||
}
|
||||
|
||||
function showSupporterInfo(context) {
|
||||
|
||||
var html = '<button is="emby-button" class="raised button-accent block btnSyncSupporter" style="margin:1em 0;">';
|
||||
|
||||
html += '<div>';
|
||||
html += globalize.translate('sharedcomponents#HeaderSyncRequiresSub');
|
||||
html += '</div>';
|
||||
html += '<div style="margin-top:.5em;">';
|
||||
html += globalize.translate('sharedcomponents#LearnMore');
|
||||
html += '</div>';
|
||||
|
||||
html += '</button';
|
||||
|
||||
context.insertAdjacentHTML('afterbegin', html);
|
||||
|
||||
context.querySelector('.btnSyncSupporter').addEventListener('click', function () {
|
||||
|
||||
registrationServices.validateFeature('sync');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function initSupporterInfo(context, apiClient) {
|
||||
|
||||
apiClient.getPluginSecurityInfo().then(function (regInfo) {
|
||||
|
||||
if (!regInfo.IsMBSupporter) {
|
||||
showSupporterInfo(context, apiClient);
|
||||
}
|
||||
|
||||
}, function () {
|
||||
showSupporterInfo(context, apiClient);
|
||||
});
|
||||
}
|
||||
|
||||
syncJobList.prototype.destroy = function () {
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
var self = this;
|
||||
|
||||
options = options || {};
|
||||
self.options = options;
|
||||
|
||||
function resetSyncStatus() {
|
||||
@ -67,12 +68,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
syncToggle.prototype.refresh = function(item) {
|
||||
syncToggle.prototype.refresh = function (item) {
|
||||
|
||||
if (this.options) {
|
||||
this.options.item = item;
|
||||
updateSyncStatus(this.options.container, item);
|
||||
}
|
||||
this.options.item = item;
|
||||
updateSyncStatus(this.options.container, item);
|
||||
};
|
||||
|
||||
syncToggle.prototype.destroy = function () {
|
||||
|
@ -508,7 +508,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
||||
|
||||
@media all and (min-width: 800px) {
|
||||
|
||||
.mainDetailButtons, .recordingFields button {
|
||||
.mainDetailButtons, .itemDetailPage .recordingFields button {
|
||||
font-size: 110%;
|
||||
}
|
||||
}
|
||||
|
@ -16,17 +16,6 @@
|
||||
</style>
|
||||
<div data-role="content">
|
||||
|
||||
<div class="supporterPromotionContainer hide" style="text-align: right; position: static;">
|
||||
<div class="customSupporterPromotion supporterPromotion inlineSupporterPromotion">
|
||||
<button is="emby-button" type="button" class="raised button-accent block btnSyncSupporter">
|
||||
<div class="mainText">
|
||||
</div>
|
||||
<div class="btnLearnMore" style="font-weight: normal; margin-top: .25em;">
|
||||
${ButtonLearnMore}
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ehsContent" style="clear:both;">
|
||||
<br />
|
||||
<div class="localSyncStatus hide" style="text-align:right;margin:0 0 1em;">
|
||||
|
@ -1,32 +1,6 @@
|
||||
define(['apphost', 'globalize', 'syncJobList', 'events', 'localsync', 'emby-button', 'paper-icon-button-light'], function (appHost, globalize, syncJobList, events, localSync) {
|
||||
'use strict';
|
||||
|
||||
function initSupporterInfo(view, params) {
|
||||
|
||||
view.querySelector('.btnSyncSupporter').addEventListener('click', function () {
|
||||
|
||||
requirejs(["registrationServices"], function (registrationServices) {
|
||||
registrationServices.validateFeature('sync');
|
||||
});
|
||||
});
|
||||
|
||||
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) {
|
||||
|
||||
var interval;
|
||||
@ -71,22 +45,12 @@
|
||||
view.querySelector('.localSyncStatus').classList.add('hide');
|
||||
}
|
||||
|
||||
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('viewbeforeshow', function () {
|
||||
|
@ -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 () {
|
||||
|
@ -17,19 +17,6 @@
|
||||
<div data-role="content">
|
||||
<div class="content-primary">
|
||||
|
||||
<div class="supporterPromotionContainer" style="display:none;">
|
||||
<div class="customSupporterPromotion supporterPromotion">
|
||||
<a class="clearLink" href="http://emby.media/premiere" target="_blank">
|
||||
<button is="emby-button" type="button" class="raised block" style="text-transform:none;background-color:#52B54B;color:#fff;">
|
||||
<div class="mainText">
|
||||
</div>
|
||||
<div class="btnLearnMore" style="font-weight: normal; margin-top: 5px;">
|
||||
${ButtonLearnMore}
|
||||
</div>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align:right;">
|
||||
<button is="emby-button" type="button" class="raised btnSync subdued">
|
||||
<i class="md-icon">sync</i>
|
||||
|
Loading…
Reference in New Issue
Block a user