diff --git a/daemon.py b/daemon.py index ee80dc8a..cb91b7b4 100644 --- a/daemon.py +++ b/daemon.py @@ -1245,6 +1245,61 @@ class PubServer(BaseHTTPRequestHandler): self._benchmarkGETtimings(GETstartTime, GETtimings, 4) + if '/manifest.json' in self.path: + manifest = { + "name": "Epicyon", + "short_name": "Epicyon", + "start_url": "/index.html", + "display": "standalone", + "background_color": "black", + "theme_color": "grey", + "orientation": "portrait-primary", + "icons": [ + { + "src": "/logo72.png", + "type": "image/png", + "sizes": "72x72" + }, + { + "src": "/logo96.png", + "type": "image/png", + "sizes": "96x96" + }, + { + "src": "/logo128.png", + "type": "image/png", + "sizes": "128x128" + }, + { + "src": "/logo144.png", + "type": "image/png", + "sizes": "144x144" + }, + { + "src": "/logo152.png", + "type": "image/png", + "sizes": "152x152" + }, + { + "src": "/logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "/logo256.png", + "type": "image/png", + "sizes": "256x256" + } + ] + } + msg = json.dumps(manifest, + ensure_ascii=False).encode('utf-8') + self._set_headers('application/json', + len(msg), + None, callingDomain) + self._write(msg) + return + # favicon image if 'favicon.ico' in self.path: favType = 'image/x-icon' @@ -1836,6 +1891,13 @@ class PubServer(BaseHTTPRequestHandler): self.path == '/login.webp' or \ self.path == '/login.jpeg' or \ self.path == '/login.jpg' or \ + self.path == '/logo72.png' or \ + self.path == '/logo96.png' or \ + self.path == '/logo128.png' or \ + self.path == '/logo144.png' or \ + self.path == '/logo152.png' or \ + self.path == '/logo192.png' or \ + self.path == '/logo256.png' or \ self.path == '/qrcode.png': mediaFilename = \ self.server.baseDir + '/accounts' + self.path diff --git a/img/logo128.png b/img/logo128.png new file mode 100644 index 00000000..4a7683ca Binary files /dev/null and b/img/logo128.png differ diff --git a/img/logo144.png b/img/logo144.png new file mode 100644 index 00000000..c644defa Binary files /dev/null and b/img/logo144.png differ diff --git a/img/logo152.png b/img/logo152.png new file mode 100644 index 00000000..011235ee Binary files /dev/null and b/img/logo152.png differ diff --git a/img/logo192.png b/img/logo192.png new file mode 100644 index 00000000..ee9bf1e9 Binary files /dev/null and b/img/logo192.png differ diff --git a/img/logo256.png b/img/logo256.png new file mode 100644 index 00000000..c5c087e4 Binary files /dev/null and b/img/logo256.png differ diff --git a/img/logo72.png b/img/logo72.png new file mode 100644 index 00000000..3f13793c Binary files /dev/null and b/img/logo72.png differ diff --git a/img/logo96.png b/img/logo96.png new file mode 100644 index 00000000..98ef5f5c Binary files /dev/null and b/img/logo96.png differ diff --git a/webinterface.py b/webinterface.py index 6a84dc8a..4028e531 100644 --- a/webinterface.py +++ b/webinterface.py @@ -2297,6 +2297,7 @@ def htmlHeader(cssFilename: str, css: str, lang='en') -> str: htmlStr += ' \n' htmlStr += ' \n' + htmlStr += ' \n' htmlStr += ' \n' htmlStr += ' \n' return htmlStr