From: Calin Crisan Date: Mon, 7 Nov 2016 22:49:55 +0000 (+0200) Subject: added web app manifest support; better icon X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=fd3fa1f2444ffb1b71c38140ff97db7ee59bf2e7;p=motioneye-debian added web app manifest support; better icon --- diff --git a/motioneye/handlers.py b/motioneye/handlers.py index 3cceeb6..1db2f1a 100644 --- a/motioneye/handlers.py +++ b/motioneye/handlers.py @@ -214,6 +214,15 @@ class MainHandler(BaseHandler): mask_width=utils.MASK_WIDTH) +class ManifestHandler(BaseHandler): + def get(self): + import motioneye + + self.set_header('Content-Type', 'application/manifest+json') + self.set_header('Cache-Control', 'max-age=2592000') # 30 days + self.render('manifest.json', version=motioneye.VERSION) + + class ConfigHandler(BaseHandler): @asynchronous def get(self, camera_id=None, op=None): diff --git a/motioneye/server.py b/motioneye/server.py index 677953a..8ae5eb0 100644 --- a/motioneye/server.py +++ b/motioneye/server.py @@ -167,6 +167,7 @@ def _log_request(handler): handler_mapping = [ (r'^/$', handlers.MainHandler), + (r'^/manifest.json$', handlers.ManifestHandler), (r'^/config/main/(?Pset|get)/?$', handlers.ConfigHandler), (r'^/config/(?P\d+)/(?Pget|set|rem|set_preview|test|authorize)/?$', handlers.ConfigHandler), (r'^/config/(?Padd|list|backup|restore)/?$', handlers.ConfigHandler), diff --git a/motioneye/static/favicon.ico b/motioneye/static/favicon.ico index 6cb844d..a419e17 100644 Binary files a/motioneye/static/favicon.ico and b/motioneye/static/favicon.ico differ diff --git a/motioneye/static/img/favicon.ico b/motioneye/static/img/favicon.ico new file mode 100644 index 0000000..b0a4b82 Binary files /dev/null and b/motioneye/static/img/favicon.ico differ diff --git a/motioneye/static/img/launcher-icon-144.png b/motioneye/static/img/launcher-icon-144.png new file mode 100644 index 0000000..c5b4332 Binary files /dev/null and b/motioneye/static/img/launcher-icon-144.png differ diff --git a/motioneye/static/img/launcher-icon-192.png b/motioneye/static/img/launcher-icon-192.png new file mode 100644 index 0000000..fbbcfdf Binary files /dev/null and b/motioneye/static/img/launcher-icon-192.png differ diff --git a/motioneye/static/img/launcher-icon-256.png b/motioneye/static/img/launcher-icon-256.png new file mode 100644 index 0000000..ee293f5 Binary files /dev/null and b/motioneye/static/img/launcher-icon-256.png differ diff --git a/motioneye/static/img/launcher-icon-96.png b/motioneye/static/img/launcher-icon-96.png new file mode 100644 index 0000000..a95881c Binary files /dev/null and b/motioneye/static/img/launcher-icon-96.png differ diff --git a/motioneye/static/img/motioneye-icon.svg b/motioneye/static/img/motioneye-icon.svg index 93dfd9c..8e376d0 100644 --- a/motioneye/static/img/motioneye-icon.svg +++ b/motioneye/static/img/motioneye-icon.svg @@ -7,11 +7,12 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg2" version="1.1" - inkscape:version="0.48.4 r9939" + inkscape:version="0.91 r13725" width="64" height="64" xml:space="preserve" @@ -21,9 +22,424 @@ inkscape:export-ydpi="960">image/svg+xml \ No newline at end of file + style="fill:#737373;fill-opacity:1;stroke:none;filter:url(#filter4339)" + d="m 25.6,47.2 c -4.373944,0 -8.437159,-1.399808 -11.838461,-3.634616 3.677605,-0.394237 7.305921,-1.342945 11.423077,-3.375 4.166157,2.122533 8.434154,3.008875 12.279808,3.452886 C 34.057131,45.890032 29.986674,47.2 25.6,47.2 Z" + id="path4248" /> \ No newline at end of file diff --git a/motioneye/templates/base.html b/motioneye/templates/base.html index ecf5893..8386a85 100644 --- a/motioneye/templates/base.html +++ b/motioneye/templates/base.html @@ -5,14 +5,17 @@ + - + + {% endblock %} {% block title %}{% endblock %} {% block style %} + {% endblock %} {% block script %}