From fc0af956e7989e4c55418ebc0bc6a922e1991396 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sun, 1 Oct 2023 09:13:12 +0200 Subject: [PATCH] feat: add option to click on the spool or name to open change spool dialog Signed-off-by: Stefan Dej --- .../panels/Spoolman/SpoolmanPanelActiveSpool.vue | 8 ++++++-- src/components/panels/SpoolmanPanel.vue | 2 +- src/components/ui/SpoolIcon.vue | 12 +++++++++--- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/src/components/panels/Spoolman/SpoolmanPanelActiveSpool.vue b/src/components/panels/Spoolman/SpoolmanPanelActiveSpool.vue index 02cb9eccb..52dafdd20 100644 --- a/src/components/panels/Spoolman/SpoolmanPanelActiveSpool.vue +++ b/src/components/panels/Spoolman/SpoolmanPanelActiveSpool.vue @@ -3,13 +3,13 @@
#{{ id }} | {{ vendor }}
- {{ name }} + {{ name }} {{ subtitle }}
- + @@ -115,6 +115,10 @@ export default class SpoolmanPanelActiveSpool extends Mixins(BaseMixin) { get subtitle() { return [this.materialOutput, this.weightOutput, this.lengthOutput].filter((v) => v !== null).join(' | ') } + + clickSpool() { + this.$emit('change-spool') + } } diff --git a/src/components/panels/SpoolmanPanel.vue b/src/components/panels/SpoolmanPanel.vue index c6d33a73a..a05a1fa04 100644 --- a/src/components/panels/SpoolmanPanel.vue +++ b/src/components/panels/SpoolmanPanel.vue @@ -37,7 +37,7 @@ - + diff --git a/src/components/ui/SpoolIcon.vue b/src/components/ui/SpoolIcon.vue index 730da9111..d0b65e6c8 100644 --- a/src/components/ui/SpoolIcon.vue +++ b/src/components/ui/SpoolIcon.vue @@ -6,7 +6,9 @@ x="0px" y="0px" viewBox="0 0 487.04 487.04" - xml:space="preserve"> + xml:space="preserve" + class="cursor-pointer" + @click="clickSpool"> @@ -20,9 +22,9 @@