mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Resolve #1007
This commit is contained in:
parent
014d22add9
commit
308c7197c7
|
@ -160,11 +160,6 @@ $tar->addFromString('index.php', $index);
|
|||
$zip->addFile('README.md');
|
||||
$tar->addFile('README.md');
|
||||
|
||||
$data = file_get_contents('dev/serviceworker.js');
|
||||
//$data = file_get_contents('snappymail/v/0.0.0/static/js/min/serviceworker.min.js');
|
||||
$zip->addFromString('serviceworker.js', $data);
|
||||
$tar->addFromString('serviceworker.js', $data);
|
||||
|
||||
$zip->close();
|
||||
|
||||
$tar->compress(Phar::GZ);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as Links from 'Common/Links';
|
||||
import { staticLink } from 'Common/Links';
|
||||
import { addObservablesTo } from 'External/ko';
|
||||
import { fireEvent } from 'Common/Globals';
|
||||
|
||||
|
@ -61,7 +61,7 @@ export const NotificationUserStore = new class {
|
|||
if (DesktopNotifications && NotificationsGranted()) {
|
||||
const options = {
|
||||
body: text,
|
||||
icon: imageSrc || Links.staticLink('images/icon-message-notification.png'),
|
||||
icon: imageSrc || staticLink('images/icon-message-notification.png'),
|
||||
data: messageData
|
||||
};
|
||||
if (messageData?.uid) {
|
||||
|
@ -69,8 +69,7 @@ export const NotificationUserStore = new class {
|
|||
}
|
||||
if (WorkerNotifications) {
|
||||
// Service-Worker-Allowed HTTP header to allow the scope.
|
||||
WorkerNotifications.register('./serviceworker.js')
|
||||
// WorkerNotifications.register(Links.staticLink('js/serviceworker.js'), {scope:'/'})
|
||||
WorkerNotifications.register(staticLink('js/serviceworker.js'), {scope:'/'})
|
||||
.then(() =>
|
||||
WorkerNotifications.ready.then(registration =>
|
||||
/* Show the notification */
|
||||
|
|
Loading…
Reference in a new issue