-
-
- {{ mdiSwapVertical }}
-
-
-
-
- {{ mdiSwapVertical }}
-
-
- {{ mdiEject }}
-
-
+
+ {{ mdiSwapVertical }}
+
+
+
+
+ {{ mdiDotsVertical }}
+
+
+
+
+
+ {{ mdiEject }}
+ {{ $t('Panels.Spoolman.EjectSpool') }}
+
+
+
+
+ {{ mdiOpenInNew }}
+ {{ $t('Panels.Spoolman.OpenSpoolManager') }}
+
+
+
+
@@ -26,19 +37,7 @@
-
-
- #{{ id }} | {{ vendor }}
-
- {{ name }}
-
- {{ subtitle }}
-
-
-
-
-
-
+
@@ -49,17 +48,20 @@
import { Component, Mixins } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
-import { mdiAdjust, mdiEject, mdiSwapVertical } from '@mdi/js'
-import SpoolmanChangeSpoolDialog from '@/components/panels/Spoolman/SpoolmanChangeSpoolDialog.vue'
-import SpoolmanEjectSpoolDialog from '@/components/panels/Spoolman/SpoolmanEjectSpoolDialog.vue'
+import { mdiAdjust, mdiDotsVertical, mdiEject, mdiOpenInNew, mdiSwapVertical } from '@mdi/js'
+import SpoolmanChangeSpoolDialog from '@/components/dialogs/SpoolmanChangeSpoolDialog.vue'
+import SpoolmanEjectSpoolDialog from '@/components/dialogs/SpoolmanEjectSpoolDialog.vue'
import { ServerSpoolmanStateSpool } from '@/store/server/spoolman/types'
+import SpoolmanPanelActiveSpool from '@/components/panels/Spoolman/SpoolmanPanelActiveSpool.vue'
@Component({
- components: { Panel, SpoolmanChangeSpoolDialog, SpoolmanEjectSpoolDialog },
+ components: { SpoolmanPanelActiveSpool, Panel, SpoolmanChangeSpoolDialog, SpoolmanEjectSpoolDialog },
})
export default class SpoolmanPanel extends Mixins(BaseMixin) {
mdiAdjust = mdiAdjust
+ mdiDotsVertical = mdiDotsVertical
mdiEject = mdiEject
+ mdiOpenInNew = mdiOpenInNew
mdiSwapVertical = mdiSwapVertical
showChangeSpoolDialog = false
@@ -75,6 +77,12 @@ export default class SpoolmanPanel extends Mixins(BaseMixin) {
return `Spoolman (${this.health})`
}
+ get changeSpoolTooltip(): string {
+ if (this.active_spool === null) return this.$t('Panels.Spoolman.SelectSpool') as string
+
+ return this.$t('Panels.Spoolman.ChangeSpool') as string
+ }
+
get active_spool(): ServerSpoolmanStateSpool | null {
return this.$store.state.server.spoolman.active_spool ?? null
}
@@ -137,6 +145,14 @@ export default class SpoolmanPanel extends Mixins(BaseMixin) {
get subtitle() {
return [this.materialOutput, this.weightOutput, this.lengthOutput].filter((v) => v !== null).join(' | ')
}
+
+ get spoolManagerUrl() {
+ return this.$store.state.server.config.config?.spoolman?.server ?? null
+ }
+
+ openSpoolManager() {
+ window.open(this.spoolManagerUrl, '_blank')
+ }
}
diff --git a/src/locales/en.json b/src/locales/en.json
index 427cfdf5a..84f5f9d2b 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -144,8 +144,9 @@
"StartPrint": {
"Cancel": "Cancel",
"DoYouWantToStartFilename": "Do you want to start {filename}?",
- "DoYouWantToStartFilenameFilament": "Do you want to start {filename} with the filament {filament}?",
+ "DoYouWantToStartFilenameFilament": "Do you want to start {filename} with the following filament?",
"Headline": "Start Job",
+ "NoSpoolSelected": "No spool selected. Please select a spool or this print will not be tracked.",
"Print": "print",
"Timelapse": "Timelapse"
}