@@ -41,7 +30,7 @@
{{ mdiTrashCan }}
-
+
- {{ mdiFilter }}
+ {{ mdiCog }}
+
+
+
+ :label="$t('Console.HideTemperatures')" />
+ :label="$t('Console.HideTimelapse')" />
+ @change="toggleFilter(filter)" />
@@ -104,7 +100,7 @@ import ConsoleTable from '@/components/console/ConsoleTable.vue'
import { CommandHelp, VTextareaType } from '@/store/printer/types'
import { reverseString, strLongestEqual } from '@/plugins/helpers'
import CommandHelpModal from '@/components/CommandHelpModal.vue'
-import { mdiChevronDoubleRight, mdiFilter, mdiSend, mdiTrashCan } from '@mdi/js'
+import { mdiChevronDoubleRight, mdiCog, mdiSend, mdiTrashCan } from '@mdi/js'
@Component({
components: {
@@ -122,7 +118,7 @@ export default class PageConsole extends Mixins(BaseMixin) {
*/
mdiChevronDoubleRight = mdiChevronDoubleRight
mdiSend = mdiSend
- mdiFilter = mdiFilter
+ mdiCog = mdiCog
mdiTrashCan = mdiTrashCan
declare $refs: {
@@ -145,13 +141,18 @@ export default class PageConsole 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()
+ }
+
get hideWaitTemperatures(): boolean {
return this.$store.state.gui.console.hideWaitTemperatures
}
@@ -184,6 +185,14 @@ export default class PageConsole 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
@@ -304,3 +313,14 @@ export default class PageConsole extends Mixins(BaseMixin) {
}
}
+
+
diff --git a/src/store/gui/console/index.ts b/src/store/gui/console/index.ts
index 5466c489..b152a5c7 100644
--- a/src/store/gui/console/index.ts
+++ b/src/store/gui/console/index.ts
@@ -11,6 +11,7 @@ export const getDefaultState = (): GuiConsoleState => {
direction: 'table',
entryStyle: 'default',
height: 300,
+ autoscroll: true,
consolefilters: {},
}
}
diff --git a/src/store/gui/console/types.ts b/src/store/gui/console/types.ts
index a3f49274..35e63cda 100644
--- a/src/store/gui/console/types.ts
+++ b/src/store/gui/console/types.ts
@@ -5,6 +5,7 @@ export interface GuiConsoleState {
direction: 'table' | 'shell'
entryStyle: 'default' | 'compact'
height: number
+ autoscroll: boolean
consolefilters: {
[key: string]: GuiConsoleStateFilter
}