Skip to content

Commit

Permalink
Merge branch 'develop' into feat/add-tmc2240-temp
Browse files Browse the repository at this point in the history
  • Loading branch information
meteyou committed Aug 27, 2023
2 parents 4d0191f + 18a5c73 commit c0ef109
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 21 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
# Changelog
All notable changes to Mainsail will be documented in this file.

## [2.7.1](https://github.com/mainsail-crew/mainsail/releases/tag/v2.7.1) - 2023-08-16
### Bug Fixes and Improvements

- Fix issue on tablet and smaller devices with the sidebar (#1518) | [218f85c](218f85c81feafecc80043e26e880f45be5bc5e3d)

### Localization

- **zh**: Update Chinese (zh) localization (#1521) | [caaf5e1](caaf5e16062d12f765d2e7d6c985dbc351e34336)

## [2.7.0](https://github.com/mainsail-crew/mainsail/releases/tag/v2.7.0) - 2023-08-12
### Features

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mainsail",
"version": "2.7.0",
"version": "2.7.1",
"private": true,
"decription": "a klipper web interface",
"author": {
Expand Down
6 changes: 5 additions & 1 deletion src/components/TheSidebar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-navigation-drawer
:key="navigationStyle"
:value="naviDrawer"
v-model="naviDrawer"
:src="sidebarBackground"
:mini-variant="navigationStyle === 'iconsOnly'"
:width="navigationWidth"
Expand Down Expand Up @@ -70,6 +70,10 @@ export default class TheSidebar extends Mixins(NavigationMixin, BaseMixin) {
return this.$store.state.naviDrawer
}
set naviDrawer(newVal) {
this.$store.dispatch('setNaviDrawer', newVal)
}
get navigationStyle() {
return this.$store.state.gui.uiSettings.navigationStyle
}
Expand Down
7 changes: 5 additions & 2 deletions src/components/TheTopbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,12 @@ export default class TheTopbar extends Mixins(BaseMixin) {
btnEmergencyStop() {
const confirmOnEmergencyStop = this.$store.state.gui.uiSettings.confirmOnEmergencyStop
if (!confirmOnEmergencyStop) this.emergencyStop()
if (confirmOnEmergencyStop) {
this.showEmergencyStopDialog = true
return
}
this.showEmergencyStopDialog = true
this.emergencyStop()
}
emergencyStop() {
Expand Down
30 changes: 19 additions & 11 deletions src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"DescriptionPreviouslyUnderVolted": "自从开机以来树莓派供电电压至少有一次低于4.65V。",
"DescriptionTemperatureLimitActive": "树莓派uC(仅3A+/3B+)温度目前超过软件限值(默认60C)。",
"DescriptionUnderVoltageDetected": "树莓派供电电压目前低于4.65V",
"TitleCurrentlyThrottled": "当前受到限制",
"TitleFrequencyCapped": "频率上限",
"TitlePreviouslyFrequencyCapped": "历史频率上限",
"TitlePreviouslyTemperatureLimited": "历史温度限制",
"TitlePreviouslyThrottled": "历史限制",
"TitlePreviouslyUnderVolted": "历史电压过低",
"TitleTemperatureLimitActive": "温度限制",
"TitleUnderVoltageDetected": "检测到电压过低"
"TitleCurrentlyThrottled": "受限提醒",
"TitleFrequencyCapped": "频率上限提醒",
"TitlePreviouslyFrequencyCapped": "频率上限提醒",
"TitlePreviouslyTemperatureLimited": "温度限制提醒",
"TitlePreviouslyThrottled": "受限提醒",
"TitlePreviouslyUnderVolted": "电压过低提醒",
"TitleTemperatureLimitActive": "温度限制提醒",
"TitleUnderVoltageDetected": "电压过低提醒"
},
"Titles": {
"Complete": "已完成 - {filename}",
Expand Down Expand Up @@ -677,6 +677,7 @@
"Temperature": "当前温度"
},
"Headline": "温度",
"HideMcuHostSensors": "隐藏Host/MCU传感器",
"Max": "最高",
"Min": "最低",
"Name": "名称",
Expand Down Expand Up @@ -791,6 +792,7 @@
"Circle": "圆形",
"Control": "控制",
"Cross": "交叉",
"HideDuringPrint": "打印期间隐藏轴控制",
"EnableXYHoming": "显示X&Y轴归零按钮",
"EstimatedExtrusionInfo": "显示预估的挤出信息",
"EstimatedExtrusionInfoDescription": "显示/隐藏根据挤出量和进给速度预估的挤出信息",
Expand Down Expand Up @@ -866,8 +868,7 @@
"CannotReadJson": "无法读取/解析备份文件。",
"DateFormat": "日期格式",
"DbConsoleHistory": "控制台历史记录",
"DbHistoryJobs": "历史任务",
"DbHistoryTotals": "历史统计",
"DBNavigation": "侧边栏",
"DbTimelapseSettings": "延时摄影设置",
"DbView": "视图设置",
"EstimateValues": {
Expand All @@ -884,7 +885,8 @@
"Reset": "重启",
"Restore": "恢复",
"RestoreDialog": "请选择你想要恢复的项:",
"TimeFormat": "时间格式"
"TimeFormat": "时间格式",
"Everything": "全部"
},
"InterfaceSettings": "Mainsail设置",
"MacrosTab": {
Expand Down Expand Up @@ -1055,6 +1057,11 @@
"ConfirmOnEmergencyStopDescription": "在按下\"紧急停止\"时显示确认对话框",
"ConfirmOnPowerDeviceChange": "控制设备电源时需要确认",
"ConfirmOnPowerDeviceChangeDescription": "控制设备电源时显示确认对话框",
"DefaultNavigationState": "侧边栏默认状态",
"DefaultNavigationStateAlwaysClosed": "始终隐藏",
"DefaultNavigationStateAlwaysOpen": "始终显示",
"DefaultNavigationStateDescription": "侧边栏默认显示状态。",
"DefaultNavigationStateLastState": "上一次的状态",
"DisableFanAnimation": "关闭风扇动画",
"DisableFanAnimationDescription": "这会一定程度减少浏览器的资源消耗",
"DisplayCANCEL_PRINT": "显示\"取消打印\"按钮",
Expand Down Expand Up @@ -1093,6 +1100,7 @@
"EditCrowsnestConf": "编辑 crowsnest.conf",
"EditWebcam": "编辑摄像头",
"FlipWebcam": "翻转摄像头图像:",
"HideFps": "隐藏FPS数值显示",
"Horizontally": "水平",
"IconBed": "热床",
"IconCam": "摄像头",
Expand Down
6 changes: 2 additions & 4 deletions src/store/gui/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,8 @@ export const getters: GetterTree<GuiState, any> = {
const setting = state.general.timeFormat
if (setting === '12hours') return true
if (setting === null) {
const browserLocale =
navigator.languages && navigator.languages.length ? navigator.languages[0] : navigator.language

if (browserLocale === 'en_us') return true
const timestring = new Date().toLocaleTimeString().split(' ')
return timestring.includes('AM') || timestring.includes('PM')
}

return false
Expand Down

0 comments on commit c0ef109

Please sign in to comment.