From 1c6e0d442ef0af1f366cb82143b947b75978deec Mon Sep 17 00:00:00 2001 From: ntoff Date: Sat, 18 Nov 2017 08:00:16 +1000 Subject: [PATCH] changes to the settings page added helpful popup hints and removed the somewhat obvious line of text about limiting the fans output. --- octoprint_fanspeedslider/static/js/fanslider.js | 6 ++++++ .../templates/fanspeedslider_settings.jinja2 | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/octoprint_fanspeedslider/static/js/fanslider.js b/octoprint_fanspeedslider/static/js/fanslider.js index 362dc63..1ce241c 100644 --- a/octoprint_fanspeedslider/static/js/fanslider.js +++ b/octoprint_fanspeedslider/static/js/fanslider.js @@ -18,6 +18,12 @@ $(function () { self.settings.maxFanSpeed = new ko.observable(100); //and this are percents 0 - 100% self.settings.notifyDelay = new ko.observable(4000); //time in milliseconds + self.settings.commonTitle = ko.observable(gettext("\n\nThis allows limiting the cooling fan without having to re-slice your model.\n\nLimited to prints controlled by OctoPrint.")); + self.settings.defaultTitle = ko.observable(gettext("This is the value the slider will default to when the UI is loaded / refreshed.")); + self.settings.minTitle = ko.observable(gettext("Set this to the lowest value at which your fan will spin.") + self.settings.commonTitle()); + self.settings.maxTitle = ko.observable(gettext("Set this <100% if your cooling fan is too strong on full.") + self.settings.commonTitle()); + self.settings.noticeTitle = ko.observable(gettext("Notifications only apply when setting the speed via the slider + button in the UI. Set to 0 (zero) to disable notifications.")); + self.showNotify = function (self, options) { options.hide = true; options.title = "Fan Speed Control"; diff --git a/octoprint_fanspeedslider/templates/fanspeedslider_settings.jinja2 b/octoprint_fanspeedslider/templates/fanspeedslider_settings.jinja2 index 00a318e..b2811b6 100644 --- a/octoprint_fanspeedslider/templates/fanspeedslider_settings.jinja2 +++ b/octoprint_fanspeedslider/templates/fanspeedslider_settings.jinja2 @@ -5,18 +5,18 @@
- + %
{{ _('The default value the slider will be set to when opening OctoPrint\'s UI') }}
-

{{ _('The settings below can be used to limit the fan\'s output without having to re-slice and re-upload your gcode.') }}

+
- + %
{{ _('Any value sent which is below this value will be increased to meet this speed. Useful if your fan doesn\'t work below a certain threshold.') }} @@ -26,7 +26,7 @@
- + %
{{ _('Any value sent which is above this value will be decreased to meet this speed. Useful if your fan is too strong on full speed.') }} @@ -38,7 +38,7 @@
- + ms
{{ _('Delay (in milliseconds) before notifications are auto-hidden. Set to 0 to disable notifications.') }}