Skip to content

Commit

Permalink
v1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sco01 committed Sep 21, 2019
1 parent a3ff4c6 commit 5a7728c
Show file tree
Hide file tree
Showing 8 changed files with 207 additions and 154 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion octoprint_dashboard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
24 changes: 24 additions & 0 deletions octoprint_dashboard/static/css/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
filter: contrast(0%);
vertical-align: middle;
padding: 3px;
}

#fullScreenIcon {
width: auto;
height: 15px;
float: right;
}

.dashboardSmall{
Expand Down Expand Up @@ -71,6 +76,7 @@ svg text {
fill: #08c;
}

/* Small Screens */
@media (max-width: 700px) {
#touch .dashboardGridItem {
text-align: center;
Expand All @@ -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;
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 20 additions & 3 deletions octoprint_dashboard/static/js/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Author: Stefan Cohen
* License: AGPLv3
*/
$(function() {
$(function() {
function DashboardViewModel(parameters) {
var self = this;

Expand Down Expand Up @@ -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)
Expand All @@ -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") {
Expand Down Expand Up @@ -155,3 +169,6 @@ $(function() {
elements: [ "#tab_plugin_dashboard" ]
});
});



9 changes: 7 additions & 2 deletions octoprint_dashboard/templates/dashboard_settings.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,21 @@
</label>
</div>
</div>
<!--

<legend>{{ _('Advanced Settings') }}</legend>
<div class="control-group">
<div >
<label class="checkbox">{{ _('Enable Fullscreen Mode (Experimental)') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.showFullscreen">
</label>
</div>
<div >
<label class="checkbox">{{ _('Hide hotend(s) when target temp = 0 (Experimental)') }}
<input type="checkbox" data-bind="checked: settings.plugins.dashboard.hideHotend">
</label>
</div>
</div>
-->

</form>


298 changes: 152 additions & 146 deletions octoprint_dashboard/templates/dashboard_tab.jinja2

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5a7728c

Please sign in to comment.