Skip to content

Commit

Permalink
New Verison 1.8.1
Browse files Browse the repository at this point in the history
- PR #67, #62 G2/G3 movement is now tracked. Thx @ldursw
- E #8 output of current selecetd spool in confirm dialog
  • Loading branch information
OllisGit committed Jun 5, 2021
1 parent 4e271a3 commit ab5311b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions octoprint_filamentmanager/static/js/filamentmanager.bundled.js
Expand Up @@ -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);
Expand Down Expand Up @@ -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");
});
Expand All @@ -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;
Expand Down
Expand Up @@ -15,7 +15,7 @@
<!-- ko foreach: viewModels.confirmation.selections -->
<div class="control-group">
<div class="controls form-inline">
<label class="control-label">{{ _('Tool') }} <span data-bind="text: $data.tool"></span></label>&nbsp;
<label class="control-label">{{ _('Tool') }} <span data-bind="text: $data.tool"></span>:&nbsp;&nbsp;<span data-bind="text: $data.currentSpoolName"></span></label>&nbsp;
<select data-bind="enable: !$root.core.bridge.allViewModels.printerStateViewModel.isPrinting() && $root.core.bridge.allViewModels.loginStateViewModel.isUser(), options: $root.viewModels.spools.allSpools.items, optionsText: function(item) { return item.name + ' ' + (item.weight - item.used).toFixed(0) + 'g - ' + item.profile.material + ' (' + item.profile.vendor + ')'; }, optionsValue: function(item) { return item.id; }, optionsCaption: '{{ _('--- Select Spool ---') }}', value: $root.viewModels.confirmation.selections()[$index()].spool, event: { change: function() { $root.viewModels.confirmation.checkSelection(); } }"></select>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -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"
Expand Down

0 comments on commit ab5311b

Please sign in to comment.