mirror of https://gitlab.com/bashrc2/epicyon
Support for ms desktop icon
parent
6ed992faaf
commit
523a6bca24
47
daemon.py
47
daemon.py
|
@ -6038,11 +6038,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"sizes": "96x96"
|
"sizes": "96x96"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"src": "/logo120.png",
|
|
||||||
"type": "image/png",
|
|
||||||
"sizes": "120x120"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"src": "/logo128.png",
|
"src": "/logo128.png",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
|
@ -6053,6 +6048,11 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"sizes": "144x144"
|
"sizes": "144x144"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"src": "/logo150.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "150x150"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"src": "/logo152.png",
|
"src": "/logo152.png",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
|
@ -6102,6 +6102,33 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
'_GET', '_progressiveWebAppManifest',
|
'_GET', '_progressiveWebAppManifest',
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
|
|
||||||
|
def _browserConfig(self, callingDomain: str, GETstartTime) -> None:
|
||||||
|
"""Used by MS Windows to put an icon on the desktop if you
|
||||||
|
link to a website
|
||||||
|
"""
|
||||||
|
xmlStr = \
|
||||||
|
'<?xml version="1.0" encoding="utf-8"?>\n' + \
|
||||||
|
'<browserconfig>\n' + \
|
||||||
|
' <msapplication>\n' + \
|
||||||
|
' <tile>\n' + \
|
||||||
|
' <square150x150logo src="/logo150.png"/>\n' + \
|
||||||
|
' <TileColor>#eeeeee</TileColor>\n' + \
|
||||||
|
' </tile>\n' + \
|
||||||
|
' </msapplication>\n' + \
|
||||||
|
'</browserconfig>'
|
||||||
|
|
||||||
|
msg = json.dumps(xmlStr,
|
||||||
|
ensure_ascii=False).encode('utf-8')
|
||||||
|
msglen = len(msg)
|
||||||
|
self._set_headers('application/xml', msglen,
|
||||||
|
None, callingDomain, False)
|
||||||
|
self._write(msg)
|
||||||
|
if self.server.debug:
|
||||||
|
print('Sent browserconfig: ' + callingDomain)
|
||||||
|
fitnessPerformance(GETstartTime, self.server.fitness,
|
||||||
|
'_GET', '_browserConfig',
|
||||||
|
self.server.debug)
|
||||||
|
|
||||||
def _getFavicon(self, callingDomain: str,
|
def _getFavicon(self, callingDomain: str,
|
||||||
baseDir: str, debug: bool,
|
baseDir: str, debug: bool,
|
||||||
favFilename: str) -> None:
|
favFilename: str) -> None:
|
||||||
|
@ -12411,6 +12438,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
else:
|
else:
|
||||||
self.path = '/'
|
self.path = '/'
|
||||||
|
|
||||||
|
if '/browserconfig.xml' in self.path:
|
||||||
|
if self._hasAccept(callingDomain):
|
||||||
|
if not self._requestHTTP():
|
||||||
|
self._browserConfig(callingDomain, GETstartTime)
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
self.path = '/'
|
||||||
|
|
||||||
# default newswire favicon, for links to sites which
|
# default newswire favicon, for links to sites which
|
||||||
# have no favicon
|
# have no favicon
|
||||||
if 'newswire_favicon.ico' in self.path:
|
if 'newswire_favicon.ico' in self.path:
|
||||||
|
@ -13490,9 +13525,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
# which support progressive web apps
|
# which support progressive web apps
|
||||||
if self.path == '/logo72.png' or \
|
if self.path == '/logo72.png' or \
|
||||||
self.path == '/logo96.png' or \
|
self.path == '/logo96.png' or \
|
||||||
self.path == '/logo120.png' or \
|
|
||||||
self.path == '/logo128.png' or \
|
self.path == '/logo128.png' or \
|
||||||
self.path == '/logo144.png' or \
|
self.path == '/logo144.png' or \
|
||||||
|
self.path == '/logo150.png' or \
|
||||||
self.path == '/logo152.png' or \
|
self.path == '/logo152.png' or \
|
||||||
self.path == '/logo192.png' or \
|
self.path == '/logo192.png' or \
|
||||||
self.path == '/logo256.png' or \
|
self.path == '/logo256.png' or \
|
||||||
|
|
BIN
img/logo120.png
BIN
img/logo120.png
Binary file not shown.
Before Width: | Height: | Size: 17 KiB |
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue