feat: support a color or colour variable from tool change macros (#1244)
Co-authored-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
1 parent
6a2a1baaab
commit
e0e90bcdaf
3 files changed
+4
-1
No files matched your search
@@ -63,6 +63,7 @@
|
||||
:key="tool.name"
|
||||
:class="tool.active ? 'primary--text' : {}"
|
||||
:disabled="isPrinting"
|
||||
:style="{ 'background-color': '#' + tool.color }"
|
||||
dense
|
||||
class="flex-grow-1 px-0"
|
||||
@click="doSend(tool.name)">
|
||||
@@ -85,7 +86,7 @@
|
||||
attribute-name="S"></tool-slider>
|
||||
</v-container>
|
||||
<!-- PRESSURE ADVANCE SETTINGS -->
|
||||
<template v-if="!extruderSteppers.length > 0">
|
||||
<template v-if="!(extruderSteppers.length > 0)">
|
||||
<v-divider></v-divider>
|
||||
<pressure-advance-settings></pressure-advance-settings>
|
||||
</template>
|
||||
|
||||
@@ -1097,6 +1097,7 @@ export const getters: GetterTree<PrinterState, RootState> = {
|
||||
tools.push({
|
||||
name: macro.name,
|
||||
active: macro.variables.active ?? false,
|
||||
color: macro.variables.color ?? macro.variables.colour ?? null,
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
@@ -252,6 +252,7 @@ export interface PrinterStateExtruderStepper {
|
||||
export interface PrinterStateToolchangeMacro {
|
||||
name: string
|
||||
active: boolean
|
||||
color: string
|
||||
}
|
||||
|
||||
export interface PrinterGetterObject {
|
||||
|
||||
Reference in new issue
Block a user