diff --git a/src/components/TheSettingsMenu.vue b/src/components/TheSettingsMenu.vue index e5ce55c4f..35dfeebcd 100644 --- a/src/components/TheSettingsMenu.vue +++ b/src/components/TheSettingsMenu.vue @@ -3,7 +3,7 @@ mdi-cogs - + mdi-close-thick @@ -187,18 +187,18 @@ export default class TheSettingsMenu extends Mixins(BaseMixin) { diff --git a/src/components/TheSidebar.vue b/src/components/TheSidebar.vue index 129d8291a..da8eb8ba0 100644 --- a/src/components/TheSidebar.vue +++ b/src/components/TheSidebar.vue @@ -2,24 +2,33 @@ .nav-logo { height: 32px; } + .small-list-item { height: var(--sidebar-menu-item-height); } + .no-text-decoration { text-decoration: none; background-color: transparent; } + .no-background:before { background-color: rgba(255, 255, 255, 0) !important; } + + .no-border { + border: 0 !important; + } + .nav-scrollbar { + height: 100%; + } + - - - - - - - - - mdi-view-dashboard-outline - - - {{ $t("App.Printers") }} - - - + + + + + + + - {{ $t("App.Printers") }} - - - - - - - - - mdi-{{ category.icon }} - - - {{ $t(`Router.${category.title}`) }} - - + + - {{ $t(`Router.${category.title}`) }} - - - - + {{ printerName }} + + + + + + + mdi-view-dashboard-outline + + + {{ $t("App.Printers") }} + + + + + {{ $t("App.Printers") }} + + + + + + + + + mdi-{{ category.icon }} + + + {{ $t(`Router.${category.title}`) }} + + + + {{ $t(`Router.${category.title}`) }} + + + + + @@ -95,17 +123,20 @@ import BaseMixin from '@/components/mixins/base' import {PrinterStateKlipperConfig} from '@/store/printer/types' import TheSelectPrinterDialog from '@/components/TheSelectPrinterDialog.vue' import AboutModal from '@/components/modals/AboutModal.vue' -import {navigationWidth} from '@/store/variables' +import {navigationWidth, topbarHeight} from '@/store/variables' +import MainsailLogo from '@/components/ui/MainsailLogo.vue' @Component({ components: { TheSelectPrinterDialog, - AboutModal + AboutModal, + MainsailLogo } }) export default class TheSidebar extends Mixins(BaseMixin) { navigationWidth = navigationWidth + topbarHeight = topbarHeight get naviDrawer(): boolean { return this.$store.state.naviDrawer @@ -157,6 +188,39 @@ export default class TheSidebar extends Mixins(BaseMixin) { return this.$store.getters['farm/countPrinters'] } + get boolNaviTemp(): boolean { + if(!this.isMobile && this.$vuetify.breakpoint.mdAndDown) { + return true + } + return false + } + + get cssVars(): any { + if(this.boolNaviTemp){ + return { + 'top': `${topbarHeight}px !important`, + 'padding-bottom': `${topbarHeight}px` + } + } + return {} + } + + get sidebarLogo(): string { + return this.$store.getters['files/getSidebarLogo'] + } + + get logoColor(): string { + return this.$store.state.gui.uiSettings.logo + } + + get printerName():string { + if (this.$store.state.gui.general.printername.length) + return this.$store.state.gui.general.printername + + return this.$store.state.printer.hostname + } + + showInNavi(route: AppRoute): boolean { if (['shutdown', 'error', 'disconnected'].includes(this.klippy_state) && !route.alwaysShow) return false else if (route.title === 'Webcam' && !this.boolNaviWebcam) return false diff --git a/src/components/console/ConsoleTableEntry.vue b/src/components/console/ConsoleTableEntry.vue index a4814f511..edff71ae8 100644 --- a/src/components/console/ConsoleTableEntry.vue +++ b/src/components/console/ConsoleTableEntry.vue @@ -25,8 +25,8 @@ - {{ event.formatTime }} - + {{ event.formatTime }} + @@ -46,9 +46,9 @@ export default class ConsoleTableEntry extends Vue { } colorConsoleMessage(item: ServerStateEvent): string { - if (item.message.startsWith('!! ')) return 'red--text' + if (item.message.startsWith('!! ')) return 'error--text' - return 'white--text' + return 'text--primary' } commandClick(event: Event) { diff --git a/src/components/panels/GcodefilesPanel.vue b/src/components/panels/GcodefilesPanel.vue index e8a2d4e40..be86f7dda 100644 --- a/src/components/panels/GcodefilesPanel.vue +++ b/src/components/panels/GcodefilesPanel.vue @@ -470,7 +470,6 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) { private search = '' private selected = [] private hideHeaderColums = [] - private currentPath = 'gcodes' private dropzone = { visibility: 'hidden', opacity: 0, @@ -563,6 +562,14 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) { (value: string) => value.indexOf(' ') === -1 || 'Name contains spaces!' ] + get currentPath() { + return this.$store.state.gui.view.gcodefiles.currentPath + } + + set currentPath(newVal) { + this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.gcodefiles.currentPath', value: newVal }) + } + get headers() { const headers = [ { text: '', value: '', align: 'left', configable: false, visible: true, filterable: false }, diff --git a/src/components/panels/Machine/ConfigFilesPanel.vue b/src/components/panels/Machine/ConfigFilesPanel.vue index 50f47b81c..35cf02f55 100644 --- a/src/components/panels/Machine/ConfigFilesPanel.vue +++ b/src/components/panels/Machine/ConfigFilesPanel.vue @@ -365,8 +365,6 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) { private selected = [] private options = { } private currentPage = 1 - private currentPath = '' - private root = 'config' private contextMenu: contextMenu = { shown: false, isDirectory: false, @@ -580,6 +578,22 @@ export default class ConfigFilesPanel extends Mixins(BaseMixin) { return this.$store.state.server.registered_directories.filter((dir: string) => !hiddenRootDirectories.includes(dir)).sort() } + get root() { + return this.$store.state.gui.view.configfiles.rootPath + } + + set root(newVal) { + this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.configfiles.rootPath', value: newVal }) + } + + get currentPath() { + return this.$store.state.gui.view.configfiles.currentPath + } + + set currentPath(newVal) { + this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.configfiles.currentPath', value: newVal }) + } + refreshFileList() { this.$socket.emit('server.files.get_directory', { path: this.absolutePath.substring(1) }, { action: 'files/getDirectory' }) } diff --git a/src/components/panels/Timelapse/TimelapseFilesPanel.vue b/src/components/panels/Timelapse/TimelapseFilesPanel.vue index 208623cd2..c723f2e5f 100644 --- a/src/components/panels/Timelapse/TimelapseFilesPanel.vue +++ b/src/components/panels/Timelapse/TimelapseFilesPanel.vue @@ -39,7 +39,7 @@ - {{ $t('Timelapse.CurrentPath') }}: {{ this.currentPath !== 'timelapse' ? "/"+this.currentPath.substring(7) : "/" }} + {{ $t('Timelapse.CurrentPath') }}: {{ this.currentPath !== 'timelapse' ? "/"+this.currentPath.substring(10) : "/" }} @@ -284,7 +284,6 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) { } private search = '' - private currentPath = 'timelapse' private boolVideoDialog = false private videoDialogFilename = '' @@ -405,6 +404,14 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) { }) ?? [] } + get currentPath() { + return this.$store.state.gui.view.timelapse.currentPath + } + + set currentPath(newVal) { + this.$store.dispatch('gui/saveSettingWithoutUpload', { name: 'view.timelapse.currentPath', value: newVal }) + } + createDirectory() { this.dialogCreateDirectory.name = '' this.dialogCreateDirectory.show = true diff --git a/src/pages/Heightmap.vue b/src/pages/Heightmap.vue index 611f853a8..caf8fc21e 100644 --- a/src/pages/Heightmap.vue +++ b/src/pages/Heightmap.vue @@ -8,23 +8,23 @@ - {{ bed_mesh ? bed_mesh.profile_name : "" }} + {{ bed_mesh.profile_name }} - {{ bed_mesh ? bed_mesh.profile_name : "" }} - mdi-home - {{ $t('Heightmap.Clear') }} + {{ bed_mesh ? bed_mesh.profile_name : "" }} + mdi-home + {{ $t('Heightmap.Clear') }} {{ $t('Heightmap.Calibrate') }} - mdi-home + mdi-home {{ $t('Heightmap.Clear') }} {{ $t('Heightmap.Calibrate') }} - - + + {{ $t('Heightmap.NoBedMeshHasBeenLoadedYet') }} @@ -66,7 +66,7 @@ - + {{ $t('Heightmap.CurrentMesh.Name') }} @@ -184,6 +184,7 @@