Skip to content

Commit 2a9d705

Browse files
committed
Merge branch 'develop'
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2 parents a8f9fda + e4567ac commit 2a9d705

27 files changed

+1041
-309
lines changed

package-lock.json

Lines changed: 233 additions & 192 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,22 @@
3333
"main": "index.js",
3434
"dependencies": {
3535
"@ctrl/tinycolor": "^4.1.0",
36-
"@fontsource/raleway": "^5.0.19",
37-
"@fontsource/roboto": "^5.0.14",
36+
"@fontsource/raleway": "^5.0.21",
37+
"@fontsource/roboto": "^5.0.15",
3838
"@irojs/iro-core": "^1.2.1",
3939
"@jaames/iro": "^5.5.2",
40-
"axios": "^1.7.4",
40+
"axios": "^1.7.7",
4141
"consola": "^3.2.3",
4242
"dompurify": "^3.1.6",
4343
"echarts": "^5.5.1",
4444
"echarts-gl": "^2.0.9",
45-
"hls.js": "^1.5.14",
45+
"hls.js": "^1.5.15",
4646
"jwt-decode": "^4.0.0",
4747
"lodash-es": "^4.17.21",
48-
"marked": "^14.0.0",
48+
"marked": "^14.1.2",
4949
"marked-base-url": "^1.1.5",
5050
"md5": "^2.3.0",
51-
"monaco-editor": "^0.50.0",
51+
"monaco-editor": "^0.51.0",
5252
"monaco-editor-textmate": "^4.0.0",
5353
"monaco-textmate": "^3.0.1",
5454
"onigasm": "^2.2.5",
@@ -57,11 +57,11 @@
5757
"qrcode.vue": "^1.7.0",
5858
"semver": "^7.6.3",
5959
"shlex": "^2.1.2",
60-
"sortablejs": "^1.15.2",
60+
"sortablejs": "^1.15.3",
6161
"uuid": "^10.0.0",
6262
"vue": "^2.7.16",
6363
"vue-class-component": "^7.2.6",
64-
"vue-echarts": "^7.0.2",
64+
"vue-echarts": "^7.0.3",
6565
"vue-i18n": "^8.28.2",
6666
"vue-inline-svg": "^2.1.4",
6767
"vue-json-viewer": "^2.2.22",
@@ -81,34 +81,34 @@
8181
"@types/jsdom": "^21.1.7",
8282
"@types/lodash-es": "^4.17.12",
8383
"@types/md5": "^2.3.5",
84-
"@types/node": "^20.14.15",
84+
"@types/node": "^20.16.5",
8585
"@types/semver": "^7.5.8",
8686
"@types/sortablejs": "^1.15.8",
8787
"@types/uuid": "^10.0.0",
88-
"@typescript-eslint/eslint-plugin": "^7.17.0",
89-
"@typescript-eslint/parser": "^7.17.0",
88+
"@typescript-eslint/eslint-plugin": "^7.18.0",
89+
"@typescript-eslint/parser": "^7.18.0",
9090
"@vitejs/plugin-vue2": "^2.3.1",
9191
"@vue/eslint-config-standard": "^8.0.1",
9292
"@vue/eslint-config-typescript": "^13.0.0",
9393
"@vue/test-utils": "^1.3.6",
9494
"@vue/tsconfig": "~0.1.3",
9595
"eslint": "^8.57.0",
96-
"eslint-plugin-vue": "^9.27.0",
97-
"husky": "^9.1.4",
98-
"jsdom": "^24.1.1",
96+
"eslint-plugin-vue": "^9.28.0",
97+
"husky": "^9.1.6",
98+
"jsdom": "^25.0.0",
9999
"mockdate": "^3.0.5",
100100
"monaco-vscode-textmate-theme-converter": "^0.1.7",
101-
"rollup": "^4.20.0",
101+
"rollup": "^4.21.3",
102102
"sass": "~1.32.13",
103103
"shx": "^0.3.4",
104-
"skott": "^0.35.2",
104+
"skott": "^0.35.3",
105105
"standard-version": "^9.5.0",
106106
"typescript": "^5.5.4",
107107
"unplugin-vue-components": "^0.27.4",
108-
"vite": "^5.4.0",
108+
"vite": "^5.4.4",
109109
"vite-plugin-checker": "^0.7.2",
110110
"vite-plugin-monaco-editor": "^1.1.0",
111-
"vite-plugin-pwa": "^0.20.1",
111+
"vite-plugin-pwa": "^0.20.5",
112112
"vitest": "^1.6.0",
113113
"vue-debounce-decorator": "^1.0.1",
114114
"vue-i18n-extract": "^2.0.7",

src/components/widgets/console/ConsoleItem.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class ConsoleItem extends Vue {
3131
get itemMessage () {
3232
let message = this.value.message
3333
if (this.value.type === 'response') {
34-
message = this.value.message.replace(/([A-Z0-9_]{2,})/gm, (match, command) => {
34+
message = this.value.message.replace(/([A-Z0-9_]{2,})/g, (match, command) => {
3535
if (command in this.knownCommands) return `<a class="primary--text text--lighten-1">${command.toUpperCase()}</a>`
3636
return match
3737
})

src/components/widgets/diagnostics/StateExplorer.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default class StateExplorer extends Mixins(StateMixin) {
3131
handleClick (path: string) {
3232
const sanitizedPath = path
3333
.replace('$.', '')
34-
.replace(/\.(\w*[^\w\S.]+\w*)/g, (_, match) => {
34+
.replace(/\.(\w*\s+\w*)/g, (_, match) => {
3535
if (isNaN(match)) return `['${match}']`
3636
return `[${match}]`
3737
})

src/components/widgets/filesystem/FileSystem.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,10 @@ export default class FileSystem extends Mixins(StateMixin, FilesMixin, ServicesM
420420
break
421421
422422
case 'rolled_log_files':
423-
if (file.type === 'file' && file.filename.match(/\.\d{4}-\d{2}-\d{2}(_\d{2}-\d{2}-\d{2})?$/)) {
423+
if (file.type === 'file' && (
424+
file.filename.match(/\.\d{4}-\d{2}-\d{2}(_\d{2}-\d{2}-\d{2})?$/) ||
425+
file.filename.match(/\.log\.\d+$/)
426+
)) {
424427
return false
425428
}
426429
break

src/components/widgets/filesystem/setupMonaco.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ async function setupMonaco () {
172172

173173
const sectionBlocks = linesContent
174174
.reduce((state, lineContent, index) => {
175-
const isSection = /^\[([^\]]+)\]/.test(lineContent)
175+
const isSection = /^\[[^\]]+\]/.test(lineContent)
176176

177177
if (isSection) {
178178
state.result.push(state.current = {

src/components/widgets/limits/PrinterLimits.vue

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@
7979
:value="minimumCruiseRatio"
8080
:reset-value="defaultMinimumCruiseRatio"
8181
:min="0"
82-
:max="0.99"
83-
:step="0.01"
82+
:max="100"
8483
:disabled="!klippyReady"
8584
overridable
8685
:locked="isMobileViewport"
8786
:loading="hasWait($waits.onSetMinimumCruiseRatio)"
87+
suffix="%"
8888
@submit="setMinimumCruiseRatio"
8989
/>
9090

@@ -144,11 +144,15 @@ export default class PrinterLimits extends Mixins(StateMixin, BrowserMixin) {
144144
get defaultMinimumCruiseRatio (): number {
145145
const defaultMinimumCruiseRatio = this.$store.getters['printer/getPrinterSettings']('printer.minimum_cruise_ratio') as number | undefined
146146
147-
return defaultMinimumCruiseRatio ?? 0.5
147+
return Math.round((defaultMinimumCruiseRatio ?? 0.5) * 100)
148148
}
149149
150150
get minimumCruiseRatio (): number | undefined {
151-
return this.$store.state.printer.printer.toolhead.minimum_cruise_ratio as number | undefined
151+
const minimumCruiseRatio = this.$store.state.printer.printer.toolhead.minimum_cruise_ratio as number | undefined
152+
153+
return minimumCruiseRatio != null
154+
? Math.round(minimumCruiseRatio * 100)
155+
: undefined
152156
}
153157
154158
get defaultSquareCornerVelocity (): number {
@@ -172,7 +176,7 @@ export default class PrinterLimits extends Mixins(StateMixin, BrowserMixin) {
172176
}
173177
174178
setMinimumCruiseRatio (val: number) {
175-
this.sendGcode(`SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO=${val}`, this.$waits.onSetMinimumCruiseRatio)
179+
this.sendGcode(`SET_VELOCITY_LIMIT MINIMUM_CRUISE_RATIO=${val / 100}`, this.$waits.onSetMinimumCruiseRatio)
176180
}
177181
178182
setSquareCornerVelocity (val: number) {

src/components/widgets/macros/MacroBtn.vue

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ export default class MacroBtn extends Mixins(StateMixin) {
9898
return ['m117', 'm118'].includes(this.macro.name)
9999
}
100100
101+
get isMacroForGcodeCommand () {
102+
return /^[gm]\d+$/i.test(this.macro.name)
103+
}
104+
101105
get filteredListeners () {
102106
// eslint-disable-next-line @typescript-eslint/no-unused-vars
103107
const { click, ...listeners } = this.$listeners
@@ -114,12 +118,29 @@ export default class MacroBtn extends Mixins(StateMixin) {
114118
*/
115119
get runCommand () {
116120
const command = this.macro.name.toUpperCase()
121+
const isMacroForGcodeCommand = this.isMacroForGcodeCommand
117122
118123
if (this.params) {
119124
const params = this.isMacroWithRawParam
120125
? this.params.message.value.toString()
121126
: Object.entries(this.params)
122-
.map(([key, param]) => `${key.toUpperCase()}=${param.value}`)
127+
.map(([key, param]) => {
128+
const value = param.value.toString()
129+
130+
if (!value) {
131+
return null
132+
}
133+
134+
const valueDelimiter = value.includes(' ')
135+
? '"'
136+
: ''
137+
const paramSeparator = isMacroForGcodeCommand && !valueDelimiter
138+
? ''
139+
: '='
140+
141+
return `${key.toUpperCase()}${paramSeparator}${valueDelimiter}${value}${valueDelimiter}`
142+
})
143+
.filter(x => x != null)
123144
.join(' ')
124145
125146
if (params) {
@@ -148,7 +169,7 @@ export default class MacroBtn extends Mixins(StateMixin) {
148169
this.$set(this.params, 'message', { value: '', reset: '' })
149170
} else {
150171
for (const { name, value } of gcodeMacroParams(this.macro.config.gcode)) {
151-
if (!this.params[name]) {
172+
if (!name.startsWith('_') && !this.params[name]) {
152173
this.$set(this.params, name, { value, reset: value })
153174
}
154175
}

src/components/widgets/thermals/TemperatureTargets.vue

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,6 @@ import type { ChartData } from '@/store/charts/types'
260260
}
261261
})
262262
export default class TemperatureTargets extends Mixins(StateMixin) {
263-
get colors () {
264-
return this.$colorset.colorList
265-
}
266-
267263
get extruder () {
268264
return this.$store.state.printer.printer.extruder
269265
}

src/components/widgets/toolhead/ExtruderMoves.vue

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<app-btn
3232
:disabled="!klippyReady || !extruderReady || !valid"
3333
block
34-
@click="sendRetractGcode(extrudeLength, extrudeSpeed, $waits.onExtrude)"
34+
@click="retract"
3535
>
3636
{{ $t('app.general.btn.retract') }}
3737
<v-icon>$chevronUp</v-icon>
@@ -68,7 +68,7 @@
6868
<app-btn
6969
:disabled="!klippyReady || !extruderReady || !valid"
7070
block
71-
@click="sendExtrudeGcode(extrudeLength, extrudeSpeed, $waits.onExtrude)"
71+
@click="extrude"
7272
>
7373
{{ $t('app.general.btn.extrude') }}
7474
<v-icon>$chevronDown</v-icon>
@@ -136,19 +136,15 @@ export default class ExtruderMoves extends Mixins(StateMixin, ToolheadMixin) {
136136
return this.$rules.numberLessThanOrEqual(this.maxExtrudeSpeed)(value)
137137
}
138138
139-
sendRetractGcode (amount: number, rate: number, wait?: string) {
139+
retract () {
140140
if (this.valid) {
141-
const gcode = `M83
142-
G1 E-${amount} F${rate * 60}`
143-
this.sendGcode(gcode, wait)
141+
this.sendExtrudeGcode(-this.extrudeLength, this.extrudeSpeed, this.$waits.onExtrude)
144142
}
145143
}
146144
147-
sendExtrudeGcode (amount: number, rate: number, wait?: string) {
145+
extrude () {
148146
if (this.valid) {
149-
const gcode = `M83
150-
G1 E${amount} F${rate * 60}`
151-
this.sendGcode(gcode, wait)
147+
this.sendExtrudeGcode(this.extrudeLength, this.extrudeSpeed, this.$waits.onExtrude)
152148
}
153149
}
154150

0 commit comments

Comments
 (0)