mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update card layouts
This commit is contained in:
parent
614e07a81d
commit
cee7db2ce0
29 changed files with 194 additions and 71 deletions
|
@ -40,14 +40,11 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
|
||||
resetRegistration();
|
||||
|
||||
function show(title, options, timeoutMs) {
|
||||
function showPersistentNotification(title, options, timeoutMs) {
|
||||
serviceWorkerRegistration.showNotification(title, options);
|
||||
}
|
||||
|
||||
resetRegistration();
|
||||
|
||||
if (serviceWorkerRegistration && !timeoutMs) {
|
||||
serviceWorkerRegistration.showNotification(title, options);
|
||||
return;
|
||||
}
|
||||
function showNonPersistentNotification(title, options, timeoutMs) {
|
||||
|
||||
try {
|
||||
var notif = new Notification(title, options);
|
||||
|
@ -69,6 +66,18 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
}
|
||||
}
|
||||
|
||||
function show(title, options, timeoutMs) {
|
||||
|
||||
resetRegistration();
|
||||
|
||||
if (serviceWorkerRegistration) {
|
||||
showPersistentNotification(title, options, timeoutMs);
|
||||
return;
|
||||
}
|
||||
|
||||
showNonPersistentNotification(title, options, timeoutMs);
|
||||
}
|
||||
|
||||
function showNewItemNotification(item, apiClient) {
|
||||
|
||||
var notification = {
|
||||
|
@ -162,10 +171,10 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir
|
|||
else if (status == 'progress') {
|
||||
notification.title = globalize.translate('sharedcomponents#InstallingPackage').replace('{0}', installation.Name + ' ' + installation.Version);
|
||||
|
||||
//notification.actions =
|
||||
//[
|
||||
// { action: 'cancel', title: globalize.translate('sharedcomponents#ButtonCancel')/*, icon: 'https://example/like.png'*/ }
|
||||
//];
|
||||
notification.actions =
|
||||
[
|
||||
{ action: 'cancel-install-' + installation.Id, title: globalize.translate('sharedcomponents#ButtonCancel')/*, icon: 'https://example/like.png'*/ }
|
||||
];
|
||||
}
|
||||
|
||||
if (status == 'progress') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue