mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 11:28:23 -07:00
commit
80891c2364
Binary file not shown.
Before Width: | Height: | Size: 24 KiB |
@ -3,6 +3,8 @@ import { playbackManager } from '../playback/playbackmanager';
|
||||
import { Events } from 'jellyfin-apiclient';
|
||||
import globalize from '../../scripts/globalize';
|
||||
|
||||
import NotificationIcon from './notificationicon.png';
|
||||
|
||||
function onOneDocumentClick() {
|
||||
document.removeEventListener('click', onOneDocumentClick);
|
||||
document.removeEventListener('keydown', onOneDocumentClick);
|
||||
@ -71,8 +73,8 @@ function showNotification(options, timeoutMs, apiClient) {
|
||||
|
||||
options.data = options.data || {};
|
||||
options.data.serverId = apiClient.serverInfo().Id;
|
||||
options.icon = options.icon || getIconUrl();
|
||||
options.badge = options.badge || getIconUrl('badge.png');
|
||||
options.icon = options.icon || NotificationIcon;
|
||||
options.badge = options.badge || NotificationIcon;
|
||||
|
||||
resetRegistration();
|
||||
|
||||
@ -148,11 +150,6 @@ function onLibraryChanged(data, apiClient) {
|
||||
});
|
||||
}
|
||||
|
||||
function getIconUrl(name) {
|
||||
name = name || 'notificationicon.png';
|
||||
return './components/notifications/' + name;
|
||||
}
|
||||
|
||||
function showPackageInstallNotification(apiClient, installation, status) {
|
||||
apiClient.getCurrentUser().then(function (user) {
|
||||
if (!user.Policy.IsAdministrator) {
|
||||
@ -180,7 +177,7 @@ function showPackageInstallNotification(apiClient, installation, status) {
|
||||
{
|
||||
action: 'cancel-install',
|
||||
title: globalize.translate('ButtonCancel'),
|
||||
icon: getIconUrl()
|
||||
icon: NotificationIcon
|
||||
}
|
||||
];
|
||||
|
||||
@ -249,7 +246,7 @@ Events.on(serverNotifications, 'RestartRequired', function (e, apiClient) {
|
||||
{
|
||||
action: 'restart',
|
||||
title: globalize.translate('Restart'),
|
||||
icon: getIconUrl()
|
||||
icon: NotificationIcon
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -20,6 +20,8 @@ import ServerConnections from '../ServerConnections';
|
||||
import { playbackManager } from '../playback/playbackmanager';
|
||||
import template from './recordingcreator.template.html';
|
||||
|
||||
import PlaceholderImage from './empty.png';
|
||||
|
||||
let currentDialog;
|
||||
let closeAction;
|
||||
let currentRecordingFields;
|
||||
@ -70,7 +72,7 @@ function renderRecording(context, defaultTimer, program, apiClient, refreshRecor
|
||||
const imageContainer = context.querySelector('.recordingDialog-imageContainer');
|
||||
|
||||
if (imgUrl) {
|
||||
imageContainer.innerHTML = '<img src="./empty.png" data-src="' + imgUrl + '" class="recordingDialog-img lazy" />';
|
||||
imageContainer.innerHTML = `<img src="${PlaceholderImage}" data-src="${imgUrl}" class="recordingDialog-img lazy" />`;
|
||||
imageContainer.classList.remove('hide');
|
||||
|
||||
imageLoader.lazyChildren(imageContainer);
|
||||
|
Loading…
Reference in New Issue
Block a user