mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix image path for notification icon
This commit is contained in:
parent
aa17b14cff
commit
c045af621d
2 changed files with 6 additions and 9 deletions
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 { Events } from 'jellyfin-apiclient';
|
||||||
import globalize from '../../scripts/globalize';
|
import globalize from '../../scripts/globalize';
|
||||||
|
|
||||||
|
import NotificationIcon from './notificationicon.png';
|
||||||
|
|
||||||
function onOneDocumentClick() {
|
function onOneDocumentClick() {
|
||||||
document.removeEventListener('click', onOneDocumentClick);
|
document.removeEventListener('click', onOneDocumentClick);
|
||||||
document.removeEventListener('keydown', onOneDocumentClick);
|
document.removeEventListener('keydown', onOneDocumentClick);
|
||||||
|
@ -71,8 +73,8 @@ function showNotification(options, timeoutMs, apiClient) {
|
||||||
|
|
||||||
options.data = options.data || {};
|
options.data = options.data || {};
|
||||||
options.data.serverId = apiClient.serverInfo().Id;
|
options.data.serverId = apiClient.serverInfo().Id;
|
||||||
options.icon = options.icon || getIconUrl();
|
options.icon = options.icon || NotificationIcon;
|
||||||
options.badge = options.badge || getIconUrl('badge.png');
|
options.badge = options.badge || NotificationIcon;
|
||||||
|
|
||||||
resetRegistration();
|
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) {
|
function showPackageInstallNotification(apiClient, installation, status) {
|
||||||
apiClient.getCurrentUser().then(function (user) {
|
apiClient.getCurrentUser().then(function (user) {
|
||||||
if (!user.Policy.IsAdministrator) {
|
if (!user.Policy.IsAdministrator) {
|
||||||
|
@ -180,7 +177,7 @@ function showPackageInstallNotification(apiClient, installation, status) {
|
||||||
{
|
{
|
||||||
action: 'cancel-install',
|
action: 'cancel-install',
|
||||||
title: globalize.translate('ButtonCancel'),
|
title: globalize.translate('ButtonCancel'),
|
||||||
icon: getIconUrl()
|
icon: NotificationIcon
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -249,7 +246,7 @@ Events.on(serverNotifications, 'RestartRequired', function (e, apiClient) {
|
||||||
{
|
{
|
||||||
action: 'restart',
|
action: 'restart',
|
||||||
title: globalize.translate('Restart'),
|
title: globalize.translate('Restart'),
|
||||||
icon: getIconUrl()
|
icon: NotificationIcon
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue