Browse Source

add new app icon; tweak worker for notificationclick on android chrome

Andrew Dolgov 6 months ago
parent
commit
c5285e2f21
5 changed files with 6 additions and 5 deletions
  1. 1 0
      .gitignore
  2. BIN
      images/icon-app.png
  3. 2 2
      index.php
  4. 2 2
      manifest.json
  5. 1 1
      worker.js

+ 1 - 0
.gitignore

@@ -13,6 +13,7 @@ lib/*.jar
 out
 build.number
 lock/*.lock
+emoticons/*/*
 emoticons/*.gif
 emoticons/*.webp
 emoticons/*.png

BIN
images/icon-app.png


+ 2 - 2
index.php

@@ -56,12 +56,12 @@
 	<link id="favicon" rel="shortcut icon" type="image/png" href="images/favicon.png" />
 
 	<link rel="icon" type="image/png" sizes="144x144"
-		href="images/icon-hires.png" />
+		href="images/icon-app.png" />
 
 	<meta name="mobile-web-app-capable" content="yes">
 	<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
 
-	<link rel="manifest" href="manifest.json">
+	<link rel="manifest" href="manifest.json?v2">
 
 	<meta name="referrer" content="no-referrer">
 

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
   "name": "Tiny Tiny IRC",
   "icons": [
     {
-      "src": "images/icon-hires.png",
-      "sizes": "144x144",
+      "src": "images/icon-app.png",
+      "sizes": "192x192",
       "type": "image/png",
       "density": 4.0
     }

+ 1 - 1
worker.js

@@ -1,7 +1,7 @@
 self.addEventListener('notificationclick', function (event) {
 	event.notification.close();
 
-	event.waitUntil(clients.matchAll({type: 'window'}).then((windows) => {
+	event.waitUntil(clients.matchAll({includeUncontrolled: true, type: 'window'}).then((windows) => {
 		for (let i = 0; i < windows.length; i++) {
 			if (windows[i].url == event.notification.data) {
 				console.log('focusing window', windows[i]);