From 6d22621e049284abcf8eca1caa3079f3c4c527d7 Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Sat, 8 Jul 2023 00:24:17 +0200 Subject: [PATCH 01/49] feat(spoolman): implement initial stores Signed-off-by: Mathis Mensing --- src/api/socketActions.ts | 14 +++++++++++++ src/globals.ts | 3 ++- src/store/index.ts | 4 +++- src/store/spoolman/actions.ts | 28 ++++++++++++++++++++++++++ src/store/spoolman/getters.ts | 21 ++++++++++++++++++++ src/store/spoolman/index.ts | 17 ++++++++++++++++ src/store/spoolman/mutations.ts | 20 +++++++++++++++++++ src/store/spoolman/state.ts | 11 +++++++++++ src/store/spoolman/types.ts | 35 +++++++++++++++++++++++++++++++++ 9 files changed, 151 insertions(+), 2 deletions(-) create mode 100644 src/store/spoolman/actions.ts create mode 100644 src/store/spoolman/getters.ts create mode 100644 src/store/spoolman/index.ts create mode 100644 src/store/spoolman/mutations.ts create mode 100644 src/store/spoolman/state.ts create mode 100644 src/store/spoolman/types.ts diff --git a/src/api/socketActions.ts b/src/api/socketActions.ts index 1351e6812e..be8729c231 100644 --- a/src/api/socketActions.ts +++ b/src/api/socketActions.ts @@ -699,5 +699,19 @@ export const SocketActions = { dispatch: 'webcams/onWebcamsList' } ) + }, + + async spoolmanState () { + baseEmit('server.spoolman.get_spool_id', { + dispatch: 'spoolman/onActiveSpool' + }) + + baseEmit('server.spoolman.proxy', { + params: { + request_method: 'GET', + path: '/v1/spool' + }, + dispatch: 'spoolman/onAvailableSpools' + }) } } diff --git a/src/globals.ts b/src/globals.ts index 585639c474..44a2bc8efe 100644 --- a/src/globals.ts +++ b/src/globals.ts @@ -202,7 +202,8 @@ export const Globals = Object.freeze({ timelapse: { name: 'timelapse', dispatch: 'timelapse/init' }, announcements: { name: 'announcements', dispatch: 'announcements/init' }, webcams: { name: 'webcam', dispatch: 'webcams/init' }, - jobQueue: { name: 'job_queue', dispatch: 'jobQueue/init' } + jobQueue: { name: 'job_queue', dispatch: 'jobQueue/init' }, + spoolman: { name: 'spoolman', dispatch: 'spoolman/init' } }, // Ordered by weight. CONFIG_SERVICE_MAP: [ diff --git a/src/store/index.ts b/src/store/index.ts index 51750ce3d9..5364ae8745 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -28,6 +28,7 @@ import { timelapse } from './timelapse' import { parts } from './parts' import { webcams } from './webcams' import { jobQueue } from './jobQueue' +import { spoolman } from './spoolman' Vue.use(Vuex) @@ -56,7 +57,8 @@ export default new Vuex.Store({ timelapse, parts, webcams, - jobQueue + jobQueue, + spoolman }, mutations: {}, actions: { diff --git a/src/store/spoolman/actions.ts b/src/store/spoolman/actions.ts new file mode 100644 index 0000000000..ada5b1e721 --- /dev/null +++ b/src/store/spoolman/actions.ts @@ -0,0 +1,28 @@ +import { ActionTree } from 'vuex' +import { SpoolmanState } from './types' +import { RootState } from '../types' +import { SocketActions } from '@/api/socketActions' + +export const actions: ActionTree = { + /** + * Reset our store + */ + async reset ({ commit }) { + commit('setReset') + }, + + /** + * Make a socket request to init the spoolman component. + */ + async init () { + SocketActions.spoolmanState() + }, + + async onActiveSpool ({ commit }, payload) { + commit('setActiveSpool', payload.spool_id) + }, + + async onAvailableSpools ({ commit }, payload) { + commit('setAvailableSpools', [...payload]) + } +} diff --git a/src/store/spoolman/getters.ts b/src/store/spoolman/getters.ts new file mode 100644 index 0000000000..ea1487339a --- /dev/null +++ b/src/store/spoolman/getters.ts @@ -0,0 +1,21 @@ +import { GetterTree } from 'vuex' +import { SpoolmanState } from './types' +import { RootState } from '../types' + +export const getters: GetterTree = { + getActiveSpool: (state) => { + return state.availableSpools.find(spool => spool.id === state.activeSpool) + }, + + getActiveSpoolId: (state) => { + return state.activeSpool + }, + + getAvailableSpools: (state) => { + return state.availableSpools + }, + + getSupported: (state) => { + return state.supported + } +} diff --git a/src/store/spoolman/index.ts b/src/store/spoolman/index.ts new file mode 100644 index 0000000000..fb79ed1fab --- /dev/null +++ b/src/store/spoolman/index.ts @@ -0,0 +1,17 @@ +import { Module } from 'vuex' +import { state } from './state' +import { getters } from './getters' +import { actions } from './actions' +import { mutations } from './mutations' +import { SpoolmanState } from './types' +import { RootState } from '../types' + +const namespaced = true + +export const spoolman: Module = { + namespaced, + state, + getters, + actions, + mutations +} diff --git a/src/store/spoolman/mutations.ts b/src/store/spoolman/mutations.ts new file mode 100644 index 0000000000..9fcb37f812 --- /dev/null +++ b/src/store/spoolman/mutations.ts @@ -0,0 +1,20 @@ +import { MutationTree } from 'vuex' +import { defaultState } from './state' +import { Spool, SpoolmanState } from '@/store/spoolman/types' + +export const mutations: MutationTree = { + /** + * Reset state + */ + setReset (state) { + Object.assign(state, defaultState()) + }, + + setActiveSpool (state, payload: number) { + state.activeSpool = payload + }, + + setAvailableSpools (state, payload: Spool[]) { + state.availableSpools = payload + } +} diff --git a/src/store/spoolman/state.ts b/src/store/spoolman/state.ts new file mode 100644 index 0000000000..b478c7ab92 --- /dev/null +++ b/src/store/spoolman/state.ts @@ -0,0 +1,11 @@ +import { SpoolmanState } from '@/store/spoolman/types' + +export const defaultState = (): SpoolmanState => { + return { + availableSpools: [], + activeSpool: undefined, + supported: false + } +} + +export const state = defaultState() diff --git a/src/store/spoolman/types.ts b/src/store/spoolman/types.ts new file mode 100644 index 0000000000..bba7f80bba --- /dev/null +++ b/src/store/spoolman/types.ts @@ -0,0 +1,35 @@ +export interface Vendor { + id: number; + registered: Date; + name: string; +} + +export interface Filament { + id: number; + registered: Date; + name: string; + vendor: Vendor; + material: string; + price: number; + density: number; + diameter: number; + weight: number; + color: string; +} + +export interface Spool { + id: number; + registered: Date; + filament: Filament; + remaining_weight: number; + used_weight: number; + location?: string; + lot_nr?: string; + comment?: string; +} + +export interface SpoolmanState { + availableSpools: Spool[]; + activeSpool?: number; + supported: boolean; +} From 160ee2768b18387151dc19cba6c50f293bc54ac2 Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Sun, 9 Jul 2023 19:16:23 +0200 Subject: [PATCH 02/49] feat(spoolman): implement support check, spool selection Signed-off-by: Mathis Mensing --- src/App.vue | 3 + src/api/socketActions.ts | 33 ++-- .../widgets/filesystem/FileSystem.vue | 12 +- .../widgets/spoolman/SpoolSelectionDialog.vue | 149 ++++++++++++++++++ .../widgets/status/PrinterStatusCard.vue | 9 ++ src/locales/en.yaml | 16 ++ src/store/spoolman/mutations.ts | 15 +- src/store/spoolman/state.ts | 6 +- src/store/spoolman/types.ts | 8 + 9 files changed, 237 insertions(+), 14 deletions(-) create mode 100644 src/components/widgets/spoolman/SpoolSelectionDialog.vue diff --git a/src/App.vue b/src/App.vue index d35e214309..8171a086d4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -75,6 +75,7 @@ + @@ -89,6 +90,7 @@ import FilesMixin from '@/mixins/files' import BrowserMixin from '@/mixins/browser' import { LinkPropertyHref } from 'vue-meta' import FileSystemDownloadDialog from '@/components/widgets/filesystem/FileSystemDownloadDialog.vue' +import SpoolSelectionDialog from '@/components/widgets/spoolman/SpoolSelectionDialog.vue' @Component({ metaInfo () { @@ -104,6 +106,7 @@ import FileSystemDownloadDialog from '@/components/widgets/filesystem/FileSystem } }, components: { + SpoolSelectionDialog, FileSystemDownloadDialog } }) diff --git a/src/api/socketActions.ts b/src/api/socketActions.ts index be8729c231..f5e3fca4e9 100644 --- a/src/api/socketActions.ts +++ b/src/api/socketActions.ts @@ -702,16 +702,29 @@ export const SocketActions = { }, async spoolmanState () { - baseEmit('server.spoolman.get_spool_id', { - dispatch: 'spoolman/onActiveSpool' - }) + baseEmit( + 'server.spoolman.get_spool_id', { + dispatch: 'spoolman/onActiveSpool' + } + ) - baseEmit('server.spoolman.proxy', { - params: { - request_method: 'GET', - path: '/v1/spool' - }, - dispatch: 'spoolman/onAvailableSpools' - }) + baseEmit( + 'server.spoolman.proxy', { + params: { + request_method: 'GET', + path: '/v1/spool' + }, + dispatch: 'spoolman/onAvailableSpools' + } + ) + }, + + async spoolmanSetSpool (spoolId: number | undefined) { + baseEmit( + 'server.spoolman.post_spool_id', { + params: { spool_id: spoolId }, + dispatch: 'spoolman/onActiveSpool' + } + ) } } diff --git a/src/components/widgets/filesystem/FileSystem.vue b/src/components/widgets/filesystem/FileSystem.vue index 8905d983af..89b035dc3d 100644 --- a/src/components/widgets/filesystem/FileSystem.vue +++ b/src/components/widgets/filesystem/FileSystem.vue @@ -736,7 +736,17 @@ export default class FileSystem extends Mixins(StateMixin, FilesMixin, ServicesM */ handlePrint (file: AppFile) { if (this.disabled) return - SocketActions.printerPrintStart(`${this.visiblePath}/${file.filename}`) + const filename = `${this.visiblePath}/${file.filename}` + if (this.$store.state.spoolman.supported) { + this.$store.commit('spoolman/setDialogState', { + show: true, + filename + }) + + return + } + + SocketActions.printerPrintStart(filename) // If we aren't on the dashboard, push the user back there. if (this.$router.currentRoute.path !== '/') { diff --git a/src/components/widgets/spoolman/SpoolSelectionDialog.vue b/src/components/widgets/spoolman/SpoolSelectionDialog.vue new file mode 100644 index 0000000000..9faf610caa --- /dev/null +++ b/src/components/widgets/spoolman/SpoolSelectionDialog.vue @@ -0,0 +1,149 @@ + + + diff --git a/src/components/widgets/status/PrinterStatusCard.vue b/src/components/widgets/status/PrinterStatusCard.vue index 9c25276a13..7ee18c8176 100644 --- a/src/components/widgets/status/PrinterStatusCard.vue +++ b/src/components/widgets/status/PrinterStatusCard.vue @@ -113,6 +113,15 @@ export default class PrinterStatusCard extends Mixins(StateMixin) { } handlePrint (filename: string) { + if (this.$store.state.spoolman.supported) { + this.$store.commit('spoolman/setDialogState', { + show: true, + filename + }) + + return + } + SocketActions.printerPrintStart(filename) } } diff --git a/src/locales/en.yaml b/src/locales/en.yaml index f55a301405..abc27d88c9 100644 --- a/src/locales/en.yaml +++ b/src/locales/en.yaml @@ -756,3 +756,19 @@ app: variable_fps: Variable FPS variable_fps_min: Minimum Framerate variable_fps_max: Maximum Framerate + spoolman: + title: + spool_selection: Spool Selection + label: + filament: Filament + used_weight: Used Weight + remaining_weight: Remaining Weight + location: Location + lot_nr: Lot Nr + first_used: First Used + last_used: Last Used + comment: Comment + msg: + no_spool: >- + You haven't selected a spool. + Are you sure you want to print without filament tracking? diff --git a/src/store/spoolman/mutations.ts b/src/store/spoolman/mutations.ts index 9fcb37f812..1f670a24f1 100644 --- a/src/store/spoolman/mutations.ts +++ b/src/store/spoolman/mutations.ts @@ -1,6 +1,6 @@ import { MutationTree } from 'vuex' import { defaultState } from './state' -import { Spool, SpoolmanState } from '@/store/spoolman/types' +import { Spool, SpoolmanState, SpoolSelectionDialogState } from '@/store/spoolman/types' export const mutations: MutationTree = { /** @@ -15,6 +15,17 @@ export const mutations: MutationTree = { }, setAvailableSpools (state, payload: Spool[]) { - state.availableSpools = payload + // implies working communication with spoolman server + state.supported = !!payload.length // spools available + state.availableSpools = payload.map(spool => ({ + ...spool, + registered: new Date(spool.registered), + first_used: spool.first_used ? new Date(spool.first_used) : undefined, + last_used: spool.last_used ? new Date(spool.last_used) : undefined + })) + }, + + setDialogState (state, payload: SpoolSelectionDialogState) { + state.dialog = payload } } diff --git a/src/store/spoolman/state.ts b/src/store/spoolman/state.ts index b478c7ab92..a47afb433c 100644 --- a/src/store/spoolman/state.ts +++ b/src/store/spoolman/state.ts @@ -4,7 +4,11 @@ export const defaultState = (): SpoolmanState => { return { availableSpools: [], activeSpool: undefined, - supported: false + supported: false, + dialog: { + show: false, + filename: '' + } } } diff --git a/src/store/spoolman/types.ts b/src/store/spoolman/types.ts index bba7f80bba..5b8eb13b60 100644 --- a/src/store/spoolman/types.ts +++ b/src/store/spoolman/types.ts @@ -26,10 +26,18 @@ export interface Spool { location?: string; lot_nr?: string; comment?: string; + first_used?: Date; + last_used?: Date; } export interface SpoolmanState { availableSpools: Spool[]; activeSpool?: number; supported: boolean; + dialog: SpoolSelectionDialogState; +} + +export interface SpoolSelectionDialogState { + show: boolean; + filename: string; } From c8af0d2705a9b69ae9891c5ec724fb6e5422f60a Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Sun, 9 Jul 2023 21:01:36 +0200 Subject: [PATCH 03/49] fix(spoolman): handle all socket events Signed-off-by: Mathis Mensing --- src/store/socket/actions.ts | 4 ++++ src/store/spoolman/actions.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/store/socket/actions.ts b/src/store/socket/actions.ts index ad9e7c808d..63bbc1b6c9 100644 --- a/src/store/socket/actions.ts +++ b/src/store/socket/actions.ts @@ -240,5 +240,9 @@ export const actions: ActionTree = { async notifyJobQueueChanged ({ dispatch }, payload) { dispatch('jobQueue/onJobQueueChanged', payload, { root: true }) + }, + + async notifyActiveSpoolSet ({ dispatch }, payload) { + dispatch('spoolman/onActiveSpool', payload, { root: true }) } } diff --git a/src/store/spoolman/actions.ts b/src/store/spoolman/actions.ts index ada5b1e721..5ca9bea823 100644 --- a/src/store/spoolman/actions.ts +++ b/src/store/spoolman/actions.ts @@ -24,5 +24,9 @@ export const actions: ActionTree = { async onAvailableSpools ({ commit }, payload) { commit('setAvailableSpools', [...payload]) + }, + + async notifyActiveSpoolSet ({ commit }, payload) { + commit('setActiveSpool', payload.spool_id) } } From 32e8d0d1bcd58ce1add719142785a8a097acda5c Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Sun, 9 Jul 2023 21:02:31 +0200 Subject: [PATCH 04/49] feat(spoolman): check if enough filament on spool Signed-off-by: Mathis Mensing --- .../widgets/spoolman/SpoolSelectionDialog.vue | 99 ++++++++++++++----- src/locales/en.yaml | 7 ++ 2 files changed, 79 insertions(+), 27 deletions(-) diff --git a/src/components/widgets/spoolman/SpoolSelectionDialog.vue b/src/components/widgets/spoolman/SpoolSelectionDialog.vue index 9faf610caa..2ab65f73f8 100644 --- a/src/components/widgets/spoolman/SpoolSelectionDialog.vue +++ b/src/components/widgets/spoolman/SpoolSelectionDialog.vue @@ -27,13 +27,13 @@ class="row-select px-1" @click.prevent="selectedSpool = item.id" > - {{ item.filament }} - {{ item.used_weight }} - {{ item.remaining_weight }} + {{ item.filament.vendor.name }} - {{ item.filament.name }} + {{ item.used_weight.toLocaleString() }} + {{ item.remaining_weight.toLocaleString() }} {{ item.location }} {{ item.lot_nr }} - {{ item.first_used }} - {{ item.last_used }} + {{ item.first_used ? $filters.formatRelativeTimeToNow(item.first_used) : $tc('app.setting.label.never') }} + {{ item.last_used ? $filters.formatRelativeTimeToNow(item.last_used) : $tc('app.setting.label.never') }} {{ item.comment }} @@ -64,17 +64,26 @@ diff --git a/src/components/widgets/toolhead/ToolheadCard.vue b/src/components/widgets/toolhead/ToolheadCard.vue index 1d5bc59f8c..044cbde0ee 100644 --- a/src/components/widgets/toolhead/ToolheadCard.vue +++ b/src/components/widgets/toolhead/ToolheadCard.vue @@ -106,7 +106,7 @@ v-if="tool.name !== '-'" :key="tool.name" :disabled="tool.disabled || (tool.wait && hasWait(tool.wait))" - @click="sendGcode(tool.name, tool.wait)" + @click="tool.callback ? tool.callback() : sendGcode(tool.name, tool.wait)" > @@ -156,6 +156,7 @@ type Tool = { disabled?: boolean, wait?: string, icon?: string, + callback?: () => void, } @Component({ @@ -209,6 +210,10 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) { ) } + get serverSupportsSpoolman (): boolean { + return this.$store.getters['spoolman/getSupported'] + } + get macros (): Macro[] { return this.$store.getters['macros/getMacros'] as Macro[] } @@ -231,12 +236,10 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) { get availableTools () { const tools: Tool[] = [] - const loadFilamentMacro = this.loadFilamentMacro if (loadFilamentMacro) { const ignoreMinExtrudeTemp = loadFilamentMacro.variables?.ignore_min_extrude_temp ?? false - tools.push({ name: loadFilamentMacro.name.toUpperCase(), label: loadFilamentMacro.name === 'm701' ? 'M701 (Load Filament)' : undefined, @@ -244,12 +247,10 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) { disabled: !(ignoreMinExtrudeTemp || this.extruderReady) }) } - const unloadFilamentMacro = this.unloadFilamentMacro if (unloadFilamentMacro) { const ignoreMinExtrudeTemp = unloadFilamentMacro.variables?.ignore_min_extrude_temp ?? false - tools.push({ name: unloadFilamentMacro.name.toUpperCase(), label: unloadFilamentMacro.name === 'm702' ? 'M702 (Unload Filament)' : undefined, @@ -258,6 +259,15 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) { }) } + if (this.serverSupportsSpoolman) { + tools.push({ + name: 'CHANGE_SPOOL', + label: this.$tc('app.spoolman.label.change_spool'), + icon: '$changeFilament', + callback: () => this.$store.commit('spoolman/setDialogState', { show: true }) + }) + } + if (tools.length > 0) { tools.push({ name: '-' diff --git a/src/globals.ts b/src/globals.ts index 44a2bc8efe..e2b1a4ab8d 100644 --- a/src/globals.ts +++ b/src/globals.ts @@ -150,6 +150,7 @@ import { const mdiFilamentDown = 'M 12 2 A 10 10 0 0 0 10.871094 2.0800781 A 10 10 0 0 0 9.8515625 2.2597656 A 10 10 0 0 0 8.5371094 2.6464844 A 10 10 0 0 0 7.671875 3 A 10 10 0 0 0 7.6699219 3 A 10 10 0 0 0 6.375 3.7519531 A 10 10 0 0 0 5.6210938 4.3164062 A 10 10 0 0 0 4.640625 5.2539062 A 10 10 0 0 0 4.0429688 5.9863281 A 10 10 0 0 0 3.9179688 6.1542969 A 10 10 0 0 0 3.3769531 6.9804688 A 10 10 0 0 0 3.3417969 7.0449219 A 10 10 0 0 0 2.4726562 9.0019531 A 10 10 0 0 0 2.1582031 10.316406 A 10 10 0 0 0 2.0527344 11.248047 A 10 10 0 0 0 2.0527344 11.255859 A 10 10 0 0 0 2 12 A 10 10 0 0 0 2.0527344 12.742188 A 10 10 0 0 0 2.0527344 12.748047 A 10 10 0 0 0 2.1582031 13.683594 A 10 10 0 0 0 2.4726562 14.998047 A 10 10 0 0 0 3.3417969 16.955078 A 10 10 0 0 0 3.3769531 17.019531 A 10 10 0 0 0 3.9179688 17.845703 A 10 10 0 0 0 4.0429688 18.013672 A 10 10 0 0 0 4.640625 18.746094 A 10 10 0 0 0 5.6210938 19.683594 A 10 10 0 0 0 6.375 20.248047 A 10 10 0 0 0 7.6699219 21 A 10 10 0 0 0 7.671875 21 A 10 10 0 0 0 8.5371094 21.353516 A 10 10 0 0 0 9.8515625 21.740234 A 10 10 0 0 0 10.871094 21.919922 A 10 10 0 0 0 12 22 A 10 10 0 0 0 13.128906 21.919922 A 10 10 0 0 0 13.71875 21.816406 A 6 6 0 0 1 13.042969 19.601562 L 12.433594 19.25 L 12.433594 18.25 L 12.867188 18 L 13.125 17.851562 A 6 6 0 0 1 13.732422 16.160156 L 13.732422 16 L 13.859375 15.925781 A 6 6 0 0 1 15.201172 14.367188 A 4 4 0 0 0 15.763672 13.326172 L 15.896484 13.25 L 16.455078 13.572266 A 6 6 0 0 1 19 13 A 6 6 0 0 1 21.833984 13.712891 A 10 10 0 0 0 21.841797 13.683594 A 10 10 0 0 0 21.947266 12.751953 A 10 10 0 0 0 21.947266 12.75 A 10 10 0 0 0 21.947266 12.748047 A 10 10 0 0 0 21.947266 12.746094 A 10 10 0 0 0 21.947266 12.744141 A 10 10 0 0 0 22 12 A 10 10 0 0 0 21.96875 11.244141 A 10 10 0 0 0 21.966797 11.232422 A 10 10 0 0 0 21.853516 10.310547 A 10 10 0 0 0 21.541016 9.0097656 A 10 10 0 0 0 21.160156 7.9960938 A 10 10 0 0 0 21.154297 7.9824219 A 10 10 0 0 0 21.146484 7.96875 A 10 10 0 0 0 20.658203 7.0019531 A 10 10 0 0 0 20.65625 7 A 10 10 0 0 0 20.056641 6.0800781 A 10 10 0 0 0 19.359375 5.2324219 A 10 10 0 0 0 18.390625 4.3105469 A 10 10 0 0 0 17.638672 3.7441406 A 10 10 0 0 0 16.330078 2.9882812 A 10 10 0 0 0 16.328125 2.9882812 A 10 10 0 0 0 15.462891 2.6210938 A 10 10 0 0 0 14.177734 2.2421875 A 10 10 0 0 0 14.175781 2.2421875 A 10 10 0 0 0 13.140625 2.0683594 A 10 10 0 0 0 13.0625 2.0585938 A 10 10 0 0 0 12 2 z M 10.701172 4.25 L 11.132812 4.5 L 11.566406 4.75 L 11.566406 5.75 L 10.701172 6.25 L 10.267578 6 L 9.8359375 5.75 L 9.8359375 4.75 L 10.103516 4.5957031 L 10.701172 4.25 z M 13.298828 4.25 L 14.164062 4.75 L 14.164062 5.75 L 13.298828 6.25 L 12.433594 5.75 L 12.433594 4.75 L 13.298828 4.25 z M 15.181641 4.6640625 A 8 8 0 0 1 16.761719 5.5742188 L 16.761719 5.75 L 16.103516 6.1308594 L 15.896484 6.25 L 15.03125 5.75 L 15.03125 4.75 L 15.181641 4.6640625 z M 8.8398438 4.6757812 L 8.96875 4.75 L 8.96875 5.75 L 8.5371094 6 L 8.1035156 6.25 L 7.2382812 5.75 L 7.2382812 5.578125 A 8 8 0 0 1 8.8398438 4.6757812 z M 6.8046875 6.5 L 7.6699219 7 L 7.6699219 8 L 6.8046875 8.5 L 6.7011719 8.4394531 L 5.9394531 8 L 5.9394531 7.75 L 5.9394531 7 L 6.8046875 6.5 z M 9.4023438 6.5 L 10.267578 7 L 10.267578 8 L 9.8339844 8.25 L 9.4023438 8.5 L 8.9707031 8.25 L 8.5371094 8 L 8.5371094 7 L 8.96875 6.75 L 9.4023438 6.5 z M 12 6.5 L 12.865234 7 L 12.865234 7.75 L 12.865234 8 L 12.744141 8.0703125 A 4 4 0 0 0 12 8 A 4 4 0 0 0 11.267578 8.0761719 L 11.134766 8 L 11.134766 7 L 12 6.5 z M 14.597656 6.5 L 15.462891 7 L 15.462891 7.75 L 15.462891 8 L 14.597656 8.5 L 13.732422 8 L 13.732422 7.75 L 13.732422 7 L 14.597656 6.5 z M 17.195312 6.5 L 18.060547 7 L 18.060547 8 L 17.195312 8.5 L 16.330078 8 L 16.330078 7 L 17.195312 6.5 z M 5.5058594 8.75 L 6.3710938 9.25 L 6.3710938 10.25 L 5.5058594 10.75 L 4.640625 10.25 L 4.640625 9.25 L 5.5058594 8.75 z M 8.1035156 8.75 L 8.96875 9.25 L 8.96875 9.390625 A 4 4 0 0 0 8.2363281 10.673828 L 8.1035156 10.75 L 7.2382812 10.25 L 7.2382812 9.25 L 8.1035156 8.75 z M 15.896484 8.75 L 16.761719 9.25 L 16.761719 10.25 L 15.896484 10.75 L 15.775391 10.679688 A 4 4 0 0 0 15.03125 9.3925781 L 15.03125 9.25 L 15.896484 8.75 z M 18.494141 8.75 L 19.359375 9.25 L 19.359375 10.25 L 18.494141 10.75 L 18.287109 10.630859 L 17.628906 10.25 L 17.628906 9.25 L 18.494141 8.75 z M 12 10 A 2 2 0 0 1 14 12 A 2 2 0 0 1 12 14 A 2 2 0 0 1 10 12 A 2 2 0 0 1 12 10 z M 4.2070312 11 L 5.0722656 11.5 L 5.0722656 12.5 L 4.2070312 13 L 4.0722656 12.921875 A 8 8 0 0 1 4 12 A 8 8 0 0 1 4.0722656 11.078125 L 4.2070312 11 z M 6.8046875 11 L 7.6699219 11.5 L 7.6699219 12.5 L 6.8046875 13 L 6.7011719 12.939453 L 5.9394531 12.5 L 5.9394531 11.5 L 6.7011719 11.060547 L 6.8046875 11 z M 17.195312 11 L 18.060547 11.5 L 18.060547 12.5 L 17.195312 13 L 16.763672 12.75 L 16.330078 12.5 L 16.330078 11.5 L 17.195312 11 z M 19.792969 11 L 19.947266 11.089844 A 8 8 0 0 1 20 12 A 8 8 0 0 1 19.927734 12.921875 L 19.792969 13 L 18.927734 12.5 L 18.927734 12.25 L 18.927734 11.5 L 19.792969 11 z M 5.5058594 13.25 L 6.3710938 13.75 L 6.3710938 14.75 L 5.5058594 15.25 L 4.640625 14.75 L 4.640625 13.75 L 5.5058594 13.25 z M 8.1035156 13.25 L 8.2363281 13.326172 A 4 4 0 0 0 8.96875 14.609375 L 8.96875 14.75 L 8.5371094 15 L 8.1035156 15.25 L 7.2382812 14.75 L 7.2382812 13.75 L 7.671875 13.5 L 8.1035156 13.25 z M 6.8046875 15.5 L 7.6699219 16 L 7.6699219 17 L 6.8046875 17.5 L 6.7011719 17.439453 L 5.9394531 17 L 5.9394531 16.75 L 5.9394531 16 L 6.7011719 15.560547 L 6.8046875 15.5 z M 9.4023438 15.5 L 9.8339844 15.75 L 10.267578 16 L 10.267578 17 L 9.8339844 17.25 L 9.4023438 17.5 L 8.9707031 17.25 L 8.5371094 17 L 8.5371094 16 L 8.96875 15.75 L 8.9707031 15.75 L 9.4023438 15.5 z M 11.267578 15.923828 A 4 4 0 0 0 12 16 A 4 4 0 0 0 12.732422 15.923828 L 12.865234 16 L 12.865234 16.75 L 12.865234 17 L 12.103516 17.439453 L 12 17.5 L 11.134766 17 L 11.134766 16 L 11.267578 15.923828 z M 18 16 L 18 20 L 16 20 L 19 23 L 22 20 L 20 20 L 20 16 L 18 16 z M 8.1035156 17.75 L 8.96875 18.25 L 8.96875 19.25 L 8.8398438 19.324219 A 8 8 0 0 1 7.2382812 18.421875 L 7.2382812 18.25 L 8.1035156 17.75 z M 10.701172 17.75 L 11.566406 18.25 L 11.566406 19.25 L 10.701172 19.75 L 9.8359375 19.25 L 9.8359375 18.25 L 10.701172 17.75 z' const mdiFilamentUp = 'M 12 2 A 10 10 0 0 0 10.871094 2.0800781 A 10 10 0 0 0 9.8515625 2.2597656 A 10 10 0 0 0 8.5371094 2.6464844 A 10 10 0 0 0 7.671875 3 A 10 10 0 0 0 7.6699219 3 A 10 10 0 0 0 6.375 3.7519531 A 10 10 0 0 0 5.6210938 4.3164062 A 10 10 0 0 0 4.640625 5.2539062 A 10 10 0 0 0 4.0429688 5.9863281 A 10 10 0 0 0 3.9179688 6.1542969 A 10 10 0 0 0 3.3769531 6.9804688 A 10 10 0 0 0 3.3417969 7.0449219 A 10 10 0 0 0 2.4726562 9.0019531 A 10 10 0 0 0 2.1582031 10.316406 A 10 10 0 0 0 2.0527344 11.248047 A 10 10 0 0 0 2.0527344 11.255859 A 10 10 0 0 0 2 12 A 10 10 0 0 0 2.0527344 12.742188 A 10 10 0 0 0 2.0527344 12.748047 A 10 10 0 0 0 2.1582031 13.683594 A 10 10 0 0 0 2.4726562 14.998047 A 10 10 0 0 0 3.3417969 16.955078 A 10 10 0 0 0 3.3769531 17.019531 A 10 10 0 0 0 3.9179688 17.845703 A 10 10 0 0 0 4.0429688 18.013672 A 10 10 0 0 0 4.640625 18.746094 A 10 10 0 0 0 5.6210938 19.683594 A 10 10 0 0 0 6.375 20.248047 A 10 10 0 0 0 7.6699219 21 A 10 10 0 0 0 7.671875 21 A 10 10 0 0 0 8.5371094 21.353516 A 10 10 0 0 0 9.8515625 21.740234 A 10 10 0 0 0 10.871094 21.919922 A 10 10 0 0 0 12 22 A 10 10 0 0 0 13.128906 21.919922 A 10 10 0 0 0 13.71875 21.816406 A 6 6 0 0 1 13.042969 19.601562 L 12.433594 19.25 L 12.433594 18.25 L 12.867188 18 L 13.125 17.851562 A 6 6 0 0 1 13.732422 16.160156 L 13.732422 16 L 13.859375 15.925781 A 6 6 0 0 1 15.201172 14.367188 A 4 4 0 0 0 15.763672 13.326172 L 15.896484 13.25 L 16.455078 13.572266 A 6 6 0 0 1 19 13 A 6 6 0 0 1 21.833984 13.712891 A 10 10 0 0 0 21.841797 13.683594 A 10 10 0 0 0 21.947266 12.751953 A 10 10 0 0 0 21.947266 12.75 A 10 10 0 0 0 21.947266 12.748047 A 10 10 0 0 0 21.947266 12.746094 A 10 10 0 0 0 21.947266 12.744141 A 10 10 0 0 0 22 12 A 10 10 0 0 0 21.96875 11.244141 A 10 10 0 0 0 21.966797 11.232422 A 10 10 0 0 0 21.853516 10.310547 A 10 10 0 0 0 21.541016 9.0097656 A 10 10 0 0 0 21.160156 7.9960938 A 10 10 0 0 0 21.154297 7.9824219 A 10 10 0 0 0 21.146484 7.96875 A 10 10 0 0 0 20.658203 7.0019531 A 10 10 0 0 0 20.65625 7 A 10 10 0 0 0 20.056641 6.0800781 A 10 10 0 0 0 19.359375 5.2324219 A 10 10 0 0 0 18.390625 4.3105469 A 10 10 0 0 0 17.638672 3.7441406 A 10 10 0 0 0 16.330078 2.9882812 A 10 10 0 0 0 16.328125 2.9882812 A 10 10 0 0 0 15.462891 2.6210938 A 10 10 0 0 0 14.177734 2.2421875 A 10 10 0 0 0 14.175781 2.2421875 A 10 10 0 0 0 13.140625 2.0683594 A 10 10 0 0 0 13.0625 2.0585938 A 10 10 0 0 0 12 2 z M 10.701172 4.25 L 11.132812 4.5 L 11.566406 4.75 L 11.566406 5.75 L 10.701172 6.25 L 10.267578 6 L 9.8359375 5.75 L 9.8359375 4.75 L 10.103516 4.5957031 L 10.701172 4.25 z M 13.298828 4.25 L 14.164062 4.75 L 14.164062 5.75 L 13.298828 6.25 L 12.433594 5.75 L 12.433594 4.75 L 13.298828 4.25 z M 15.181641 4.6640625 A 8 8 0 0 1 16.761719 5.5742188 L 16.761719 5.75 L 16.103516 6.1308594 L 15.896484 6.25 L 15.03125 5.75 L 15.03125 4.75 L 15.181641 4.6640625 z M 8.8398438 4.6757812 L 8.96875 4.75 L 8.96875 5.75 L 8.5371094 6 L 8.1035156 6.25 L 7.2382812 5.75 L 7.2382812 5.578125 A 8 8 0 0 1 8.8398438 4.6757812 z M 6.8046875 6.5 L 7.6699219 7 L 7.6699219 8 L 6.8046875 8.5 L 6.7011719 8.4394531 L 5.9394531 8 L 5.9394531 7.75 L 5.9394531 7 L 6.8046875 6.5 z M 9.4023438 6.5 L 10.267578 7 L 10.267578 8 L 9.8339844 8.25 L 9.4023438 8.5 L 8.9707031 8.25 L 8.5371094 8 L 8.5371094 7 L 8.96875 6.75 L 9.4023438 6.5 z M 12 6.5 L 12.865234 7 L 12.865234 7.75 L 12.865234 8 L 12.744141 8.0703125 A 4 4 0 0 0 12 8 A 4 4 0 0 0 11.267578 8.0761719 L 11.134766 8 L 11.134766 7 L 12 6.5 z M 14.597656 6.5 L 15.462891 7 L 15.462891 7.75 L 15.462891 8 L 14.597656 8.5 L 13.732422 8 L 13.732422 7.75 L 13.732422 7 L 14.597656 6.5 z M 17.195312 6.5 L 18.060547 7 L 18.060547 8 L 17.195312 8.5 L 16.330078 8 L 16.330078 7 L 17.195312 6.5 z M 5.5058594 8.75 L 6.3710938 9.25 L 6.3710938 10.25 L 5.5058594 10.75 L 4.640625 10.25 L 4.640625 9.25 L 5.5058594 8.75 z M 8.1035156 8.75 L 8.96875 9.25 L 8.96875 9.390625 A 4 4 0 0 0 8.2363281 10.673828 L 8.1035156 10.75 L 7.2382812 10.25 L 7.2382812 9.25 L 8.1035156 8.75 z M 15.896484 8.75 L 16.761719 9.25 L 16.761719 10.25 L 15.896484 10.75 L 15.775391 10.679688 A 4 4 0 0 0 15.03125 9.3925781 L 15.03125 9.25 L 15.896484 8.75 z M 18.494141 8.75 L 19.359375 9.25 L 19.359375 10.25 L 18.494141 10.75 L 18.287109 10.630859 L 17.628906 10.25 L 17.628906 9.25 L 18.494141 8.75 z M 12 10 A 2 2 0 0 1 14 12 A 2 2 0 0 1 12 14 A 2 2 0 0 1 10 12 A 2 2 0 0 1 12 10 z M 4.2070312 11 L 5.0722656 11.5 L 5.0722656 12.5 L 4.2070312 13 L 4.0722656 12.921875 A 8 8 0 0 1 4 12 A 8 8 0 0 1 4.0722656 11.078125 L 4.2070312 11 z M 6.8046875 11 L 7.6699219 11.5 L 7.6699219 12.5 L 6.8046875 13 L 6.7011719 12.939453 L 5.9394531 12.5 L 5.9394531 11.5 L 6.7011719 11.060547 L 6.8046875 11 z M 17.195312 11 L 18.060547 11.5 L 18.060547 12.5 L 17.195312 13 L 16.763672 12.75 L 16.330078 12.5 L 16.330078 11.5 L 17.195312 11 z M 19.792969 11 L 19.947266 11.089844 A 8 8 0 0 1 20 12 A 8 8 0 0 1 19.927734 12.921875 L 19.792969 13 L 18.927734 12.5 L 18.927734 12.25 L 18.927734 11.5 L 19.792969 11 z M 5.5058594 13.25 L 6.3710938 13.75 L 6.3710938 14.75 L 5.5058594 15.25 L 4.640625 14.75 L 4.640625 13.75 L 5.5058594 13.25 z M 8.1035156 13.25 L 8.2363281 13.326172 A 4 4 0 0 0 8.96875 14.609375 L 8.96875 14.75 L 8.5371094 15 L 8.1035156 15.25 L 7.2382812 14.75 L 7.2382812 13.75 L 7.671875 13.5 L 8.1035156 13.25 z M 19 15 L 16 18 L 18 18 L 18 22 L 20 22 L 20 18 L 22 18 L 19 15 z M 6.8046875 15.5 L 7.6699219 16 L 7.6699219 17 L 6.8046875 17.5 L 6.7011719 17.439453 L 5.9394531 17 L 5.9394531 16.75 L 5.9394531 16 L 6.7011719 15.560547 L 6.8046875 15.5 z M 9.4023438 15.5 L 9.8339844 15.75 L 10.267578 16 L 10.267578 17 L 9.8339844 17.25 L 9.4023438 17.5 L 8.9707031 17.25 L 8.5371094 17 L 8.5371094 16 L 8.96875 15.75 L 8.9707031 15.75 L 9.4023438 15.5 z M 11.267578 15.923828 A 4 4 0 0 0 12 16 A 4 4 0 0 0 12.732422 15.923828 L 12.865234 16 L 12.865234 16.75 L 12.865234 17 L 12.103516 17.439453 L 12 17.5 L 11.134766 17 L 11.134766 16 L 11.267578 15.923828 z M 8.1035156 17.75 L 8.96875 18.25 L 8.96875 19.25 L 8.8398438 19.324219 A 8 8 0 0 1 7.2382812 18.421875 L 7.2382812 18.25 L 8.1035156 17.75 z M 10.701172 17.75 L 11.566406 18.25 L 11.566406 19.25 L 10.701172 19.75 L 9.8359375 19.25 L 9.8359375 18.25 L 10.701172 17.75 z' +const mdiFilamentChange = 'm 23.5,18.5 -3,-3 v 2 h -4 v 2 h 4 v 2 z m -9,0 3,3 v -2 h 4 v -2 h -4 v -2 z M 12,2 C 11.622488,2.00536 11.245583,2.032096 10.871094,2.080078 10.528376,2.122331 10.188076,2.182307 9.8515625,2.2597655 9.4050853,2.3584681 8.9659036,2.4876776 8.5371094,2.6464844 8.2433456,2.7507727 7.9546188,2.8687401 7.671875,3 H 7.669925 C 7.2200951,3.2179361 6.7872412,3.4692916 6.375,3.7519531 6.1149725,3.9281594 5.8633915,4.1165192 5.6210938,4.3164062 5.2734271,4.6063528 4.9458507,4.9195733 4.640625,5.2539062 4.4299716,5.4884888 4.2305301,5.7329024 4.0429688,5.9863281 4.0007171,6.04188 3.9590482,6.0978726 3.9179688,6.1542969 3.7241339,6.4206094 3.5435752,6.6963361 3.3769531,6.9804688 3.3651555,7.0019101 3.3534367,7.0233946 3.3417969,7.0449219 2.9828723,7.664277 2.6914886,8.3203814 2.4726562,9.0019531 2.3383156,9.4325113 2.233258,9.871665 2.1582031,10.316406 2.1084999,10.625133 2.073305,10.936022 2.0527344,11.248047 v 0.0078 C 2.0259069,11.503164 2.0083166,11.751383 2,12 c 0.00836,0.247965 0.025955,0.495532 0.052734,0.742188 v 0.0059 c 0.020449,0.313332 0.055644,0.625527 0.1054687,0.935547 0.075055,0.444741 0.1801125,0.883895 0.3144531,1.314453 0.2188324,0.681572 0.5102161,1.337676 0.8691407,1.957031 0.01164,0.02153 0.023359,0.04301 0.035156,0.06445 0.1666221,0.284133 0.3471808,0.55986 0.5410157,0.826172 0.041079,0.05642 0.082748,0.112417 0.125,0.167969 0.1875613,0.253426 0.3870028,0.497839 0.5976562,0.732422 0.3052257,0.334333 0.6328021,0.647553 0.9804688,0.9375 C 5.8633915,19.883481 6.1149725,20.071841 6.375,20.248047 6.7872412,20.530708 7.2200951,20.782064 7.6699219,21 h 0.00195 c 0.2827438,0.13126 0.5714706,0.249228 0.8652344,0.353516 0.4287942,0.158807 0.8679759,0.288016 1.3144531,0.386718 0.3365136,0.07746 0.6768136,0.137435 1.0195316,0.179688 C 11.245583,21.967904 11.622488,21.99464 12,22 12.377512,21.9946 12.754417,21.9679 13.128906,21.91992 13.32651,21.89131 13.523213,21.85679 13.71875,21.816404 13.351809,21.12901 13.122274,20.37672 13.042969,19.601562 L 12.433594,19.25 v -1 L 12.867188,18 13.125,17.851562 c 0.11641,-0.5911 0.32118,-1.161297 0.607422,-1.691406 V 16 l 0.126953,-0.07422 c 0.354229,-0.592884 0.808162,-1.120159 1.341797,-1.558593 0.238072,-0.3172 0.427646,-0.668043 0.5625,-1.041016 L 15.896484,13.25 16.455078,13.572266 C 17.251154,13.197189 18.119991,13.001817 19,13 c 0.988977,4.37e-4 1.962512,0.24533 2.833984,0.712891 0.0026,-0.0098 0.0052,-0.01953 0.0078,-0.0293 0.0497,-0.308727 0.0849,-0.619616 0.105469,-0.931641 v -0.002 -0.002 -0.002 -0.002 C 21.974093,12.496836 21.991684,12.248617 22,12 21.999121,11.747743 21.9887,11.49561 21.96875,11.244141 l -0.002,-0.01172 C 21.94329,10.923541 21.90549,10.615917 21.853469,10.310546 21.778459,9.8704628 21.674054,9.4358968 21.540969,9.0097646 21.432417,8.6652433 21.305277,8.3268567 21.160109,7.9960928 l -0.0059,-0.013672 -0.0078,-0.013672 C 21.001308,7.6379002 20.838309,7.3151613 20.658203,7.0019531 L 20.65625,7 C 20.47338,6.6826088 20.273208,6.3755053 20.056641,6.0800781 19.839912,5.7849743 19.60714,5.5019961 19.359375,5.2324219 19.05739,4.9038587 18.73375,4.5958786 18.390625,4.3105469 18.149005,4.1100447 17.898076,3.9210332 17.638672,3.7441406 17.222163,3.4595417 16.784717,3.2068673 16.330078,2.9882812 h -0.002 C 16.045628,2.8523913 15.756898,2.7298602 15.462891,2.6210938 15.043458,2.4662028 14.614109,2.3396167 14.177734,2.2421875 h -0.002 C 13.83401,2.1661631 13.488482,2.1081405 13.140625,2.0683594 13.114596,2.0650017 13.088554,2.0617465 13.0625,2.0585938 12.709624,2.0202193 12.354956,2.0006604 12,2 Z m -1.298828,2.25 0.43164,0.25 0.433594,0.25 v 1 L 10.701172,6.25 10.267578,6 9.8359375,5.75 v -1 L 10.103516,4.5957031 Z m 2.597656,0 0.865234,0.5 v 1 l -0.865234,0.5 -0.865234,-0.5 v -1 z m 1.882813,0.4140625 c 0.55966,0.2421723 1.089796,0.5475408 1.580078,0.9101563 V 5.75 L 16.103516,6.1308594 15.896484,6.25 15.03125,5.75 v -1 z M 8.8398438,4.6757812 8.96875,4.75 v 1 L 8.5371094,6 8.1035156,6.25 7.2382812,5.75 V 5.578125 C 7.7356899,5.2168037 8.273091,4.9140241 8.8398438,4.6757812 Z M 6.8046875,6.5 7.6699219,7 V 8 L 6.8046875,8.5 6.7011719,8.4394531 5.9394531,8 V 7.75 7 Z M 9.4023438,6.5 10.267578,7 V 8 L 9.8339844,8.25 9.4023438,8.5 8.9707031,8.25 8.5371094,8 V 7 L 8.96875,6.75 Z M 12,6.5 12.865234,7 V 7.75 8 L 12.744141,8.070312 C 12.498832,8.0237001 12.249698,8.0001598 12,8 11.754037,8.00282 11.508857,8.028315 11.267578,8.076172 L 11.134766,8 V 7 Z m 2.597656,0 0.865235,0.5 V 7.75 8 L 14.597656,8.5 13.732422,8 V 7.75 7 Z m 2.597656,0 0.865235,0.5 V 8 L 17.195312,8.5 16.330078,8 V 7 Z M 5.5058594,8.75 6.3710938,9.25 v 1 l -0.8652344,0.5 -0.8652344,-0.5 v -1 z m 2.5976562,0 0.8652344,0.5 V 9.390625 C 8.6470442,9.7691668 8.3986671,10.204323 8.2363281,10.673828 L 8.1035156,10.75 7.2382812,10.25 v -1 z m 7.7929684,0 0.865235,0.5 v 1 l -0.865235,0.5 -0.121093,-0.07031 C 15.609957,10.207918 15.357551,9.7713421 15.03125,9.3925781 V 9.25 Z m 2.597657,0 0.865234,0.5 v 1 L 18.494141,10.75 18.287109,10.630859 17.628906,10.25 v -1 z M 12,10 c 1.104569,0 2,0.895431 2,2 0,1.104569 -0.895431,2 -2,2 -1.104569,0 -2,-0.895431 -2,-2 0,-1.104569 0.895431,-2 2,-2 z m -7.7929688,1 0.8652344,0.5 v 1 L 4.2070312,13 4.0722656,12.921875 C 4.0304228,12.616234 4.0062939,12.308428 4,12 4.00629,11.691572 4.030423,11.383766 4.072266,11.078125 Z m 2.5976563,0 0.8652344,0.5 v 1 L 6.8046875,13 6.7011719,12.939453 5.9394531,12.5 v -1 l 0.7617188,-0.439453 z m 10.3906245,0 0.865235,0.5 v 1 L 17.195312,13 16.763672,12.75 16.330078,12.5 v -1 z m 2.597657,0 0.154297,0.08984 C 19.982131,11.39198 19.999737,11.695859 20,12 c -0.0063,0.308428 -0.03042,0.616234 -0.07227,0.921875 L 19.792969,13 18.927734,12.5 V 12.25 11.5 Z m -14.2871096,2.25 0.8652344,0.5 v 1 l -0.8652344,0.5 -0.8652344,-0.5 v -1 z m 2.5976562,0 0.1328125,0.07617 c 0.162339,0.469505 0.4107161,0.904661 0.7324219,1.283203 V 14.75 L 8.5371094,15 8.1035156,15.25 7.2382812,14.75 v -1 L 7.671875,13.5 Z M 6.8046875,15.5 7.6699219,16 v 1 L 6.8046875,17.5 6.7011719,17.439453 5.9394531,17 V 16.75 16 l 0.7617188,-0.439453 z m 2.5976563,0 0.4316406,0.25 0.4335936,0.25 v 1 L 9.8339844,17.25 9.4023438,17.5 8.9707031,17.25 8.5371094,17 V 16 L 8.96875,15.75 H 8.9707 Z m 1.8652342,0.423828 C 11.508857,15.971685 11.754037,15.997183 12,16 c 0.245963,-0.0028 0.491143,-0.02831 0.732422,-0.07617 L 12.865234,16 V 16.75 17 L 12.103516,17.439453 12,17.5 11.134766,17 V 16 Z M 8.1035156,17.75 8.96875,18.25 v 1 L 8.8398438,19.32422 C 8.273091,19.085976 7.7356899,18.783196 7.2382812,18.421875 V 18.25 Z m 2.5976564,0 0.865234,0.5 v 1 l -0.865234,0.5 -0.8652345,-0.5 v -1 z' const mdiFileImageLock = 'M 6 2 C 4.8900022 2 4 2.8900022 4 4 L 4 20 C 4 21.099998 4.8900022 22 6 22 L 12.009766 22 C 11.95662 21.34327 12.005856 20.659203 12.011719 20 L 6 20 L 12 14 L 13.220703 15.220703 C 13.493877 12.99107 15.651414 11.209302 17.896484 11.201172 C 18.62275 11.179377 19.34355 11.336699 20 11.632812 L 20 8 L 14 2 L 6 2 z M 13 3.5 L 18.5 9 L 13 9 L 13 3.5 z M 8 9 A 2 2 0 0 1 10 11 A 2 2 0 0 1 8 13 A 2 2 0 0 1 6 11 A 2 2 0 0 1 8 9 z M 18 13.199219 C 16.600001 13.199219 15.199219 14.29922 15.199219 15.699219 L 15.199219 17.199219 C 14.599219 17.199219 14 17.800391 14 18.400391 L 14 21.900391 C 14 22.60039 14.599219 23.199219 15.199219 23.199219 L 20.699219 23.199219 C 21.399218 23.199219 22 22.599999 22 22 L 22 18.5 C 22 17.800001 21.400781 17.199219 20.800781 17.199219 L 20.800781 15.699219 C 20.800781 14.29922 19.399999 13.199219 18 13.199219 z M 18 14.400391 C 18.799999 14.400391 19.5 14.89922 19.5 15.699219 L 19.5 17.199219 L 16.5 17.199219 L 16.5 15.699219 C 16.5 14.89922 17.200001 14.400391 18 14.400391 z' /** @@ -382,6 +383,7 @@ export const Icons = Object.freeze({ fileZipAdd: mdiArchivePlus, loadFilament: mdiFilamentDown, unloadFilament: mdiFilamentUp, + changeFilament: mdiFilamentChange, jobQueue: mdiTrayFull, enqueueJob: mdiTrayPlus }) diff --git a/src/locales/en.yaml b/src/locales/en.yaml index 2a72e93474..42c0fdb4f6 100644 --- a/src/locales/en.yaml +++ b/src/locales/en.yaml @@ -757,17 +757,20 @@ app: variable_fps_min: Minimum Framerate variable_fps_max: Maximum Framerate spoolman: + btn: + manage_spools: Manage Spools + select: Select title: spool_selection: Spool Selection label: - filament: Filament - used_weight: Used Weight + filament_name: Filament remaining_weight: Remaining Weight location: Location lot_nr: Lot Nr first_used: First Used last_used: Last Used comment: Comment + change_spool: Change Spool msg: no_spool: >- You haven't selected a spool. diff --git a/src/store/spoolman/types.ts b/src/store/spoolman/types.ts index 5b8eb13b60..b295ef1dcd 100644 --- a/src/store/spoolman/types.ts +++ b/src/store/spoolman/types.ts @@ -22,6 +22,7 @@ export interface Spool { registered: Date; filament: Filament; remaining_weight: number; + remaining_length?: number; used_weight: number; location?: string; lot_nr?: string; @@ -39,5 +40,5 @@ export interface SpoolmanState { export interface SpoolSelectionDialogState { show: boolean; - filename: string; + filename?: string; } From d086872d2bf56737680c97f1abd91c52aac786c1 Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Fri, 14 Jul 2023 22:04:15 +0200 Subject: [PATCH 08/49] feat: moar spoolman Signed-off-by: Mathis Mensing --- .../widgets/spoolman/SpoolSelectionDialog.vue | 72 ++++++++++++------- .../widgets/toolhead/ToolheadCard.vue | 6 +- src/globals.ts | 2 + 3 files changed, 52 insertions(+), 28 deletions(-) diff --git a/src/components/widgets/spoolman/SpoolSelectionDialog.vue b/src/components/widgets/spoolman/SpoolSelectionDialog.vue index f01b977249..0b87b49f5e 100644 --- a/src/components/widgets/spoolman/SpoolSelectionDialog.vue +++ b/src/components/widgets/spoolman/SpoolSelectionDialog.vue @@ -2,6 +2,7 @@ @@ -11,7 +12,7 @@ class="mb-2" > - $loadFilament + $changeFilament {{ $tc('app.spoolman.title.spool_selection') }} @@ -54,7 +55,6 @@ sort-desc mobile-breakpoint="0" class="file-system spool-table" - :height="isMobileViewport ? '75vh' : '50vh'" hide-default-footer disable-pagination > @@ -68,25 +68,31 @@
- {{ item.id === selectedSpool ? '$markedCircle' : '$circle' }} + {{ item.id === selectedSpool ? '$markedCircle' : '$filament' }} - {{ item.filament_name }} +
+
+ {{ item.filament_name }} +
+
+ + {{ item.remaining_weight.toLocaleString() }}g / {{ item.filament.weight.toLocaleString() }}g + +
+
- {{ item.remaining_weight.toLocaleString() }} / {{ item.filament.weight.toLocaleString() }} g {{ item.location }} - {{ item.lot_nr }} - {{ item.first_used ? $filters.formatRelativeTimeToNow(item.first_used) : $tc('app.setting.label.never') }} - {{ item.last_used ? $filters.formatRelativeTimeToNow(item.last_used) : $tc('app.setting.label.never') }} {{ item.comment }} + {{ item.last_used ? $filters.formatRelativeTimeToNow(item.last_used) : $tc('app.setting.label.never') }} - ({ - text: value && this.$tc(`app.spoolman.label.${value}`), + 'comment', + 'last_used' + ].map((value) => ({ + text: this.$tc(`app.spoolman.label.${value}`), value })) } @@ -186,6 +189,7 @@ export default class SpoolSelectionDialog extends Mixins(StateMixin, BrowserMixi get filename () { let filename = this.$store.state.spoolman.dialog.filename + if (!filename) { return } else if (filename.startsWith('/')) { @@ -195,6 +199,10 @@ export default class SpoolSelectionDialog extends Mixins(StateMixin, BrowserMixi return filename } + get currentFile () { + return this.filename || this.$store.state.printer.printer.print_stats.filename + } + async handleSelectSpool () { if (!this.selectedSpool) { // no spool selected @@ -215,15 +223,20 @@ export default class SpoolSelectionDialog extends Mixins(StateMixin, BrowserMixi let remainingLength = spool.remaining_length if (!remainingLength) { - // l = m/D/A - remainingLength = spool.remaining_weight / spool.filament.density / (Math.PI * (spool.filament.diameter / 2) ** 2) + // l[mm] = m[g]/D[g/cm³]/A[mm²]*(1000mm³/cm³) + remainingLength = spool.remaining_weight / spool.filament.density / (Math.PI * (spool.filament.diameter / 2) ** 2) * 1000 } - const splitFilepath = this.filename.split('/') - const filename = splitFilepath.pop() - const filepath = splitFilepath.join('/') - const requiredLength = this.$store.getters['files/getFile'](null, filepath ? `gcodes/${filepath}` : 'gcodes', filename)?.filament_total - console.log({ remainingLength, requiredLength }) + // l[mm] + let requiredLength = 0 + if (this.currentFile) { + const splitFilepath = this.currentFile.split('/') + const filename = splitFilepath.pop() + const filepath = splitFilepath.join('/') + requiredLength = this.$store.getters['files/getFile'](null, filepath ? `gcodes/${filepath}` : 'gcodes', filename)?.filament_total ?? 0 + requiredLength -= this.$store.state.printer.printer.print_stats?.filament_used ?? 0 + requiredLength = Math.max(requiredLength, 0) + } if (!requiredLength) { // missing file metadata @@ -272,3 +285,10 @@ export default class SpoolSelectionDialog extends Mixins(StateMixin, BrowserMixi } } + + diff --git a/src/components/widgets/toolhead/ToolheadCard.vue b/src/components/widgets/toolhead/ToolheadCard.vue index 044cbde0ee..8a8c1326ea 100644 --- a/src/components/widgets/toolhead/ToolheadCard.vue +++ b/src/components/widgets/toolhead/ToolheadCard.vue @@ -81,7 +81,7 @@ v-bind="attrs" small class="ms-1 my-1" - :disabled="!klippyReady || printerPrinting" + :disabled="!klippyReady" v-on="on" > @@ -154,6 +154,7 @@ type Tool = { name: string, label?: string, disabled?: boolean, + enabledOnPrint?: boolean, wait?: string, icon?: string, callback?: () => void, @@ -264,6 +265,7 @@ export default class ToolheadCard extends Mixins(StateMixin, ToolheadMixin) { name: 'CHANGE_SPOOL', label: this.$tc('app.spoolman.label.change_spool'), icon: '$changeFilament', + enabledOnPrint: true, callback: () => this.$store.commit('spoolman/setDialogState', { show: true }) }) } diff --git a/src/globals.ts b/src/globals.ts index e2b1a4ab8d..d507f95f83 100644 --- a/src/globals.ts +++ b/src/globals.ts @@ -148,6 +148,7 @@ import { mdiFileImage } from '@mdi/js' +const mdiFilament = 'M 12 2 C 11.811244 2.0027 11.62182 2.01009 11.433594 2.0234375 C 11.245368 2.0367892 11.058338 2.0560871 10.871094 2.0800781 C 10.528376 2.1223311 10.188076 2.1823072 9.8515625 2.2597656 C 9.4050859 2.3584685 8.9659029 2.4876777 8.5371094 2.6464844 C 8.2433457 2.7507726 7.9546177 2.8687402 7.671875 3 L 7.6699219 3 C 7.2200923 3.2179359 6.7872406 3.4692919 6.375 3.7519531 C 6.1149723 3.9281592 5.8633915 4.1165194 5.6210938 4.3164062 C 5.2734281 4.6063526 4.9458497 4.9195737 4.640625 5.2539062 C 4.4299712 5.4884886 4.2305306 5.7329027 4.0429688 5.9863281 C 4.0007188 6.0418801 3.9590487 6.0978726 3.9179688 6.1542969 C 3.7241339 6.4206091 3.543575 6.6963363 3.3769531 6.9804688 C 3.3651531 7.0019097 3.3534369 7.0233949 3.3417969 7.0449219 C 2.9828732 7.6642764 2.691488 8.3203821 2.4726562 9.0019531 C 2.3383154 9.4325109 2.233258 9.8716656 2.1582031 10.316406 C 2.1085032 10.625133 2.0733024 10.936022 2.0527344 11.248047 L 2.0527344 11.25 L 2.0527344 11.251953 L 2.0527344 11.253906 L 2.0527344 11.255859 C 2.0258944 11.502973 2.00832 11.751383 2 12 C 2.000879 12.252257 2.0113 12.504391 2.03125 12.755859 L 2.0332031 12.767578 C 2.0566631 13.076458 2.0944624 13.384082 2.1464844 13.689453 C 2.2214943 14.129536 2.3258985 14.564103 2.4589844 14.990234 C 2.5675343 15.334756 2.6946769 15.673142 2.8398438 16.003906 L 2.8457031 16.017578 L 2.8535156 16.03125 C 2.9986205 16.362102 3.1616911 16.684839 3.3417969 16.998047 L 3.34375 17 C 3.5265728 17.317394 3.7267926 17.624495 3.9433594 17.919922 C 4.1600882 18.215026 4.3928602 18.498004 4.640625 18.767578 C 4.9426097 19.096141 5.2662503 19.404121 5.609375 19.689453 C 5.8509948 19.889955 6.1019244 20.078968 6.3613281 20.255859 C 6.7778367 20.540458 7.2152833 20.793132 7.6699219 21.011719 L 7.671875 21.011719 C 7.9543247 21.147608 8.2431027 21.27014 8.5371094 21.378906 C 8.956542 21.533797 9.3858911 21.660384 9.8222656 21.757812 L 9.8242188 21.757812 C 10.165943 21.833832 10.511518 21.891861 10.859375 21.931641 C 10.885405 21.935041 10.91144 21.938206 10.9375 21.941406 C 11.290376 21.979776 11.645044 21.99934 12 22 C 12.188756 21.9973 12.37818 21.98991 12.566406 21.976562 C 12.754632 21.963215 12.941662 21.943912 13.128906 21.919922 C 13.471624 21.877672 13.811924 21.817693 14.148438 21.740234 C 14.594914 21.641534 15.034096 21.512323 15.462891 21.353516 C 15.756653 21.249229 16.045381 21.131261 16.328125 21 L 16.330078 21 C 16.779908 20.782064 17.21276 20.530708 17.625 20.248047 C 17.885029 20.07184 18.136608 19.883481 18.378906 19.683594 C 18.726573 19.393647 19.054149 19.080425 19.359375 18.746094 C 19.570029 18.511511 19.76947 18.267097 19.957031 18.013672 C 19.999281 17.958122 20.040951 17.902127 20.082031 17.845703 C 20.275866 17.57939 20.456425 17.303665 20.623047 17.019531 C 20.634847 16.998091 20.646563 16.976598 20.658203 16.955078 C 21.017127 16.335724 21.308511 15.679617 21.527344 14.998047 C 21.661685 14.567489 21.766742 14.128334 21.841797 13.683594 C 21.891497 13.374867 21.926698 13.063978 21.947266 12.751953 L 21.947266 12.75 L 21.947266 12.748047 L 21.947266 12.746094 L 21.947266 12.744141 C 21.974096 12.496824 21.99169 12.248617 22 12 C 21.999121 11.747743 21.9887 11.495609 21.96875 11.244141 L 21.966797 11.232422 C 21.943337 10.923542 21.905537 10.615918 21.853516 10.310547 C 21.778506 9.8704641 21.6741 9.4358974 21.541016 9.0097656 C 21.432464 8.6652447 21.305324 8.3268573 21.160156 7.9960938 L 21.154297 7.9824219 L 21.146484 7.96875 C 21.001384 7.6379017 20.838309 7.315161 20.658203 7.0019531 L 20.65625 7 C 20.47338 6.6826091 20.273207 6.375505 20.056641 6.0800781 C 19.839912 5.7849746 19.60714 5.5019958 19.359375 5.2324219 C 19.05739 4.903859 18.73375 4.5958783 18.390625 4.3105469 C 18.149005 4.1100449 17.898076 3.921033 17.638672 3.7441406 C 17.222163 3.459542 16.784717 3.2068671 16.330078 2.9882812 L 16.328125 2.9882812 C 16.045675 2.8523915 15.756897 2.72986 15.462891 2.6210938 C 15.043458 2.4662029 14.614109 2.3396166 14.177734 2.2421875 L 14.175781 2.2421875 C 13.834058 2.1661636 13.488482 2.1081404 13.140625 2.0683594 C 13.114595 2.0649994 13.08856 2.0617537 13.0625 2.0585938 C 12.709629 2.0202237 12.354956 2.0006604 12 2 z M 10.701172 4.25 L 10.957031 4.3984375 L 11.066406 4.4609375 L 11.132812 4.5 L 11.566406 4.75 L 11.566406 5.75 L 11.132812 6 L 10.875 6.1484375 C 10.874877 6.1490598 10.875123 6.1497684 10.875 6.1503906 L 10.701172 6.25 L 10.267578 6 L 9.8359375 5.75 L 9.8359375 4.75 L 10.103516 4.5957031 L 10.701172 4.25 z M 13.298828 4.25 L 14.164062 4.75 L 14.164062 5.75 L 13.298828 6.25 L 12.433594 5.75 L 12.433594 4.75 L 13.298828 4.25 z M 8.8398438 4.6757812 L 8.96875 4.75 L 8.96875 5.75 L 8.5371094 6 L 8.1035156 6.25 L 7.2382812 5.75 L 7.2382812 5.578125 C 7.7356888 5.2168041 8.2730923 4.9140239 8.8398438 4.6757812 z M 15.160156 4.6757812 C 15.726909 4.914025 16.264309 5.2168044 16.761719 5.578125 L 16.761719 5.75 L 16.103516 6.1308594 L 15.896484 6.25 L 15.03125 5.75 L 15.03125 4.75 L 15.160156 4.6757812 z M 6.8046875 6.5 L 7.6699219 7 L 7.6699219 8 L 6.8046875 8.5 L 6.7011719 8.4394531 L 5.9394531 8 L 5.9394531 7.75 L 5.9394531 7 L 6.8046875 6.5 z M 9.4023438 6.5 L 10.267578 7 L 10.267578 7.8398438 L 10.267578 8 L 10.140625 8.0742188 L 9.8339844 8.25 L 9.4023438 8.5 L 8.9707031 8.25 L 8.5371094 8 L 8.5371094 7 L 8.96875 6.75 L 9.4023438 6.5 z M 12 6.5 L 12.865234 7 L 12.865234 7.75 L 12.865234 8 L 12.744141 8.0703125 C 12.743508 8.0701923 12.74282 8.0704324 12.742188 8.0703125 C 12.497492 8.0239396 12.249054 8.0001594 12 8 C 11.754037 8.00282 11.508857 8.0283149 11.267578 8.0761719 L 11.134766 8 L 11.134766 7.25 L 11.134766 7 L 11.896484 6.5605469 L 12 6.5 z M 14.597656 6.5 L 15.029297 6.75 L 15.462891 7 L 15.462891 8 L 14.597656 8.5 L 14.166016 8.25 L 13.732422 8 L 13.732422 7 L 14.166016 6.75 L 14.597656 6.5 z M 17.195312 6.5 L 17.298828 6.5605469 L 18.060547 7 L 18.060547 7.25 L 18.060547 8 L 17.298828 8.4394531 L 17.195312 8.5 L 16.330078 8 L 16.330078 7 L 17.195312 6.5 z M 5.5058594 8.75 L 6.3710938 9.25 L 6.3710938 10.25 L 5.5058594 10.75 L 4.640625 10.25 L 4.640625 9.25 L 5.5058594 8.75 z M 8.1035156 8.75 L 8.96875 9.25 L 8.96875 9.390625 C 8.6470443 9.7691664 8.398667 10.204324 8.2363281 10.673828 L 8.1035156 10.75 L 7.5449219 10.427734 L 7.2382812 10.25 L 7.2382812 9.25 L 8.1035156 8.75 z M 15.896484 8.75 L 16.761719 9.25 L 16.761719 10.25 L 16.328125 10.5 L 15.896484 10.75 L 15.775391 10.679688 C 15.6258 10.253096 15.401287 9.8581752 15.119141 9.5058594 C 15.089259 9.4685462 15.062498 9.4288507 15.03125 9.3925781 L 15.03125 9.390625 L 15.03125 9.25 L 15.462891 9 L 15.896484 8.75 z M 18.494141 8.75 L 19.359375 9.25 L 19.359375 10.25 L 18.494141 10.75 L 18.287109 10.630859 L 17.628906 10.25 L 17.628906 9.25 L 18.494141 8.75 z M 12 10 C 13.104568 10 14 10.895432 14 12 C 14 13.035532 13.213589 13.887814 12.205078 13.990234 C 12.137844 13.997062 12.069035 14 12 14 C 11.792894 14 11.592174 13.968592 11.404297 13.910156 C 11.028542 13.793284 10.701584 13.567814 10.457031 13.271484 C 10.416272 13.222096 10.377738 13.172341 10.341797 13.119141 C 10.126148 12.799939 10 12.414213 10 12 C 10 11.930965 10.002938 11.862156 10.009766 11.794922 C 10.037078 11.525986 10.119032 11.273584 10.242188 11.046875 C 10.396132 10.763489 10.614858 10.521504 10.880859 10.341797 C 10.93406 10.305855 10.990198 10.272976 11.046875 10.242188 C 11.330261 10.088243 11.654823 10 12 10 z M 4.2070312 11 L 5.0722656 11.5 L 5.0722656 11.75 L 5.0722656 12.5 L 4.2070312 13 L 4.0722656 12.921875 C 4.0304257 12.616234 4.0063 12.308428 4 12 C 4.00315 11.845786 4.0113888 11.690819 4.0234375 11.537109 C 4.0354862 11.383399 4.0513406 11.230945 4.0722656 11.078125 L 4.2070312 11 z M 6.8046875 11 L 7.2363281 11.25 L 7.6699219 11.5 L 7.6699219 12.5 L 6.8046875 13 L 6.7011719 12.939453 L 5.9394531 12.5 L 5.9394531 11.5 L 6.7011719 11.060547 L 6.8046875 11 z M 17.195312 11 L 17.298828 11.060547 L 18.060547 11.5 L 18.060547 12.5 L 17.298828 12.939453 L 17.195312 13 L 16.763672 12.75 L 16.330078 12.5 L 16.330078 11.5 L 17.195312 11 z M 19.792969 11 L 19.927734 11.078125 C 19.969574 11.383766 19.9937 11.691572 20 12 C 19.9937 12.308428 19.969584 12.616234 19.927734 12.921875 L 19.792969 13 L 18.927734 12.5 L 18.927734 12.25 L 18.927734 11.5 L 19.792969 11 z M 5.5058594 13.25 L 5.7128906 13.369141 L 6.3710938 13.75 L 6.3710938 14.75 L 5.5058594 15.25 L 4.640625 14.75 L 4.640625 13.75 L 5.5058594 13.25 z M 8.1035156 13.25 L 8.2246094 13.320312 C 8.3742003 13.746904 8.5987134 14.141825 8.8808594 14.494141 C 8.9107409 14.531454 8.9375015 14.571149 8.96875 14.607422 C 8.9690848 14.607816 8.968415 14.608981 8.96875 14.609375 L 8.96875 14.75 L 8.5371094 15 L 8.1035156 15.25 L 7.2382812 14.75 L 7.2382812 13.75 L 7.671875 13.5 L 8.1035156 13.25 z M 15.896484 13.25 L 16.455078 13.572266 L 16.761719 13.75 L 16.761719 14.75 L 15.896484 15.25 L 15.03125 14.75 L 15.03125 14.609375 C 15.288819 14.306302 15.495308 13.965789 15.652344 13.601562 C 15.6928 13.511265 15.729958 13.419415 15.763672 13.326172 L 15.896484 13.25 z M 18.494141 13.25 L 19.359375 13.75 L 19.359375 14.75 L 18.494141 15.25 L 17.628906 14.75 L 17.628906 13.75 L 18.494141 13.25 z M 6.8046875 15.5 L 7.6699219 16 L 7.6699219 17 L 6.8046875 17.5 L 6.7011719 17.439453 L 5.9394531 17 L 5.9394531 16.75 L 5.9394531 16 L 6.7011719 15.560547 L 6.8046875 15.5 z M 9.4023438 15.5 L 9.8339844 15.75 L 10.267578 16 L 10.267578 17 L 9.8339844 17.25 L 9.4023438 17.5 L 8.9707031 17.25 L 8.5371094 17 L 8.5371094 16.25 L 8.5371094 16 L 8.96875 15.75 L 8.9707031 15.75 L 9.4023438 15.5 z M 14.597656 15.5 L 15.029297 15.75 L 15.462891 16 L 15.462891 17 L 15.03125 17.25 L 14.597656 17.5 L 13.732422 17 L 13.732422 16.160156 L 13.732422 16 L 13.859375 15.925781 L 14.166016 15.75 L 14.597656 15.5 z M 17.195312 15.5 L 17.298828 15.560547 L 18.060547 16 L 18.060547 16.25 L 18.060547 17 L 17.195312 17.5 L 16.330078 17 L 16.330078 16 L 17.195312 15.5 z M 12.732422 15.923828 L 12.865234 16 L 12.865234 16.75 L 12.865234 17 L 12.103516 17.439453 L 12 17.5 L 11.134766 17 L 11.134766 16 L 11.255859 15.929688 C 11.256492 15.929808 11.25718 15.929568 11.257812 15.929688 C 11.502508 15.976059 11.750946 15.99984 12 16 C 12.122981 15.9986 12.244987 15.991227 12.367188 15.978516 C 12.489388 15.965806 12.611782 15.947758 12.732422 15.923828 z M 8.1035156 17.75 L 8.96875 18.25 L 8.96875 19.25 L 8.8398438 19.324219 C 8.2730923 19.085975 7.7356888 18.783196 7.2382812 18.421875 L 7.2382812 18.25 L 7.8964844 17.869141 L 8.1035156 17.75 z M 10.701172 17.75 L 11.566406 18.25 L 11.566406 19.25 L 10.701172 19.75 L 9.8359375 19.25 L 9.8359375 18.25 L 10.701172 17.75 z M 13.298828 17.75 L 13.732422 18 L 14.164062 18.25 L 14.164062 19.25 L 13.896484 19.404297 L 13.298828 19.75 L 13.042969 19.601562 L 12.867188 19.5 L 12.433594 19.25 L 12.433594 18.25 L 12.867188 18 L 13.125 17.851562 C 13.125123 17.85094 13.124877 17.850232 13.125 17.849609 L 13.298828 17.75 z M 15.896484 17.75 L 16.761719 18.25 L 16.761719 18.421875 C 16.264309 18.783196 15.726909 19.085977 15.160156 19.324219 L 15.03125 19.25 L 15.03125 18.25 L 15.462891 18 L 15.896484 17.75 z' const mdiFilamentDown = 'M 12 2 A 10 10 0 0 0 10.871094 2.0800781 A 10 10 0 0 0 9.8515625 2.2597656 A 10 10 0 0 0 8.5371094 2.6464844 A 10 10 0 0 0 7.671875 3 A 10 10 0 0 0 7.6699219 3 A 10 10 0 0 0 6.375 3.7519531 A 10 10 0 0 0 5.6210938 4.3164062 A 10 10 0 0 0 4.640625 5.2539062 A 10 10 0 0 0 4.0429688 5.9863281 A 10 10 0 0 0 3.9179688 6.1542969 A 10 10 0 0 0 3.3769531 6.9804688 A 10 10 0 0 0 3.3417969 7.0449219 A 10 10 0 0 0 2.4726562 9.0019531 A 10 10 0 0 0 2.1582031 10.316406 A 10 10 0 0 0 2.0527344 11.248047 A 10 10 0 0 0 2.0527344 11.255859 A 10 10 0 0 0 2 12 A 10 10 0 0 0 2.0527344 12.742188 A 10 10 0 0 0 2.0527344 12.748047 A 10 10 0 0 0 2.1582031 13.683594 A 10 10 0 0 0 2.4726562 14.998047 A 10 10 0 0 0 3.3417969 16.955078 A 10 10 0 0 0 3.3769531 17.019531 A 10 10 0 0 0 3.9179688 17.845703 A 10 10 0 0 0 4.0429688 18.013672 A 10 10 0 0 0 4.640625 18.746094 A 10 10 0 0 0 5.6210938 19.683594 A 10 10 0 0 0 6.375 20.248047 A 10 10 0 0 0 7.6699219 21 A 10 10 0 0 0 7.671875 21 A 10 10 0 0 0 8.5371094 21.353516 A 10 10 0 0 0 9.8515625 21.740234 A 10 10 0 0 0 10.871094 21.919922 A 10 10 0 0 0 12 22 A 10 10 0 0 0 13.128906 21.919922 A 10 10 0 0 0 13.71875 21.816406 A 6 6 0 0 1 13.042969 19.601562 L 12.433594 19.25 L 12.433594 18.25 L 12.867188 18 L 13.125 17.851562 A 6 6 0 0 1 13.732422 16.160156 L 13.732422 16 L 13.859375 15.925781 A 6 6 0 0 1 15.201172 14.367188 A 4 4 0 0 0 15.763672 13.326172 L 15.896484 13.25 L 16.455078 13.572266 A 6 6 0 0 1 19 13 A 6 6 0 0 1 21.833984 13.712891 A 10 10 0 0 0 21.841797 13.683594 A 10 10 0 0 0 21.947266 12.751953 A 10 10 0 0 0 21.947266 12.75 A 10 10 0 0 0 21.947266 12.748047 A 10 10 0 0 0 21.947266 12.746094 A 10 10 0 0 0 21.947266 12.744141 A 10 10 0 0 0 22 12 A 10 10 0 0 0 21.96875 11.244141 A 10 10 0 0 0 21.966797 11.232422 A 10 10 0 0 0 21.853516 10.310547 A 10 10 0 0 0 21.541016 9.0097656 A 10 10 0 0 0 21.160156 7.9960938 A 10 10 0 0 0 21.154297 7.9824219 A 10 10 0 0 0 21.146484 7.96875 A 10 10 0 0 0 20.658203 7.0019531 A 10 10 0 0 0 20.65625 7 A 10 10 0 0 0 20.056641 6.0800781 A 10 10 0 0 0 19.359375 5.2324219 A 10 10 0 0 0 18.390625 4.3105469 A 10 10 0 0 0 17.638672 3.7441406 A 10 10 0 0 0 16.330078 2.9882812 A 10 10 0 0 0 16.328125 2.9882812 A 10 10 0 0 0 15.462891 2.6210938 A 10 10 0 0 0 14.177734 2.2421875 A 10 10 0 0 0 14.175781 2.2421875 A 10 10 0 0 0 13.140625 2.0683594 A 10 10 0 0 0 13.0625 2.0585938 A 10 10 0 0 0 12 2 z M 10.701172 4.25 L 11.132812 4.5 L 11.566406 4.75 L 11.566406 5.75 L 10.701172 6.25 L 10.267578 6 L 9.8359375 5.75 L 9.8359375 4.75 L 10.103516 4.5957031 L 10.701172 4.25 z M 13.298828 4.25 L 14.164062 4.75 L 14.164062 5.75 L 13.298828 6.25 L 12.433594 5.75 L 12.433594 4.75 L 13.298828 4.25 z M 15.181641 4.6640625 A 8 8 0 0 1 16.761719 5.5742188 L 16.761719 5.75 L 16.103516 6.1308594 L 15.896484 6.25 L 15.03125 5.75 L 15.03125 4.75 L 15.181641 4.6640625 z M 8.8398438 4.6757812 L 8.96875 4.75 L 8.96875 5.75 L 8.5371094 6 L 8.1035156 6.25 L 7.2382812 5.75 L 7.2382812 5.578125 A 8 8 0 0 1 8.8398438 4.6757812 z M 6.8046875 6.5 L 7.6699219 7 L 7.6699219 8 L 6.8046875 8.5 L 6.7011719 8.4394531 L 5.9394531 8 L 5.9394531 7.75 L 5.9394531 7 L 6.8046875 6.5 z M 9.4023438 6.5 L 10.267578 7 L 10.267578 8 L 9.8339844 8.25 L 9.4023438 8.5 L 8.9707031 8.25 L 8.5371094 8 L 8.5371094 7 L 8.96875 6.75 L 9.4023438 6.5 z M 12 6.5 L 12.865234 7 L 12.865234 7.75 L 12.865234 8 L 12.744141 8.0703125 A 4 4 0 0 0 12 8 A 4 4 0 0 0 11.267578 8.0761719 L 11.134766 8 L 11.134766 7 L 12 6.5 z M 14.597656 6.5 L 15.462891 7 L 15.462891 7.75 L 15.462891 8 L 14.597656 8.5 L 13.732422 8 L 13.732422 7.75 L 13.732422 7 L 14.597656 6.5 z M 17.195312 6.5 L 18.060547 7 L 18.060547 8 L 17.195312 8.5 L 16.330078 8 L 16.330078 7 L 17.195312 6.5 z M 5.5058594 8.75 L 6.3710938 9.25 L 6.3710938 10.25 L 5.5058594 10.75 L 4.640625 10.25 L 4.640625 9.25 L 5.5058594 8.75 z M 8.1035156 8.75 L 8.96875 9.25 L 8.96875 9.390625 A 4 4 0 0 0 8.2363281 10.673828 L 8.1035156 10.75 L 7.2382812 10.25 L 7.2382812 9.25 L 8.1035156 8.75 z M 15.896484 8.75 L 16.761719 9.25 L 16.761719 10.25 L 15.896484 10.75 L 15.775391 10.679688 A 4 4 0 0 0 15.03125 9.3925781 L 15.03125 9.25 L 15.896484 8.75 z M 18.494141 8.75 L 19.359375 9.25 L 19.359375 10.25 L 18.494141 10.75 L 18.287109 10.630859 L 17.628906 10.25 L 17.628906 9.25 L 18.494141 8.75 z M 12 10 A 2 2 0 0 1 14 12 A 2 2 0 0 1 12 14 A 2 2 0 0 1 10 12 A 2 2 0 0 1 12 10 z M 4.2070312 11 L 5.0722656 11.5 L 5.0722656 12.5 L 4.2070312 13 L 4.0722656 12.921875 A 8 8 0 0 1 4 12 A 8 8 0 0 1 4.0722656 11.078125 L 4.2070312 11 z M 6.8046875 11 L 7.6699219 11.5 L 7.6699219 12.5 L 6.8046875 13 L 6.7011719 12.939453 L 5.9394531 12.5 L 5.9394531 11.5 L 6.7011719 11.060547 L 6.8046875 11 z M 17.195312 11 L 18.060547 11.5 L 18.060547 12.5 L 17.195312 13 L 16.763672 12.75 L 16.330078 12.5 L 16.330078 11.5 L 17.195312 11 z M 19.792969 11 L 19.947266 11.089844 A 8 8 0 0 1 20 12 A 8 8 0 0 1 19.927734 12.921875 L 19.792969 13 L 18.927734 12.5 L 18.927734 12.25 L 18.927734 11.5 L 19.792969 11 z M 5.5058594 13.25 L 6.3710938 13.75 L 6.3710938 14.75 L 5.5058594 15.25 L 4.640625 14.75 L 4.640625 13.75 L 5.5058594 13.25 z M 8.1035156 13.25 L 8.2363281 13.326172 A 4 4 0 0 0 8.96875 14.609375 L 8.96875 14.75 L 8.5371094 15 L 8.1035156 15.25 L 7.2382812 14.75 L 7.2382812 13.75 L 7.671875 13.5 L 8.1035156 13.25 z M 6.8046875 15.5 L 7.6699219 16 L 7.6699219 17 L 6.8046875 17.5 L 6.7011719 17.439453 L 5.9394531 17 L 5.9394531 16.75 L 5.9394531 16 L 6.7011719 15.560547 L 6.8046875 15.5 z M 9.4023438 15.5 L 9.8339844 15.75 L 10.267578 16 L 10.267578 17 L 9.8339844 17.25 L 9.4023438 17.5 L 8.9707031 17.25 L 8.5371094 17 L 8.5371094 16 L 8.96875 15.75 L 8.9707031 15.75 L 9.4023438 15.5 z M 11.267578 15.923828 A 4 4 0 0 0 12 16 A 4 4 0 0 0 12.732422 15.923828 L 12.865234 16 L 12.865234 16.75 L 12.865234 17 L 12.103516 17.439453 L 12 17.5 L 11.134766 17 L 11.134766 16 L 11.267578 15.923828 z M 18 16 L 18 20 L 16 20 L 19 23 L 22 20 L 20 20 L 20 16 L 18 16 z M 8.1035156 17.75 L 8.96875 18.25 L 8.96875 19.25 L 8.8398438 19.324219 A 8 8 0 0 1 7.2382812 18.421875 L 7.2382812 18.25 L 8.1035156 17.75 z M 10.701172 17.75 L 11.566406 18.25 L 11.566406 19.25 L 10.701172 19.75 L 9.8359375 19.25 L 9.8359375 18.25 L 10.701172 17.75 z' const mdiFilamentUp = 'M 12 2 A 10 10 0 0 0 10.871094 2.0800781 A 10 10 0 0 0 9.8515625 2.2597656 A 10 10 0 0 0 8.5371094 2.6464844 A 10 10 0 0 0 7.671875 3 A 10 10 0 0 0 7.6699219 3 A 10 10 0 0 0 6.375 3.7519531 A 10 10 0 0 0 5.6210938 4.3164062 A 10 10 0 0 0 4.640625 5.2539062 A 10 10 0 0 0 4.0429688 5.9863281 A 10 10 0 0 0 3.9179688 6.1542969 A 10 10 0 0 0 3.3769531 6.9804688 A 10 10 0 0 0 3.3417969 7.0449219 A 10 10 0 0 0 2.4726562 9.0019531 A 10 10 0 0 0 2.1582031 10.316406 A 10 10 0 0 0 2.0527344 11.248047 A 10 10 0 0 0 2.0527344 11.255859 A 10 10 0 0 0 2 12 A 10 10 0 0 0 2.0527344 12.742188 A 10 10 0 0 0 2.0527344 12.748047 A 10 10 0 0 0 2.1582031 13.683594 A 10 10 0 0 0 2.4726562 14.998047 A 10 10 0 0 0 3.3417969 16.955078 A 10 10 0 0 0 3.3769531 17.019531 A 10 10 0 0 0 3.9179688 17.845703 A 10 10 0 0 0 4.0429688 18.013672 A 10 10 0 0 0 4.640625 18.746094 A 10 10 0 0 0 5.6210938 19.683594 A 10 10 0 0 0 6.375 20.248047 A 10 10 0 0 0 7.6699219 21 A 10 10 0 0 0 7.671875 21 A 10 10 0 0 0 8.5371094 21.353516 A 10 10 0 0 0 9.8515625 21.740234 A 10 10 0 0 0 10.871094 21.919922 A 10 10 0 0 0 12 22 A 10 10 0 0 0 13.128906 21.919922 A 10 10 0 0 0 13.71875 21.816406 A 6 6 0 0 1 13.042969 19.601562 L 12.433594 19.25 L 12.433594 18.25 L 12.867188 18 L 13.125 17.851562 A 6 6 0 0 1 13.732422 16.160156 L 13.732422 16 L 13.859375 15.925781 A 6 6 0 0 1 15.201172 14.367188 A 4 4 0 0 0 15.763672 13.326172 L 15.896484 13.25 L 16.455078 13.572266 A 6 6 0 0 1 19 13 A 6 6 0 0 1 21.833984 13.712891 A 10 10 0 0 0 21.841797 13.683594 A 10 10 0 0 0 21.947266 12.751953 A 10 10 0 0 0 21.947266 12.75 A 10 10 0 0 0 21.947266 12.748047 A 10 10 0 0 0 21.947266 12.746094 A 10 10 0 0 0 21.947266 12.744141 A 10 10 0 0 0 22 12 A 10 10 0 0 0 21.96875 11.244141 A 10 10 0 0 0 21.966797 11.232422 A 10 10 0 0 0 21.853516 10.310547 A 10 10 0 0 0 21.541016 9.0097656 A 10 10 0 0 0 21.160156 7.9960938 A 10 10 0 0 0 21.154297 7.9824219 A 10 10 0 0 0 21.146484 7.96875 A 10 10 0 0 0 20.658203 7.0019531 A 10 10 0 0 0 20.65625 7 A 10 10 0 0 0 20.056641 6.0800781 A 10 10 0 0 0 19.359375 5.2324219 A 10 10 0 0 0 18.390625 4.3105469 A 10 10 0 0 0 17.638672 3.7441406 A 10 10 0 0 0 16.330078 2.9882812 A 10 10 0 0 0 16.328125 2.9882812 A 10 10 0 0 0 15.462891 2.6210938 A 10 10 0 0 0 14.177734 2.2421875 A 10 10 0 0 0 14.175781 2.2421875 A 10 10 0 0 0 13.140625 2.0683594 A 10 10 0 0 0 13.0625 2.0585938 A 10 10 0 0 0 12 2 z M 10.701172 4.25 L 11.132812 4.5 L 11.566406 4.75 L 11.566406 5.75 L 10.701172 6.25 L 10.267578 6 L 9.8359375 5.75 L 9.8359375 4.75 L 10.103516 4.5957031 L 10.701172 4.25 z M 13.298828 4.25 L 14.164062 4.75 L 14.164062 5.75 L 13.298828 6.25 L 12.433594 5.75 L 12.433594 4.75 L 13.298828 4.25 z M 15.181641 4.6640625 A 8 8 0 0 1 16.761719 5.5742188 L 16.761719 5.75 L 16.103516 6.1308594 L 15.896484 6.25 L 15.03125 5.75 L 15.03125 4.75 L 15.181641 4.6640625 z M 8.8398438 4.6757812 L 8.96875 4.75 L 8.96875 5.75 L 8.5371094 6 L 8.1035156 6.25 L 7.2382812 5.75 L 7.2382812 5.578125 A 8 8 0 0 1 8.8398438 4.6757812 z M 6.8046875 6.5 L 7.6699219 7 L 7.6699219 8 L 6.8046875 8.5 L 6.7011719 8.4394531 L 5.9394531 8 L 5.9394531 7.75 L 5.9394531 7 L 6.8046875 6.5 z M 9.4023438 6.5 L 10.267578 7 L 10.267578 8 L 9.8339844 8.25 L 9.4023438 8.5 L 8.9707031 8.25 L 8.5371094 8 L 8.5371094 7 L 8.96875 6.75 L 9.4023438 6.5 z M 12 6.5 L 12.865234 7 L 12.865234 7.75 L 12.865234 8 L 12.744141 8.0703125 A 4 4 0 0 0 12 8 A 4 4 0 0 0 11.267578 8.0761719 L 11.134766 8 L 11.134766 7 L 12 6.5 z M 14.597656 6.5 L 15.462891 7 L 15.462891 7.75 L 15.462891 8 L 14.597656 8.5 L 13.732422 8 L 13.732422 7.75 L 13.732422 7 L 14.597656 6.5 z M 17.195312 6.5 L 18.060547 7 L 18.060547 8 L 17.195312 8.5 L 16.330078 8 L 16.330078 7 L 17.195312 6.5 z M 5.5058594 8.75 L 6.3710938 9.25 L 6.3710938 10.25 L 5.5058594 10.75 L 4.640625 10.25 L 4.640625 9.25 L 5.5058594 8.75 z M 8.1035156 8.75 L 8.96875 9.25 L 8.96875 9.390625 A 4 4 0 0 0 8.2363281 10.673828 L 8.1035156 10.75 L 7.2382812 10.25 L 7.2382812 9.25 L 8.1035156 8.75 z M 15.896484 8.75 L 16.761719 9.25 L 16.761719 10.25 L 15.896484 10.75 L 15.775391 10.679688 A 4 4 0 0 0 15.03125 9.3925781 L 15.03125 9.25 L 15.896484 8.75 z M 18.494141 8.75 L 19.359375 9.25 L 19.359375 10.25 L 18.494141 10.75 L 18.287109 10.630859 L 17.628906 10.25 L 17.628906 9.25 L 18.494141 8.75 z M 12 10 A 2 2 0 0 1 14 12 A 2 2 0 0 1 12 14 A 2 2 0 0 1 10 12 A 2 2 0 0 1 12 10 z M 4.2070312 11 L 5.0722656 11.5 L 5.0722656 12.5 L 4.2070312 13 L 4.0722656 12.921875 A 8 8 0 0 1 4 12 A 8 8 0 0 1 4.0722656 11.078125 L 4.2070312 11 z M 6.8046875 11 L 7.6699219 11.5 L 7.6699219 12.5 L 6.8046875 13 L 6.7011719 12.939453 L 5.9394531 12.5 L 5.9394531 11.5 L 6.7011719 11.060547 L 6.8046875 11 z M 17.195312 11 L 18.060547 11.5 L 18.060547 12.5 L 17.195312 13 L 16.763672 12.75 L 16.330078 12.5 L 16.330078 11.5 L 17.195312 11 z M 19.792969 11 L 19.947266 11.089844 A 8 8 0 0 1 20 12 A 8 8 0 0 1 19.927734 12.921875 L 19.792969 13 L 18.927734 12.5 L 18.927734 12.25 L 18.927734 11.5 L 19.792969 11 z M 5.5058594 13.25 L 6.3710938 13.75 L 6.3710938 14.75 L 5.5058594 15.25 L 4.640625 14.75 L 4.640625 13.75 L 5.5058594 13.25 z M 8.1035156 13.25 L 8.2363281 13.326172 A 4 4 0 0 0 8.96875 14.609375 L 8.96875 14.75 L 8.5371094 15 L 8.1035156 15.25 L 7.2382812 14.75 L 7.2382812 13.75 L 7.671875 13.5 L 8.1035156 13.25 z M 19 15 L 16 18 L 18 18 L 18 22 L 20 22 L 20 18 L 22 18 L 19 15 z M 6.8046875 15.5 L 7.6699219 16 L 7.6699219 17 L 6.8046875 17.5 L 6.7011719 17.439453 L 5.9394531 17 L 5.9394531 16.75 L 5.9394531 16 L 6.7011719 15.560547 L 6.8046875 15.5 z M 9.4023438 15.5 L 9.8339844 15.75 L 10.267578 16 L 10.267578 17 L 9.8339844 17.25 L 9.4023438 17.5 L 8.9707031 17.25 L 8.5371094 17 L 8.5371094 16 L 8.96875 15.75 L 8.9707031 15.75 L 9.4023438 15.5 z M 11.267578 15.923828 A 4 4 0 0 0 12 16 A 4 4 0 0 0 12.732422 15.923828 L 12.865234 16 L 12.865234 16.75 L 12.865234 17 L 12.103516 17.439453 L 12 17.5 L 11.134766 17 L 11.134766 16 L 11.267578 15.923828 z M 8.1035156 17.75 L 8.96875 18.25 L 8.96875 19.25 L 8.8398438 19.324219 A 8 8 0 0 1 7.2382812 18.421875 L 7.2382812 18.25 L 8.1035156 17.75 z M 10.701172 17.75 L 11.566406 18.25 L 11.566406 19.25 L 10.701172 19.75 L 9.8359375 19.25 L 9.8359375 18.25 L 10.701172 17.75 z' const mdiFilamentChange = 'm 23.5,18.5 -3,-3 v 2 h -4 v 2 h 4 v 2 z m -9,0 3,3 v -2 h 4 v -2 h -4 v -2 z M 12,2 C 11.622488,2.00536 11.245583,2.032096 10.871094,2.080078 10.528376,2.122331 10.188076,2.182307 9.8515625,2.2597655 9.4050853,2.3584681 8.9659036,2.4876776 8.5371094,2.6464844 8.2433456,2.7507727 7.9546188,2.8687401 7.671875,3 H 7.669925 C 7.2200951,3.2179361 6.7872412,3.4692916 6.375,3.7519531 6.1149725,3.9281594 5.8633915,4.1165192 5.6210938,4.3164062 5.2734271,4.6063528 4.9458507,4.9195733 4.640625,5.2539062 4.4299716,5.4884888 4.2305301,5.7329024 4.0429688,5.9863281 4.0007171,6.04188 3.9590482,6.0978726 3.9179688,6.1542969 3.7241339,6.4206094 3.5435752,6.6963361 3.3769531,6.9804688 3.3651555,7.0019101 3.3534367,7.0233946 3.3417969,7.0449219 2.9828723,7.664277 2.6914886,8.3203814 2.4726562,9.0019531 2.3383156,9.4325113 2.233258,9.871665 2.1582031,10.316406 2.1084999,10.625133 2.073305,10.936022 2.0527344,11.248047 v 0.0078 C 2.0259069,11.503164 2.0083166,11.751383 2,12 c 0.00836,0.247965 0.025955,0.495532 0.052734,0.742188 v 0.0059 c 0.020449,0.313332 0.055644,0.625527 0.1054687,0.935547 0.075055,0.444741 0.1801125,0.883895 0.3144531,1.314453 0.2188324,0.681572 0.5102161,1.337676 0.8691407,1.957031 0.01164,0.02153 0.023359,0.04301 0.035156,0.06445 0.1666221,0.284133 0.3471808,0.55986 0.5410157,0.826172 0.041079,0.05642 0.082748,0.112417 0.125,0.167969 0.1875613,0.253426 0.3870028,0.497839 0.5976562,0.732422 0.3052257,0.334333 0.6328021,0.647553 0.9804688,0.9375 C 5.8633915,19.883481 6.1149725,20.071841 6.375,20.248047 6.7872412,20.530708 7.2200951,20.782064 7.6699219,21 h 0.00195 c 0.2827438,0.13126 0.5714706,0.249228 0.8652344,0.353516 0.4287942,0.158807 0.8679759,0.288016 1.3144531,0.386718 0.3365136,0.07746 0.6768136,0.137435 1.0195316,0.179688 C 11.245583,21.967904 11.622488,21.99464 12,22 12.377512,21.9946 12.754417,21.9679 13.128906,21.91992 13.32651,21.89131 13.523213,21.85679 13.71875,21.816404 13.351809,21.12901 13.122274,20.37672 13.042969,19.601562 L 12.433594,19.25 v -1 L 12.867188,18 13.125,17.851562 c 0.11641,-0.5911 0.32118,-1.161297 0.607422,-1.691406 V 16 l 0.126953,-0.07422 c 0.354229,-0.592884 0.808162,-1.120159 1.341797,-1.558593 0.238072,-0.3172 0.427646,-0.668043 0.5625,-1.041016 L 15.896484,13.25 16.455078,13.572266 C 17.251154,13.197189 18.119991,13.001817 19,13 c 0.988977,4.37e-4 1.962512,0.24533 2.833984,0.712891 0.0026,-0.0098 0.0052,-0.01953 0.0078,-0.0293 0.0497,-0.308727 0.0849,-0.619616 0.105469,-0.931641 v -0.002 -0.002 -0.002 -0.002 C 21.974093,12.496836 21.991684,12.248617 22,12 21.999121,11.747743 21.9887,11.49561 21.96875,11.244141 l -0.002,-0.01172 C 21.94329,10.923541 21.90549,10.615917 21.853469,10.310546 21.778459,9.8704628 21.674054,9.4358968 21.540969,9.0097646 21.432417,8.6652433 21.305277,8.3268567 21.160109,7.9960928 l -0.0059,-0.013672 -0.0078,-0.013672 C 21.001308,7.6379002 20.838309,7.3151613 20.658203,7.0019531 L 20.65625,7 C 20.47338,6.6826088 20.273208,6.3755053 20.056641,6.0800781 19.839912,5.7849743 19.60714,5.5019961 19.359375,5.2324219 19.05739,4.9038587 18.73375,4.5958786 18.390625,4.3105469 18.149005,4.1100447 17.898076,3.9210332 17.638672,3.7441406 17.222163,3.4595417 16.784717,3.2068673 16.330078,2.9882812 h -0.002 C 16.045628,2.8523913 15.756898,2.7298602 15.462891,2.6210938 15.043458,2.4662028 14.614109,2.3396167 14.177734,2.2421875 h -0.002 C 13.83401,2.1661631 13.488482,2.1081405 13.140625,2.0683594 13.114596,2.0650017 13.088554,2.0617465 13.0625,2.0585938 12.709624,2.0202193 12.354956,2.0006604 12,2 Z m -1.298828,2.25 0.43164,0.25 0.433594,0.25 v 1 L 10.701172,6.25 10.267578,6 9.8359375,5.75 v -1 L 10.103516,4.5957031 Z m 2.597656,0 0.865234,0.5 v 1 l -0.865234,0.5 -0.865234,-0.5 v -1 z m 1.882813,0.4140625 c 0.55966,0.2421723 1.089796,0.5475408 1.580078,0.9101563 V 5.75 L 16.103516,6.1308594 15.896484,6.25 15.03125,5.75 v -1 z M 8.8398438,4.6757812 8.96875,4.75 v 1 L 8.5371094,6 8.1035156,6.25 7.2382812,5.75 V 5.578125 C 7.7356899,5.2168037 8.273091,4.9140241 8.8398438,4.6757812 Z M 6.8046875,6.5 7.6699219,7 V 8 L 6.8046875,8.5 6.7011719,8.4394531 5.9394531,8 V 7.75 7 Z M 9.4023438,6.5 10.267578,7 V 8 L 9.8339844,8.25 9.4023438,8.5 8.9707031,8.25 8.5371094,8 V 7 L 8.96875,6.75 Z M 12,6.5 12.865234,7 V 7.75 8 L 12.744141,8.070312 C 12.498832,8.0237001 12.249698,8.0001598 12,8 11.754037,8.00282 11.508857,8.028315 11.267578,8.076172 L 11.134766,8 V 7 Z m 2.597656,0 0.865235,0.5 V 7.75 8 L 14.597656,8.5 13.732422,8 V 7.75 7 Z m 2.597656,0 0.865235,0.5 V 8 L 17.195312,8.5 16.330078,8 V 7 Z M 5.5058594,8.75 6.3710938,9.25 v 1 l -0.8652344,0.5 -0.8652344,-0.5 v -1 z m 2.5976562,0 0.8652344,0.5 V 9.390625 C 8.6470442,9.7691668 8.3986671,10.204323 8.2363281,10.673828 L 8.1035156,10.75 7.2382812,10.25 v -1 z m 7.7929684,0 0.865235,0.5 v 1 l -0.865235,0.5 -0.121093,-0.07031 C 15.609957,10.207918 15.357551,9.7713421 15.03125,9.3925781 V 9.25 Z m 2.597657,0 0.865234,0.5 v 1 L 18.494141,10.75 18.287109,10.630859 17.628906,10.25 v -1 z M 12,10 c 1.104569,0 2,0.895431 2,2 0,1.104569 -0.895431,2 -2,2 -1.104569,0 -2,-0.895431 -2,-2 0,-1.104569 0.895431,-2 2,-2 z m -7.7929688,1 0.8652344,0.5 v 1 L 4.2070312,13 4.0722656,12.921875 C 4.0304228,12.616234 4.0062939,12.308428 4,12 4.00629,11.691572 4.030423,11.383766 4.072266,11.078125 Z m 2.5976563,0 0.8652344,0.5 v 1 L 6.8046875,13 6.7011719,12.939453 5.9394531,12.5 v -1 l 0.7617188,-0.439453 z m 10.3906245,0 0.865235,0.5 v 1 L 17.195312,13 16.763672,12.75 16.330078,12.5 v -1 z m 2.597657,0 0.154297,0.08984 C 19.982131,11.39198 19.999737,11.695859 20,12 c -0.0063,0.308428 -0.03042,0.616234 -0.07227,0.921875 L 19.792969,13 18.927734,12.5 V 12.25 11.5 Z m -14.2871096,2.25 0.8652344,0.5 v 1 l -0.8652344,0.5 -0.8652344,-0.5 v -1 z m 2.5976562,0 0.1328125,0.07617 c 0.162339,0.469505 0.4107161,0.904661 0.7324219,1.283203 V 14.75 L 8.5371094,15 8.1035156,15.25 7.2382812,14.75 v -1 L 7.671875,13.5 Z M 6.8046875,15.5 7.6699219,16 v 1 L 6.8046875,17.5 6.7011719,17.439453 5.9394531,17 V 16.75 16 l 0.7617188,-0.439453 z m 2.5976563,0 0.4316406,0.25 0.4335936,0.25 v 1 L 9.8339844,17.25 9.4023438,17.5 8.9707031,17.25 8.5371094,17 V 16 L 8.96875,15.75 H 8.9707 Z m 1.8652342,0.423828 C 11.508857,15.971685 11.754037,15.997183 12,16 c 0.245963,-0.0028 0.491143,-0.02831 0.732422,-0.07617 L 12.865234,16 V 16.75 17 L 12.103516,17.439453 12,17.5 11.134766,17 V 16 Z M 8.1035156,17.75 8.96875,18.25 v 1 L 8.8398438,19.32422 C 8.273091,19.085976 7.7356899,18.783196 7.2382812,18.421875 V 18.25 Z m 2.5976564,0 0.865234,0.5 v 1 l -0.865234,0.5 -0.8652345,-0.5 v -1 z' @@ -381,6 +382,7 @@ export const Icons = Object.freeze({ fileZip: mdiArchive, fileZipLock: mdiArchiveLock, fileZipAdd: mdiArchivePlus, + filament: mdiFilament, loadFilament: mdiFilamentDown, unloadFilament: mdiFilamentUp, changeFilament: mdiFilamentChange, From 5739a1d2836645f19366d7a32632cccedc9fc769 Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Fri, 14 Jul 2023 22:06:37 +0200 Subject: [PATCH 09/49] fix: round remaining weight Signed-off-by: Mathis Mensing --- src/components/widgets/spoolman/SpoolSelectionDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/widgets/spoolman/SpoolSelectionDialog.vue b/src/components/widgets/spoolman/SpoolSelectionDialog.vue index 0b87b49f5e..6474f1bd8b 100644 --- a/src/components/widgets/spoolman/SpoolSelectionDialog.vue +++ b/src/components/widgets/spoolman/SpoolSelectionDialog.vue @@ -79,7 +79,7 @@
- {{ item.remaining_weight.toLocaleString() }}g / {{ item.filament.weight.toLocaleString() }}g + {{ Math.floor(item.remaining_weight).toLocaleString() }}g / {{ item.filament.weight.toLocaleString() }}g
From 3ae92d1ee03fb047ef78a66c2dbb7c2a1b3481f3 Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Sat, 22 Jul 2023 20:22:57 +0200 Subject: [PATCH 10/49] feat: qr code scanning Signed-off-by: Mathis Mensing --- package-lock.json | 11 + package.json | 1 + src/components/widgets/spoolman/QRReader.vue | 121 +++++++ .../widgets/spoolman/SpoolSelectionDialog.vue | 308 +++++++++++------- src/locales/de.yaml | 30 ++ src/locales/en.yaml | 10 +- 6 files changed, 366 insertions(+), 115 deletions(-) create mode 100644 src/components/widgets/spoolman/QRReader.vue diff --git a/package-lock.json b/package-lock.json index 2fd4d0ca75..8a5612fb11 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,6 +20,7 @@ "echarts": "^5.4.3", "echarts-gl": "^2.0.9", "hls.js": "^1.4.10", + "jsqr": "^1.4.0", "jwt-decode": "^3.1.2", "lodash-es": "^4.17.21", "md5": "^2.3.0", @@ -8915,6 +8916,11 @@ "node": "*" } }, + "node_modules/jsqr": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", + "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" + }, "node_modules/jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", @@ -20437,6 +20443,11 @@ "through": ">=2.2.7 <3" } }, + "jsqr": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", + "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" + }, "jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", diff --git a/package.json b/package.json index b66d02fcfc..bd8d4108bc 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "echarts": "^5.4.3", "echarts-gl": "^2.0.9", "hls.js": "^1.4.10", + "jsqr": "^1.4.0", "jwt-decode": "^3.1.2", "lodash-es": "^4.17.21", "md5": "^2.3.0", diff --git a/src/components/widgets/spoolman/QRReader.vue b/src/components/widgets/spoolman/QRReader.vue new file mode 100644 index 0000000000..e18e081e60 --- /dev/null +++ b/src/components/widgets/spoolman/QRReader.vue @@ -0,0 +1,121 @@ + + + diff --git a/src/components/widgets/spoolman/SpoolSelectionDialog.vue b/src/components/widgets/spoolman/SpoolSelectionDialog.vue index 6474f1bd8b..ef69bb217d 100644 --- a/src/components/widgets/spoolman/SpoolSelectionDialog.vue +++ b/src/components/widgets/spoolman/SpoolSelectionDialog.vue @@ -1,122 +1,183 @@ diff --git a/src/components/settings/SpoolmanSettings.vue b/src/components/settings/SpoolmanSettings.vue new file mode 100644 index 0000000000..87e03708bb --- /dev/null +++ b/src/components/settings/SpoolmanSettings.vue @@ -0,0 +1,101 @@ + + + diff --git a/src/components/settings/ToolheadSettings.vue b/src/components/settings/ToolheadSettings.vue index 73fd29b621..e9acdc3a9d 100644 --- a/src/components/settings/ToolheadSettings.vue +++ b/src/components/settings/ToolheadSettings.vue @@ -229,20 +229,6 @@ - - (this.cameraScanSource = autoOpenCameraId)) + } } } diff --git a/src/components/widgets/status/PrinterStatusCard.vue b/src/components/widgets/status/PrinterStatusCard.vue index 9dc6eba38b..79af82b943 100644 --- a/src/components/widgets/status/PrinterStatusCard.vue +++ b/src/components/widgets/status/PrinterStatusCard.vue @@ -114,7 +114,7 @@ export default class PrinterStatusCard extends Mixins(StateMixin) { handlePrint (filename: string) { const spoolmanSupported = this.$store.getters['spoolman/getSupported'] - const autoSpoolSelectionDialog = this.$store.state.config.uiSettings.general.autoSpoolSelectionDialog + const autoSpoolSelectionDialog = this.$store.state.config.uiSettings.spoolman.autoSpoolSelectionDialog if (spoolmanSupported && autoSpoolSelectionDialog) { this.$store.commit('spoolman/setDialogState', { show: true, diff --git a/src/locales/de.yaml b/src/locales/de.yaml index 932f30d5ce..812c1263b1 100644 --- a/src/locales/de.yaml +++ b/src/locales/de.yaml @@ -737,4 +737,5 @@ app: Bitte überprüfen Sie Ihre Kameraeinstellungen oder versuchen Sie, eine andere Kameraquelle zu verwenden. setting: + auto_open_qr_camera: Kamera automatisch zur QR-Code- Erkennung öffnen show_spool_selection_dialog_on_print_start: Spulenauswahl-Dialog automatisch bei Druckstart anzeigen diff --git a/src/locales/en.yaml b/src/locales/en.yaml index 6906c863f3..e5d264c5f5 100644 --- a/src/locales/en.yaml +++ b/src/locales/en.yaml @@ -600,6 +600,7 @@ app: theme: Theme thermal_presets: Thermal Presets tool: Tool + spoolman: Spoolman tooltip: diagnostics_performance: '[BETA] Logging diagnostics info may impact performance' gcode_coords: Use GCode position instead of toolhead position on dashboard @@ -797,4 +798,5 @@ app: There was an error accessing the cameras feed. Please check your camera configuration or try another camera source. setting: + auto_open_qr_camera: Automatically open camera for QR code detection show_spool_selection_dialog_on_print_start: Show spool selection dialog on print start diff --git a/src/store/config/state.ts b/src/store/config/state.ts index 3848f600d7..9905d6ec4d 100644 --- a/src/store/config/state.ts +++ b/src/store/config/state.ts @@ -54,8 +54,7 @@ export const defaultState = (): ConfigState => { showBedScrewsAdjustDialogAutomatically: true, forceMoveToggleWarning: true, enableDiagnostics: false, - thumbnailSize: 32, - autoSpoolSelectionDialog: true + thumbnailSize: 32 }, theme: { isDark: true, @@ -141,6 +140,10 @@ export const defaultState = (): ConfigState => { forceMove: false, extrudeSpeed: -1, extrudeLength: -1 + }, + spoolman: { + autoSpoolSelectionDialog: true, + autoOpenQRDetectionCamera: null } } } diff --git a/src/store/config/types.ts b/src/store/config/types.ts index 752ef25032..a9753cd7c4 100644 --- a/src/store/config/types.ts +++ b/src/store/config/types.ts @@ -22,6 +22,7 @@ export interface UiSettings { gcodePreview: GcodePreviewConfig; fileSystem: FileSystemConfig; toolhead: ToolheadConfig; + spoolman: SpoolmanConfig; } export interface ToolheadConfig { @@ -30,6 +31,11 @@ export interface ToolheadConfig { extrudeLength: number; } +export interface SpoolmanConfig { + autoSpoolSelectionDialog: boolean; + autoOpenQRDetectionCamera: string | null; +} + export interface HostConfig { endpoints: string[]; blacklist: string[]; @@ -78,7 +84,6 @@ export interface GeneralConfig { forceMoveToggleWarning: boolean; enableDiagnostics: boolean; thumbnailSize: number; - autoSpoolSelectionDialog: boolean; } export type TextSortOrder = 'default' | 'numeric-prefix' | 'version' diff --git a/src/views/Settings.vue b/src/views/Settings.vue index 54e3f8667e..5f88fab3c5 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -20,6 +20,7 @@ + @@ -42,9 +43,11 @@ import AuthSettings from '@/components/settings/auth/AuthSettings.vue' import ConsoleSettings from '@/components/settings/console/ConsoleSettings.vue' import FileEditorSettings from '@/components/settings/FileEditorSettings.vue' import TimelapseSettings from '@/components/settings/timelapse/TimelapseSettings.vue' +import SpoolmanSettings from '@/components/settings/SpoolmanSettings.vue' @Component({ components: { + SpoolmanSettings, TimelapseSettings, MacroCategories, GeneralSettings, @@ -71,5 +74,9 @@ export default class Settings extends Mixins(StateMixin) { get supportsTimelapse () { return this.$store.getters['server/componentSupport']('timelapse') } + + get supportsSpoolman () { + return this.$store.getters['spoolman/getSupported'] + } } From afc3b937bf0c9da9d5d1dec6883235eefd6f67bd Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Wed, 26 Jul 2023 19:51:17 +0200 Subject: [PATCH 28/49] upside down smile Signed-off-by: Mathis Mensing --- src/components/settings/SpoolmanSettings.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/settings/SpoolmanSettings.vue b/src/components/settings/SpoolmanSettings.vue index 87e03708bb..333ebefc82 100644 --- a/src/components/settings/SpoolmanSettings.vue +++ b/src/components/settings/SpoolmanSettings.vue @@ -42,7 +42,6 @@ > {{ $t('app.setting.btn.reset') }} -
From af1d6a7ef31b2fa976129362c988469a3cadb8ed Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Wed, 26 Jul 2023 22:26:12 +0200 Subject: [PATCH 29/49] refactor: switch to QrScanner performance improvements by detecting codes outside of the UI thread Signed-off-by: Mathis Mensing --- package-lock.json | 38 +++++++--- package.json | 2 +- src/components/widgets/spoolman/QRReader.vue | 73 ++++++++++---------- 3 files changed, 65 insertions(+), 48 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8a5612fb11..2ae55a3f04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,6 @@ "echarts": "^5.4.3", "echarts-gl": "^2.0.9", "hls.js": "^1.4.10", - "jsqr": "^1.4.0", "jwt-decode": "^3.1.2", "lodash-es": "^4.17.21", "md5": "^2.3.0", @@ -29,6 +28,7 @@ "monaco-textmate": "^3.0.1", "onigasm": "^2.2.5", "panzoom": "^9.4.3", + "qr-scanner": "^1.4.2", "qrcode.vue": "^1.7.0", "semver": "^7.5.4", "shlex": "^2.1.2", @@ -2987,6 +2987,11 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, + "node_modules/@types/offscreencanvas": { + "version": "2019.7.0", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.0.tgz", + "integrity": "sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg==" + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -8916,11 +8921,6 @@ "node": "*" } }, - "node_modules/jsqr": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", - "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" - }, "node_modules/jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", @@ -10608,6 +10608,14 @@ "teleport": ">=0.2.0" } }, + "node_modules/qr-scanner": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/qr-scanner/-/qr-scanner-1.4.2.tgz", + "integrity": "sha512-kV1yQUe2FENvn59tMZW6mOVfpq9mGxGf8l6+EGaXUOd4RBOLg7tRC83OrirM5AtDvZRpdjdlXURsHreAOSPOUw==", + "dependencies": { + "@types/offscreencanvas": "^2019.6.4" + } + }, "node_modules/qrcode.vue": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-1.7.0.tgz", @@ -16052,6 +16060,11 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, + "@types/offscreencanvas": { + "version": "2019.7.0", + "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.0.tgz", + "integrity": "sha512-PGcyveRIpL1XIqK8eBsmRBt76eFgtzuPiSTyKHZxnGemp2yzGzWpjYKAfK3wIMiU7eH+851yEpiuP8JZerTmWg==" + }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -20443,11 +20456,6 @@ "through": ">=2.2.7 <3" } }, - "jsqr": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/jsqr/-/jsqr-1.4.0.tgz", - "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" - }, "jwt-decode": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.1.2.tgz", @@ -21750,6 +21758,14 @@ "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==", "dev": true }, + "qr-scanner": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/qr-scanner/-/qr-scanner-1.4.2.tgz", + "integrity": "sha512-kV1yQUe2FENvn59tMZW6mOVfpq9mGxGf8l6+EGaXUOd4RBOLg7tRC83OrirM5AtDvZRpdjdlXURsHreAOSPOUw==", + "requires": { + "@types/offscreencanvas": "^2019.6.4" + } + }, "qrcode.vue": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/qrcode.vue/-/qrcode.vue-1.7.0.tgz", diff --git a/package.json b/package.json index bd8d4108bc..e33a2c0220 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,6 @@ "echarts": "^5.4.3", "echarts-gl": "^2.0.9", "hls.js": "^1.4.10", - "jsqr": "^1.4.0", "jwt-decode": "^3.1.2", "lodash-es": "^4.17.21", "md5": "^2.3.0", @@ -53,6 +52,7 @@ "monaco-textmate": "^3.0.1", "onigasm": "^2.2.5", "panzoom": "^9.4.3", + "qr-scanner": "^1.4.2", "qrcode.vue": "^1.7.0", "semver": "^7.5.4", "shlex": "^2.1.2", diff --git a/src/components/widgets/spoolman/QRReader.vue b/src/components/widgets/spoolman/QRReader.vue index daed18ed12..1cf0f9dcd9 100644 --- a/src/components/widgets/spoolman/QRReader.vue +++ b/src/components/widgets/spoolman/QRReader.vue @@ -25,7 +25,7 @@ diff --git a/src/store/layout/mutations.ts b/src/store/layout/mutations.ts index ff9092eda8..cee54137a6 100644 --- a/src/store/layout/mutations.ts +++ b/src/store/layout/mutations.ts @@ -20,12 +20,20 @@ export const mutations: MutationTree = { setInitLayout (state, payload: LayoutState) { if (payload && Object.keys(payload).length > 0) { const defaultState = getDefaultState() - const migratableLayouts = ['dashboard'] + // add new layouts for (const [layout, defaultComponents] of Object.entries(defaultState.layouts)) { if (!payload.layouts[layout]) { payload.layouts[layout] = defaultComponents - } else if (migratableLayouts.includes(layout)) { + } + } + + // migrate existing layouts + const migratableLayouts = ['dashboard'] + for (const layout of Object.keys(payload.layouts)) { + const migratableLayout = migratableLayouts.find(migration => layout.startsWith(migration)) + if (migratableLayout) { + const defaultComponents = defaultState.layouts[migratableLayout] const defaultComponentIds = Object.values(defaultComponents).flat().map(card => card.id) const currentComponentIds = Object.values(payload.layouts[layout]).flat().map(card => card.id) From 2b74cbd118fca3b3d90585ed35001bfa6b251517 Mon Sep 17 00:00:00 2001 From: Mathis Mensing Date: Thu, 27 Jul 2023 22:22:37 +0200 Subject: [PATCH 32/49] feat: spoolman dashboard card Signed-off-by: Mathis Mensing --- src/components/layout/AppSettingsNav.vue | 2 +- src/components/settings/SpoolmanSettings.vue | 2 +- .../widgets/spoolman/SpoolSelectionDialog.vue | 3 ++- .../widgets/toolhead/ToolheadCard.vue | 24 +++++-------------- src/locales/de.yaml | 11 ++++++--- src/locales/en.yaml | 13 ++++++---- src/store/layout/state.ts | 1 + src/store/spoolman/types.ts | 2 +- src/views/Dashboard.vue | 9 ++++++- 9 files changed, 37 insertions(+), 30 deletions(-) diff --git a/src/components/layout/AppSettingsNav.vue b/src/components/layout/AppSettingsNav.vue index fb664c59e9..b9a3d21b4f 100644 --- a/src/components/layout/AppSettingsNav.vue +++ b/src/components/layout/AppSettingsNav.vue @@ -45,7 +45,7 @@ export default class AppSettingsNav extends Vue { { name: this.$t('app.setting.title.thermal_presets'), hash: '#presets', visible: true }, { name: this.$t('app.setting.title.gcode_preview'), icon: '$cubeScan', hash: '#gcodePreview', visible: true }, { name: this.$t('app.general.title.timelapse'), hash: '#timelapse', visible: this.supportsTimelapse }, - { name: this.$t('app.setting.title.spoolman'), hash: '#spoolman', visible: this.supportsSpoolman }, + { name: this.$t('app.spoolman.title.spoolman'), hash: '#spoolman', visible: this.supportsSpoolman }, { name: this.$t('app.version.title'), hash: '#versions', visible: this.supportsVersions } ] } diff --git a/src/components/settings/SpoolmanSettings.vue b/src/components/settings/SpoolmanSettings.vue index 333ebefc82..1bd2e7cea4 100644 --- a/src/components/settings/SpoolmanSettings.vue +++ b/src/components/settings/SpoolmanSettings.vue @@ -1,7 +1,7 @@