Skip to content

Commit

Permalink
Merge branch 'mainsail-crew-develop' into idex-controls
Browse files Browse the repository at this point in the history
  • Loading branch information
HelgeKeck committed Sep 20, 2023
2 parents b5c3e91 + 9363ab9 commit 298b12d
Show file tree
Hide file tree
Showing 26 changed files with 578 additions and 279 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,40 @@
# 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

- Hide screws tilt adjust dialog, when using MAX_DEVIATION (#1474) | [15371ad](15371adc3d550817663aabca6c2f4b76fd585e4f)
- Add option to hide MCU/Host sensors in the temp panel (#1496) | [9883457](9883457e9d622c16f6edb8e368c77b99e6728085)
- Hide axis controls during print (#1452) | [da15789](da157891a44bc6a6b9cdec87e0e8fb2c0f060dba)
- Add an option to set the sidebar default state (#1462) | [e9c22d3](e9c22d32bc3615360407caf544ed5751f30adb09)
- Add option to hide FPS counter in webcams (#1488) | [69eaeb6](69eaeb65573c5dda5773c5f9c60fa249d136c213)
- Add a select all option on the backup and restore dialogs (#1448) | [0c4b9e7](0c4b9e75516c55bfe6678ce3a66ed8e281295ace)
- Add nevermore to temperature panel (#1511) | [1cd2541](1cd2541d6f2f7d567f33b00708fe055b929df3dd)

### Bug Fixes and Improvements

- Fix cursor style for item name to be a pointer (#1514) | [98d9b0a](98d9b0aa597ab482314876b11d261c81aae1bbf9)

### Refactor

- Soft down info buttons in update manager (#1513) | [16165ec](16165ec85f05a92edcd52f57be869ea31f8b0460)

### Localization

- **pl**: Update Polish translation (#1502) | [fe7aee9](fe7aee9307cca63ae993c062e2d9a84a6f215856)
- **pl**: Update Polish translation (#1515) | [90d76c1](90d76c1ffeea42bc59f6d7dcc9374eee600f2cc7)
- **zh**: Update Chinese (zh) localization (#1503) | [dbb5f81](dbb5f81206d4d161eb0593b9d5e8c7b5189ffc2d)

## [2.6.2](https://github.com/mainsail-crew/mainsail/releases/tag/v2.6.2) - 2023-07-30
### Bug Fixes and Improvements

Expand Down
281 changes: 186 additions & 95 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mainsail",
"version": "2.6.2",
"version": "2.7.1",
"private": true,
"decription": "a klipper web interface",
"author": {
Expand Down Expand Up @@ -40,6 +40,7 @@
"axios": "^0.27.0",
"codemirror": "^6.0.1",
"core-js": "^3.16.0",
"detect-browser": "^5.3.0",
"echarts": "^5.2.2",
"echarts-gl": "^2.0.8",
"hls.js": "^1.3.3",
Expand Down Expand Up @@ -81,7 +82,7 @@
"@typescript-eslint/parser": "^5.11.0",
"@vue/eslint-config-typescript": "^11.0.0",
"autoprefixer": "^10.4.2",
"cypress": "^10.0.0",
"cypress": "^13.2.0",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-jsonc": "^2.2.1",
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
4 changes: 3 additions & 1 deletion src/components/TheTopCornerMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ export default class TheTopCornerMenu extends Mixins(BaseMixin) {
}
get powerDevices() {
return this.$store.getters['server/power/getDevices']
const devices = this.$store.getters['server/power/getDevices'] ?? []
return devices.filter((device: ServerPowerStateDevice) => !device.device.startsWith('_'))
}
get service_states() {
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
8 changes: 6 additions & 2 deletions src/components/inputs/MacroButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,13 @@ export default class MacroButton extends Mixins(BaseMixin) {
sendWithParams() {
let params: string[] = []
this.paramArray.forEach((paramname: string) => {
if (this.params[paramname].value !== null && this.params[paramname].value !== '') {
let value = this.params[paramname].value?.toString().trim()
if (this.params[paramname].value !== null && value !== '') {
let tmp: string = paramname
tmp += this.isGcodeStyle ? this.params[paramname].value : `=${this.params[paramname].value}`
if (value?.includes(' ')) value = `"${value}"`
tmp += this.isGcodeStyle ? value : `=${value}`
params.push(tmp)
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/inputs/ToolSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ import { Component, Mixins, Prop, Watch } from 'vue-property-decorator'
import { Debounce } from 'vue-debounce-decorator'
import BaseMixin from '@/components/mixins/base'
import { mdiLockOpenVariantOutline, mdiLockOutline, mdiMinus, mdiPlus, mdiRestart } from '@mdi/js'
import { TranslateResult } from 'vue-i18n'
@Component
export default class ToolSlider extends Mixins(BaseMixin) {
Expand All @@ -107,7 +108,7 @@ export default class ToolSlider extends Mixins(BaseMixin) {
@Prop({ type: Number, required: true }) declare readonly target: number
@Prop({ type: String, required: true }) declare readonly command: string
@Prop({ type: String, default: '' }) declare readonly attributeName: string
@Prop({ type: String, default: '' }) declare readonly label: string
@Prop({ default: '' }) declare readonly label: string | TranslateResult
@Prop({ type: String, default: '' }) declare readonly icon: string
@Prop({ type: String, default: '%' }) declare readonly unit: string
@Prop({ type: Number, default: 1 }) declare readonly attributeScale: number
Expand Down
58 changes: 39 additions & 19 deletions src/components/panels/MiniconsolePanel.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
<style scoped lang="scss">
.consoleTable {
border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.gcode-command-field {
font-family: 'Roboto Mono', monospace;
}
</style>

<template>
<panel
v-if="socketIsConnected && klipperState !== 'disconnected'"
Expand All @@ -20,38 +10,45 @@
<v-btn icon tile @click="clearConsole">
<v-icon small>{{ mdiTrashCan }}</v-icon>
</v-btn>
<command-help-modal :in-toolbar="true" @onCommand="gcode = $event"></command-help-modal>
<command-help-modal :in-toolbar="true" @onCommand="gcode = $event" />
<v-menu
:offset-y="true"
:close-on-content-click="false"
:title="$t('Panels.MiniconsolePanel.SetupConsole')">
<template #activator="{ on, attrs }">
<v-btn icon tile v-bind="attrs" v-on="on">
<v-icon small>{{ mdiFilter }}</v-icon>
<v-icon small>{{ mdiCog }}</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item v-if="consoleDirection === 'shell'" class="minHeight36">
<v-checkbox
v-model="autoscroll"
class="mt-0"
hide-details
:label="$t('Panels.MiniconsolePanel.Autoscroll')" />
</v-list-item>
<v-list-item class="minHeight36">
<v-checkbox
v-model="hideWaitTemperatures"
class="mt-0"
hide-details
:label="$t('Panels.MiniconsolePanel.HideTemperatures')"></v-checkbox>
:label="$t('Panels.MiniconsolePanel.HideTemperatures')" />
</v-list-item>
<v-list-item v-if="moonrakerComponents.includes('timelapse')" class="minHeight36">
<v-checkbox
v-model="hideTlCommands"
class="mt-0"
hide-details
:label="$t('Panels.MiniconsolePanel.HideTimelapse')"></v-checkbox>
:label="$t('Panels.MiniconsolePanel.HideTimelapse')" />
</v-list-item>
<v-list-item v-for="(filter, index) in customFilters" :key="index" class="minHeight36">
<v-checkbox
v-model="filter.bool"
class="mt-0"
hide-details
:label="filter.name"
@change="toggleFilter(filter)"></v-checkbox>
@change="toggleFilter(filter)" />
</v-list-item>
</v-list>
</v-menu>
Expand Down Expand Up @@ -93,7 +90,7 @@
:events="events"
:is-mini="true"
@command-click="commandClick" />
<v-divider></v-divider>
<v-divider />
</overlay-scrollbars>
</v-col>
</v-row>
Expand All @@ -109,7 +106,7 @@ import BaseMixin from '@/components/mixins/base'
import { CommandHelp, VTextareaType } from '@/store/printer/types'
import ConsoleTable from '@/components/console/ConsoleTable.vue'
import Panel from '@/components/ui/Panel.vue'
import { mdiChevronDoubleRight, mdiConsoleLine, mdiFilter, mdiSend, mdiTrashCan } from '@mdi/js'
import { mdiChevronDoubleRight, mdiCog, mdiConsoleLine, mdiSend, mdiTrashCan } from '@mdi/js'
import CommandHelpModal from '@/components/CommandHelpModal.vue'
@Component({
Expand All @@ -122,7 +119,7 @@ import CommandHelpModal from '@/components/CommandHelpModal.vue'
export default class MiniconsolePanel extends Mixins(BaseMixin) {
mdiTrashCan = mdiTrashCan
mdiConsoleLine = mdiConsoleLine
mdiFilter = mdiFilter
mdiCog = mdiCog
mdiSend = mdiSend
mdiChevronDoubleRight = mdiChevronDoubleRight
Expand Down Expand Up @@ -155,13 +152,18 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
@Watch('events')
eventsChanged() {
if (this.consoleDirection === 'shell') {
if (this.consoleDirection === 'shell' && this.autoscroll) {
setTimeout(() => {
this.scrollToBottom()
}, 50)
}
}
@Watch('autoscroll')
autoscrollChanged(newVal: boolean) {
if (newVal) this.scrollToBottom()
}
clearConsole() {
this.$store.dispatch('gui/console/clear')
}
Expand Down Expand Up @@ -194,6 +196,14 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
return this.$store.state.gui.gcodehistory.entries ?? []
}
get autoscroll(): boolean {
return this.$store.state.gui.console.autoscroll ?? true
}
set autoscroll(newVal) {
this.$store.dispatch('gui/saveSetting', { name: 'console.autoscroll', value: newVal })
}
commandClick(msg: string): void {
this.gcode = msg
Expand Down Expand Up @@ -325,3 +335,13 @@ export default class MiniconsolePanel extends Mixins(BaseMixin) {
}
}
</script>

<style scoped>
.consoleTable {
border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.gcode-command-field {
font-family: 'Roboto Mono', monospace;
}
</style>
8 changes: 7 additions & 1 deletion src/components/panels/ToolheadControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<panel
v-if="klipperReadyForGui"
:icon="mdiGamepad"
:title="$t(headline)"
:title="$t('Panels.ToolheadControlPanel.Headline')"
:collapsible="true"
card-class="toolhead-control-panel">
<!-- PANEL-HEADER 3-DOT-MENU -->
Expand Down Expand Up @@ -87,19 +87,25 @@
<idex-control v-if="isIdex" class="py-0 pt-3" />
<!-- MOVE TO CONTROL -->
<move-to-control class="py-0 pt-3" />
<move-to-control class="py-0 pt-3" />
<!-- AXIS CONTROL -->
<v-container v-if="axisControlVisible">
<component :is="`${controlStyle}-control`" />
<component :is="`${controlStyle}-control`" />
</v-container>
<!-- Z-OFFSET CONTROL -->
<v-divider :class="{ 'mt-3': !axisControlVisible }" />
<v-divider :class="{ 'mt-3': !axisControlVisible }" />
<v-container>
<zoffset-control />
<zoffset-control />
</v-container>
<!-- SPEED FACTOR -->
<v-divider />
<v-divider />
<v-container>
<tool-slider
:label="$t('Panels.ToolheadControlPanel.SpeedFactor')"
:label="$t('Panels.ToolheadControlPanel.SpeedFactor')"
:icon="mdiSpeedometer"
:target="speedFactor"
Expand Down
Loading

0 comments on commit 298b12d

Please sign in to comment.