diff --git a/README.md b/README.md index 4e98846..acb9bf1 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ The dashboard uses the time estimates provided by PrintTimeGenius if it is insta Inspired by OctoDash: https://github.com/UnchartedBull/OctoDash/ Icons from: http://www.iconninja.com -Github Contributors: Andy Harrison (wizard04wsu), Doug Hoyt (doughoyt) +Github Contributors: Andy Harrison (wizard04wsu), Doug Hoyt (doughoyt), (j7126) ## Setup diff --git a/octoprint_dashboard/__init__.py b/octoprint_dashboard/__init__.py index b83ae2d..befbaaf 100644 --- a/octoprint_dashboard/__init__.py +++ b/octoprint_dashboard/__init__.py @@ -51,7 +51,8 @@ def get_settings_defaults(self): showWebCam=False, showSystemInfo=False, showProgress=True, - hideHotend=False + hideHotend=False, + showFullscreen=False ) def get_template_configs(self): diff --git a/octoprint_dashboard/static/css/dashboard.css b/octoprint_dashboard/static/css/dashboard.css index cb56229..dd8c4b1 100644 --- a/octoprint_dashboard/static/css/dashboard.css +++ b/octoprint_dashboard/static/css/dashboard.css @@ -22,7 +22,12 @@ filter: contrast(0%); vertical-align: middle; padding: 3px; +} +#fullScreenIcon { + width: auto; + height: 15px; + float: right; } .dashboardSmall{ @@ -71,6 +76,7 @@ svg text { fill: #08c; } +/* Small Screens */ @media (max-width: 700px) { #touch .dashboardGridItem { text-align: center; @@ -89,3 +95,21 @@ svg text { } } +/* FullScreen. TODO: Could need some love ; */ +.dasboardContainer:-moz-full-screen { + width: 90vw; + height: 90vh; +} +.dasboardContainer:-ms-fullscreen { + width: 90vw; + height: 90vh; +} +.dasboardContainer:-webkit-full-screen { + width: 90vw; + height: 90vh; +} +.dasboardContainer:fullscreen { + width: 90vw; + height: 90vh; +} + diff --git a/octoprint_dashboard/static/img/fullscreen-icon.png b/octoprint_dashboard/static/img/fullscreen-icon.png new file mode 100644 index 0000000..981814c Binary files /dev/null and b/octoprint_dashboard/static/img/fullscreen-icon.png differ diff --git a/octoprint_dashboard/static/js/dashboard.js b/octoprint_dashboard/static/js/dashboard.js index bca5825..f0b535a 100644 --- a/octoprint_dashboard/static/js/dashboard.js +++ b/octoprint_dashboard/static/js/dashboard.js @@ -4,7 +4,7 @@ * Author: Stefan Cohen * License: AGPLv3 */ -$(function() { +$(function() { function DashboardViewModel(parameters) { var self = this; @@ -35,8 +35,7 @@ $(function() { self.diskUsagePercent = ko.observable(0); self.cpuTemp = ko.observable(0); - - + //Notify user if displaylayerprogress plugin is not installed self.DisplayLayerProgressAvailable = function() { if (self.settingsViewModel.settings.plugins.DisplayLayerProgress) @@ -52,6 +51,21 @@ $(function() { } }; + self.fullScreen = function() { + var elem = document.getElementById("dasboardContainer"); + if (elem.requestFullscreen) { + elem.requestFullscreen(); + } else if (elem.mozRequestFullScreen) { /* Firefox */ + elem.mozRequestFullScreen(); + } else if (elem.webkitRequestFullscreen) { /* Chrome, Safari & Opera */ + elem.webkitRequestFullscreen(); + } else if (elem.msRequestFullscreen) { /* IE/Edge */ + elem.msRequestFullscreen(); + } + + return + } + //Events from displaylayerprogress Plugin self.onDataUpdaterPluginMessage = function(plugin, data) { if (plugin != "dashboard") { @@ -155,3 +169,6 @@ $(function() { elements: [ "#tab_plugin_dashboard" ] }); }); + + + diff --git a/octoprint_dashboard/templates/dashboard_settings.jinja2 b/octoprint_dashboard/templates/dashboard_settings.jinja2 index 056dee8..2a985b6 100644 --- a/octoprint_dashboard/templates/dashboard_settings.jinja2 +++ b/octoprint_dashboard/templates/dashboard_settings.jinja2 @@ -54,16 +54,21 @@ - + diff --git a/octoprint_dashboard/templates/dashboard_tab.jinja2 b/octoprint_dashboard/templates/dashboard_tab.jinja2 index 89e13ac..aadc5b9 100644 --- a/octoprint_dashboard/templates/dashboard_tab.jinja2 +++ b/octoprint_dashboard/templates/dashboard_tab.jinja2 @@ -1,165 +1,171 @@ - -
- - -
- -
- - -
-
-
- - -
-
- - -
- - -
- - -
-
- - -
-
- - -
- - - - -
- - - - - - - - - -
- - - -
- - - - - - - - -
- - -
- - - - - - - -
- -
- - - - - - Fan Speed - - -
-
+
+ + + +
+ + +
+ +
+ + +
+
+
+ + +
+
+ + +
+ + +
+ + +
+
+ + +
+
+ + +
+ + + + +
+ + + + + + + + + +
+ + + +
+ + + + + + + + +
- -
-
-
- - - - + +
+ + + + + + -
-
- - -
-
- -
- + + +
+ + + + + + Fan Speed + +
-
- - -
- - -
-
- -
- - + +
+
+
+ + + + + +
+
-
- -
-
- + + +
+
+ +
+ +
+ +
- - + +
- -
- - - -
-
- - - -
-
- - -
-
- - - -
- - -
-
-
- +
+ +
+ + +
+
+ +
+
+ +
+
+
+ + +
+ + +
+ + + +
+
+ + + +
+
+ + +
+ +
+ + + +
+ + +
+
+
+ +
\ No newline at end of file diff --git a/setup.py b/setup.py index c98a826..7a14515 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ plugin_name = "OctoPrint-Dashboard" # The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module -plugin_version = "1.3.1" +plugin_version = "1.4.0" # The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin # module