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

refactor: button overhaul and minor changes to the ui #413

Merged
merged 39 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2b55058
refactor(appbar): change buttons to new design
steadyjaw Nov 8, 2021
ff1437a
refactor(appbar): change height and add pritnername
steadyjaw Nov 8, 2021
e78ed57
refactor: small sidebar
steadyjaw Nov 9, 2021
11a9a8e
refactor(vuetify): define parts of the mainsail theme and expose colo…
steadyjaw Nov 9, 2021
413e642
refactor: ui settings add missing divider
steadyjaw Nov 9, 2021
46bb749
refactor: add farm printer selection and menu to new top and sidebar,…
steadyjaw Nov 9, 2021
d10caf3
refactor: make topbar buttons hideable via ui settings
steadyjaw Nov 9, 2021
be109a6
refactor: move miniConsole buttons to toolbar and make'em collapsible
steadyjaw Nov 9, 2021
39ede45
refactor: set matching colors for buttons on console page
steadyjaw Nov 9, 2021
88fb3f3
refactor: use colornames from theme and set play/resume button to green
steadyjaw Nov 9, 2021
c30ea16
fix: correct visibility of hide buttons on collapse
steadyjaw Nov 9, 2021
884a336
feature: add virtual tab button to console-input on touch devices
steadyjaw Nov 9, 2021
1dfa48a
refactor: remove hide e-stop button setting
steadyjaw Nov 12, 2021
9af6427
fix: add reactivity to hide upload and print button functionality
steadyjaw Nov 12, 2021
03408a0
refactor: move logo to topbar and clip menu under topbar
steadyjaw Nov 12, 2021
4d6d9de
refactor: remove unused TheSidebarPrinterMenu
steadyjaw Nov 12, 2021
cd2a534
feature: create and add about component to sidebar ...no dialog on cl…
steadyjaw Nov 12, 2021
f66e29d
fix: correct appearance of the close icon from interface settings dialog
steadyjaw Nov 12, 2021
b414572
Revert "fix: correct appearance of the close icon from interface sett…
steadyjaw Nov 13, 2021
7f67a35
Merge branch 'develop' into refactor/ui-redesign
steadyjaw Nov 13, 2021
dc2c034
Merge branch 'mainsail-crew:develop' into feature/ui-design
steadyjaw Nov 14, 2021
44cfcda
refactor: close ui settings on ESC and change close icon to tile
steadyjaw Nov 14, 2021
de8d400
refactor: change font style in wide sidebar and extend width of wide …
steadyjaw Nov 14, 2021
44f12e9
refactor: change menu style ui-settings-entry to dropdown
steadyjaw Nov 14, 2021
259aa1f
refactor: correct variablenames in locales
steadyjaw Nov 14, 2021
aadd989
refactor: re-do menuStyle setting implementation
steadyjaw Nov 14, 2021
f291731
refactor(miniconsole): change collapse button to tile and remove empt…
steadyjaw Nov 16, 2021
412e4dd
refactor: gui variables and button appearance in toolbars
steadyjaw Nov 17, 2021
aa2b725
refactor(heightmap): add autofocus and close on ESC to dialogs
steadyjaw Nov 17, 2021
fb1f31f
refactor(throttledStates): bigger dropdownlist in favor of readability
steadyjaw Nov 17, 2021
88447a3
refactor(confFiles): change imageviewer topbar to darkcolor and move …
steadyjaw Nov 17, 2021
7cbacb3
fix: camera-dropdown visability condition
steadyjaw Nov 17, 2021
2c25fd4
refactor(history): ad close on ESC on dialogs
steadyjaw Nov 17, 2021
a43811a
refactor: button overhaul
steadyjaw Nov 17, 2021
b960f9d
Merge branch 'develop' of https://github.com/mainsail-crew/mainsail i…
steadyjaw Nov 17, 2021
742fb2c
Merge branch 'mainsail-crew-develop' into feature/ui-design
steadyjaw Nov 17, 2021
cfa5f27
fix: correct navigation width and change variablenames
steadyjaw Nov 17, 2021
c93e197
fix: change more close buttons to tiles
steadyjaw Nov 17, 2021
a56724b
Merge branch 'develop' into feature/ui-design
steadyjaw Nov 17, 2021
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: 9 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import TheUpdateDialog from '@/components/TheUpdateDialog.vue'
import TheConnectingDialog from '@/components/TheConnectingDialog.vue'
import TheSelectPrinterDialog from '@/components/TheSelectPrinterDialog.vue'
import TheEditor from '@/components/TheEditor.vue'
import {panelToolbarHeight, topbarHeight, navigationItemHeight} from '@/store/variables'

@Component({
components: {
Expand All @@ -67,6 +68,9 @@ import TheEditor from '@/components/TheEditor.vue'
}
})
export default class App extends Mixins(BaseMixin) {
panelToolbarHeight = panelToolbarHeight
topbarHeight = topbarHeight
navigationItemHeight = navigationItemHeight

get title(): string {
return this.$store.getters['getTitle']
Expand Down Expand Up @@ -136,7 +140,11 @@ export default class App extends Mixins(BaseMixin) {
return {
'--v-btn-text-primary': this.primaryTextColor,
'--color-primary': this.primaryColor,
'--color-warning': this.warningColor
'--color-warning': this.warningColor,
'--panel-toolbar-icon-btn-width': panelToolbarHeight + 'px',
'--panel-toolbar-text-btn-height': panelToolbarHeight + 'px',
'--topbar-icon-btn-width': topbarHeight + 'px',
'--sidebar-menu-item-height': navigationItemHeight + 'px'
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/components/CommandHelpModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
<template #activator="{ on, attrs }">
<template v-if="inToolbar">
<v-btn icon v-bind="attrs" v-on="on"><v-icon small>mdi-help</v-icon></v-btn>
<v-btn icon tile v-bind="attrs" v-on="on"><v-icon small>mdi-help</v-icon></v-btn>
</template>
<template v-else>
<v-btn
Expand All @@ -24,7 +24,7 @@
<template #default>
<panel :title="$t('Console.CommandList')" icon="mdi-help" card-class="command-help-dialog" :margin-bottom="false">
<template v-slot:buttons>
<v-btn icon @click="isOpen = false"><v-icon>mdi-close-thick</v-icon></v-btn>
<v-btn icon tile @click="isOpen = false"><v-icon>mdi-close-thick</v-icon></v-btn>
</template>
<v-card-title>
<v-row>
Expand Down Expand Up @@ -72,9 +72,11 @@ import {CommandHelp} from '@/store/printer/types'
import {Mixins, Prop, Watch} from 'vue-property-decorator'
import Component from 'vue-class-component'
import Panel from '@/components/ui/Panel.vue'

@Component({
components: {Panel}
})

export default class CommandHelpModal extends Mixins(BaseMixin) {
@Prop({ required: false, default: false }) isMini!: boolean;
@Prop({ required: false, default: false }) inToolbar!: boolean;
Expand Down
4 changes: 2 additions & 2 deletions src/components/TheConnectingDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<template>
<v-dialog v-model="showDialog" persistent :width="400">
<v-card dark>
<v-toolbar flat dense color="primary">
<v-toolbar flat dense>
<v-toolbar-title>
<span class="subheading">
<v-icon class="mdi mdi-connection" left></v-icon>
Expand All @@ -31,7 +31,7 @@
<v-divider class="mt-4 mb-5"></v-divider>
</template>
<div class="text-center">
<v-btn @click="reconnect" color="primary">{{ $t("ConnectionDialog.TryAgain") }}</v-btn>
<v-btn @click="reconnect" class="primary--text">{{ $t("ConnectionDialog.TryAgain") }}</v-btn>
</div>
</v-card-text>
</v-card>
Expand Down
12 changes: 7 additions & 5 deletions src/components/TheEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
>
<panel card-class="editor-dialog" icon="mdi-file-document-edit-outline" :title="(filepath ? filepath.slice(1)+'/': '')+filename+' '+changed">
<template v-slot:buttons>
<v-btn dark text href="https://www.klipper3d.org/Config_Reference.html" v-if="restartServiceName === 'klipper'" target="_blank" class="d-none d-md-flex"><v-icon small class="mr-1">mdi-help</v-icon>{{ $t('Editor.ConfigReference') }}</v-btn>
<v-btn v-if="isWriteable" text :color="restartServiceName === null ? 'primary' : ''" @click="save(null)" ><v-icon small class="mr-1">mdi-content-save</v-icon><span class="d-none d-sm-inline">{{ $t('Editor.SaveClose') }}</span></v-btn>
<v-btn v-if="restartServiceName !== null" color="primary" text @click="save(restartServiceName)" class="d-none d-sm-flex"><v-icon small class="mr-1">mdi-restart</v-icon>{{ $t('Editor.SaveRestart') }}</v-btn>
<v-btn icon @click="close"><v-icon>mdi-close-thick</v-icon></v-btn>
<v-btn text tile href="https://www.klipper3d.org/Config_Reference.html" v-if="restartServiceName === 'klipper'" target="_blank" class="d-none d-md-flex"><v-icon small class="mr-1">mdi-help</v-icon>{{ $t('Editor.ConfigReference') }}</v-btn>
<v-btn v-if="isWriteable" text tile :color="restartServiceName === null ? 'primary' : ''" @click="save(null)" ><v-icon small class="mr-1">mdi-content-save</v-icon><span class="d-none d-sm-inline">{{ $t('Editor.SaveClose') }}</span></v-btn>
<v-btn v-if="restartServiceName !== null" color="primary" text tile @click="save(restartServiceName)" class="d-none d-sm-flex"><v-icon small class="mr-1">mdi-restart</v-icon>{{ $t('Editor.SaveRestart') }}</v-btn>
<v-btn icon tile @click="close"><v-icon>mdi-close-thick</v-icon></v-btn>
</template>
<v-card-text class="pa-0">
<overlay-scrollbars style="height: calc(var(--app-height) - 48px)" :options="{ }">
Expand All @@ -40,6 +40,7 @@
v-bind="attrs"
@click="cancelDownload"
style="min-width: auto;"
tile
>
<v-icon class="0">mdi-close</v-icon>
</v-btn>
Expand All @@ -48,7 +49,7 @@
<v-dialog v-model="dialogConfirmChange" persistent :width="600">
<panel card-class="editor-confirm-change-dialog" icon="mdi-help-circle" :title="$t('Editor.UnsavedChanges')" :margin-bottom="false">
<template v-slot:buttons>
<v-btn icon @click="dialogConfirmChange = false"><v-icon>mdi-close-thick</v-icon></v-btn>
<v-btn icon tile @click="dialogConfirmChange = false"><v-icon>mdi-close-thick</v-icon></v-btn>
</template>
<v-card-text class="pt-3">
<v-row>
Expand Down Expand Up @@ -87,6 +88,7 @@ import Panel from '@/components/ui/Panel.vue'
@Component({
components: {Panel, Codemirror}
})

export default class TheEditor extends Mixins(BaseMixin) {
private dialogConfirmChange = false

Expand Down
14 changes: 8 additions & 6 deletions src/components/TheSelectPrinterDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<panel card-class="select-printer-dialog" icon="mdi-connection" :title="panelTitle" :margin-bottom="false" toolbar-color="primary">
<template v-slot:buttons>
<template v-if="!isConnecting && !connectingFailed">
<template v-if="dialogEditPrinter.bool"><v-btn text class="minwidth-0" @click="dialogEditPrinter.bool = false"><v-icon>mdi-close-thick</v-icon></v-btn></template>
<template v-else-if="dialogAddPrinter.bool"><v-btn text class="minwidth-0" v-if="dialogAddPrinter.bool" @click="dialogAddPrinter.bool = false"><v-icon>mdi-close-thick</v-icon></v-btn></template>
<template v-else-if="printers.length > 0"><v-btn text class="minwidth-0" @click="checkPrinters"><v-icon>mdi-sync</v-icon></v-btn></template>
<template v-if="dialogEditPrinter.bool"><v-btn icon tile class="minwidth-0" @click="dialogEditPrinter.bool = false"><v-icon>mdi-close-thick</v-icon></v-btn></template>
<template v-else-if="dialogAddPrinter.bool"><v-btn icon tile class="minwidth-0" v-if="dialogAddPrinter.bool" @click="dialogAddPrinter.bool = false"><v-icon>mdi-close-thick</v-icon></v-btn></template>
<template v-else-if="printers.length > 0"><v-btn icon tile class="minwidth-0" @click="checkPrinters"><v-icon>mdi-sync</v-icon></v-btn></template>
</template>
</template>
<template v-if="isConnecting">
Expand All @@ -21,8 +21,8 @@
<v-card-text>
<p>{{ $t("SelectPrinterDialog.CannotConnectTo", {'host': parseInt(port) !== 80 ? hostname+":"+port : hostname}) }}</p>
<div class="text-center">
<v-btn @click="switchToChangePrinter" color="white" outlined class="mr-3">{{ $t("SelectPrinterDialog.ChangePrinter") }}</v-btn>
<v-btn @click="reconnect" color="primary">{{ $t("SelectPrinterDialog.TryAgain") }}</v-btn>
<v-btn text @click="switchToChangePrinter" color="white" class="mr-3">{{ $t("SelectPrinterDialog.ChangePrinter") }}</v-btn>
<v-btn text @click="reconnect" color="primary">{{ $t("SelectPrinterDialog.TryAgain") }}</v-btn>
</div>
</v-card-text>
</template>
Expand Down Expand Up @@ -169,11 +169,13 @@ import BaseMixin from './mixins/base'
import {FarmPrinterState} from '@/store/farm/printer/types'
import Panel from '@/components/ui/Panel.vue'
import { GuiRemoteprintersStatePrinter } from '@/store/gui/remoteprinters/types'

@Component({
components: {Panel}
})
export default class TheSelectPrinterDialog extends Mixins(BaseMixin) {

export default class TheSelectPrinterDialog extends Mixins(BaseMixin) {

private dialogAddPrinter = {
bool: false,
hostname: '',
Expand Down
2 changes: 1 addition & 1 deletion src/components/TheSettingsMenu.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<v-btn icon tile large @click="showSettings = true">
<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">
Expand Down
7 changes: 5 additions & 2 deletions src/components/TheSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
height: 32px;
}
.small-list-item {
height: 48px;
height: var(--sidebar-menu-item-height);
}
.no-text-decoration {
text-decoration: none;
Expand All @@ -30,7 +30,7 @@
</style>

<template>
<v-navigation-drawer v-model="naviDrawer" :src="sidebarBackground" :mini-variant="(navigationStyle === 'iconsOnly')" :key="navigationStyle" width="220px" clipped app>
<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">
Expand Down Expand Up @@ -82,6 +82,7 @@ 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'

@Component({
components: {
Expand All @@ -91,6 +92,8 @@ import AboutModal from '@/components/modals/AboutModal.vue'
})

export default class TheSidebarAlt extends Mixins(BaseMixin) {
navigationWidth = navigationWidth

get naviDrawer(): boolean {
return this.$store.state.naviDrawer
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/TheThrottledStates.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
</style>

<template>
<v-menu bottom left :offset-y="true" :close-on-content-click="false" v-model="showMenu" v-if="throttledStateFlags.length">
<v-menu bottom :offset-y="true" :close-on-content-click="false" v-model="showMenu" v-if="throttledStateFlags.length">
<template v-slot:activator="{ on, attrs }">
<v-btn :color="currentFlags.length ? 'error' : 'warning'" icon class="mr-3" v-bind="attrs" v-on="on">
<v-btn :color="currentFlags.length ? 'error' : 'warning'" icon tile class="mr-3" v-bind="attrs" v-on="on">
<v-icon>mdi-raspberry-pi</v-icon>
</v-btn>
</template>

<v-list width="300">
<v-list min-width="300" max-width="600">
<template v-if="currentFlags.length">
<v-subheader class="" style="height: auto;">{{ $t("App.ThrottledStates.HeadlineCurrentFlags") }}</v-subheader>
<v-list-item v-for="(flag) in currentFlags" :key="flag" two-line>
Expand Down
3 changes: 2 additions & 1 deletion src/components/TheTopCornerMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div>
<v-menu bottom left :offset-y="true" :close-on-content-click="false" v-model="showMenu">
<template v-slot:activator="{ on, attrs }">
<v-btn icon tile large v-bind="attrs" v-on="on">
<v-btn icon tile v-bind="attrs" v-on="on">
<v-icon>mdi-power-standby</v-icon>
</v-btn>
</template>
Expand Down Expand Up @@ -102,6 +102,7 @@ interface dialogPowerDeviceChange {

@Component
export default class TheTopCornerMenu extends Mixins(BaseMixin) {

showMenu = false
dialogPowerDeviceChange : dialogPowerDeviceChange = {
show: false,
Expand Down
28 changes: 22 additions & 6 deletions src/components/TheTopbar.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
<style>
.topbar .v-toolbar__content {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
</style>
<style scoped>
.button-min-width-auto {
min-width: auto !important;
}
.topbar .v-btn {
height: 100% !important;
max-height: none;
}
.topbar .v-btn.v-btn--icon {
width: var(--topbar-icon-btn-width) !important;
}
</style>

<template>
<div>
<v-app-bar app elevate-on-scroll height="48px" clipped-left>
<v-app-bar-nav-icon @click.stop="naviDrawer = !naviDrawer"></v-app-bar-nav-icon>
<v-app-bar app elevate-on-scroll :height="topbarHeight" class="topbar pa-0" clipped-left>
<v-app-bar-nav-icon tile @click.stop="naviDrawer = !naviDrawer"></v-app-bar-nav-icon>
<router-link to="/">
<template v-if="sidebarLogo">
<img :src="sidebarLogo" style="height: 32px;" class="nav-logo ml-4 mr-1 d-none d-sm-flex" alt="Logo" />
Expand All @@ -21,7 +34,7 @@
<v-spacer></v-spacer>
<the-throttled-states></the-throttled-states>
<input type="file" ref="fileUploadAndStart" :accept="validGcodeExtensions.join(', ')" style="display: none" @change="uploadAndStart" />
<v-btn tile large
<v-btn tile
:icon="$vuetify.breakpoint.smAndDown"
:text="$vuetify.breakpoint.mdAndUp"
color="primary"
Expand All @@ -32,7 +45,7 @@
@click="saveConfig">
<v-icon class="d-md-none">mdi-content-save</v-icon><span class="d-none d-md-inline">{{ $t("App.TopBar.SAVE_CONFIG") }}</span>
</v-btn>
<v-btn tile large
<v-btn tile
:icon="$vuetify.breakpoint.smAndDown"
:text="$vuetify.breakpoint.mdAndUp"
color="primary"
Expand All @@ -42,7 +55,7 @@
@click="btnUploadAndStart">
<v-icon class="mr-md-2">mdi-file-upload</v-icon><span class="d-none d-md-inline">{{ $t("App.TopBar.UploadPrint") }}</span>
</v-btn>
<v-btn tile large
<v-btn tile
:icon="$vuetify.breakpoint.smAndDown"
:text="$vuetify.breakpoint.mdAndUp"
color="error"
Expand Down Expand Up @@ -82,7 +95,7 @@
<v-dialog v-model="showEmergencyStopDialog" width="400" :fullscreen="isMobile">
<panel :title="$t('EmergencyStopDialog.EmergencyStop')" toolbar-color="error" card-class="emergency-stop-dialog" icon="mdi-alert-circle-outline" :margin-bottom="false">
<template v-slot:buttons>
<v-btn icon @click="showEmergencyStopDialog = false"><v-icon>mdi-close-thick</v-icon></v-btn>
<v-btn icon tile @click="showEmergencyStopDialog = false"><v-icon>mdi-close-thick</v-icon></v-btn>
</template>
<v-card-text>{{ $t('EmergencyStopDialog.AreYouSure') }}</v-card-text>
<v-card-actions>
Expand All @@ -108,6 +121,7 @@ import TheThrottledStates from '@/components/TheThrottledStates.vue'
import Panel from '@/components/ui/Panel.vue'
import PrinterSelector from '@/components/ui/PrinterSelector.vue'
import MainsailLogo from '@/components/ui/MainsailLogo.vue'
import {topbarHeight} from '@/store/variables'

type uploadSnackbar = {
status: boolean
Expand All @@ -133,6 +147,8 @@ type uploadSnackbar = {
}
})
export default class TheTopbar extends Mixins(BaseMixin) {
topbarHeight = topbarHeight

showEmergencyStopDialog = false

uploadSnackbar: uploadSnackbar = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/TheUpdateDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
</v-row>
<v-row>
<v-col class="text-center pt-5">
<v-btn @click="close" :disabled="!complete" color="primary">{{ $t("App.UpdateDialog.Close")}}</v-btn>
<v-btn text @click="close" :disabled="!complete" color="primary">{{ $t("App.UpdateDialog.Close")}}</v-btn>
</v-col>
</v-row>
</v-card-text>
Expand Down
16 changes: 14 additions & 2 deletions src/components/gcodeviewer/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,19 @@
<div>
<panel :title="$t('GCodeViewer.Title')" icon="mdi-video-3d" card-class="gcode-viewer-panel">
<template v-slot:buttons>
<v-btn text @click="reloadViewer" color="info" class="ml-3" v-show="reloadRequired">{{$t("GCodeViewer.ReloadRequired")}}</v-btn>
<v-btn icon @click="resetCamera"><v-icon>mdi-camera-retake</v-icon></v-btn>
<v-btn
:icon="$vuetify.breakpoint.xs"
:text="$vuetify.breakpoint.smAndUp"
tile
@click="reloadViewer"
color="info"
class="ml-3"
v-show="reloadRequired"
>
<span v-show="$vuetify.breakpoint.smAndUp">{{$t("GCodeViewer.ReloadRequired")}}</span>
<v-icon v-show="$vuetify.breakpoint.xs">mdi-reload-alert</v-icon>
</v-btn>
<v-btn icon tile @click="resetCamera"><v-icon>mdi-camera-retake</v-icon></v-btn>
</template>
<v-card-text>
<v-row>
Expand Down Expand Up @@ -175,6 +186,7 @@ let viewer: any = null
})
export default class Viewer extends Mixins(BaseMixin) {
formatFilesize = formatFilesize

private isBusy = false
private loading = false
private loadingPercent = 0
Expand Down
2 changes: 1 addition & 1 deletion src/components/panels/FarmPrinterPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
:loading="printer.socket.isConnecting"
:toolbar-color="isCurrentPrinter ? 'primary' : ''"
>
<template v-slot:buttons v-show="printer.socket.isConnected && printer_webcams.length">
<template v-slot:buttons v-if="printer.socket.isConnected && printer_webcams.length">
<v-menu :offset-y="true" title="Webcam">
<template v-slot:activator="{ on, attrs }">
<v-btn text v-bind="attrs" v-on="on">
Expand Down
Loading