fixes #1277 - Web: Wrong position of image and buttons during "Play To"
This commit is contained in:
parent
781f63d9ac
commit
b6040d998e
8 changed files with 92 additions and 164 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.169",
|
||||
"_release": "1.4.169",
|
||||
"version": "1.4.170",
|
||||
"_release": "1.4.170",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.169",
|
||||
"commit": "af6acc90c4ff89041c8f0be115ec132389e7805b"
|
||||
"tag": "1.4.170",
|
||||
"commit": "61f0b1c9783d19db9b76882badbf575500dea6e9"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
}
|
||||
|
||||
.formDialogHeaderTitle {
|
||||
margin-left: .75em;
|
||||
margin-left: .5em;
|
||||
}
|
||||
|
||||
.formDialogContent {
|
||||
|
|
|
@ -59,14 +59,20 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
} catch (err) {
|
||||
if (options.actions) {
|
||||
options.actions = [];
|
||||
show(title, options, timeoutMs);
|
||||
showNonPersistentNotification(title, options, timeoutMs);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function show(title, options, timeoutMs) {
|
||||
function showNotification(options, timeoutMs, apiClient) {
|
||||
|
||||
var title = options.title;
|
||||
|
||||
options.data = options.data || {};
|
||||
options.data.serverId = apiClient.serverInfo().Id;
|
||||
options.icon = options.icon || getIconUrl();
|
||||
|
||||
resetRegistration();
|
||||
|
||||
|
@ -103,7 +109,7 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
});
|
||||
}
|
||||
|
||||
show(notification.title, notification, 15000);
|
||||
showNotification(notification, 15000, apiClient);
|
||||
}
|
||||
|
||||
function onLibraryChanged(data, apiClient) {
|
||||
|
@ -140,6 +146,9 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
}
|
||||
|
||||
function getIconUrl(name) {
|
||||
|
||||
name = name || 'notificationicon.png';
|
||||
|
||||
return require.toUrl('.').split('?')[0] + '/' + name;
|
||||
}
|
||||
|
||||
|
@ -153,8 +162,7 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
|
||||
var notification = {
|
||||
tag: "install" + installation.Id,
|
||||
data: {},
|
||||
icon: getIconUrl('/notificationicon.png')
|
||||
data: {}
|
||||
};
|
||||
|
||||
if (status == 'completed') {
|
||||
|
@ -173,8 +181,14 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
|
||||
notification.actions =
|
||||
[
|
||||
{ action: 'cancel-install-' + installation.Id, title: globalize.translate('sharedcomponents#ButtonCancel')/*, icon: 'https://example/like.png'*/ }
|
||||
{
|
||||
action: 'cancel-install',
|
||||
title: globalize.translate('sharedcomponents#ButtonCancel'),
|
||||
icon: getIconUrl()
|
||||
}
|
||||
];
|
||||
|
||||
notification.data.id = installation.id;
|
||||
}
|
||||
|
||||
if (status == 'progress') {
|
||||
|
@ -186,7 +200,7 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
|
||||
var timeout = status == 'cancelled' ? 5000 : 0;
|
||||
|
||||
show(notification.title, notification, timeout);
|
||||
showNotification(notification, timeout, apiClient);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -210,4 +224,41 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
showPackageInstallNotification(apiClient, data, "progress");
|
||||
});
|
||||
|
||||
events.on(serverNotifications, 'ServerShuttingDown', function (e, apiClient, data) {
|
||||
var serverId = apiClient.serverInfo().Id;
|
||||
var notification = {
|
||||
tag: "restart" + serverId,
|
||||
title: globalize.translate('sharedcomponents#ServerNameIsShuttingDown', apiClient.serverInfo().Name)
|
||||
};
|
||||
showNotification(notification, 0, apiClient);
|
||||
});
|
||||
|
||||
events.on(serverNotifications, 'ServerRestarting', function (e, apiClient, data) {
|
||||
var serverId = apiClient.serverInfo().Id;
|
||||
var notification = {
|
||||
tag: "restart" + serverId,
|
||||
title: globalize.translate('sharedcomponents#ServerNameIsRestarting', apiClient.serverInfo().Name)
|
||||
};
|
||||
showNotification(notification, 0, apiClient);
|
||||
});
|
||||
|
||||
events.on(serverNotifications, 'RestartRequired', function (e, apiClient, data) {
|
||||
|
||||
var serverId = apiClient.serverInfo().Id;
|
||||
var notification = {
|
||||
tag: "restart" + serverId,
|
||||
title: globalize.translate('sharedcomponents#PleaseRestartServerName', apiClient.serverInfo().Name)
|
||||
};
|
||||
|
||||
notification.actions =
|
||||
[
|
||||
{
|
||||
action: 'restart',
|
||||
title: globalize.translate('sharedcomponents#ButtonRestart'),
|
||||
icon: getIconUrl()
|
||||
}
|
||||
];
|
||||
|
||||
showNotification(notification, 0, apiClient);
|
||||
});
|
||||
});
|
|
@ -24,6 +24,7 @@
|
|||
"ButtonOk": "Ok",
|
||||
"ButtonCancel": "Cancel",
|
||||
"ButtonGotIt": "Got It",
|
||||
"ButtonRestart": "Restart",
|
||||
"RecordingCancelled": "Recording cancelled.",
|
||||
"RecordingScheduled": "Recording scheduled.",
|
||||
"SeriesRecordingScheduled": "Series recording scheduled.",
|
||||
|
@ -248,5 +249,8 @@
|
|||
"MessageItemSaved": "Item saved.",
|
||||
"SearchResults": "Search Results",
|
||||
"SyncToOtherDevice": "Sync to other device",
|
||||
"MakeAvailableOffline": "Make available offline"
|
||||
"MakeAvailableOffline": "Make available offline",
|
||||
"ServerNameIsRestarting": "Emby Server - {0} is restarting.",
|
||||
"ServerNameIsShuttingDown": "Emby Server - {0} is shutting down.",
|
||||
"PleaseRestartServerName": "Please restart Emby Server - {0}."
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue