diff --git a/CHANGELOG.md b/CHANGELOG.md index ea0a17a7..87dd6ccb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,27 @@ # Changelog All notable changes to Mainsail will be documented in this file. +## [2.6.2](https://github.com/mainsail-crew/mainsail/releases/tag/v2.6.2) - 2023-07-30 +### Bug Fixes and Improvements + +- Fix editor save & restart button behavior (#1483) | [8447be2](8447be2ecee64fa4a3c0211ac57f42c3adf1d050) +- Hide rpm in temperature_fans without tachometer_pin (#1489) | [e929c7c](e929c7cc0f45074f40407420b3585d9c02284fa1) +- Fix flip function in several webcam clients (#1487) | [5c40820](5c4082010890e0b341754f42673affe7d1ca9d99) +- Fix issue with camel-case object names in temperature panel (#1491) | [aeee198](aeee1982398acca803f7f4eae7b7b39a29253179) +- Use webcam name instead of UUID for timelapse plugin (#1492) | [d67ef3a](d67ef3aa908601b6bb87353957bcc97ea4f829ea) +- Fix issue with create/edit presets and refactor settings (#1499) | [6a4cca7](6a4cca751c88e89ddf5f2cc0f09a58f097a461af) +- Fix multiple issues in the refactored update manager (#1497) | [9eb133b](9eb133bd85530ac08416e94f02ebe19f060bc095) +- Fix issue with cannot extrude after a Klipper restart (#1495) | [cda3098](cda3098c9e09a054aa7baa69a3195e0a73f43e54) + +### Refactor + +- Refactor SettingsRow (#1484) | [0b47a80](0b47a80b133e6093aecdb0d7d87b718899dff0c7) + +### Localization + +- **pl**: Update Polish translation (#1482) | [0c5aca8](0c5aca8baffb65198f43a7d3b2b57571d8e911c9) +- **zh**: Update chinese locale (#1486) | [7251a8c](7251a8c6bae2b92395de4c8c23e8e8e3900df66a) + ## [2.6.1](https://github.com/mainsail-crew/mainsail/releases/tag/v2.6.1) - 2023-07-24 ### Bug Fixes and Improvements diff --git a/package-lock.json b/package-lock.json index 079006ef..8bee62f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mainsail", - "version": "2.6.2", + "version": "2.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "mainsail", - "version": "2.6.2", + "version": "2.7.0", "dependencies": { "@codemirror/commands": "^6.0.1", "@codemirror/lang-css": "^6.0.0", diff --git a/package.json b/package.json index 58a0c62c..26c74ed4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mainsail", - "version": "2.6.2", + "version": "2.7.0", "private": true, "decription": "a klipper web interface", "author": { diff --git a/src/App.vue b/src/App.vue index 24aacef7..29a4a2b7 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,37 +1,11 @@ - - @@ -105,13 +79,27 @@ export default class App extends Mixins(BaseMixin) { return this.$store.getters['files/getMainBackground'] } + get naviDrawer(): boolean { + return this.$store.state.naviDrawer + } + + get navigationStyle() { + return this.$store.state.gui.uiSettings.navigationStyle + } + get mainStyle() { - let style = '' + let style: any = { + paddingLeft: '0', + } if (this.mainBackground !== null) { - style = 'background-image: url(' + this.mainBackground + ');' + style.backgroundImage = 'url(' + this.mainBackground + ')' } + // overwrite padding left for the sidebar + if (this.naviDrawer && this.navigationStyle === 'iconsAndText') style.paddingLeft = '220px' + if (this.naviDrawer && this.navigationStyle === 'iconsOnly') style.paddingLeft = '56px' + return style } @@ -311,3 +299,28 @@ export default class App extends Mixins(BaseMixin) { } } + + diff --git a/src/components/TheSidebar.vue b/src/components/TheSidebar.vue index 8050321b..6be678c9 100644 --- a/src/components/TheSidebar.vue +++ b/src/components/TheSidebar.vue @@ -1,7 +1,7 @@ @@ -237,93 +61,27 @@ import { Mixins } from 'vue-property-decorator' import BaseMixin from '@/components/mixins/base' import SettingsRow from '@/components/settings/SettingsRow.vue' import Panel from '@/components/ui/Panel.vue' -import Vue from 'vue' import { mdiCloseThick, mdiHelpCircle } from '@mdi/js' +import CheckboxList from '@/components/inputs/CheckboxList.vue' +import SettingsGeneralTabBackupDatabase from '@/components/settings/General/GeneralBackup.vue' +import SettingsGeneralTabRestoreDatabase from '@/components/settings/General/GeneralRestore.vue' +import SettingsGeneralTabResetDatabase from '@/components/settings/General/GeneralReset.vue' +import SettingsGeneralDatabase from '@/components/mixins/settingsGeneralDatabase' @Component({ - components: { Panel, SettingsRow }, + components: { + Panel, + SettingsRow, + CheckboxList, + SettingsGeneralTabBackupDatabase, + SettingsGeneralTabRestoreDatabase, + SettingsGeneralTabResetDatabase, + }, }) -export default class SettingsGeneralTab extends Mixins(BaseMixin) { +export default class SettingsGeneralTab extends Mixins(BaseMixin, SettingsGeneralDatabase) { mdiHelpCircle = mdiHelpCircle mdiCloseThick = mdiCloseThick - private dialogBackupMainsail = false - private dialogResetMainsail = false - private dialogRestoreMainsail = false - - private dbCheckboxes: string[] = [] - - private restoreableNamespaces: { name: string; label: string }[] = [] - private restoreObjects: any = {} - - private mainsailKeys: { name: string; label: string }[] = [] - private availableNamespaces: string[] = [] - - declare $refs: { - uploadBackupFile: HTMLInputElement - } - - get availableKeys() { - return [ - { - name: 'general', - label: this.$t('Settings.GeneralTab.General'), - }, - { - name: 'console', - label: this.$t('Settings.ConsoleTab.Console'), - }, - { - name: 'control', - label: this.$t('Settings.ControlTab.Control'), - }, - { - name: 'dashboard', - label: this.$t('Settings.DashboardTab.Dashboard'), - }, - { - name: 'editor', - label: this.$t('Settings.EditorTab.Editor'), - }, - { - name: 'gcodeViewer', - label: this.$t('Settings.GCodeViewerTab.GCodeViewer'), - }, - { - name: 'gcodehistory', - label: this.$t('Settings.GeneralTab.DbConsoleHistory'), - }, - { - name: 'macros', - label: this.$t('Settings.MacrosTab.Macros'), - }, - { - name: 'notifications', - label: this.$t('App.Notifications.Notifications'), - }, - { - name: 'presets', - label: this.$t('Settings.PresetsTab.PreheatPresets'), - }, - { - name: 'remoteprinters', - label: this.$t('Settings.RemotePrintersTab.RemotePrinters'), - }, - { - name: 'timelapse', - label: this.$t('Settings.TimelapseTab.Timelapse'), - }, - { - name: 'uiSettings', - label: this.$t('Settings.UiSettingsTab.UiSettings'), - }, - { - name: 'view', - label: this.$t('Settings.GeneralTab.DbView'), - }, - ] - } - get printerName() { return this.$store.state.gui.general.printername } @@ -459,154 +217,5 @@ export default class SettingsGeneralTab extends Mixins(BaseMixin) { set calcEtaTime(newVal) { this.$store.dispatch('gui/saveSetting', { name: 'general.calcEtaTime', value: newVal }) } - - get moonrakerDbNamespaces() { - return this.$store.state.server.dbNamespaces ?? [] - } - - get moonrakerComponents() { - return this.$store.state.server.components ?? [] - } - - async refreshNamespaces() { - this.availableNamespaces = [] - - const url = this.$store.getters['socket/getUrl'] + '/server/database/list' - const response = await fetch(url) - if (response) { - const objects = await response.json() - this.availableNamespaces = [...(objects.result?.namespaces || {})] ?? [] - } - } - - async refreshMainsailKeys() { - this.mainsailKeys = [] - - const url = this.$store.getters['socket/getUrl'] + '/server/database/item?namespace=mainsail' - const response = await fetch(url) - if (response) { - const objects = await response.json() - if (objects?.result?.value) { - Object.keys(objects?.result?.value).forEach((tmp: string) => { - if (tmp !== 'initVersion') { - const namespace = this.availableKeys.find((namespace) => namespace.name === tmp) - const tmpNamespace = namespace ? namespace : { name: tmp, label: tmp } - this.mainsailKeys.push(tmpNamespace) - } - }) - - this.mainsailKeys = this.mainsailKeys.sort((a, b) => { - if (a.name === 'general') return -1 - if (b.name === 'general') return 1 - - const stringA = a.label.toString().toLowerCase() - const stringB = b.label.toString().toLowerCase() - - if (stringA < stringB) return -1 - if (stringA > stringB) return 1 - - return 0 - }) - } - } - } - - changeNamespace(name: string) { - if (this.dbCheckboxes.includes(name)) { - const index = this.dbCheckboxes.indexOf(name) - if (index >= 0) this.dbCheckboxes.splice(index, 1) - } else this.dbCheckboxes.push(name) - } - - async resetMainsail() { - await this.refreshNamespaces() - if (this.availableNamespaces.includes('mainsail')) await this.refreshMainsailKeys() - else this.mainsailKeys = [] - - this.dbCheckboxes = [] - this.dialogResetMainsail = true - } - - async resetMainsailAction() { - await this.$store.dispatch('socket/addLoading', 'resetMainsail') - await this.$store.dispatch('gui/resetMoonrakerDB', this.dbCheckboxes) - } - - async backupDb() { - await this.$store.dispatch('socket/addLoading', 'backupDbButton') - await this.refreshNamespaces() - if (this.availableNamespaces.includes('mainsail')) await this.refreshMainsailKeys() - else this.mainsailKeys = [] - - this.dbCheckboxes = [] - this.dialogBackupMainsail = true - } - - async backupMainsail() { - await this.$store.dispatch('socket/addLoading', 'backupMainsail') - await this.$store.dispatch('gui/backupMoonrakerDB', this.dbCheckboxes) - await this.$store.dispatch('socket/removeLoading', 'backupMainsail') - this.dialogBackupMainsail = false - } - - async restoreDb() { - await this.$store.dispatch('socket/addLoading', 'restoreUploadButton') - this.$refs?.uploadBackupFile?.click() - } - - uploadRestore() { - if (this.$refs.uploadBackupFile.files?.length) { - const backup = this.$refs.uploadBackupFile.files[0] - if (backup) { - const reader = new FileReader() - reader.readAsText(backup, 'UTF-8') - reader.onload = (evt) => { - this.restoreableNamespaces = [] - try { - this.restoreObjects = JSON.parse(evt?.target?.result + '') - - Object.keys(this.restoreObjects).forEach((tmp: string) => { - const namespace = this.availableKeys.find((namespace) => namespace.name === tmp) - const tmpNamespace = namespace ? namespace : { name: tmp, label: tmp } - - this.restoreableNamespaces.push(tmpNamespace) - }) - - this.restoreableNamespaces = this.restoreableNamespaces.sort((a, b) => { - if (a.name === 'general') return -1 - if (b.name === 'general') return 1 - - const stringA = a.label.toString().toLowerCase() - const stringB = b.label.toString().toLowerCase() - - if (stringA < stringB) return -1 - if (stringA > stringB) return 1 - - return 0 - }) - - this.dbCheckboxes = [] - this.dialogRestoreMainsail = true - } catch (e) { - Vue.$toast.error(this.$t('Settings.GeneralTab.CannotReadJson') + '') - } - } - reader.onerror = (evt) => { - window.console.error(evt) - } - } - - this.$refs.uploadBackupFile.value = '' - } - } - - async restoreDbAction() { - this.$store.dispatch('socket/addLoading', 'restoreDbAction') - - this.$store.dispatch('gui/restoreMoonrakerDB', { - dbCheckboxes: this.dbCheckboxes, - restoreObjects: this.restoreObjects, - }) - } } diff --git a/src/components/settings/SettingsUiSettingsTab.vue b/src/components/settings/SettingsUiSettingsTab.vue index 91c24c80..bfd44fc0 100644 --- a/src/components/settings/SettingsUiSettingsTab.vue +++ b/src/components/settings/SettingsUiSettingsTab.vue @@ -2,7 +2,7 @@
- + + @update:color="updateLogoColor" /> - + - {{ $t('Settings.UiSettingsTab.Guide').toString() }} + {{ $t('Settings.UiSettingsTab.Guide') }} - + @@ -82,8 +82,8 @@ + :title="$t('Settings.UiSettingsTab.NavigationStyle')" + :sub-title="$t('Settings.UiSettingsTab.NavigationStyleDescription')"> + + + + - + + :title="$t('Settings.UiSettingsTab.TempchartHeight')" + :sub-title="$t('Settings.UiSettingsTab.TempchartHeightDescription')"> + + + + +
@@ -250,6 +259,27 @@ export default class WebcamForm extends Mixins(BaseMixin, WebcamMixin) { return classes } + get hasFpsCounter() { + return ['mjpegstreamer', 'mjpegstreamer-adaptive'].includes(this.webcam.service) + } + + get hideFps() { + return this.webcam.extra_data?.hideFps ?? false + } + + set hideFps(newVal) { + if (!('extra_data' in this.webcam)) { + this.webcam.extra_data = { + hideFps: newVal, + } + + return + } + + // @ts-ignore + this.webcam.extra_data.hideFps = newVal + } + mounted() { this.oldWebcamName = this.webcam.name } diff --git a/src/components/webcams/Mjpegstreamer.vue b/src/components/webcams/Mjpegstreamer.vue index 7d9cc167..90c208a5 100644 --- a/src/components/webcams/Mjpegstreamer.vue +++ b/src/components/webcams/Mjpegstreamer.vue @@ -6,7 +6,7 @@ class="webcamImage" :style="webcamStyle" @load="onload" /> - {{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }} + {{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }}
@@ -72,6 +72,12 @@ export default class Mjpegstreamer extends Mixins(BaseMixin, WebcamMixin) { return this.currentFPS < 10 ? '0' + this.currentFPS.toString() : this.currentFPS } + get showFpsCounter() { + if (!this.showFps) return false + + return !(this.camSettings.extra_data?.hideFps ?? false) + } + startStream() { if (this.streamState) return this.streamState = true diff --git a/src/components/webcams/MjpegstreamerAdaptive.vue b/src/components/webcams/MjpegstreamerAdaptive.vue index 0966770d..41ca032c 100644 --- a/src/components/webcams/MjpegstreamerAdaptive.vue +++ b/src/components/webcams/MjpegstreamerAdaptive.vue @@ -10,7 +10,7 @@ height="400" :style="webcamStyle" :class="'webcamImage ' + (isLoaded ? '' : 'hiddenWebcam')"> - + {{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }}
@@ -74,6 +74,12 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin, WebcamMixin return this.currentFPS < 10 ? '0' + this.currentFPS.toString() : this.currentFPS } + get showFpsCounter() { + if (!this.showFps) return false + + return !(this.camSettings.extra_data?.hideFps ?? false) + } + get rotate() { return [90, 270].includes(this.camSettings.rotation ?? 0) } diff --git a/src/locales/de.json b/src/locales/de.json index eb3a1aec..6d7d1b59 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -680,6 +680,7 @@ "Temperature": "Aktuelle Temperatur" }, "Headline": "Temperaturen", + "HideMcuHostSensors": "Host/MCU Sensoren ausblenden", "Max": "max", "Min": "min", "Name": "Name", @@ -794,6 +795,7 @@ "Circle": "Kreis", "Control": "Steuerung", "Cross": "Kreuz", + "HideDuringPrint": "Achsensteuerung während des Drucks ausblenden", "EnableXYHoming": "Aktiviere kombiniertes X & Y homing", "EstimatedExtrusionInfo": "Zeige Info zur geschätzten Extrusion", "EstimatedExtrusionInfoDescription": "Anzeigen/ausblenden der Info zur geschätzten Extrusion, basierend auf Extrusionmenge und Extrusionsgeschwindigkeit", @@ -1058,6 +1060,11 @@ "ConfirmOnEmergencyStopDescription": "Zeige vor einem Notstop einen Bestätigungsdialog.", "ConfirmOnPowerDeviceChange": "Bestätigung für Änderung der Stromversorgung von Geräten", "ConfirmOnPowerDeviceChangeDescription": "Zeige vor Änderung der Stromversorgung von Geräten einen Bestätigungsdialog.", + "DefaultNavigationState": "Standard Navigationszustand", + "DefaultNavigationStateAlwaysClosed": "immer geschlossen", + "DefaultNavigationStateAlwaysOpen": "immer geöffnet", + "DefaultNavigationStateDescription": "Welchen zustand soll die Navigation normalerweise haben?", + "DefaultNavigationStateLastState": "letzter Zustand", "DisableFanAnimation": "Lüfteranimation deaktivieren", "DisableFanAnimationDescription": "Dies kann die Last im Browser senken.", "DisplayCANCEL_PRINT": "Zeige CANCEL_PRINT an", @@ -1097,6 +1104,7 @@ "EditWebcam": "Webcam bearbeiten", "FlipWebcam": "Webcam-Bild spiegeln:", "Hlsstream": "HLS-Stream", + "HideFps": "FPS-Anzeige verstecken", "Horizontally": "horizontal", "IconBed": "Bett", "IconCam": "Kamera", diff --git a/src/locales/en.json b/src/locales/en.json index bdaef032..b7234078 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -681,6 +681,7 @@ "Temperature": "current temperature" }, "Headline": "Temperatures", + "HideMcuHostSensors": "Hide Host/MCU Sensors", "Max": "max", "Min": "min", "Name": "Name", @@ -795,6 +796,7 @@ "Circle": "Circle", "Control": "Control", "Cross": "Cross", + "HideDuringPrint": "Hide axis controls during print", "EnableXYHoming": "Enable combined X & Y axes homing", "EstimatedExtrusionInfo": "Show estimated extrusion info", "EstimatedExtrusionInfoDescription": "Show / Hide info for estimated extrusions based on extrusion amount and feedrate", @@ -872,6 +874,7 @@ "DbConsoleHistory": "Console History", "DbHistoryJobs": "History Jobs", "DbHistoryTotals": "History Totals", + "DBNavigation": "Navigation", "DbTimelapseSettings": "Timelapse Settings", "DbView": "View Settings", "EstimateValues": { @@ -888,7 +891,8 @@ "Reset": "reset", "Restore": "Restore", "RestoreDialog": "Please select all the sections you want to restore:", - "TimeFormat": "Time Format" + "TimeFormat": "Time Format", + "Everything": "Everything" }, "InterfaceSettings": "Interface Settings", "MacrosTab": { @@ -1059,6 +1063,11 @@ "ConfirmOnEmergencyStopDescription": "Show a confirmation dialog on Emergency Stop", "ConfirmOnPowerDeviceChange": "Require confirm on Device Power changes", "ConfirmOnPowerDeviceChangeDescription": "Show a confirmation dialog on Device Power changes", + "DefaultNavigationState": "Navigation default state", + "DefaultNavigationStateAlwaysClosed": "always closed", + "DefaultNavigationStateAlwaysOpen": "always open", + "DefaultNavigationStateDescription": "Which state should have the navigation per default.", + "DefaultNavigationStateLastState": "last state", "DisableFanAnimation": "Disable fan animation", "DisableFanAnimationDescription": "This can reduce some load in your Browser.", "DisplayCANCEL_PRINT": "Display CANCEL_PRINT", @@ -1097,6 +1106,7 @@ "EditCrowsnestConf": "Edit crowsnest.conf", "EditWebcam": "Edit Webcam", "FlipWebcam": "Flip webcam image:", + "HideFps": "Hide FPS counter", "Horizontally": "horizontally", "IconBed": "Bed", "IconCam": "Cam", diff --git a/src/locales/fr.json b/src/locales/fr.json index f5074516..67583b07 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -829,7 +829,8 @@ "12hours": "12-heures ({time})", "24hours": "24-heures ({time})", "DateFormat": "Format de la date", - "TimeFormat": "Format de l'heure" + "TimeFormat": "Format de l'heure", + "Everything": "Tout" }, "InterfaceSettings": "Réglages interface", "MacrosTab": { diff --git a/src/locales/pl.json b/src/locales/pl.json index 4a6b935e..3366e927 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -193,7 +193,7 @@ "Name": "Nazwa", "NewDirectory": "Nowy katalog", "NozzleDiameter": "Średnica dyszy", - "ObjectHeight": "Wysokość objektu", + "ObjectHeight": "Wysokość obiektu", "Preheat": "Podgrzej", "PrintedFiles": "Wydrukowane pliki", "PrintStart": "Start wydruku", @@ -217,7 +217,7 @@ "AddBatchToQueue": "Dodaj serię do kolejki", "GcodesRootDirectoryDoesntExists": "Nie znaleziono katalogu G-Code. Sprawdź opcję \"path\" w sekcji [virtual_sdcard] konfiguracji Klippera.", "ScanMeta": "Skanuj metadane", - "BedTemp": "Temp. łóżka", + "BedTemp": "Temp. stołu", "ChamberTemp": "Temp. komory", "Count": "Ilość", "DuplicateFile": "Powielony plik", @@ -281,7 +281,7 @@ "Later": "Później", "Mesh": "Siatka", "Name": "Nazwa", - "NoBedMeshHasBeenLoadedYet": "Nie została jeszcze wgrana żadna siatka.", + "NoBedMeshHasBeenLoadedYet": "Nie wczytano siatki stołu.", "NoProfile": "Brak profili", "Ok": "Ok", "Probed": "Zmierzone", @@ -468,9 +468,9 @@ }, "UpdatePanel": { "CheckForUpdates": "Sprawdź dostępność aktualizacji", - "Commits": "Wydane", - "CommitsAvailable": "Brak nowych wydań | {count} dostępnych wydań| {count} dostępnych wydań", - "CommitsOnDate": "Wydano {date}", + "Commits": "Zmiany", + "CommitsAvailable": "Brak nowych wydań | {count} dostępne wydanie | {count} dostępnych wydań", + "CommitsOnDate": "Zmiany w {date}", "CommittedDaysAgo": "Wydano {days} dni temu", "CommittedHoursAgo": "Wydano {hours} godzin temu", "CommittedOnDate": "Wydano {date}", @@ -490,10 +490,6 @@ "GenericUpdateQuestion": "Sprawdź historię zmian (jeśli jest dostępna) i stronę GitHub dla tego projektu, aby sprawdzić, czy konieczne są jakiekolwiek ręczne korekty dla tej aktualizacji.", "InitUpdateManager": "Menedżer aktualizacji nie został jeszcze zainicjowany. Jest to normalne zjawisko podczas pierwszego uruchomienia systemu. Kliknij przycisk odświeżania, aby zainicjować wszystkie komponenty.", "MoonrakerUpdateQuestion": "Spowoduje to aktualizację API Moonraker. Zmiany w pliku moonraker.conf mogą być wymagane do dalszego korzystania z urządzenia.", - "Notification": { - "Dirty": "Lokalne repozytorium zostało zmodyfikowane i nie można go zaktualizować w tym stanie. Przywróć to repozytorium.", - "Detached": "Stan odłączony nie jest błędem ani problemem. Oznacza jedynie, że w lokalnym repozytorium istnieją dodatkowe zmiany, które nie istnieją w zdalnym repozytorium." - }, "StartUpdate": "Rozpocznij aktualizację", "ThesePackagesCanBeUpgrade": "Te pakiety systemowe mogą być zaktualizowane:", "WebClientUpdateQuestion": "W niektórych przypadkach aktualizacja klienta sieciowego może spowodować zmiany, które mogą spowodować niezgodność. Więcej informacji można znaleźć w uwagach wydania.", @@ -511,7 +507,8 @@ "MoreCommitsInfo": "Można tu wyświetlić maksymalnie 30 zmian. Aby zobaczyć wszystkie zmiany, kliknij poniższy link:", "SoftRecovery": "Przywróć miękko", "UpdateWarning": "Ostrzeżenie o aktualizacji: {name}", - "UpgradeableSystemPackages": "Pakiety systemowe, które można uaktualnić" + "UpgradeableSystemPackages": "Pakiety systemowe, które można uaktualnić", + "Corrupt": "uszkodzone" } }, "Panels": { @@ -675,7 +672,8 @@ "Target": "Docelowa", "TemperaturesInChart": "Temperatura [°C]", "TempTooHigh": "Temperatura zbyt wysoka dla {name}! (max: {max})", - "TempTooLow": "Temperatura zbyt mała dla {name}! (min: {min})" + "TempTooLow": "Temperatura zbyt mała dla {name}! (min: {min})", + "HideMcuHostSensors": "Ukryj czujniki hosta/MCU" }, "ToolheadControlPanel": { "Absolute": "Absolutna", @@ -799,7 +797,8 @@ "Style": "Styl", "ValueGreaterThan": "Wartość musi być większa niż {value}", "ZOffsetIncrements": "Wzrost offsetu osi Z (w mm)", - "ZTiltAdjust": "Dostosuj Z-Tilt {isDefault}" + "ZTiltAdjust": "Dostosuj Z-Tilt {isDefault}", + "HideDuringPrint": "Ukryj sterowanie osiami podczas drukowania" }, "DashboardTab": { "Dashboard": "Sterowanie", @@ -841,8 +840,6 @@ "CalcEtaTimeDescription": "Po wybraniu kilku opcji zostanie obliczona średnia.", "CannotReadJson": "Brak możliwości przeczytania/przeanalizowania pliku kopii zapasowej.", "DbConsoleHistory": "Historia Konsoli", - "DbHistoryJobs": "Historia wydruków", - "DbHistoryTotals": "Historia łącznie", "DbTimelapseSettings": "Ustawienia timelapse", "DbView": "Ustawienia", "EstimateValues": { @@ -852,7 +849,7 @@ }, "FactoryDialog": "Proszę wybrać wszystkie sekcje które mają zostać zresetowane:", "FactoryReset": "Ustawienia fabryczne", - "General": "Ogólny", + "General": "Ogólne", "Language": "Język", "PrinterName": "Nazwa drukarki", "Reset": "reset", @@ -870,7 +867,9 @@ "Slicer": "Slicer (M73)" }, "DateFormat": "Format daty", - "MainsailSettingsMoonrakerDb": "Ustawienia Mainsail w bazie danych Moonraker" + "MainsailSettingsMoonrakerDb": "Ustawienia Mainsail w bazie danych Moonraker", + "DBNavigation": "Nawigacja", + "Everything": "Wszystko" }, "InterfaceSettings": "Ustawienia interfejsu", "MacrosTab": { @@ -1027,7 +1026,7 @@ "NavigationStyleIconsAndText": "Ikony + Tekst", "NavigationStyleIconsOnly": "Tylko ikony", "Primary": "Podstawowe", - "UiSettings": "Ustawienia interfejsu", + "UiSettings": "Interfejs", "DisableFanAnimation": "Wyłącz animację wentylatora", "DisableFanAnimationDescription": "To może zmniejszyć obciążenie przeglądarki.", "HideSaveConfigButtonForBedMeshDescription": "Ukryj przycisk \"Zapisz konfigurację\", jeśli oczekują jedynie zmiany w siatce stołu do zapisania w Klipperze.", @@ -1043,7 +1042,12 @@ "TempchartHeightDescription": "Modyfikuj wysokość wykresu temperatury w panelu sterowania.", "PowerDeviceName": "Urządzenie zasilające drukarkę", "HideUpdateWarnings": "Ukryj ostrzeżenia o aktualizacji", - "HideUpdateWarningsDescription": "Ta opcja ukryje wszystkie ostrzeżenia o aktualizacjach w menedżerze aktualizacji." + "HideUpdateWarningsDescription": "Ta opcja ukryje wszystkie ostrzeżenia o aktualizacjach w menedżerze aktualizacji.", + "DefaultNavigationState": "Domyślny stan nawigacji", + "DefaultNavigationStateAlwaysClosed": "zawsze zamknięty", + "DefaultNavigationStateDescription": "Który stan powinien mieć domyślną nawigację?", + "DefaultNavigationStateAlwaysOpen": "zawsze otwarty", + "DefaultNavigationStateLastState": "ostatni stan" }, "WebcamsTab": { "AddWebcam": "Dodaj kamerę", @@ -1080,7 +1084,8 @@ "JMuxerStream": "Nieskompresowany strumień h264 (jmuxer)", "Rotate": "Obróć", "WebrtcCameraStreamer": "WebRTC (camera-streamer)", - "WebrtcMediaMTX": "WebRTC (MediaMTX / rtsp-simple-server)" + "WebrtcMediaMTX": "WebRTC (MediaMTX / rtsp-simple-server)", + "HideFps": "Ukryj wskaźnik kl./s" }, "MiscellaneousTab": { "AddGroup": "dodaj grupę", @@ -1169,7 +1174,7 @@ "Accept": "Akceptuj", "Description": "Kliknij WYREGULOWANO, jeśli bieżąca śruba została wyregulowana. Kliknij AKCEPTUJ, aby kontynuować bez regulacji.", "Adjusted": "wyregulowano", - "Headline": "Śruby łóżka", + "Headline": "Śruby stołu", "ScrewAccepted": "Śruby zaakceptowane", "ScrewIndex": "Indeks śrub", "ScrewName": "Nazwa śruby", diff --git a/src/locales/zh.json b/src/locales/zh.json index f1ea6321..f70e3d00 100644 --- a/src/locales/zh.json +++ b/src/locales/zh.json @@ -478,51 +478,48 @@ } }, "UpdatePanel": { - "Abort": "中止", - "AreYouSure": "你确定嘛?", - "CheckForUpdates": "检查跟新", + "Abort": "放弃", + "AreYouSure": "你确定吗?", + "CheckForUpdates": "检查更新", "Close": "关闭", - "CommitHistory": "提交历史记录", + "CommitHistory": "查看提交记录", "Commits": "提交", - "CommitsAvailable": "没有有效纪录 | {count} 提交可用 | {count} 提交可用", - "CommitsOnDate": "提交于 {date}", - "CommittedDaysAgo": "提交于 {days} 日前", - "CommittedHoursAgo": "提交于 {hours} 小时前", - "CommittedOnDate": "提交于 {date}", - "CommittedYesterday": "昨天完成提交", - "ConfigChanges": "配置修改", - "CountPackagesCanBeUpgraded": "{count} 功能包可以跟新", - "Detached": "分离", - "Dirty": "脏", - "GenericUpdateQuestion": "再Github页面检查此项目的提交记录 (如果有效) 来查看此更新是否需要进行任何手动调整。", - "GitHubPage": "GitHub 页", - "HardRecovery": "硬恢复", - "InitUpdateManager": "更新管理器尚未初始化。 这是第一次启动系统时的正常现象。 请单击刷新按钮来初始化所有组件。", + "CommitsAvailable": "没有新的提交 | 有{count}个提交 | 有{count}个提交", + "CommitsOnDate": "提交于{date}", + "CommittedDaysAgo": "{days}天前提交", + "CommittedHoursAgo": "{hours}小时前提交", + "CommittedOnDate": "提交于{date}", + "CommittedYesterday": "昨天提交", + "Corrupt": "破坏", + "ConfigChanges": "查看变更日志", + "CountPackagesCanBeUpgraded": "有{count}个软件包可以更新", + "Detached": "独立分支", + "Dirty": "被修改", + "GenericUpdateQuestion": "检查提交历史(如果有的话)和该项目的 GitHub 页面,以查看是否需要对此更新进行手动调整。", + "GitHubPage": "GitHub页面", + "HardRecovery": "版本回退(清空修改内容)", + "InitUpdateManager": "更新管理器尚未初始化。这是在您首次启动系统时的正常现象。请点击刷新按钮来初始化所有组件。", "Invalid": "无效", - "IUnderstandTheRisks": "我了解风险", - "LinkToGithub": "连接到 GitHub", - "KlipperUpdateQuestionFirmware": "这将更新 Klipper 主机软件。 你可能需要重新跟新MCU固件以兼容跟新后的主机。", - "KlipperUpdateQuestionConfig": "此更新还可能包含需要在 Printer.cfg 文件中修改的配置参数的更改,请参阅更改日志了解详细信息。", - "MoonrakerUpdateQuestion": "这将更新 Moonraker API。 可能需要更改 Moonraker.conf 文件才能继续使用计算机。", - "MoreCommitsInfo": "此处最多可显示 30 个提交。 要查看所有提交,请单击以下链接:", - "Notification": { - "Detached": "分离状态不是错误也不是问题。 它仅意味着本地存储库中存在远程存储库中不存在的其他提交。", - "Dirty": "本地存储库已被修改,在此状态下无法更新。 请恢复此存储库。" - }, - "OSPackages": "系统包", - "SoftRecovery": "软恢复", - "StartUpdate": "开始跟新", + "IUnderstandTheRisks": "我已了解此风险", + "LinkToGithub": "链接到GitHub", + "KlipperUpdateQuestionFirmware": "此操作将更新Klipper主机软件。运行Klipper固件的打印机控制板,可能需要更新到最新编译的固件后才能使用。", + "KlipperUpdateQuestionConfig": "此更新还可能包含对配置参数的更改,这些更改需要修改printer.cfg文件,有关详细信息请参阅更改日志。", + "MoonrakerUpdateQuestion": "此操作将更新Moonraker API。可能需要更改moonraker.conf文件才能继续使用打印机。", + "MoreCommitsInfo": "这里最多可以显示30个提交。要查看所有提交,请单击以下链接:", + "OSPackages": "操作系统软件包", + "SoftRecovery": "版本回退(保留修改内容)", + "StartUpdate": "开始更新", "System": "系统", - "ThesePackagesCanBeUpgrade": "一下系统包可以跟新:", + "ThesePackagesCanBeUpgrade": "这些系统软件包可以升级:", "Unknown": "未知", - "Update": "跟新", - "UpdateAll": "跟新所有组件", - "UpdateManager": "跟新管理", - "UpdateWarning": "跟新警告: {name}", + "Update": "更新", + "UpdateAll": "更新全部组件", + "UpdateManager": "更新管理", + "UpdateWarning": "更新警告: {name}", "Upgrade": "升级", - "UpgradeableSystemPackages": "可以升级的系统包", - "UpToDate": "最新", - "WebClientUpdateQuestion": "在某些情况下,更新 Web 客户端可能会发生更改,从而导致不兼容。 请参阅发行说明以获取更多信息。" + "UpgradeableSystemPackages": "可升级的系统软件包", + "UpToDate": "已是最新版本", + "WebClientUpdateQuestion": "在某些情况下,更新Web客户端可能会有导致不兼容的更改。有关详细信息,请参阅发行说明。" } }, "ManualProbe": { @@ -649,7 +646,7 @@ "Accept": "接受", "AtLayer": "所在层", "Call": "调用", - "DescriptionPauseAtLayerActive": "此功能已激活,会在层{layer}时调用\"{call}\"。如果重复调用命令,此设置将会被覆盖。", + "DescriptionPauseAtLayerActive": "此功能已激活,会在第{layer}层时调用\"{call}\"。如果重复调用命令,此设置将会被覆盖。", "DescriptionPauseNextLayerActive": "此功能已激活,将在下一层调用\"{call}\"。", "Layer": "层", "NextLayer": "下一层", @@ -873,7 +870,6 @@ "DbHistoryTotals": "历史统计", "DbTimelapseSettings": "延时摄影设置", "DbView": "视图设置", - "DbWebcams": "摄像头", "EstimateValues": { "Filament": "耗材用量", "File": "Gcode文件", @@ -883,7 +879,7 @@ "FactoryReset": "恢复默认设置", "General": "通用", "Language": "界面语言", - "MoonrakerDb": "Moonraker数据库", + "MainsailSettingsMoonrakerDb": "在Moonraker数据库中的Mainsail设置", "PrinterName": "打印机名称", "Reset": "重启", "Restore": "恢复", @@ -1069,7 +1065,7 @@ "HideSaveConfigButtonForBedMesh": "仅bed_mesh更改时隐藏\"保存配置\"按钮", "HideSaveConfigButtonForBedMeshDescription": "如果只有bed_mesh更改需要保存到Klipper时,隐藏\"保存配置\"按钮。", "HideUpdateWarnings": "隐藏更新警告", - "HideUpdateWarningsDescription": "此选项将隐藏更新管理器中的所有更新警告。", + "HideUpdateWarningsDescription": "此选项将在更新管理器中隐藏所有的更新警告。", "LockSliders": "在触摸屏设备上锁定滑动条", "LockSlidersDelay": "滑动条锁定延迟时间", "LockSlidersDelayDescription": "滑动条将在给定延迟时间后锁定。如果设置为0或留空,滑动条将仅在页面更改/重新加载后锁定", diff --git a/src/store/gui/actions.ts b/src/store/gui/actions.ts index e8070a9c..ea4dd736 100644 --- a/src/store/gui/actions.ts +++ b/src/store/gui/actions.ts @@ -32,21 +32,13 @@ export const actions: ActionTree = { } // delete currentPath if exists - if ( - 'view' in payload.value && - 'gcodefiles' in payload.value.view && - 'currentPath' in payload.value.view.gcodefiles - ) { + if (payload.value?.view?.gcodefiles?.currentPath) { window.console.debug('remove currentPath from gui namespace') await fetch(mainsailUrl + '&key=view.gcodefiles.currentPath', { method: 'DELETE' }) } // delete currentPath if exists - if ( - 'view' in payload.value && - 'configfiles' in payload.value.view && - 'currentPath' in payload.value.view.configfiles - ) { + if (payload.value?.view?.configfiles?.currentPath) { window.console.debug('remove currentPath from gui namespace') await fetch(mainsailUrl + '&key=view.configfiles.currentPath', { method: 'DELETE' }) } diff --git a/src/store/gui/index.ts b/src/store/gui/index.ts index 9b502221..c484e21d 100644 --- a/src/store/gui/index.ts +++ b/src/store/gui/index.ts @@ -30,6 +30,7 @@ export const getDefaultState = (): GuiState => { control: { style: 'bars', actionButton: null, + hideDuringPrint: false, enableXYHoming: false, feedrateXY: 100, stepsXY: [100, 10, 1], @@ -157,6 +158,7 @@ export const getDefaultState = (): GuiState => { boolWideNavDrawer: false, boolHideUploadAndPrintButton: false, navigationStyle: 'iconsAndText', + defaultNavigationStateSetting: 'alwaysOpen', powerDeviceName: null, hideSaveConfigForBedMash: false, disableFanAnimation: false, @@ -236,6 +238,7 @@ export const getDefaultState = (): GuiState => { tempchart: { boolTempchart: true, hiddenDataset: [], + hideMcuHostSensors: false, autoscale: false, datasetSettings: {}, }, diff --git a/src/store/gui/types.ts b/src/store/gui/types.ts index dff97411..8eba4690 100644 --- a/src/store/gui/types.ts +++ b/src/store/gui/types.ts @@ -20,6 +20,7 @@ export interface GuiState { console?: GuiConsoleState control: { style: 'bars' | 'circle' | 'cross' + hideDuringPrint: boolean actionButton: null | 'm84' | 'qgl' | 'ztilt' enableXYHoming: boolean feedrateXY: number @@ -107,6 +108,7 @@ export interface GuiState { boolWideNavDrawer: boolean boolHideUploadAndPrintButton: boolean navigationStyle: 'iconsAndText' | 'iconsOnly' + defaultNavigationStateSetting: 'alwaysOpen' | 'alwaysClosed' | 'lastState' powerDeviceName: string | null hideSaveConfigForBedMash: boolean disableFanAnimation: boolean @@ -162,6 +164,7 @@ export interface GuiState { tempchart: { boolTempchart: boolean hiddenDataset: string[] + hideMcuHostSensors: boolean autoscale: boolean datasetSettings: any } diff --git a/src/store/gui/webcams/types.ts b/src/store/gui/webcams/types.ts index 1fa1385b..50f03153 100644 --- a/src/store/gui/webcams/types.ts +++ b/src/store/gui/webcams/types.ts @@ -25,6 +25,8 @@ export interface GuiWebcamStateWebcam { flip_vertical: boolean rotation: number aspect_ratio?: string - extra_data?: {} + extra_data?: { + hideFps?: boolean + } source?: 'config' | 'database' } diff --git a/src/store/mutations.ts b/src/store/mutations.ts index 1186708d..6ae477a9 100644 --- a/src/store/mutations.ts +++ b/src/store/mutations.ts @@ -5,6 +5,7 @@ import { RootState } from './types' export const mutations: MutationTree = { setNaviDrawer(state, payload) { Vue.set(state, 'naviDrawer', payload) + localStorage.setItem('naviDrawer', payload) }, setInstancesDB(state, payload) { diff --git a/src/store/printer/tempHistory/getters.ts b/src/store/printer/tempHistory/getters.ts index 67e15085..53ed0d31 100644 --- a/src/store/printer/tempHistory/getters.ts +++ b/src/store/printer/tempHistory/getters.ts @@ -70,7 +70,29 @@ export const getters: GetterTree = { return getters['getAvg'](name, 'speed') }, - getSelectedLegends: (state, _, rootState) => { + getHostMcuSensors: (state, getters, rootState) => { + const settings = rootState.printer?.configfile?.settings ?? {} + const available_heaters = rootState.printer?.heaters?.available_heaters ?? [] + const available_sensors = rootState.printer?.heaters?.available_sensors ?? [] + + return available_sensors.filter((fullName: string) => { + // stop when the current sensor is a heater + if (available_heaters.includes(fullName)) return false + // stop when the current sensor is a temperature_fan + if (fullName.startsWith('temperature_fan')) return false + + // get printer settings object from the current sensor + const settingsObject = settings[fullName.toLowerCase()] + if (!settingsObject) return false + + // get the sensor type of the current sensor + const sensor_type = settingsObject.sensor_type ?? '' + + return ['temperature_mcu', 'temperature_host'].includes(sensor_type) + }) + }, + + getSelectedLegends: (state, getters, rootState) => { interface legends { [key: string]: boolean } @@ -108,6 +130,21 @@ export const getters: GetterTree = { selected[serie.name] = !datasetTypesInPercents.includes(datasetType) }) + // hide MCU & Host sensors, if the option is set to true + const hideMcuHostSensors = rootState.gui?.view?.tempchart?.hideMcuHostSensors ?? false + if (hideMcuHostSensors) { + const mcuHostSensors = getters.getHostMcuSensors ?? [] + + Object.keys(selected) + .filter((seriesName) => { + const datasetName = seriesName.slice(0, seriesName.lastIndexOf('-')) + return mcuHostSensors.includes(datasetName) + }) + .forEach((seriesName) => { + selected[seriesName] = false + }) + } + return selected },