Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: UI fixes related to feedback form beta-phase #494

Merged
merged 44 commits into from
Jan 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
320c6a3
fix: truncated settings menu
steadyjaw Nov 21, 2021
9ad8180
Merge branch 'mainsail-crew:develop' into fix/beta1
steadyjaw Nov 21, 2021
65bd537
refactor: change probe chips to label
steadyjaw Nov 21, 2021
b7c3ff9
refactor(timelapse): change button color and make responsive
steadyjaw Nov 21, 2021
2a9c478
refactor: change display helpers of some buttons
steadyjaw Nov 22, 2021
0a188b5
fix(#390): encodeURI of thumbnails in files page
steadyjaw Nov 22, 2021
10d8a58
fix: responsivity of timelapse-page
steadyjaw Nov 22, 2021
9d369c9
refactor(timelapse): more responsiveness
steadyjaw Nov 22, 2021
cbc6733
Merge branch 'mainsail-crew:develop' into fix/beta1
steadyjaw Nov 22, 2021
a1ace57
refactor(timelapse): no frames found visibility
steadyjaw Nov 23, 2021
3ae66a7
Merge branch 'fix/beta1' of github.com:steadyjaw/mainsail into fix/beta1
steadyjaw Nov 23, 2021
641906a
refactor: tooltip on disabled retract /extrude buttons
steadyjaw Nov 26, 2021
0993076
refactor(editor): show "read-only" in title if file is not writable
steadyjaw Nov 26, 2021
910b022
fix: visibility of reload button
steadyjaw Nov 29, 2021
3db2c0b
Merge branch 'develop' of https://github.com/mainsail-crew/mainsail i…
steadyjaw Dec 3, 2021
8e5209c
xMerge branch 'mainsail-crew-develop' into fix/beta1
steadyjaw Dec 3, 2021
7ca1b22
refactor: select printer dialog new ui style
steadyjaw Dec 5, 2021
5bea699
refactor: add attach prop to inputs w dropdowns
steadyjaw Dec 5, 2021
b7d52f4
fix: paddings of panels on spec. viewports
steadyjaw Dec 5, 2021
cb15bf8
Merge branch 'mainsail-crew:develop' into fix/2.1.0-beta
steadyjaw Dec 5, 2021
ff65985
refactor: hide spin buttons on number inputs
steadyjaw Dec 6, 2021
5cf7b99
Merge branch 'fix/2.1.0-beta' of github.com:steadyjaw/mainsail into f…
steadyjaw Dec 6, 2021
af08e68
refactor: hide-spin-buttons after merging timelapseTab
steadyjaw Dec 6, 2021
c1f9e19
fix: add overlay-scrollbar to sidebar
steadyjaw Dec 10, 2021
83a660b
fix: scrollbars in settingsmenu
steadyjaw Dec 10, 2021
bebad86
feat: remember current path when leaving gcode-files-page
steadyjaw Dec 20, 2021
b35c631
fix: remove comment in gcodefilespanel
steadyjaw Dec 20, 2021
9e1d1aa
feat: remember current path in timlapse files panel
steadyjaw Dec 20, 2021
28e56fc
feat: remember current path in config files panel
steadyjaw Dec 20, 2021
5d196f8
fix: console text colors and add css classes
steadyjaw Dec 20, 2021
54af9d9
Merge branch 'develop' of https://github.com/mainsail-crew/mainsail i…
steadyjaw Dec 30, 2021
bc624b5
Merge branch 'mainsail-crew-develop' into fix/2.1.0-beta
steadyjaw Dec 30, 2021
bb9ce25
fix: filepanel-path-persistance to new db layout
steadyjaw Dec 30, 2021
0d6ab09
fix: settings tab scrollbars
steadyjaw Dec 31, 2021
91a2e8e
fix: button logic in heigthmap
steadyjaw Dec 31, 2021
257dff7
refactor: color home button in heightmap
steadyjaw Dec 31, 2021
7622f5b
refactor: heightmap add color to small buttons
steadyjaw Dec 31, 2021
f992733
refactor: sidebar behavior on touch devices
steadyjaw Jan 1, 2022
f74cad6
Merge branch 'develop' of https://github.com/mainsail-crew/mainsail i…
steadyjaw Jan 1, 2022
e5a12aa
Merge branch 'mainsail-crew-develop' into fix/2.1.0-beta
steadyjaw Jan 1, 2022
58811b2
fix: reapply tooltip patch after merge
steadyjaw Jan 1, 2022
2252ef0
fix: temp sidebar remove touch-condition
steadyjaw Jan 1, 2022
fdca91b
feat: add save-action for non persistant settings
steadyjaw Jan 1, 2022
afb0afe
fix: use new save action in setters
steadyjaw Jan 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/components/TheSettingsMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<v-btn icon tile @click="showSettings = true">
<v-icon>mdi-cogs</v-icon>
</v-btn>
<v-dialog v-model="showSettings" width="900" persistent :fullscreen="isMobile" @keydown.esc="showSettings = false">
<v-dialog v-model="showSettings" width="900" persistent :fullscreen="isMobile" @keydown.esc="showSettings = false" scrollable>
<panel :title="$t('Settings.InterfaceSettings')" icon="mdi-cogs" card-class="settings-menu-dialog" :margin-bottom="false" style="overflow: hidden;" :height="isMobile ? 0 : 548">
<template v-slot:buttons>
<v-btn icon tile @click="showSettings = false"><v-icon>mdi-close-thick</v-icon></v-btn>
Expand Down Expand Up @@ -187,18 +187,18 @@ export default class TheSettingsMenu extends Mixins(BaseMixin) {

<style scoped>
.settings-tabs {
height: auto;
min-height: 100%;
max-height: calc(var(--app-height) - 96px);
height: calc(var(--app-height) - 96px);
}

.settings-tabs-bar {
border-right: 1px solid rgba(255, 255, 255, 0.12);
height: 100%;
}

.settings-tabs-bar.height500,
.settings-tabs.height500 {
max-height: 500px;
height: 500px;
max-height: calc(var(--app-height) - 111px);
}
</style>

Expand Down
160 changes: 112 additions & 48 deletions src/components/TheSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,81 +2,109 @@
.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;
}
</style>
<style scoped>
.active-nav-item {
border-right: 4px solid var(--v-primary-base);
}

.menu-item-icon {
opacity: .85;
}

.menu-item-title {
line-height: 30px;
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
opacity: .85;
}
</style>

.nav-scrollbar {
height: 100%;
}
</style>
<template>
<v-navigation-drawer v-model="naviDrawer" :src="sidebarBackground" :mini-variant="(navigationStyle === 'iconsOnly')" :key="navigationStyle" :width="navigationWidth" clipped app>
<v-list class="pr-0 pt-0 ml-0">
<v-list-item-group active-class="active-nav-item">
<template v-if="countPrinters">
<v-tooltip right>
<template v-slot:activator="{ on, attrs }">
<v-list-item
router to="/allPrinters"
class="small-list-item mt-1"
v-bind="attrs"
v-on="on"
>
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
<v-icon>mdi-view-dashboard-outline</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title tile class="menu-item-title">{{ $t("App.Printers") }}</v-list-item-title>
</v-list-item-content>

</v-list-item>
<v-navigation-drawer v-model="naviDrawer" :src="sidebarBackground" :mini-variant="(navigationStyle === 'iconsOnly')" :key="navigationStyle" :width="navigationWidth" :temporary="boolNaviTemp" :hide-overlay="!isMobile" clipped app :style="cssVars">
<overlay-scrollbars class="nav-scrollbar">
<v-list class="pr-0 pt-0 ml-0">
<v-list-item-group active-class="active-nav-item">
<v-list-item
router to="/"
class="d-flex d-sm-none sidebar-logo no-text-decoration no-background no-border"
:style="'height: ' + topbarHeight + 'px'"
:ripple="false"
>
<template v-if="sidebarLogo">
<img :src="sidebarLogo" style="height: 32px;" class="nav-logo mr-3" alt="Logo" />
</template>
<span v-if="navigationStyle === 'iconsOnly'">{{ $t("App.Printers") }}</span>
</v-tooltip>
<v-divider class="my-1"></v-divider>
</template>
<div v-for="(category, index) in naviPoints" :key="index">
<v-tooltip right :open-delay="500" :disabled="navigationStyle !== 'iconsOnly'">
<template v-slot:activator="{ on, attrs }">
<v-list-item
router :to="category.path"
class="small-list-item"
v-bind="attrs"
v-on="on"
>
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
<v-icon>mdi-{{ category.icon }}</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title tile class="menu-item-title">{{ $t(`Router.${category.title}`) }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
<template v-else>
<mainsail-logo :color="logoColor" style="height: 32px;" class="nav-logo mr-4" :ripple="false"></mainsail-logo>
</template>
<span>{{ $t(`Router.${category.title}`) }}</span>
</v-tooltip>
</div>
</v-list-item-group>
</v-list>
<span class="text-h6 font-weight-regular text-truncate"> {{ printerName }} </span>
</v-list-item>
<template v-if="countPrinters">
<v-tooltip right :open-delay="500" :disabled="navigationStyle !== 'iconsOnly'">
<template v-slot:activator="{ on, attrs }">
<v-list-item
router to="/allPrinters"
class="small-list-item mt-1"
v-bind="attrs"
v-on="on"
>
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
<v-icon>mdi-view-dashboard-outline</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title tile class="menu-item-title">{{ $t("App.Printers") }}</v-list-item-title>
</v-list-item-content>

</v-list-item>
</template>
<span>{{ $t("App.Printers") }}</span>
</v-tooltip>
<v-divider class="my-1"></v-divider>
</template>
<div v-for="(category, index) in naviPoints" :key="index">
<v-tooltip right :open-delay="500" :disabled="navigationStyle !== 'iconsOnly'">
<template v-slot:activator="{ on, attrs }">
<v-list-item
router :to="category.path"
class="small-list-item"
v-bind="attrs"
v-on="on"
>
<v-list-item-icon class="my-3 mr-3 menu-item-icon">
<v-icon>mdi-{{ category.icon }}</v-icon>
</v-list-item-icon>
<v-list-item-content>
<v-list-item-title tile class="menu-item-title">{{ $t(`Router.${category.title}`) }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
</template>
<span>{{ $t(`Router.${category.title}`) }}</span>
</v-tooltip>
</div>
</v-list-item-group>
</v-list>
</overlay-scrollbars>
<template v-slot:append>
<v-list-item class="small-list-item mb-2">
<v-list-item-icon class="menu-item-icon">
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/components/console/ConsoleTableEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

<template>
<v-row :class="'ma-0 '+entryStyle">
<v-col class="col-auto pr-0 text--secondary">{{ event.formatTime }}</v-col>
<v-col :class="colorConsoleMessage(event)" v-html="event.formatMessage" @click.capture="commandClick"></v-col>
<v-col class="col-auto pr-0 text--disabled console-time">{{ event.formatTime }}</v-col>
<v-col :class="colorConsoleMessage(event) + ' ' + 'console-message'" v-html="event.formatMessage" @click.capture="commandClick"></v-col>
</v-row>
</template>

Expand All @@ -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) {
Expand Down
9 changes: 8 additions & 1 deletion src/components/panels/GcodefilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 },
Expand Down
18 changes: 16 additions & 2 deletions src/components/panels/Machine/ConfigFilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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' })
}
Expand Down
11 changes: 9 additions & 2 deletions src/components/panels/Timelapse/TimelapseFilesPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<v-card-text>
<v-row>
<v-col class="col-12 py-2 d-flex align-center">
<span><b>{{ $t('Timelapse.CurrentPath') }}:</b> {{ this.currentPath !== 'timelapse' ? "/"+this.currentPath.substring(7) : "/" }}</span>
<span><b>{{ $t('Timelapse.CurrentPath') }}:</b> {{ this.currentPath !== 'timelapse' ? "/"+this.currentPath.substring(10) : "/" }}</span>
<v-spacer></v-spacer>
<template v-if="this.disk_usage !== null">
<v-tooltip top>
Expand Down Expand Up @@ -284,7 +284,6 @@ export default class TimelapseFilesPanel extends Mixins(BaseMixin) {
}

private search = ''
private currentPath = 'timelapse'
private boolVideoDialog = false
private videoDialogFilename = ''

Expand Down Expand Up @@ -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
Expand Down
Loading