Skip to content

Commit d308a9f

Browse files
authored
Merge branch 'develop' into develop
2 parents 13abd37 + 951e025 commit d308a9f

24 files changed

+902
-551
lines changed

package-lock.json

+161-149
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"@fontsource/roboto": "^5.2.5",
3737
"@irojs/iro-core": "^1.2.1",
3838
"@jaames/iro": "^5.5.2",
39-
"axios": "^1.8.2",
39+
"axios": "^1.8.3",
4040
"consola": "^3.4.0",
4141
"dompurify": "^3.2.4",
4242
"echarts": "^5.6.0",
@@ -80,27 +80,27 @@
8080
"@types/jsdom": "^21.1.7",
8181
"@types/lodash-es": "^4.17.12",
8282
"@types/md5": "^2.3.5",
83-
"@types/node": "^22.13.9",
83+
"@types/node": "^22.13.10",
8484
"@types/semver": "^7.5.8",
8585
"@types/sortablejs": "^1.15.8",
8686
"@vitejs/plugin-vue2": "^2.3.3",
8787
"@vue/eslint-config-typescript": "^14.5.0",
8888
"@vue/test-utils": "^1.3.6",
8989
"@vue/tsconfig": "~0.1.3",
90-
"eslint": "^9.21.0",
90+
"eslint": "^9.22.0",
9191
"eslint-plugin-regexp": "^2.7.0",
9292
"eslint-plugin-vue": "^9.32.0",
9393
"husky": "^9.1.7",
9494
"jsdom": "^26.0.0",
9595
"mockdate": "^3.0.5",
9696
"monaco-vscode-textmate-theme-converter": "^0.1.7",
9797
"neostandard": "^0.12.1",
98-
"rollup": "^4.34.9",
98+
"rollup": "^4.35.0",
9999
"sass": "~1.32.13",
100100
"skott": "^0.35.4",
101101
"standard-version": "^9.5.0",
102102
"typescript": "^5.8.2",
103-
"typescript-eslint": "^8.26.0",
103+
"typescript-eslint": "^8.26.1",
104104
"unplugin-vue-components": "^28.4.1",
105105
"vite": "^6.2.1",
106106
"vite-plugin-checker": "^0.9.0",

src/App.vue

+11-9
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,17 @@
7878
(!socketConnected && authenticated)"
7979
/>
8080

81-
<file-system-download-dialog />
82-
<file-system-upload-dialog />
83-
<updating-dialog />
84-
<spool-selection-dialog />
85-
<action-command-prompt-dialog />
86-
<keyboard-shortcuts-dialog />
87-
<manual-probe-dialog />
88-
<bed-screws-adjust-dialog />
89-
<screws-tilt-adjust-dialog />
81+
<template v-if="socketConnected">
82+
<file-system-download-dialog />
83+
<file-system-upload-dialog />
84+
<updating-dialog />
85+
<spool-selection-dialog />
86+
<action-command-prompt-dialog />
87+
<keyboard-shortcuts-dialog />
88+
<manual-probe-dialog />
89+
<bed-screws-adjust-dialog />
90+
<screws-tilt-adjust-dialog />
91+
</template>
9092
</v-main>
9193

9294
<app-footer />

src/components/layout/AppBar.vue

