Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

@@ -86,7 +86,7 @@ self.addEventListener("push", (e) => {
throw new Error("Server error");
}
const { body, url, grouped, groupedTitle, groupedUrl, icon, image } = data;
const { body, url, grouped, groupedTitle, groupedUrl, icon, image, unreadCount } = data;
let { title } = data;
let tag;
@@ -94,6 +94,11 @@ self.addEventListener("push", (e) => {
tag = data.tag.substr(0, 30);
}
if ( unreadCount && 'setAppBadge' in navigator )
{
navigator.setAppBadge(unreadCount);
}
let options = {
body,
icon: icon ? icon : NOTIFICATION_ICON,
@@ -0,0 +1,38 @@
<?php
use IPS\Output;
use IPS\Output\Javascript;
use IPS\Request;
define('REPORT_EXCEPTIONS', TRUE);
require_once '../../../../init.php';
$content = <<<JS
;(() => {
"use strict";
Debug.log( "No component supplied in the request." );
})();
JS;
if ( isset( Request::i()->component ) )
{
try
{
$content = Javascript::generateWebComponent( Request::i()->component );
}
catch ( Exception $e )
{
$encodedComponent = json_encode( Request::i()->component );
$content = <<<JS
;(() => {
"use strict";
Debug.log( "The source file for the component " + {$encodedComponent} + " could not be found." );
})();
JS;
}
}
$cacheHeaders = ( \IPS\IN_DEV ) ? Output::getNoCacheHeaders() : Output::getCacheHeaders( time(), 360 );
Output::i()->sendOutput( $content, 200, 'text/javascript', $cacheHeaders );