Set the toolbar color on Android
This commit is contained in:
1 parent
ee216ddc93
commit
47d10a6d3e
3 files changed
+26
No files matched your search
@@ -113,6 +113,7 @@ date of first contribution):
|
||||
* [Ben Yarmis](https://github.com/byarmis)
|
||||
* [Florian Heilmann](https://github.com/FHeilmann)
|
||||
* [Ludovico de Nittis](https://github.com/RyuzakiKK)
|
||||
* [Dominik Paľo](https://github.com/DominikPalo)
|
||||
|
||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||
|
||||
@@ -112,6 +112,30 @@ $(function() {
|
||||
else
|
||||
return gettext("OctoPrint");
|
||||
});
|
||||
|
||||
self.theme_color = ko.pureComputed(function() {
|
||||
switch (self.color()) {
|
||||
case "red":
|
||||
return "#bb645f";
|
||||
case "orange":
|
||||
return "#e39665";
|
||||
case "yellow":
|
||||
return "#e3d765;";
|
||||
case "green":
|
||||
return "#98f064";
|
||||
case "blue":
|
||||
return "#2e63cc";
|
||||
case "violet":
|
||||
return "#9864f0";
|
||||
case "black":
|
||||
return "#4f4f4f";
|
||||
case "white":
|
||||
return "#e9e9e9";
|
||||
case "default":
|
||||
default:
|
||||
return "#ebebeb";
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
OCTOPRINT_VIEWMODELS.push({
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
<meta name="robots" content="noindex, nofollow, noimageindex">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<meta name="theme-color" data-bind="attr: { content: theme_color }">
|
||||
|
||||
{% include 'stylesheets.jinja2' %}
|
||||
{% include 'initscript.jinja2' %}
|
||||
|
||||
Reference in new issue
Block a user