+118-41
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<v-app-bar
33
app
44
clipped-left
5-
extension-height="46"
5+
:extension-height="46 * (isMobileViewport ? 3 : 2)"
66
:color="$vuetify.theme.currentTheme.appbar"
77
:height="$globals.HEADER_HEIGHT"
88
>
@@ -117,44 +117,108 @@
117117
v-if="inLayout"
118118
#extension
119119
>
120-
<app-btn
121-
small
122-
class="mx-2"
123-
color="primary"
124-
@click.stop="handleExitLayout"
125-
>
126-
{{ $t('app.general.btn.exit_layout') }}
127-
</app-btn>
128-
<app-btn
129-
small
130-
class="mx-2"
131-
color="primary"
132-
@click.stop="handleResetLayout"
133-
>
134-
{{ $t('app.general.btn.reset_layout') }}
135-
</app-btn>
136-
<template v-if="isDashboard">
137-
<v-divider
138-
vertical
139-
class="mx-2"
140-
/>
141-
<app-btn
142-
small
143-
class="mx-2"
144-
color="primary"
145-
@click.stop="handleSetDefaultLayout"
146-
>
147-
{{ $t('app.general.btn.set_default_layout') }}
148-
</app-btn>
149-
<app-btn
150-
small
151-
class="mx-2"
152-
color="primary"
153-
@click.stop="handleResetDefaultLayout"
154-
>
155-
{{ $t('app.general.btn.reset_default_layout') }}
156-
</app-btn>
157-
</template>
120+
<v-container>
121+
<div class="d-flex justify-center ma-2">
122+
<v-chip
123+
v-if="currentUser"
124+
class="mx-1"
125+
label
126+
>
127+
<v-icon left>
128+
$account
129+
</v-icon>
130+
{{ currentUser.username }}
131+
</v-chip>
132+
<v-chip
133+
class="mx-1"
134+
label
135+
>
136+
<v-icon left>
137+
$screenshot
138+
</v-icon>
139+
{{ currentBreakpoint.toUpperCase() }}
140+
</v-chip>
141+
</div>
142+
<div class="d-flex justify-center ma-2">
143+
<app-btn-group class="mx-1">
144+
<v-tooltip bottom>
145+
<template #activator="{ on, attrs }">
146+
<app-btn
147+
small
148+
v-bind="attrs"
149+
color="primary"
150+
@click.stop="handleExitLayout"
151+
v-on="on"
152+
>
153+
<v-icon left>
154+
$close
155+
</v-icon>
156+
{{ $t('app.general.btn.exit_layout') }}
157+
</app-btn>
158+
</template>
159+
<span>{{ $t('app.general.tooltip.exit_layout') }}</span>
160+
</v-tooltip>
161+
<v-tooltip bottom>
162+
<template #activator="{ on, attrs }">
163+
<app-btn
164+
small
165+
v-bind="attrs"
166+
color="primary"
167+
@click.stop="handleResetLayout"
168+
v-on="on"
169+
>
170+
<v-icon left>
171+
$accountSettings
172+
</v-icon>
173+
{{ $t('app.general.btn.reset_layout') }}
174+
</app-btn>
175+
</template>
176+
<span>{{ $t('app.general.tooltip.reset_layout') }}</span>
177+
</v-tooltip>
178+
</app-btn-group>
179+
180+
<app-btn-group
181+
v-if="isDashboard"
182+
class="mx-1"
183+
>
184+
<v-tooltip bottom>
185+
<template #activator="{ on, attrs }">
186+
<app-btn
187+
small
188+
v-bind="attrs"
189+
color="primary"
190+
@click.stop="handleSetDefaultLayout"
191+
v-on="on"
192+
>
193+
<v-icon left>
194+
$saveDefault
195+
</v-icon>
196+
{{ $t('app.general.btn.set_default_layout') }}
197+
</app-btn>
198+
</template>
199+
<span>{{ $t('app.general.tooltip.set_default_layout') }}</span>
200+
</v-tooltip>
201+
202+
<v-tooltip bottom>
203+
<template #activator="{ on, attrs }">
204+
<app-btn
205+
small
206+
v-bind="attrs"
207+
color="primary"
208+
@click.stop="handleResetDefaultLayout"
209+
v-on="on"
210+
>
211+
<v-icon left>
212+
$resetDefaults
213+
</v-icon>
214+
{{ $t('app.general.btn.reset_default_layout') }}
215+
</app-btn>
216+
</template>
217+
<span>{{ $t('app.general.tooltip.reset_default_layout') }}</span>
218+
</v-tooltip>
219+
</app-btn-group>
220+
</div>
221+
</v-container>
158222
</template>
159223

