From 9e2e923a8fafad69369e7f94e847a701feb2f076 Mon Sep 17 00:00:00 2001 From: meteyou Date: Sun, 30 Jul 2023 19:26:46 +0000 Subject: [PATCH 01/14] docs(changelog): update changelog --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 From dbb5f81206d4d161eb0593b9d5e8c7b5189ffc2d Mon Sep 17 00:00:00 2001 From: Samuel-0-0 Date: Tue, 8 Aug 2023 04:54:54 +0800 Subject: [PATCH 02/14] locale(zh): Update Chinese (zh) localization (#1503) Co-authored-by: Stefan Dej --- src/locales/zh.json | 82 +++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 43 deletions(-) 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或留空,滑动条将仅在页面更改/重新加载后锁定", From fe7aee9307cca63ae993c062e2d9a84a6f215856 Mon Sep 17 00:00:00 2001 From: Daviteusz Date: Mon, 7 Aug 2023 23:03:29 +0200 Subject: [PATCH 03/14] locale(pl): Update Polish translation (#1502) Co-authored-by: Stefan Dej --- src/locales/pl.json | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/locales/pl.json b/src/locales/pl.json index 4a6b935e..88ef171a 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": { @@ -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", @@ -1027,7 +1024,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.", @@ -1169,7 +1166,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", From 15371adc3d550817663aabca6c2f4b76fd585e4f Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Mon, 7 Aug 2023 23:25:00 +0200 Subject: [PATCH 04/14] feat: hide screws tilt adjust dialog, when using MAX_DEVIATION (#1474) --- src/components/dialogs/TheScrewsTiltAdjustDialog.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/dialogs/TheScrewsTiltAdjustDialog.vue b/src/components/dialogs/TheScrewsTiltAdjustDialog.vue index caeaa9d8..fb16ba23 100644 --- a/src/components/dialogs/TheScrewsTiltAdjustDialog.vue +++ b/src/components/dialogs/TheScrewsTiltAdjustDialog.vue @@ -65,13 +65,21 @@ export default class TheScrewsTiltAdjustDialog extends Mixins(BaseMixin, Control return this.$store.state.printer.screws_tilt_adjust?.error ?? false } + get max_deviation() { + return this.$store.state.printer.screws_tilt_adjust?.max_deviation ?? null + } + get results() { return this.$store.state.printer.screws_tilt_adjust?.results ?? {} } get showDialog() { + // don't display the dialog, if the user disabled it in the UI settings if (!this.boolScrewsTiltAdjustDialog) return false + // don't display the dialog, if the user add the MAX_DEVIATION attribute to the SCREWS_TILT_CALCULATE command + if (this.max_deviation !== null) return false + return this.error || Object.keys(this.results).length } From 9883457e9d622c16f6edb8e368c77b99e6728085 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Mon, 7 Aug 2023 23:25:43 +0200 Subject: [PATCH 05/14] feat: add option to hide MCU/Host sensors in the temp panel (#1496) --- .../Temperature/TemperaturePanelList.vue | 18 +++++++++ .../Temperature/TemperaturePanelSettings.vue | 15 +++++++ src/locales/de.json | 1 + src/locales/en.json | 1 + src/store/gui/index.ts | 1 + src/store/gui/types.ts | 1 + src/store/printer/tempHistory/getters.ts | 39 ++++++++++++++++++- 7 files changed, 75 insertions(+), 1 deletion(-) diff --git a/src/components/panels/Temperature/TemperaturePanelList.vue b/src/components/panels/Temperature/TemperaturePanelList.vue index 837feb0f..c4eec5fd 100644 --- a/src/components/panels/Temperature/TemperaturePanelList.vue +++ b/src/components/panels/Temperature/TemperaturePanelList.vue @@ -65,12 +65,19 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) { .sort(this.sortObjectName) } + get hideMcuHostSensors(): boolean { + return this.$store.state.gui.view.tempchart.hideMcuHostSensors ?? false + } + get temperature_sensors() { return this.available_sensors .filter((fullName: string) => { if (this.available_heaters.includes(fullName)) return false if (this.temperature_fans.includes(fullName)) return false + // hide MCU & Host sensors, if the function is enabled + if (this.hideMcuHostSensors && this.checkMcuHostSensor(fullName)) return false + const splits = fullName.split(' ') let name = splits[0] if (splits.length > 1) name = splits[1] @@ -84,6 +91,17 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) { return [...this.filteredHeaters, ...this.temperature_fans, ...this.temperature_sensors] } + get settings() { + return this.$store.state.printer?.configfile?.settings ?? {} + } + + checkMcuHostSensor(fullName: string) { + const settingsObject = this.settings[fullName.toLowerCase()] ?? {} + const sensor_type = settingsObject.sensor_type ?? '' + + return ['temperature_mcu', 'temperature_host'].includes(sensor_type) + } + sortObjectName(a: string, b: string) { const splitsA = a.split(' ') let nameA = splitsA[0] diff --git a/src/components/panels/Temperature/TemperaturePanelSettings.vue b/src/components/panels/Temperature/TemperaturePanelSettings.vue index ad9cfc8a..c00f80b9 100644 --- a/src/components/panels/Temperature/TemperaturePanelSettings.vue +++ b/src/components/panels/Temperature/TemperaturePanelSettings.vue @@ -13,6 +13,13 @@ hide-details :label="$t('Panels.TemperaturePanel.ShowChart')" /> + + + diff --git a/src/locales/de.json b/src/locales/de.json index eb3a1aec..0b3e89eb 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", diff --git a/src/locales/en.json b/src/locales/en.json index bdaef032..b397aac5 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", diff --git a/src/store/gui/index.ts b/src/store/gui/index.ts index 9b502221..57d07150 100644 --- a/src/store/gui/index.ts +++ b/src/store/gui/index.ts @@ -236,6 +236,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..b8bbf4dc 100644 --- a/src/store/gui/types.ts +++ b/src/store/gui/types.ts @@ -162,6 +162,7 @@ export interface GuiState { tempchart: { boolTempchart: boolean hiddenDataset: string[] + hideMcuHostSensors: boolean autoscale: boolean datasetSettings: any } 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 }, From da157891a44bc6a6b9cdec87e0e8fb2c0f060dba Mon Sep 17 00:00:00 2001 From: sddev0 <23439221+sddev0@users.noreply.github.com> Date: Mon, 7 Aug 2023 23:43:20 +0200 Subject: [PATCH 06/14] feat: hide axis controls during print (#1452) Co-authored-by: Sebastian Duerholt --- src/components/panels/ToolheadControlPanel.vue | 12 ++++++++++-- src/components/settings/SettingsControlTab.vue | 14 ++++++++++++++ src/locales/de.json | 1 + src/locales/en.json | 1 + src/store/gui/index.ts | 1 + src/store/gui/types.ts | 1 + 6 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/components/panels/ToolheadControlPanel.vue b/src/components/panels/ToolheadControlPanel.vue index 46dd5df0..1a2c3a81 100644 --- a/src/components/panels/ToolheadControlPanel.vue +++ b/src/components/panels/ToolheadControlPanel.vue @@ -94,11 +94,11 @@ - + - + @@ -164,5 +164,13 @@ export default class ToolheadControlPanel extends Mixins(BaseMixin, ControlMixin get speedFactor(): number { return this.$store.state.printer?.gcode_move?.speed_factor ?? 1 } + + get isPrinting() { + return ['printing'].includes(this.printer_state) + } + + get axisControlVisible() { + return !(this.isPrinting && (this.$store.state.gui.control.hideDuringPrint ?? false)) + } } diff --git a/src/components/settings/SettingsControlTab.vue b/src/components/settings/SettingsControlTab.vue index 5a1fe4ca..beb938e5 100644 --- a/src/components/settings/SettingsControlTab.vue +++ b/src/components/settings/SettingsControlTab.vue @@ -35,6 +35,12 @@ + + + + @@ -336,6 +342,14 @@ export default class SettingsControlTab extends Mixins(BaseMixin, ControlMixin) this.$store.dispatch('gui/saveSetting', { name: 'control.style', value: newVal }) } + get hideDuringPrint(): Boolean { + return this.$store.state.gui.control.hideDuringPrint ?? false + } + + set hideDuringPrint(newVal) { + this.$store.dispatch('gui/saveSetting', { name: 'control.hideDuringPrint', value: newVal }) + } + get actionOptions() { let actions = [ { diff --git a/src/locales/de.json b/src/locales/de.json index 0b3e89eb..fa6baa6d 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -795,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", diff --git a/src/locales/en.json b/src/locales/en.json index b397aac5..61efe537 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -796,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", diff --git a/src/store/gui/index.ts b/src/store/gui/index.ts index 57d07150..7fddd584 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], diff --git a/src/store/gui/types.ts b/src/store/gui/types.ts index b8bbf4dc..46dd84ff 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 From 98d9b0aa597ab482314876b11d261c81aae1bbf9 Mon Sep 17 00:00:00 2001 From: rackrick <45207681+rackrick@users.noreply.github.com> Date: Wed, 9 Aug 2023 00:56:34 +0200 Subject: [PATCH 07/14] fix: fix cursor style for item name to be a pointer (#1514) Signed-off-by: Patrick Stainbrook --- src/components/panels/Temperature/TemperaturePanelListItem.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/panels/Temperature/TemperaturePanelListItem.vue b/src/components/panels/Temperature/TemperaturePanelListItem.vue index 32fa1e19..8adf4f07 100644 --- a/src/components/panels/Temperature/TemperaturePanelListItem.vue +++ b/src/components/panels/Temperature/TemperaturePanelListItem.vue @@ -6,7 +6,7 @@ - {{ formatName }} + {{ formatName }} From e9c22d32bc3615360407caf544ed5751f30adb09 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Wed, 9 Aug 2023 01:08:49 +0200 Subject: [PATCH 08/14] feat: add an option to set the sidebar default state (#1462) --- src/App.vue | 79 +++++++----- src/components/TheSidebar.vue | 10 +- src/components/TheTopbar.vue | 53 +++++--- .../settings/SettingsUiSettingsTab.vue | 117 ++++++++++++------ src/locales/de.json | 5 + src/locales/en.json | 5 + src/store/gui/index.ts | 1 + src/store/gui/types.ts | 1 + src/store/mutations.ts | 1 + 9 files changed, 172 insertions(+), 100 deletions(-) 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 @@