From ab5311b68c79fcdffe78ce8a128b4a4601ff1051 Mon Sep 17 00:00:00 2001 From: OllisGit Date: Sat, 5 Jun 2021 15:55:23 +0200 Subject: [PATCH] New Verison 1.8.1 - PR #67, #62 G2/G3 movement is now tracked. Thx @ldursw - E #8 output of current selecetd spool in confirm dialog --- .../static/js/filamentmanager.bundled.js | 11 ++++++++--- .../templates/spool_confirmation.jinja2 | 2 +- setup.py | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/octoprint_filamentmanager/static/js/filamentmanager.bundled.js b/octoprint_filamentmanager/static/js/filamentmanager.bundled.js index 02d57c8..117da99 100644 --- a/octoprint_filamentmanager/static/js/filamentmanager.bundled.js +++ b/octoprint_filamentmanager/static/js/filamentmanager.bundled.js @@ -316,10 +316,17 @@ FilamentManager.prototype.viewModels.confirmation = function spoolSelectionConfi }; var showDialog = function showSpoolConfirmationDialog() { + var allCurrentSelections = selections.selectedSpools != null ? selections.selectedSpools() : null; var s = []; printerStateViewModel.filament().forEach(function (value) { var toolID = Utils.extractToolIDFromName(value.name()); - s.push({ spool: undefined, tool: toolID }); + + var currentSelectionForTool = allCurrentSelections?.[toolID]?.name; + + s.push({ spool: undefined, + tool: toolID, + currentSpoolName: currentSelectionForTool + }); }); self.selections(s); button.attr('disabled', true); @@ -710,7 +717,6 @@ FilamentManager.prototype.viewModels.spools = function spoolsViewModel() { self.overUsedUsage = ko.observable(false); self.overUsedUsage.subscribe(function(newValue){ - debugger // self.allSpools.updateItems(self.allSpools.items) self.allSpools.toggleFilter("overUsedUsage"); }); @@ -719,7 +725,6 @@ FilamentManager.prototype.viewModels.spools = function spoolsViewModel() { var myListHelperFilters = { overUsedUsage: function (data){ - debugger console.error(data); var result = data.used < data.weight; return result; diff --git a/octoprint_filamentmanager/templates/spool_confirmation.jinja2 b/octoprint_filamentmanager/templates/spool_confirmation.jinja2 index 98232b1..61491c3 100644 --- a/octoprint_filamentmanager/templates/spool_confirmation.jinja2 +++ b/octoprint_filamentmanager/templates/spool_confirmation.jinja2 @@ -15,7 +15,7 @@
-   +  
diff --git a/setup.py b/setup.py index 45ac5d6..788ed24 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ plugin_identifier = "filamentmanager" plugin_package = "octoprint_filamentmanager" plugin_name = "OctoPrint-FilamentManager" -plugin_version = "1.8.0" +plugin_version = "1.8.1" plugin_description = "Manage your spools and keep track of remaining filament on them" plugin_author = "Sven Lohrmann, Olli" plugin_author_email = "ollisgit@gmail.com, malnvenshorn@gmail.com"