160224
<user-password-dialog
@@ -185,6 +249,8 @@ import { SocketActions } from '@/api/socketActions'
185249
import type { KlipperPrinterConfig, OutputPin } from '@/store/printer/types'
186250
import type { Device } from '@/store/power/types'
187251
import { encodeGcodeParamValue } from '@/util/gcode-helpers'
252+
import vuetify from '@/plugins/vuetify'
253+
import type { AppUser } from '@/store/auth/types'
188254
189255
@Component({
190256
components: {
@@ -352,11 +418,22 @@ export default class AppBar extends Mixins(StateMixin, ServicesMixin, FilesMixin
352418
})
353419
}
354420
421+
get currentLayoutName () {
422+
return this.$store.getters['layout/getSpecificLayoutName']
423+
}
424+
425+
get currentUser (): AppUser | null {
426+
return this.$store.state.auth.currentUser
427+
}
428+
429+
get currentBreakpoint () {
430+
return vuetify.framework.breakpoint.name
431+
}
432+
355433
handleSetDefaultLayout () {
356-
const currentLayoutName = this.$store.getters['layout/getSpecificLayoutName']
357434
this.$store.dispatch('layout/onLayoutChange', {
358435
name: 'dashboard',
359-
value: this.$store.getters['layout/getLayout'](currentLayoutName)
436+
value: this.$store.getters['layout/getLayout'](this.currentLayoutName)
360437
})
361438
}
362439

src/components/settings/GeneralSettings.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ import consola from 'consola'
284284
import { readFileAsTextAsync } from '@/util/file-system-entry'
285285
import { EventBus } from '@/eventBus'
286286
import { isFluiddContent, toFluiddContent } from '@/util/fluidd-content'
287+
import { getAllLocales } from '@/plugins/i18n'
287288
288289
@Component({
289290
components: {}
@@ -336,7 +337,7 @@ export default class GeneralSettings extends Mixins(StateMixin) {
336337
return Object.entries(DateFormats)
337338
.map(([key, entry]) => ({
338339
value: key,
339-
text: `${date.toLocaleDateString(entry.locales ?? this.$filters.getAllLocales(), entry.options)}${entry.suffix ?? ''}`
340+
text: `${date.toLocaleDateString(entry.locales ?? getAllLocales(), entry.options)}${entry.suffix ?? ''}`
340341
}))
341342
}
342343
@@ -358,7 +359,7 @@ export default class GeneralSettings extends Mixins(StateMixin) {
358359
return Object.entries(TimeFormats)
359360
.map(([key, entry]) => ({
360361
value: key,
361-
text: `${date.toLocaleTimeString(entry.locales ?? this.$filters.getAllLocales(), entry.options)}${entry.suffix ?? ''}`
362+
text: `${date.toLocaleTimeString(entry.locales ?? getAllLocales(), entry.options)}${entry.suffix ?? ''}`
362363
}))
363364
}
364365

src/components/settings/SpoolmanSettings.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -251,12 +251,16 @@ export default class SpoolmanSettings extends Mixins(StateMixin) {
251251
'lot_nr',
252252
'price',
253253
'density',
254+
'diameter',
254255
'extruder_temp',
255256
'bed_temp',
256257
'first_used',
257258
'last_used',
258259
'comment'
259-
].map(field => ({ value: field, text: this.$t(`app.spoolman.label.${field}`) }))
260+
].map(field => ({
261+
value: field,
262+
text: this.$t(`app.spoolman.label.${field}`)
263+
}))
260264
}
261265
262266
get fieldsToShowInSpoolmanCard (): string[] {

src/components/widgets/spoolman/QRReader.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default class QRReader extends Mixins(StateMixin, BrowserMixin) {
131131
}
132132
133133
get availableSpools (): Spool[] {
134-
return this.$store.state.spoolman.availableSpools
134+
return this.$store.getters['spoolman/getAvailableSpools']
135135
}
136136
137137
handleCodeFound (code: string) {

0 commit comments

Comments
 (0)