Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b0491deb93 | ||
|
|
90d76c1ffe | ||
|
|
1cd2541d6f | ||
|
|
0c4b9e7551 | ||
|
|
16165ec85f | ||
|
|
69eaeb6557 | ||
|
|
e9c22d32bc | ||
|
|
98d9b0aa59 | ||
|
|
da157891a4 | ||
|
|
9883457e9d | ||
|
|
15371adc3d | ||
|
|
fe7aee9307 | ||
|
|
dbb5f81206 | ||
|
|
9e2e923a8f | ||
|
|
1a12554821 | ||
|
|
7251a8c6ba | ||
|
|
cda3098c9e | ||
|
|
9eb133bd85 | ||
|
|
6a4cca751c | ||
|
|
d67ef3aa90 | ||
|
|
aeee198239 | ||
|
|
5c40820108 | ||
|
|
e929c7cc0f | ||
|
|
0b47a80b13 | ||
|
|
8447be2ece | ||
|
|
0c5aca8baf | ||
|
|
eceb442a4c |
No files matched your search
@@ -2,6 +2,60 @@
|
||||
# Changelog
|
||||
All notable changes to Mainsail will be documented in this file.
|
||||
|
||||
## [2.6.2](https://github.com/mainsail-crew/mainsail/releases/tag/v2.6.2) - 2023-07-30
|
||||
### Bug Fixes and Improvements
|
||||
|
||||
- Fix editor save & restart button behavior (#1483) | [8447be2](8447be2ecee64fa4a3c0211ac57f42c3adf1d050)
|
||||
- Hide rpm in temperature_fans without tachometer_pin (#1489) | [e929c7c](e929c7cc0f45074f40407420b3585d9c02284fa1)
|
||||
- Fix flip function in several webcam clients (#1487) | [5c40820](5c4082010890e0b341754f42673affe7d1ca9d99)
|
||||
- Fix issue with camel-case object names in temperature panel (#1491) | [aeee198](aeee1982398acca803f7f4eae7b7b39a29253179)
|
||||
- Use webcam name instead of UUID for timelapse plugin (#1492) | [d67ef3a](d67ef3aa908601b6bb87353957bcc97ea4f829ea)
|
||||
- Fix issue with create/edit presets and refactor settings (#1499) | [6a4cca7](6a4cca751c88e89ddf5f2cc0f09a58f097a461af)
|
||||
- Fix multiple issues in the refactored update manager (#1497) | [9eb133b](9eb133bd85530ac08416e94f02ebe19f060bc095)
|
||||
- Fix issue with cannot extrude after a Klipper restart (#1495) | [cda3098](cda3098c9e09a054aa7baa69a3195e0a73f43e54)
|
||||
|
||||
### Refactor
|
||||
|
||||
- Refactor SettingsRow (#1484) | [0b47a80](0b47a80b133e6093aecdb0d7d87b718899dff0c7)
|
||||
|
||||
### Localization
|
||||
|
||||
- **pl**: Update Polish translation (#1482) | [0c5aca8](0c5aca8baffb65198f43a7d3b2b57571d8e911c9)
|
||||
- **zh**: Update chinese locale (#1486) | [7251a8c](7251a8c6bae2b92395de4c8c23e8e8e3900df66a)
|
||||
|
||||
## [2.6.1](https://github.com/mainsail-crew/mainsail/releases/tag/v2.6.1) - 2023-07-24
|
||||
### Bug Fixes and Improvements
|
||||
|
||||
- Show delete dialog for single files too (#1442) | [7da3352](7da33523d1ec7c4a3206400fb92803685176167e)
|
||||
- Remove variable check in klipper config StreamParser (#1435) | [6e7ef65](6e7ef6554ec88ceb29f66b4d6a5d5f21ef77671b)
|
||||
- Fix condition in restartServiceNameExists check (#1450) | [a7e70c7](a7e70c75d0009ffed14e8717ad8286f91e4e7e8a)
|
||||
- Avoid hitting 100% before print is complete (#1455) | [3959000](39590004da7ca22fef82fbd148b31683c462bb13)
|
||||
- Fix issue with ETA and 12h time format (#1463) | [039a446](039a446944f05ea241574c65040d520bbbef0e9b)
|
||||
- Fix issue with CSV separator in contents (#1460) | [1895d2d](1895d2d90591946c792faaf3f62c52865f27cd62)
|
||||
- Fix issue with webcams in farm printers (#1469) | [5b2bea5](5b2bea51aab79aabfab02825cdce45be351c1c6f)
|
||||
|
||||
### Refactor
|
||||
|
||||
- Build version file for moonraker (#1449) | [21d3d39](21d3d395039ec855d062a5ee5e5b43e2d858f402)
|
||||
- Use moonraker webcam api instead of direct DB access (#1445) | [7c81690](7c81690c1e299c804edb4ede0acab7d77d1dedbe)
|
||||
- Change SettingsGeneralTab file (#1475) | [db09bbe](db09bbe043b2e43053779709f5260c7275bc4969)
|
||||
- Extract Presets and Settings from TemperaturePanel (#1465) | [be25316](be253165a003c50fd992f43c586ce5315dc2352d)
|
||||
- Display errors and warnings in the update_manager (#1453) | [0cefa24](0cefa24e766c568a56127bfd55272735383cb45e)
|
||||
|
||||
### Localization
|
||||
|
||||
- **pl**: Update Polish translation (#1434) | [73e503f](73e503fc6448ae174dd7f9d59236c820bd4b6631)
|
||||
- **pl**: Update Polish translation (#1447) | [d844125](d8441254db04d672fe2137f64e39127f524c4769)
|
||||
- **pl**: Update polish locale (#1471) | [a58bef2](a58bef2a03479262b4ee5db2b5d103e8dc2194c5)
|
||||
- **pl**: Update Polish translation (#1476) | [6758049](6758049d29c7410bcdedec689eaca503952b2c7e)
|
||||
- **tr**: Update turkish locale (#1480) | [f52b94c](f52b94c459ad759e160a568d3b6f366b0e65f484)
|
||||
- **zh**: Update Chinese (zh) localization (#1459) | [bcbef2f](bcbef2f19af4746b941ddcb29c98ff5f071611d0)
|
||||
|
||||
### Other
|
||||
|
||||
- **pwa**: Remove debug warnings in browser console (#1441) | [2962df2](2962df21e512baad6976dc502d6234c2969da686)
|
||||
- Add dev-dist to .gitignore (#1451) | [ef2d17c](ef2d17cadde566e8b713031cb7292d65ca1bec12)
|
||||
|
||||
## [2.6.0](https://github.com/mainsail-crew/mainsail/releases/tag/v2.6.0) - 2023-06-19
|
||||
### Features
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "2.6.1",
|
||||
"version": "2.7.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mainsail",
|
||||
"version": "2.6.1",
|
||||
"version": "2.7.0",
|
||||
"dependencies": {
|
||||
"@codemirror/commands": "^6.0.1",
|
||||
"@codemirror/lang-css": "^6.0.0",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "2.6.1",
|
||||
"version": "2.7.0",
|
||||
"private": true,
|
||||
"decription": "a klipper web interface",
|
||||
"author": {
|
||||
|
||||
+46
-33
@@ -1,37 +1,11 @@
|
||||
<style>
|
||||
@import './assets/styles/fonts.css';
|
||||
@import './assets/styles/toastr.css';
|
||||
@import './assets/styles/page.scss';
|
||||
@import './assets/styles/sidebar.scss';
|
||||
@import './assets/styles/utils.scss';
|
||||
@import './assets/styles/updateManager.scss';
|
||||
|
||||
:root {
|
||||
--app-height: 100%;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/*noinspection CssUnusedSymbol*/
|
||||
.v-btn:not(.v-btn--outlined).primary {
|
||||
/*noinspection CssUnresolvedCustomProperty*/
|
||||
color: var(--v-btn-text-primary);
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<v-app dark :style="cssVars">
|
||||
<template v-if="socketIsConnected && guiIsReady">
|
||||
<the-sidebar></the-sidebar>
|
||||
<the-topbar></the-topbar>
|
||||
|
||||
<the-sidebar />
|
||||
<the-topbar />
|
||||
<v-main id="content" :style="mainStyle">
|
||||
<v-container id="page-container" fluid class="container px-3 px-sm-6 py-sm-6 mx-auto">
|
||||
<router-view></router-view>
|
||||
<router-view />
|
||||
</v-container>
|
||||
</v-main>
|
||||
<the-service-worker />
|
||||
@@ -44,8 +18,8 @@
|
||||
<the-bed-screws-dialog />
|
||||
<the-screws-tilt-adjust-dialog />
|
||||
</template>
|
||||
<the-select-printer-dialog v-else-if="instancesDB !== 'moonraker'"></the-select-printer-dialog>
|
||||
<the-connecting-dialog v-else></the-connecting-dialog>
|
||||
<the-select-printer-dialog v-else-if="instancesDB !== 'moonraker'" />
|
||||
<the-connecting-dialog v-else />
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
@@ -105,13 +79,27 @@ export default class App extends Mixins(BaseMixin) {
|
||||
return this.$store.getters['files/getMainBackground']
|
||||
}
|
||||
|
||||
get naviDrawer(): boolean {
|
||||
return this.$store.state.naviDrawer
|
||||
}
|
||||
|
||||
get navigationStyle() {
|
||||
return this.$store.state.gui.uiSettings.navigationStyle
|
||||
}
|
||||
|
||||
get mainStyle() {
|
||||
let style = ''
|
||||
let style: any = {
|
||||
paddingLeft: '0',
|
||||
}
|
||||
|
||||
if (this.mainBackground !== null) {
|
||||
style = 'background-image: url(' + this.mainBackground + ');'
|
||||
style.backgroundImage = 'url(' + this.mainBackground + ')'
|
||||
}
|
||||
|
||||
// overwrite padding left for the sidebar
|
||||
if (this.naviDrawer && this.navigationStyle === 'iconsAndText') style.paddingLeft = '220px'
|
||||
if (this.naviDrawer && this.navigationStyle === 'iconsOnly') style.paddingLeft = '56px'
|
||||
|
||||
return style
|
||||
}
|
||||
|
||||
@@ -311,3 +299,28 @@ export default class App extends Mixins(BaseMixin) {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import './assets/styles/fonts.css';
|
||||
@import './assets/styles/toastr.css';
|
||||
@import './assets/styles/page.scss';
|
||||
@import './assets/styles/sidebar.scss';
|
||||
@import './assets/styles/utils.scss';
|
||||
@import './assets/styles/updateManager.scss';
|
||||
|
||||
:root {
|
||||
--app-height: 100%;
|
||||
}
|
||||
|
||||
#content {
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
/*noinspection CssUnusedSymbol*/
|
||||
.v-btn:not(.v-btn--outlined).primary {
|
||||
/*noinspection CssUnresolvedCustomProperty*/
|
||||
color: var(--v-btn-text-primary);
|
||||
}
|
||||
</style>
|
||||
@@ -239,27 +239,35 @@ export default class TheEditor extends Mixins(BaseMixin) {
|
||||
if (!this.isWriteable) return null
|
||||
if (['printing', 'paused'].includes(this.printer_state)) return null
|
||||
|
||||
// check for generic services <service>.conf (like moonraker.conf, crowsnest.conf, sonar.conf)
|
||||
if (this.availableServices.includes(this.filenameWithoutExtension) && this.fileExtension === 'conf')
|
||||
return this.filenameWithoutExtension
|
||||
if (this.filename.startsWith('webcam') && ['conf', 'txt'].includes(this.fileExtension)) return 'webcamd'
|
||||
if (this.filename.startsWith('mooncord') && this.fileExtension === 'json') return 'mooncord'
|
||||
if (this.filename === 'moonraker.conf') return this.moonrakerRestartInstance ?? 'moonraker'
|
||||
|
||||
// old webcam service DEPRECATED
|
||||
if (this.filename.startsWith('webcam') && ['conf', 'txt'].includes(this.fileExtension)) return 'webcamd'
|
||||
|
||||
// check for mooncord config files
|
||||
if (this.filename.startsWith('mooncord') && this.fileExtension === 'json') return 'mooncord'
|
||||
|
||||
// fallback for moonraker with multi instances
|
||||
if (this.filename === 'moonraker.conf') return 'moonraker'
|
||||
|
||||
// all .cfg files will be klipper config files
|
||||
if (this.fileExtension === 'cfg') return 'klipper'
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
get restartServiceNameExists() {
|
||||
if (!this.restartServiceName) return true
|
||||
// hide the button, if there is no service found
|
||||
if (this.restartServiceName === null) return false
|
||||
|
||||
// klipper and moonraker uses specific api calls instead of generic service restart
|
||||
if (['klipper', 'moonraker'].includes(this.restartServiceName)) return true
|
||||
|
||||
return this.availableServices.includes(this.restartServiceName)
|
||||
}
|
||||
|
||||
get moonrakerRestartInstance() {
|
||||
return this.$store.state.gui.editor.moonrakerRestartInstance
|
||||
}
|
||||
|
||||
get confirmUnsavedChanges() {
|
||||
return this.$store.state.gui.editor.confirmUnsavedChanges ?? false
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<v-navigation-drawer
|
||||
:key="navigationStyle"
|
||||
v-model="naviDrawer"
|
||||
:value="naviDrawer"
|
||||
:src="sidebarBackground"
|
||||
:mini-variant="navigationStyle === 'iconsOnly'"
|
||||
:width="navigationWidth"
|
||||
@@ -70,10 +70,6 @@ export default class TheSidebar extends Mixins(NavigationMixin, BaseMixin) {
|
||||
return this.$store.state.naviDrawer
|
||||
}
|
||||
|
||||
set naviDrawer(newVal: boolean) {
|
||||
this.$store.dispatch('setNaviDrawer', newVal)
|
||||
}
|
||||
|
||||
get navigationStyle() {
|
||||
return this.$store.state.gui.uiSettings.navigationStyle
|
||||
}
|
||||
@@ -133,10 +129,6 @@ export default class TheSidebar extends Mixins(NavigationMixin, BaseMixin) {
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
mounted() {
|
||||
this.naviDrawer = this.$vuetify.breakpoint.lgAndUp
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<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>
|
||||
<v-app-bar-nav-icon tile @click.stop="naviDrawer = !naviDrawer" />
|
||||
<router-link to="/">
|
||||
<template v-if="sidebarLogo">
|
||||
<img
|
||||
@@ -17,12 +17,12 @@
|
||||
class="nav-logo ml-4 mr-1 d-none d-sm-flex"
|
||||
router
|
||||
to="/"
|
||||
:ripple="false"></mainsail-logo>
|
||||
:ripple="false" />
|
||||
</template>
|
||||
</router-link>
|
||||
<v-toolbar-title class="text-no-wrap ml-0 pl-2 mr-2">{{ printerName }}</v-toolbar-title>
|
||||
<printer-selector v-if="countPrinters"></printer-selector>
|
||||
<v-spacer></v-spacer>
|
||||
<printer-selector v-if="countPrinters" />
|
||||
<v-spacer />
|
||||
<input
|
||||
ref="fileUploadAndStart"
|
||||
type="file"
|
||||
@@ -66,9 +66,9 @@
|
||||
<v-icon class="mr-md-2">{{ mdiAlertOctagonOutline }}</v-icon>
|
||||
<span class="d-none d-md-inline">{{ $t('App.TopBar.EmergencyStop') }}</span>
|
||||
</v-btn>
|
||||
<the-notification-menu></the-notification-menu>
|
||||
<the-settings-menu></the-settings-menu>
|
||||
<the-top-corner-menu></the-top-corner-menu>
|
||||
<the-notification-menu />
|
||||
<the-settings-menu />
|
||||
<the-top-corner-menu />
|
||||
</v-app-bar>
|
||||
<v-snackbar v-model="uploadSnackbar.status" :timeout="-1" :value="true" fixed right bottom dark>
|
||||
<strong>{{ $t('App.TopBar.Uploading') }} {{ uploadSnackbar.filename }}</strong>
|
||||
@@ -84,7 +84,7 @@
|
||||
</v-snackbar>
|
||||
<v-dialog v-model="showEmergencyStopDialog" width="400" :fullscreen="isMobile">
|
||||
<panel
|
||||
:title="$t('EmergencyStopDialog.EmergencyStop').toString()"
|
||||
:title="$t('EmergencyStopDialog.EmergencyStop')"
|
||||
toolbar-color="error"
|
||||
card-class="emergency-stop-dialog"
|
||||
:icon="mdiAlertOctagonOutline"
|
||||
@@ -96,7 +96,7 @@
|
||||
</template>
|
||||
<v-card-text>{{ $t('EmergencyStopDialog.AreYouSure') }}</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-spacer />
|
||||
<v-btn text @click="showEmergencyStopDialog = false">{{ $t('EmergencyStopDialog.No') }}</v-btn>
|
||||
<v-btn color="primary" text @click="emergencyStop">{{ $t('EmergencyStopDialog.Yes') }}</v-btn>
|
||||
</v-card-actions>
|
||||
@@ -245,13 +245,31 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
)
|
||||
}
|
||||
|
||||
get defaultNavigationStateSetting() {
|
||||
return this.$store.state.gui?.uiSettings?.defaultNavigationStateSetting ?? 'alwaysOpen'
|
||||
}
|
||||
|
||||
mounted() {
|
||||
//this.naviDrawer = this.$vuetify.breakpoint.lgAndUp
|
||||
switch (this.defaultNavigationStateSetting) {
|
||||
case 'alwaysClosed':
|
||||
this.naviDrawer = false
|
||||
break
|
||||
|
||||
case 'lastState':
|
||||
this.naviDrawer = (localStorage.getItem('naviDrawer') ?? 'true') === 'true'
|
||||
break
|
||||
|
||||
default:
|
||||
this.naviDrawer = this.$vuetify.breakpoint.lgAndUp
|
||||
}
|
||||
}
|
||||
|
||||
btnEmergencyStop() {
|
||||
const confirmOnEmergencyStop = this.$store.state.gui.uiSettings.confirmOnEmergencyStop
|
||||
if (confirmOnEmergencyStop) {
|
||||
this.showEmergencyStopDialog = true
|
||||
} else {
|
||||
this.emergencyStop()
|
||||
}
|
||||
if (!confirmOnEmergencyStop) this.emergencyStop()
|
||||
|
||||
this.showEmergencyStopDialog = true
|
||||
}
|
||||
|
||||
emergencyStop() {
|
||||
@@ -342,14 +360,13 @@ export default class TheTopbar extends Mixins(BaseMixin) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
/*noinspection CssUnusedSymbol*/
|
||||
.topbar .v-toolbar__content {
|
||||
::v-deep .topbar .v-toolbar__content {
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
|
||||
.button-min-width-auto {
|
||||
min-width: auto !important;
|
||||
}
|
||||
|
||||
@@ -65,13 +65,21 @@ export default class TheScrewsTiltAdjustDialog extends Mixins(BaseMixin, Control
|
||||
return this.$store.state.printer.screws_tilt_adjust?.error ?? false
|
||||
}
|
||||
|
||||
get max_deviation() {
|
||||
return this.$store.state.printer.screws_tilt_adjust?.max_deviation ?? null
|
||||
}
|
||||
|
||||
get results() {
|
||||
return this.$store.state.printer.screws_tilt_adjust?.results ?? {}
|
||||
}
|
||||
|
||||
get showDialog() {
|
||||
// don't display the dialog, if the user disabled it in the UI settings
|
||||
if (!this.boolScrewsTiltAdjustDialog) return false
|
||||
|
||||
// don't display the dialog, if the user add the MAX_DEVIATION attribute to the SCREWS_TILT_CALCULATE command
|
||||
if (this.max_deviation !== null) return false
|
||||
|
||||
return this.error || Object.keys(this.results).length
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<v-col class="pl-6">
|
||||
<template v-if="selectAll">
|
||||
<v-checkbox
|
||||
v-model="selectAllModel"
|
||||
:label="$t('Settings.GeneralTab.Everything')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:indeterminate="selectAllIndeterminate"
|
||||
@change="$emit('update:selectedCheckboxes', selectedCheckboxes)"></v-checkbox>
|
||||
<v-divider class="my-2" />
|
||||
</template>
|
||||
<template v-for="option in options">
|
||||
<v-checkbox
|
||||
:key="option.value"
|
||||
v-model="selectedCheckboxes"
|
||||
:label="option.label"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
:value="option.value"
|
||||
@change="$emit('update:selectedCheckboxes', selectedCheckboxes)"></v-checkbox>
|
||||
</template>
|
||||
</v-col>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import { computed } from 'vue'
|
||||
import { TranslateResult } from 'vue-i18n'
|
||||
|
||||
@Component
|
||||
export default class CheckboxList extends Mixins(BaseMixin) {
|
||||
@Prop({ required: true })
|
||||
declare readonly options: { label: string | TranslateResult; value: string }[]
|
||||
|
||||
@Prop({ type: Boolean, required: false, default: false })
|
||||
declare readonly selectAll: boolean
|
||||
|
||||
selectedCheckboxes: (string | TranslateResult)[] = []
|
||||
selectAllIndeterminate: boolean = false
|
||||
selectAllModel = computed<boolean>({
|
||||
get: this.getSelectAll,
|
||||
set: this.setSelectAll,
|
||||
})
|
||||
|
||||
getSelectAll(): boolean {
|
||||
this.selectAllIndeterminate = false
|
||||
if (0 < this.selectedCheckboxes.length && this.selectedCheckboxes.length < this.options.length) {
|
||||
this.selectAllIndeterminate = true
|
||||
return false
|
||||
}
|
||||
|
||||
return this.selectedCheckboxes.length == this.options.length
|
||||
}
|
||||
|
||||
setSelectAll(state: boolean) {
|
||||
if (state) {
|
||||
this.selectedCheckboxes = this.options.map((o) => o.value)
|
||||
return
|
||||
}
|
||||
|
||||
this.selectedCheckboxes = []
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,152 @@
|
||||
import Component from 'vue-class-component'
|
||||
import BaseMixin from './base'
|
||||
import { TranslateResult } from 'vue-i18n'
|
||||
|
||||
@Component
|
||||
export default class SettingsGeneralDatabase extends BaseMixin {
|
||||
get availableKeys() {
|
||||
return [
|
||||
// gui namespace
|
||||
{
|
||||
value: 'general',
|
||||
label: this.$t('Settings.GeneralTab.General'),
|
||||
},
|
||||
{
|
||||
value: 'control',
|
||||
label: this.$t('Settings.ControlTab.Control'),
|
||||
},
|
||||
{
|
||||
value: 'dashboard',
|
||||
label: this.$t('Settings.DashboardTab.Dashboard'),
|
||||
},
|
||||
{
|
||||
value: 'editor',
|
||||
label: this.$t('Settings.EditorTab.Editor'),
|
||||
},
|
||||
{
|
||||
value: 'gcodeViewer',
|
||||
label: this.$t('Settings.GCodeViewerTab.GCodeViewer'),
|
||||
},
|
||||
{
|
||||
value: 'navigation',
|
||||
label: this.$t('Settings.GeneralTab.DBNavigation'),
|
||||
},
|
||||
{
|
||||
value: 'uiSettings',
|
||||
label: this.$t('Settings.UiSettingsTab.UiSettings'),
|
||||
},
|
||||
{
|
||||
value: 'view',
|
||||
label: this.$t('Settings.GeneralTab.DbView'),
|
||||
},
|
||||
|
||||
// gui modules
|
||||
{
|
||||
value: 'console',
|
||||
label: this.$t('Settings.ConsoleTab.Console'),
|
||||
},
|
||||
{
|
||||
value: 'gcodehistory',
|
||||
label: this.$t('Settings.GeneralTab.DbConsoleHistory'),
|
||||
},
|
||||
{
|
||||
value: 'macros',
|
||||
label: this.$t('Settings.MacrosTab.Macros'),
|
||||
},
|
||||
{
|
||||
value: 'notifications',
|
||||
label: this.$t('App.Notifications.Notifications'),
|
||||
},
|
||||
{
|
||||
value: 'presets',
|
||||
label: this.$t('Settings.PresetsTab.PreheatPresets'),
|
||||
},
|
||||
{
|
||||
value: 'remoteprinters',
|
||||
label: this.$t('Settings.RemotePrintersTab.RemotePrinters'),
|
||||
},
|
||||
{
|
||||
value: 'timelapse',
|
||||
label: this.$t('Settings.TimelapseTab.Timelapse'),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
async loadBackupableNamespaces() {
|
||||
// init namespaces
|
||||
let backupableNamespaces: { value: string; label: string | TranslateResult }[] = []
|
||||
|
||||
// load DB namespaces from moonraker
|
||||
const urlRequestDbList = this.$store.getters['socket/getUrl'] + '/server/database/list'
|
||||
const availableNamespaces = await fetch(urlRequestDbList)
|
||||
// read json
|
||||
.then((response) => response?.json())
|
||||
// extract result namespaces
|
||||
.then((response) => response?.result?.namespaces ?? [])
|
||||
.catch(() => {
|
||||
window.console.error('Cannot load Moonraker DB namespaces')
|
||||
return []
|
||||
})
|
||||
|
||||
// load mainsail keys, if mainsail namespace exists
|
||||
if (availableNamespaces.includes('mainsail')) {
|
||||
const urlRequestMainsailNamespace =
|
||||
this.$store.getters['socket/getUrl'] + '/server/database/item?namespace=mainsail'
|
||||
backupableNamespaces = await fetch(urlRequestMainsailNamespace)
|
||||
// read json
|
||||
.then((response) => response?.json())
|
||||
// extract result object
|
||||
.then((response) => response?.result?.value ?? {})
|
||||
// extract keys from mainsail gui object
|
||||
.then((objects) => Object.keys(objects))
|
||||
// filter initVersion
|
||||
.then((keys) => keys.filter((key) => key !== 'initVersion'))
|
||||
// convert to locale
|
||||
.then((keys) =>
|
||||
keys.map((key) => {
|
||||
const namespace = this.availableKeys.find((namespace) => namespace.value === key)
|
||||
if (namespace) return namespace
|
||||
|
||||
// fallback return key name
|
||||
return { value: key, label: key }
|
||||
})
|
||||
)
|
||||
|
||||
backupableNamespaces = backupableNamespaces.sort(this.sortNamespaces)
|
||||
}
|
||||
|
||||
// add timelapse if exists
|
||||
if (availableNamespaces.includes('timelapse')) {
|
||||
backupableNamespaces.push({
|
||||
value: 'timelapse',
|
||||
label: this.$t('Settings.GeneralTab.DbTimelapseSettings'),
|
||||
})
|
||||
}
|
||||
|
||||
// add webcams if exists
|
||||
if (availableNamespaces.includes('webcams')) {
|
||||
backupableNamespaces.push({
|
||||
value: 'webcams',
|
||||
label: this.$t('Settings.WebcamsTab.Webcams'),
|
||||
})
|
||||
}
|
||||
|
||||
return backupableNamespaces
|
||||
}
|
||||
|
||||
sortNamespaces(
|
||||
a: { value: string; label: string | TranslateResult },
|
||||
b: { value: string; label: string | TranslateResult }
|
||||
) {
|
||||
if (a.value === 'general') return -1
|
||||
if (b.value === 'general') return 1
|
||||
|
||||
const stringA = a.label.toString().toLowerCase()
|
||||
const stringB = b.label.toString().toLowerCase()
|
||||
|
||||
if (stringA < stringB) return -1
|
||||
if (stringA > stringB) return 1
|
||||
|
||||
return 0
|
||||
}
|
||||
}
|
||||
@@ -47,4 +47,17 @@ export default class WebcamMixin extends Mixins(BaseMixin) {
|
||||
return mdiWebcam
|
||||
}
|
||||
}
|
||||
|
||||
generateTransform(flip_horizontal: boolean, flip_vertical: boolean, rotation: number) {
|
||||
let transforms = ''
|
||||
if (flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if (flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (rotation === 180) transforms += ' rotate(180deg)'
|
||||
|
||||
// return transform when exist
|
||||
if (transforms.trimStart().length) return transforms.trimStart()
|
||||
|
||||
// return none as fallback
|
||||
return 'none'
|
||||
}
|
||||
}
|
||||
@@ -5,21 +5,31 @@
|
||||
<strong>{{ repo.name }}</strong>
|
||||
<br />
|
||||
<template v-if="type === 'git_repo' && commitsBehind.length">
|
||||
<a class="primary--text cursor--pointer" @click="boolShowCommitList = true">
|
||||
<v-icon small color="primary" class="mr-1">{{ mdiInformation }}</v-icon>
|
||||
<a class="info--text cursor--pointer" @click="boolShowCommitList = true">
|
||||
<v-icon small color="info" class="mr-1">{{ mdiUpdate }}</v-icon>
|
||||
{{ versionOutput }}
|
||||
</a>
|
||||
</template>
|
||||
<template v-else-if="type === 'web' && webUpdatable">
|
||||
<a class="primary--text text-decoration-none" :href="webLinkRelease" target="_blank">
|
||||
<v-icon small color="primary" class="mr-1">{{ mdiInformation }}</v-icon>
|
||||
<a class="info--text text-decoration-none" :href="webLinkRelease" target="_blank">
|
||||
<v-icon small color="info" class="mr-1">{{ mdiUpdate }}</v-icon>
|
||||
{{ versionOutput }}
|
||||
</a>
|
||||
</template>
|
||||
<span v-else>{{ versionOutput }}</span>
|
||||
</v-col>
|
||||
<v-col class="col-auto pr-6 text-right" align-self="center">
|
||||
<template v-if="needsRecovery">
|
||||
<v-chip
|
||||
v-if="anomalies.length > 0"
|
||||
small
|
||||
label
|
||||
:outlined="!toggleAnomalies"
|
||||
color="grey"
|
||||
class="minwidth-0 px-1 mr-2"
|
||||
@click="toggleAnomalies = !toggleAnomalies">
|
||||
<v-icon small>{{ toggleAnomalies ? mdiInformationOutline : mdiInformation }}</v-icon>
|
||||
</v-chip>
|
||||
<template v-if="!isValid">
|
||||
<v-menu :offset-y="true">
|
||||
<template #activator="{ on, attrs }">
|
||||
<v-chip
|
||||
@@ -37,16 +47,16 @@
|
||||
</v-chip>
|
||||
</template>
|
||||
<v-list dense class="py-0">
|
||||
<v-list-item @click="doRecovery(false)">
|
||||
<v-list-item-icon class="mr-0">
|
||||
<v-list-item v-if="!isCorrupt" @click="doRecovery(false)">
|
||||
<v-list-item-icon class="mr-0 pt-1">
|
||||
<v-icon small>{{ mdiReload }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
<v-list-item-title>{{ $t('Machine.UpdatePanel.SoftRecovery') }}</v-list-item-title>
|
||||
</v-list-item-content>
|
||||
</v-list-item>
|
||||
<v-list-item @click="doRecovery(true)">
|
||||
<v-list-item-icon class="mr-0">
|
||||
<v-list-item :disabled="!existsRecoveryUrl" @click="doRecovery(true)">
|
||||
<v-list-item-icon class="mr-0 pt-1">
|
||||
<v-icon small>{{ mdiReload }}</v-icon>
|
||||
</v-list-item-icon>
|
||||
<v-list-item-content>
|
||||
@@ -70,36 +80,30 @@
|
||||
</v-chip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="notificationText" class="mt-0">
|
||||
<v-col class="px-6 pt-0">
|
||||
<v-alert text dense :color="notificationColor" :icon="notificationIcon" border="left">
|
||||
{{ notificationText }}
|
||||
</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="gitMessages.length" class="mt-0">
|
||||
<v-col class="px-6 pt-0">
|
||||
<v-alert
|
||||
v-for="(message, index) in gitMessages"
|
||||
:key="'message_' + index"
|
||||
text
|
||||
dense
|
||||
border="left"
|
||||
type="info">
|
||||
{{ message }}
|
||||
</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="warnings.length" class="mt-0">
|
||||
<v-col class="px-6 pt-0">
|
||||
<v-alert
|
||||
v-for="(message, index) in warnings"
|
||||
:key="'warnings_' + index"
|
||||
text
|
||||
dense
|
||||
border="left"
|
||||
text
|
||||
color="orange"
|
||||
:icon="mdiAlertCircle">
|
||||
border="left"
|
||||
:icon="mdiCloseCircle">
|
||||
<p class="text--disabled mb-0">{{ message }}</p>
|
||||
</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-show="toggleAnomalies" class="mt-0">
|
||||
<v-col class="px-6 pt-0">
|
||||
<v-alert
|
||||
v-for="(message, index) in anomalies"
|
||||
:key="'anomalies_' + index"
|
||||
dense
|
||||
text
|
||||
color="grey"
|
||||
border="left"
|
||||
:icon="mdiInformation">
|
||||
{{ message }}
|
||||
</v-alert>
|
||||
</v-col>
|
||||
@@ -123,13 +127,15 @@ import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { ServerUpdateManagerStateGitRepo } from '@/store/server/updateManager/types'
|
||||
import {
|
||||
mdiAlertCircle,
|
||||
mdiCloseCircle,
|
||||
mdiCheck,
|
||||
mdiHelpCircleOutline,
|
||||
mdiInformation,
|
||||
mdiInformationOutline,
|
||||
mdiMenuDown,
|
||||
mdiProgressUpload,
|
||||
mdiReload,
|
||||
mdiUpdate,
|
||||
} from '@mdi/js'
|
||||
import semver from 'semver'
|
||||
import GitCommitsList from '@/components/panels/Machine/UpdatePanel/GitCommitsList.vue'
|
||||
@@ -141,11 +147,15 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
|
||||
mdiInformation = mdiInformation
|
||||
mdiMenuDown = mdiMenuDown
|
||||
mdiReload = mdiReload
|
||||
mdiAlertCircle = mdiAlertCircle
|
||||
mdiCloseCircle = mdiCloseCircle
|
||||
mdiUpdate = mdiUpdate
|
||||
mdiInformationOutline = mdiInformationOutline
|
||||
|
||||
boolShowCommitList = false
|
||||
boolShowUpdateHint = false
|
||||
|
||||
toggleAnomalies = false
|
||||
|
||||
@Prop({ required: true }) readonly repo!: ServerUpdateManagerStateGitRepo
|
||||
|
||||
get name() {
|
||||
@@ -230,6 +240,10 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
|
||||
return this.repo.is_dirty ?? false
|
||||
}
|
||||
|
||||
get isCorrupt() {
|
||||
return this.repo.corrupt ?? false
|
||||
}
|
||||
|
||||
get debugEnabled() {
|
||||
return this.repo.debug_enabled ?? false
|
||||
}
|
||||
@@ -240,19 +254,21 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
|
||||
return !this.debugEnabled && (this.repo.detached ?? false)
|
||||
}
|
||||
|
||||
get needsRecovery() {
|
||||
return !this.isValid || this.isDirty
|
||||
get existsRecoveryUrl() {
|
||||
const url = this.repo.recovery_url ?? '?'
|
||||
|
||||
return url !== '?'
|
||||
}
|
||||
|
||||
get btnDisabled() {
|
||||
if (['printing', 'paused'].includes(this.printer_state)) return true
|
||||
if (!this.isValid || this.isDirty || this.commitsBehind.length) return false
|
||||
if (!this.isValid || this.isCorrupt || this.isDirty || this.commitsBehind.length) return false
|
||||
|
||||
return !(this.localVersion && this.remoteVersion && semver.gt(this.remoteVersion, this.localVersion))
|
||||
}
|
||||
|
||||
get btnIcon() {
|
||||
if (this.isDetached || !this.isValid || this.isDirty) return mdiAlertCircle
|
||||
if (this.isDetached || !this.isValid || this.isCorrupt || this.isDirty) return mdiCloseCircle
|
||||
|
||||
if (
|
||||
this.commitsBehind.length ||
|
||||
@@ -266,8 +282,7 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get btnColor() {
|
||||
if (this.isDetached || !this.isValid) return 'orange'
|
||||
if (this.isDirty) return 'red'
|
||||
if (this.isCorrupt || this.isDetached || this.isDirty || !this.isValid) return 'orange'
|
||||
|
||||
if (
|
||||
this.commitsBehind.length ||
|
||||
@@ -279,9 +294,10 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get btnText() {
|
||||
if (this.isCorrupt) return this.$t('Machine.UpdatePanel.Corrupt')
|
||||
if (this.isDetached) return this.$t('Machine.UpdatePanel.Detached')
|
||||
if (!this.isValid) return this.$t('Machine.UpdatePanel.Invalid')
|
||||
if (this.isDirty) return this.$t('Machine.UpdatePanel.Dirty')
|
||||
if (!this.isValid) return this.$t('Machine.UpdatePanel.Invalid')
|
||||
if (
|
||||
this.commitsBehind.length ||
|
||||
(this.localVersion && this.remoteVersion && semver.gt(this.remoteVersion, this.localVersion))
|
||||
@@ -293,23 +309,8 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
|
||||
return this.$t('Machine.UpdatePanel.UpToDate')
|
||||
}
|
||||
|
||||
get notificationText() {
|
||||
if (this.isDetached) return this.$t('Machine.UpdatePanel.Notification.Detached')
|
||||
if (this.isDirty) return this.$t('Machine.UpdatePanel.Notification.Dirty')
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
get notificationColor() {
|
||||
return this.btnColor
|
||||
}
|
||||
|
||||
get notificationIcon() {
|
||||
return this.btnIcon
|
||||
}
|
||||
|
||||
get gitMessages() {
|
||||
return this.repo.git_messages ?? []
|
||||
get anomalies() {
|
||||
return this.repo.anomalies ?? []
|
||||
}
|
||||
|
||||
get warnings() {
|
||||
@@ -323,8 +324,12 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
|
||||
return semver.gt(this.remoteVersion, this.localVersion)
|
||||
}
|
||||
|
||||
get repo_name() {
|
||||
return this.repo.repo_name ?? this.repo.name ?? ''
|
||||
}
|
||||
|
||||
get webLinkRelease() {
|
||||
return `https://github.com/${this.repo.owner}/${this.repo.name}/releases/tag/${this.repo.remote_version}`
|
||||
return `https://github.com/${this.repo.owner}/${this.repo_name}/releases/tag/${this.repo.remote_version}`
|
||||
}
|
||||
|
||||
get hideUpdateWarning() {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<strong>{{ $t('Machine.UpdatePanel.System') }}</strong>
|
||||
<br />
|
||||
<template v-if="package_count">
|
||||
<a class="primary--text cursor--pointer" @click="boolShowPackageList = true">
|
||||
<v-icon small color="primary" class="mr-1">{{ mdiInformation }}</v-icon>
|
||||
<a class="info--text cursor--pointer" @click="boolShowPackageList = true">
|
||||
<v-icon small color="info" class="mr-1">{{ mdiInformation }}</v-icon>
|
||||
{{ $t('Machine.UpdatePanel.CountPackagesCanBeUpgraded', { count: package_count }) }}
|
||||
</a>
|
||||
</template>
|
||||
|
||||
@@ -85,8 +85,12 @@ export default class GitCommitsListDayCommit extends Mixins(BaseMixin) {
|
||||
})
|
||||
}
|
||||
|
||||
get repo_name() {
|
||||
return this.repo.repo_name ?? this.repo.name ?? ''
|
||||
}
|
||||
|
||||
get commitHref() {
|
||||
return `https://github.com/${this.repo.owner}/${this.repo.name}/commit/${this.commit.sha}`
|
||||
return `https://github.com/${this.repo.owner}/${this.repo_name}/commit/${this.commit.sha}`
|
||||
}
|
||||
|
||||
get commitShortSha() {
|
||||
|
||||
@@ -69,13 +69,17 @@ export default class UpdateHintAlert extends Mixins(BaseMixin) {
|
||||
return null
|
||||
}
|
||||
|
||||
get repo_name() {
|
||||
return this.repo.repo_name ?? this.repo.name ?? ''
|
||||
}
|
||||
|
||||
get externalLink() {
|
||||
if (this.name === 'klipper') return '//www.klipper3d.org/Config_Changes.html'
|
||||
if (this.name === 'moonraker') return '//moonraker.readthedocs.io/en/latest/changelog/'
|
||||
if (this.repo?.configured_type === 'web')
|
||||
return `//github.com/${this.repo.owner}/${this.repo.name}/releases/tag/${this.repo.remote_version}`
|
||||
return `//github.com/${this.repo.owner}/${this.repo_name}/releases/tag/${this.repo.remote_version}`
|
||||
|
||||
return `//github.com/${this.repo.owner}/${this.repo.name}`
|
||||
return `//github.com/${this.repo.owner}/${this.repo_name}`
|
||||
}
|
||||
|
||||
get externalLinkText() {
|
||||
|
||||
@@ -22,7 +22,15 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<temperature-panel-list-item
|
||||
v-for="objectName in tempObjects"
|
||||
v-for="objectName in heaterObjects"
|
||||
:key="objectName"
|
||||
:object-name="objectName"
|
||||
:is-responsive-mobile="el.is.mobile ?? false" />
|
||||
<temperature-panel-list-item-nevermore
|
||||
v-if="existsNevermoreFilter"
|
||||
:is-responsive-mobile="el.is.mobile ?? false" />
|
||||
<temperature-panel-list-item
|
||||
v-for="objectName in temperature_sensors"
|
||||
:key="objectName"
|
||||
:object-name="objectName"
|
||||
:is-responsive-mobile="el.is.mobile ?? false" />
|
||||
@@ -36,8 +44,11 @@
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import TemperaturePanelListItemNevermore from '@/components/panels/Temperature/TemperaturePanelListItemNevermore.vue'
|
||||
|
||||
@Component
|
||||
@Component({
|
||||
components: { TemperaturePanelListItemNevermore },
|
||||
})
|
||||
export default class TemperaturePanelList extends Mixins(BaseMixin) {
|
||||
get available_heaters() {
|
||||
return this.$store.state.printer?.heaters?.available_heaters ?? []
|
||||
@@ -65,12 +76,23 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) {
|
||||
.sort(this.sortObjectName)
|
||||
}
|
||||
|
||||
get existsNevermoreFilter() {
|
||||
return 'nevermore' in this.$store.state.printer
|
||||
}
|
||||
|
||||
get hideMcuHostSensors(): boolean {
|
||||
return this.$store.state.gui.view.tempchart.hideMcuHostSensors ?? false
|
||||
}
|
||||
|
||||
get temperature_sensors() {
|
||||
return this.available_sensors
|
||||
.filter((fullName: string) => {
|
||||
if (this.available_heaters.includes(fullName)) return false
|
||||
if (this.temperature_fans.includes(fullName)) return false
|
||||
|
||||
// hide MCU & Host sensors, if the function is enabled
|
||||
if (this.hideMcuHostSensors && this.checkMcuHostSensor(fullName)) return false
|
||||
|
||||
const splits = fullName.split(' ')
|
||||
let name = splits[0]
|
||||
if (splits.length > 1) name = splits[1]
|
||||
@@ -80,8 +102,19 @@ export default class TemperaturePanelList extends Mixins(BaseMixin) {
|
||||
.sort(this.sortObjectName)
|
||||
}
|
||||
|
||||
get tempObjects() {
|
||||
return [...this.filteredHeaters, ...this.temperature_fans, ...this.temperature_sensors]
|
||||
get heaterObjects() {
|
||||
return [...this.filteredHeaters, ...this.temperature_fans]
|
||||
}
|
||||
|
||||
get settings() {
|
||||
return this.$store.state.printer?.configfile?.settings ?? {}
|
||||
}
|
||||
|
||||
checkMcuHostSensor(fullName: string) {
|
||||
const settingsObject = this.settings[fullName.toLowerCase()] ?? {}
|
||||
const sensor_type = settingsObject.sensor_type ?? ''
|
||||
|
||||
return ['temperature_mcu', 'temperature_host'].includes(sensor_type)
|
||||
}
|
||||
|
||||
sortObjectName(a: string, b: string) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</v-icon>
|
||||
</td>
|
||||
<td class="name">
|
||||
<span @click="showEditDialog = true">{{ formatName }}</span>
|
||||
<span class="cursor-pointer" @click="showEditDialog = true">{{ formatName }}</span>
|
||||
</td>
|
||||
<td v-if="!isResponsiveMobile" class="state">
|
||||
<v-tooltip v-if="state !== null" top>
|
||||
@@ -90,9 +90,12 @@ export default class TemperaturePanelListItem extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get printerObjectSettings() {
|
||||
if (!(this.objectName in (this.$store.state.printer?.configfile?.settings ?? {}))) return {}
|
||||
// convert objectName to lowercase, because klipper only user lowercase in configfile.settings
|
||||
const lowerCaseObjectName = this.objectName.toLowerCase()
|
||||
|
||||
return this.$store.state.printer?.configfile?.settings[this.objectName]
|
||||
if (!(lowerCaseObjectName in (this.$store.state.printer?.configfile?.settings ?? {}))) return {}
|
||||
|
||||
return this.$store.state.printer?.configfile?.settings[lowerCaseObjectName]
|
||||
}
|
||||
|
||||
get name() {
|
||||
@@ -231,7 +234,10 @@ export default class TemperaturePanelListItem extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
get rpm() {
|
||||
if (!('rpm' in this.printerObject)) return null
|
||||
const rpm = this.printerObject.rpm ?? null
|
||||
|
||||
// return null when rpm doesn't exist
|
||||
if (rpm === null) return null
|
||||
|
||||
return parseInt(this.printerObject.rpm)
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ export default class TemperaturePanelListItemEdit extends Mixins(BaseMixin) {
|
||||
|
||||
get additionalValues() {
|
||||
if (this.objectName === 'z_thermal_adjust') return ['current_z_adjust']
|
||||
if (this.objectName === 'nevermore') return ['temperature', 'pressure', 'humidity', 'rpm']
|
||||
|
||||
return Object.keys(this.printerObjectAdditionalSensor).filter((key) => key !== 'temperature')
|
||||
}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
<template>
|
||||
<tr>
|
||||
<td class="icon">
|
||||
<v-icon :color="iconColor" :class="iconClass" tabindex="-1" @click="showEditDialog = true">
|
||||
{{ mdiFan }}
|
||||
</v-icon>
|
||||
</td>
|
||||
<td class="name">
|
||||
<span class="cursor-pointer" @click="showEditDialog = true">Nevermore</span>
|
||||
</td>
|
||||
<td class="text-no-wrap text-center" colspan="3">
|
||||
<temperature-panel-list-item-nevermore-value
|
||||
:printer-object="printerObject"
|
||||
:small="false"
|
||||
object-name="nevermore"
|
||||
key-name="gas" />
|
||||
<temperature-panel-list-item-nevermore-value
|
||||
v-for="keyName in nevermoreValues"
|
||||
:key="keyName"
|
||||
:printer-object="printerObject"
|
||||
object-name="nevermore"
|
||||
:key-name="keyName" />
|
||||
<div v-if="rpm !== null">
|
||||
<small :class="rpmClass">{{ rpm }} RPM</small>
|
||||
</div>
|
||||
</td>
|
||||
<temperature-panel-list-item-edit
|
||||
:bool-show="showEditDialog"
|
||||
object-name="nevermore"
|
||||
name="nevermore"
|
||||
format-name="Nevermore"
|
||||
additional-sensor-name="nevermore"
|
||||
:icon="mdiFan"
|
||||
:color="color"
|
||||
@close-dialog="showEditDialog = false" />
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { mdiFan } from '@mdi/js'
|
||||
import { opacityHeaterActive, opacityHeaterInactive } from '@/store/variables'
|
||||
|
||||
@Component
|
||||
export default class TemperaturePanelListItemNevermore extends Mixins(BaseMixin) {
|
||||
mdiFan = mdiFan
|
||||
|
||||
@Prop({ type: Boolean, required: true }) readonly isResponsiveMobile!: boolean
|
||||
|
||||
showEditDialog = false
|
||||
nevermoreValues = ['temperature', 'pressure', 'humidity']
|
||||
|
||||
get printerObject() {
|
||||
return this.$store.state.printer.nevermore ?? {}
|
||||
}
|
||||
|
||||
get color() {
|
||||
return this.$store.state.gui?.view?.tempchart?.datasetSettings?.nevermore?.color ?? '#ffffff'
|
||||
}
|
||||
|
||||
get iconColor() {
|
||||
// set icon color to active, if no target exists (temperature_sensors) or a heater is active
|
||||
if (this.state === null || this.state > 0) return `${this.color}${opacityHeaterActive}`
|
||||
|
||||
return `${this.color}${opacityHeaterInactive}`
|
||||
}
|
||||
|
||||
get iconClass() {
|
||||
const classes = ['_no-focus-style', 'cursor-pointer']
|
||||
|
||||
// add icon animation, when it is a fan and state > 0
|
||||
const disableFanAnimation = this.$store.state.gui?.uiSettings.disableFanAnimation ?? false
|
||||
|
||||
if (!disableFanAnimation && (this.state ?? 0) > 0) classes.push('icon-rotate')
|
||||
|
||||
return classes
|
||||
}
|
||||
|
||||
get state(): number | null {
|
||||
return this.printerObject.speed ?? null
|
||||
}
|
||||
|
||||
get rpm() {
|
||||
const rpm = this.printerObject.rpm ?? null
|
||||
|
||||
// return null when rpm doesn't exist
|
||||
if (rpm === null) return null
|
||||
|
||||
return parseInt(this.printerObject.rpm)
|
||||
}
|
||||
|
||||
get rpmClass() {
|
||||
if (this.rpm === 0 && (this.printerObject.speed ?? 0) > 0) return 'red--text'
|
||||
|
||||
return ''
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .v-icon._no-focus-style:focus::after {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
|
||||
::v-deep .cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<div v-if="isVisible">
|
||||
<v-tooltip top :disabled="disableTooltip">
|
||||
<template #activator="{ on, attrs }">
|
||||
<span :style="cssStyle" v-bind="attrs" v-on="on">{{ formatValue }}</span>
|
||||
</template>
|
||||
<span>
|
||||
{{ $t('Panels.TemperaturePanel.Max') }}: {{ formatValue_max }}
|
||||
<br />
|
||||
{{ $t('Panels.TemperaturePanel.Min') }}: {{ formatValue_min }}
|
||||
</span>
|
||||
</v-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
|
||||
@Component
|
||||
export default class TemperaturePanelListItemNevermoreValue extends Mixins(BaseMixin) {
|
||||
@Prop({ type: Object, required: true }) readonly printerObject!: { [key: string]: number }
|
||||
@Prop({ type: String, required: true }) readonly objectName!: string
|
||||
@Prop({ type: String, required: true }) readonly keyName!: string
|
||||
@Prop({ type: Boolean, required: false, default: true }) readonly small!: boolean
|
||||
|
||||
get cssStyle() {
|
||||
let style = { cursor: 'default', fontSize: '1em' }
|
||||
if (this.small) style.fontSize = '0.8em'
|
||||
|
||||
return style
|
||||
}
|
||||
|
||||
get value() {
|
||||
const value = this.printerObject[this.keyName] ?? null
|
||||
if (isNaN(value)) return null
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
get intake_value(): number | null {
|
||||
const name = `intake_${this.keyName}`
|
||||
|
||||
return this.printerObject[name] ?? null
|
||||
}
|
||||
|
||||
get intake_value_min(): number | null {
|
||||
const name = `intake_${this.keyName}_min`
|
||||
|
||||
return this.printerObject[name] ?? null
|
||||
}
|
||||
|
||||
get intake_value_max(): number | null {
|
||||
const name = `intake_${this.keyName}_max`
|
||||
|
||||
return this.printerObject[name] ?? null
|
||||
}
|
||||
|
||||
get exhaust_value(): number | null {
|
||||
const name = `exhaust_${this.keyName}`
|
||||
|
||||
return this.printerObject[name] ?? null
|
||||
}
|
||||
|
||||
get exhaust_value_min(): number | null {
|
||||
const name = `exhaust_${this.keyName}_min`
|
||||
|
||||
return this.printerObject[name] ?? null
|
||||
}
|
||||
|
||||
get exhaust_value_max(): number | null {
|
||||
const name = `exhaust_${this.keyName}_max`
|
||||
|
||||
return this.printerObject[name] ?? null
|
||||
}
|
||||
|
||||
get unit(): string | null {
|
||||
switch (this.keyName) {
|
||||
case 'temperature':
|
||||
return '°C'
|
||||
case 'pressure':
|
||||
return 'hPa'
|
||||
case 'humidity':
|
||||
return '%'
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
get digits() {
|
||||
return ['gas', 'pressure'].includes(this.keyName) ? 0 : 1
|
||||
}
|
||||
|
||||
get formatValue() {
|
||||
return this.getFormatedValue(this.intake_value, this.exhaust_value)
|
||||
}
|
||||
|
||||
get formatValue_min() {
|
||||
return this.getFormatedValue(this.intake_value_min, this.exhaust_value_min)
|
||||
}
|
||||
|
||||
get formatValue_max() {
|
||||
return this.getFormatedValue(this.intake_value_max, this.exhaust_value_max)
|
||||
}
|
||||
|
||||
getFormatedValue(intake: number | null, exhaust: number | null): string {
|
||||
let intake_value = intake?.toFixed(this.digits)
|
||||
let exhaust_value = exhaust?.toFixed(this.digits)
|
||||
if (this.intake_value === null) intake_value = '--'
|
||||
if (this.exhaust_value === null) exhaust_value = '--'
|
||||
|
||||
// return only the value, if unit is null
|
||||
if (this.unit === null) return `${intake_value} > ${exhaust_value}`
|
||||
|
||||
return `${intake_value} ${this.unit} > ${exhaust_value} ${this.unit}`
|
||||
}
|
||||
|
||||
get disableTooltip() {
|
||||
return (
|
||||
this.intake_value_min === null ||
|
||||
this.exhaust_value_min === null ||
|
||||
this.intake_value_max === null ||
|
||||
this.exhaust_value_max === null
|
||||
)
|
||||
}
|
||||
|
||||
get guiSetting() {
|
||||
return this.$store.getters['gui/getDatasetAdditionalSensorValue']({
|
||||
name: this.objectName,
|
||||
sensor: this.keyName,
|
||||
})
|
||||
}
|
||||
|
||||
get isVisible() {
|
||||
if (this.intake_value === null && this.exhaust_value === null) return false
|
||||
|
||||
return this.guiSetting
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -13,6 +13,13 @@
|
||||
hide-details
|
||||
:label="$t('Panels.TemperaturePanel.ShowChart')" />
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox
|
||||
v-model="hideMcuHostSensors"
|
||||
class="mt-0"
|
||||
hide-details
|
||||
:label="$t('Panels.TemperaturePanel.HideMcuHostSensors')" />
|
||||
</v-list-item>
|
||||
<v-list-item class="minHeight36">
|
||||
<v-checkbox
|
||||
v-model="autoscaleTempchart"
|
||||
@@ -49,5 +56,13 @@ export default class TemperaturePanelSettings extends Mixins(BaseMixin) {
|
||||
set autoscaleTempchart(newVal: boolean) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.tempchart.autoscale', value: newVal })
|
||||
}
|
||||
|
||||
get hideMcuHostSensors(): boolean {
|
||||
return this.$store.state.gui.view.tempchart.hideMcuHostSensors ?? false
|
||||
}
|
||||
|
||||
set hideMcuHostSensors(newVal: boolean) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'view.tempchart.hideMcuHostSensors', value: newVal })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -94,11 +94,11 @@
|
||||
<!-- MOVE TO CONTROL -->
|
||||
<move-to-control class="py-0 pt-3"></move-to-control>
|
||||
<!-- AXIS CONTROL -->
|
||||
<v-container>
|
||||
<v-container v-if="axisControlVisible">
|
||||
<component :is="`${controlStyle}-control`"></component>
|
||||
</v-container>
|
||||
<!-- Z-OFFSET CONTROL -->
|
||||
<v-divider></v-divider>
|
||||
<v-divider :class="{ 'mt-3': !axisControlVisible }"></v-divider>
|
||||
<v-container>
|
||||
<zoffset-control></zoffset-control>
|
||||
</v-container>
|
||||
@@ -164,5 +164,13 @@ export default class ToolheadControlPanel extends Mixins(BaseMixin, ControlMixin
|
||||
get speedFactor(): number {
|
||||
return this.$store.state.printer?.gcode_move?.speed_factor ?? 1
|
||||
}
|
||||
|
||||
get isPrinting() {
|
||||
return ['printing'].includes(this.printer_state)
|
||||
}
|
||||
|
||||
get axisControlVisible() {
|
||||
return !(this.isPrinting && (this.$store.state.gui.control.hideDuringPrint ?? false))
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-btn :loading="loadings.includes('backupDbButton')" small @click="openDialog">
|
||||
{{ $t('Settings.GeneralTab.Backup') }}
|
||||
</v-btn>
|
||||
<v-dialog v-model="showDialog" persistent :width="360">
|
||||
<panel
|
||||
:title="$t('Settings.GeneralTab.Backup')"
|
||||
card-class="mainsail-backup-dialog"
|
||||
:margin-bottom="false"
|
||||
:icon="mdiHelpCircle">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="closeDialog">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0">{{ $t('Settings.GeneralTab.BackupDialog') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<checkbox-list
|
||||
:options="backupableNamespaces"
|
||||
select-all
|
||||
@update:selectedCheckboxes="onSelectBackupCheckboxes" />
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="red" :loading="loadings.includes('backupMainsail')" @click="backupMainsail">
|
||||
{{ $t('Settings.GeneralTab.Backup') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { mdiCloseThick, mdiHelpCircle } from '@mdi/js'
|
||||
import CheckboxList from '@/components/inputs/CheckboxList.vue'
|
||||
import { TranslateResult } from 'vue-i18n'
|
||||
import SettingsGeneralDatabase from '@/components/mixins/settingsGeneralDatabase'
|
||||
|
||||
@Component({
|
||||
components: { Panel, SettingsRow, CheckboxList },
|
||||
})
|
||||
export default class SettingsGeneralTabBackupDatabase extends Mixins(BaseMixin, SettingsGeneralDatabase) {
|
||||
mdiHelpCircle = mdiHelpCircle
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
showDialog = false
|
||||
backupableNamespaces: { value: string; label: string | TranslateResult }[] = []
|
||||
backupCheckboxes: string[] = []
|
||||
|
||||
async mounted() {
|
||||
this.backupableNamespaces = await this.loadBackupableNamespaces()
|
||||
}
|
||||
|
||||
onSelectBackupCheckboxes(backupCheckboxes: string[]) {
|
||||
this.backupCheckboxes = backupCheckboxes
|
||||
}
|
||||
|
||||
async backupMainsail() {
|
||||
await this.$store.dispatch('socket/addLoading', 'backupMainsail')
|
||||
await this.$store.dispatch('gui/backupMoonrakerDB', this.backupCheckboxes)
|
||||
await this.$store.dispatch('socket/removeLoading', 'backupMainsail')
|
||||
this.closeDialog()
|
||||
}
|
||||
|
||||
async openDialog() {
|
||||
this.backupableNamespaces = await this.loadBackupableNamespaces()
|
||||
this.showDialog = true
|
||||
}
|
||||
|
||||
closeDialog() {
|
||||
this.showDialog = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-btn color="error" small @click="openDialog">
|
||||
{{ $t('Settings.GeneralTab.FactoryReset') }}
|
||||
</v-btn>
|
||||
<v-dialog v-model="showDialog" persistent :width="360">
|
||||
<panel
|
||||
:title="$t('Settings.GeneralTab.FactoryReset')"
|
||||
card-class="mainsail-reset-dialog"
|
||||
:margin-bottom="false"
|
||||
:icon="mdiHelpCircle">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="closeDialog">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0">{{ $t('Settings.GeneralTab.FactoryDialog') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<checkbox-list
|
||||
:options="resetableNamespaces"
|
||||
select-all
|
||||
@update:selectedCheckboxes="onSelectResetCheckboxes" />
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn
|
||||
color="red"
|
||||
:loading="loadings.includes('resetMainsail')"
|
||||
@click="resetMainsailAction">
|
||||
{{ $t('Settings.GeneralTab.Reset') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { mdiCloseThick, mdiHelpCircle } from '@mdi/js'
|
||||
import CheckboxList from '@/components/inputs/CheckboxList.vue'
|
||||
import { TranslateResult } from 'vue-i18n'
|
||||
import SettingsGeneralDatabase from '@/components/mixins/settingsGeneralDatabase'
|
||||
|
||||
@Component({
|
||||
components: { Panel, SettingsRow, CheckboxList },
|
||||
})
|
||||
export default class SettingsGeneralTabResetDatabase extends Mixins(BaseMixin, SettingsGeneralDatabase) {
|
||||
mdiHelpCircle = mdiHelpCircle
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
showDialog = false
|
||||
resetableNamespaces: { value: string; label: string | TranslateResult }[] = []
|
||||
resetCheckboxes: string[] = []
|
||||
|
||||
async mounted() {
|
||||
this.resetableNamespaces = await this.loadBackupableNamespaces()
|
||||
}
|
||||
|
||||
onSelectResetCheckboxes(resetCheckboxes: string[]) {
|
||||
this.resetCheckboxes = resetCheckboxes
|
||||
}
|
||||
|
||||
resetMainsailAction() {
|
||||
this.$store.dispatch('socket/addLoading', 'resetMainsail')
|
||||
this.$store.dispatch('gui/resetMoonrakerDB', this.resetCheckboxes)
|
||||
}
|
||||
|
||||
async openDialog() {
|
||||
this.resetableNamespaces = await this.loadBackupableNamespaces()
|
||||
this.showDialog = true
|
||||
}
|
||||
|
||||
closeDialog() {
|
||||
this.showDialog = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<div>
|
||||
<input ref="uploadBackupFile" type="file" :accept="['.json']" class="d-none" @change="uploadRestore" />
|
||||
<v-btn small :loading="loadings.includes('restoreUploadButton')" class="ml-3" @click="restoreDb">
|
||||
{{ $t('Settings.GeneralTab.Restore') }}
|
||||
</v-btn>
|
||||
<v-dialog :value="showDialog" persistent :width="360">
|
||||
<panel
|
||||
:title="$t('Settings.GeneralTab.Restore')"
|
||||
card-class="mainsail-restore-dialog"
|
||||
:margin-bottom="false"
|
||||
:icon="mdiHelpCircle">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="closeDialog">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0">{{ $t('Settings.GeneralTab.RestoreDialog') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<checkbox-list
|
||||
:options="restoreableNamespaces"
|
||||
select-all
|
||||
@update:selectedCheckboxes="onSelectRestoreCheckboxes" />
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="red" :loading="loadings.includes('restoreMainsail')" @click="restoreDbAction">
|
||||
{{ $t('Settings.GeneralTab.Restore') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import { mdiCloseThick, mdiHelpCircle } from '@mdi/js'
|
||||
import CheckboxList from '@/components/inputs/CheckboxList.vue'
|
||||
import { TranslateResult } from 'vue-i18n'
|
||||
import SettingsGeneralDatabase from '@/components/mixins/settingsGeneralDatabase'
|
||||
import SettingsGeneralTabBackupDatabase from '@/components/settings/General/GeneralBackup.vue'
|
||||
import Vue from 'vue'
|
||||
|
||||
@Component({
|
||||
components: { SettingsGeneralTabBackupDatabase, Panel, SettingsRow, CheckboxList },
|
||||
})
|
||||
export default class SettingsGeneralTabRestoreDatabase extends Mixins(BaseMixin, SettingsGeneralDatabase) {
|
||||
mdiHelpCircle = mdiHelpCircle
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
declare $refs: {
|
||||
uploadBackupFile: HTMLInputElement
|
||||
}
|
||||
|
||||
showDialog = false
|
||||
restoreableNamespaces: { value: string; label: string | TranslateResult }[] = []
|
||||
restoreCheckboxes: string[] = []
|
||||
restoreObjects: any = {}
|
||||
|
||||
onSelectRestoreCheckboxes(backupCheckboxes: string[]) {
|
||||
this.restoreCheckboxes = backupCheckboxes
|
||||
}
|
||||
|
||||
async restoreDb() {
|
||||
this.$refs?.uploadBackupFile?.click()
|
||||
}
|
||||
|
||||
uploadRestore() {
|
||||
if ((this.$refs.uploadBackupFile.files?.length ?? 0) === 0) {
|
||||
window.console.error('No json uploaded')
|
||||
return
|
||||
}
|
||||
|
||||
// get file
|
||||
// @ts-ignore
|
||||
const backup = this.$refs?.uploadBackupFile?.files[0]
|
||||
const reader = new FileReader()
|
||||
reader.readAsText(backup, 'UTF-8')
|
||||
reader.onload = (evt) => {
|
||||
this.restoreableNamespaces = []
|
||||
try {
|
||||
this.restoreObjects = JSON.parse(evt?.target?.result + '')
|
||||
|
||||
const keys = Object.keys(this.restoreObjects)
|
||||
this.restoreableNamespaces = keys.map((key) => {
|
||||
const namespace = this.availableKeys.find((namespace) => namespace.value === key)
|
||||
if (namespace) return namespace
|
||||
|
||||
return { value: key, label: key }
|
||||
})
|
||||
|
||||
// sort restoreableNamespaces
|
||||
this.restoreableNamespaces = this.restoreableNamespaces.sort(this.sortNamespaces)
|
||||
|
||||
this.openDialog()
|
||||
} catch (e) {
|
||||
Vue.$toast.error(this.$t('Settings.GeneralTab.CannotReadJson').toString())
|
||||
}
|
||||
}
|
||||
reader.onerror = (evt) => {
|
||||
window.console.error(evt)
|
||||
}
|
||||
|
||||
// empty input file field
|
||||
this.$refs.uploadBackupFile.value = ''
|
||||
}
|
||||
|
||||
openDialog() {
|
||||
this.showDialog = true
|
||||
}
|
||||
|
||||
closeDialog() {
|
||||
this.showDialog = false
|
||||
}
|
||||
|
||||
restoreDbAction() {
|
||||
this.$store.dispatch('socket/addLoading', 'restoreDbAction')
|
||||
|
||||
this.$store.dispatch('gui/restoreMoonrakerDB', {
|
||||
dbCheckboxes: this.restoreCheckboxes,
|
||||
restoreObjects: this.restoreObjects,
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<settings-row :title="preset.name" :sub-title="subTitle">
|
||||
<v-btn small outlined class="ml-3" @click="editPreset">
|
||||
<v-icon left small>{{ mdiPencil }}</v-icon>
|
||||
{{ $t('Settings.Edit') }}
|
||||
</v-btn>
|
||||
<v-btn small outlined class="ml-3 minwidth-0 px-2" color="error" @click="deletePreset">
|
||||
<v-icon small>{{ mdiDelete }}</v-icon>
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { GuiPresetsStatePreset } from '@/store/gui/presets/types'
|
||||
import { convertName } from '@/plugins/helpers'
|
||||
import { mdiDelete, mdiPencil } from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
components: { SettingsRow },
|
||||
})
|
||||
export default class PresetsEntry extends Mixins(BaseMixin) {
|
||||
mdiPencil = mdiPencil
|
||||
mdiDelete = mdiDelete
|
||||
|
||||
@Prop({ required: true }) readonly preset!: GuiPresetsStatePreset
|
||||
|
||||
get subTitle() {
|
||||
let output: string[] = []
|
||||
|
||||
Object.keys(this.preset.values).forEach((key: string) => {
|
||||
const values = this.preset.values[key]
|
||||
|
||||
if (values.bool) {
|
||||
const name = key.indexOf(' ') ? key.slice(key.indexOf(' ') + 1) : key
|
||||
|
||||
output.push(convertName(name) + ': ' + values.value + '°C')
|
||||
}
|
||||
})
|
||||
|
||||
if (this.preset.gcode) output.push(this.$t('Settings.PresetsTab.CustomGCode').toString())
|
||||
|
||||
return output.join(', ')
|
||||
}
|
||||
|
||||
editPreset() {
|
||||
this.$emit('edit', this.preset)
|
||||
}
|
||||
|
||||
deletePreset() {
|
||||
this.$store.dispatch('gui/presets/delete', this.preset.id)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<settings-row :title="$t('Settings.PresetsTab.Cooldown')">
|
||||
<v-btn small outlined class="ml-3" @click="editCooldown">
|
||||
<v-icon left small>{{ mdiPencil }}</v-icon>
|
||||
{{ $t('Settings.Edit') }}
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { mdiPencil } from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
components: { SettingsRow },
|
||||
})
|
||||
export default class PresetsEntryCooldown extends Mixins(BaseMixin) {
|
||||
mdiPencil = mdiPencil
|
||||
|
||||
editCooldown() {
|
||||
this.$emit('edit')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-form v-model="valid" @submit.prevent="savePreset">
|
||||
<v-card-title>{{ title }}</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row v-if="boolInvalidMin" class="mt-3">
|
||||
<v-col class="py-0">
|
||||
<v-alert dense text type="error">{{ $t('Settings.PresetsTab.PresetInfo') }}</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<settings-row :title="$t('Settings.PresetsTab.Name')">
|
||||
<v-text-field
|
||||
v-model="preset.name"
|
||||
:placeholder="$t('Settings.PresetsTab.PresetNamePlaceholder')"
|
||||
hide-details="auto"
|
||||
:rules="[rules.required, rules.unique]"
|
||||
dense
|
||||
outlined />
|
||||
</settings-row>
|
||||
<div v-for="(value, key) of preset.values" :key="key">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row :title="converNameObject(key)">
|
||||
<v-checkbox v-model="value.bool" hide-details class="shrink mt-0" />
|
||||
<v-text-field
|
||||
v-model="value.value"
|
||||
hide-details="auto"
|
||||
:rules="[rules.invalid]"
|
||||
type="number"
|
||||
suffix="°C"
|
||||
dense
|
||||
outlined
|
||||
hide-spin-buttons
|
||||
@focus="$event.target.select()" />
|
||||
</settings-row>
|
||||
</div>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row :title="$t('Settings.PresetsTab.CustomGCode')">
|
||||
<v-textarea v-model="preset.gcode" outlined hide-details />
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text @click="closeForm">
|
||||
{{ $t('Settings.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text type="submit" :disabled="!valid">
|
||||
{{ storeButtonText }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { GuiPresetsStatePreset } from '@/store/gui/presets/types'
|
||||
import { convertName } from '@/plugins/helpers'
|
||||
import { mdiDelete, mdiPencil } from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
components: { SettingsRow },
|
||||
})
|
||||
export default class PresetsForm extends Mixins(BaseMixin) {
|
||||
mdiPencil = mdiPencil
|
||||
mdiDelete = mdiDelete
|
||||
|
||||
@Prop({ required: true }) readonly preset!: GuiPresetsStatePreset
|
||||
|
||||
valid = false
|
||||
boolInvalidMin = false
|
||||
|
||||
private rules = {
|
||||
required: (value: string) => value !== '' || this.$t('Settings.PresetsTab.ErrorNameRequired'),
|
||||
unique: (value: string) => !this.existsPresetName(value) || this.$t('Settings.PresetsTab.ErrorNameNotUnique'),
|
||||
invalid: (value: string) => parseFloat(value) >= 0 || this.$t('Settings.PresetsTab.ErrorInvalidValue'),
|
||||
}
|
||||
|
||||
get title() {
|
||||
if (this.preset.id === null) return this.$t('Settings.PresetsTab.CreateHeadline')
|
||||
|
||||
return this.$t('Settings.PresetsTab.EditHeadline')
|
||||
}
|
||||
|
||||
get storeButtonText() {
|
||||
if (this.preset.id === null) return this.$t('Settings.PresetsTab.StoreButton')
|
||||
|
||||
return this.$t('Settings.PresetsTab.UpdateButton')
|
||||
}
|
||||
|
||||
get presets() {
|
||||
return this.$store.getters['gui/presets/getPresets'] ?? []
|
||||
}
|
||||
|
||||
get available_heaters() {
|
||||
return (this.$store.state.printer?.heaters?.available_heaters ?? []).sort()
|
||||
}
|
||||
|
||||
get available_temperature_fans() {
|
||||
return (this.$store.state.printer?.heaters?.available_sensors ?? [])
|
||||
.filter((name: string) => name.startsWith('temperature_fan '))
|
||||
.sort()
|
||||
}
|
||||
|
||||
mounted() {
|
||||
const presetValues = Object.keys(this.preset.values)
|
||||
|
||||
// add missing heaters to preset
|
||||
this.available_heaters
|
||||
.filter((name: string) => !presetValues.includes(name))
|
||||
.forEach((name: string) => {
|
||||
this.preset.values[name] = {
|
||||
bool: false,
|
||||
type: 'heater',
|
||||
value: 0,
|
||||
}
|
||||
})
|
||||
|
||||
// add missing temperature_fans to preset
|
||||
this.available_temperature_fans
|
||||
.filter((name: string) => !presetValues.includes(name))
|
||||
.forEach((name: string) => {
|
||||
this.preset.values[name] = {
|
||||
bool: false,
|
||||
type: 'temperature_fan',
|
||||
value: 0,
|
||||
}
|
||||
})
|
||||
|
||||
// remove unused values from preset
|
||||
presetValues
|
||||
.filter(
|
||||
(name: string) =>
|
||||
!this.available_heaters.includes(name) && !this.available_temperature_fans.includes(name)
|
||||
)
|
||||
.forEach((name) => {
|
||||
delete this.preset.values[name]
|
||||
})
|
||||
}
|
||||
|
||||
existsPresetName(name: string) {
|
||||
return (
|
||||
this.presets.findIndex(
|
||||
(preset: GuiPresetsStatePreset) => preset.name === name && preset.id !== this.preset.id
|
||||
) !== -1
|
||||
)
|
||||
}
|
||||
|
||||
converNameObject(name: string) {
|
||||
return convertName(name.replace('temperature_fan ', ''))
|
||||
}
|
||||
|
||||
closeForm() {
|
||||
this.$emit('close')
|
||||
}
|
||||
|
||||
savePreset() {
|
||||
let setValues = 0
|
||||
for (const key of Object.keys(this.preset.values)) {
|
||||
if (this.preset.values[key].bool) setValues++
|
||||
}
|
||||
if (this.preset.gcode.length) setValues++
|
||||
|
||||
// stop here, when no values are set
|
||||
if (setValues === 0) {
|
||||
this.boolInvalidMin = true
|
||||
return
|
||||
}
|
||||
|
||||
// create new preset, if id === null
|
||||
if (this.preset.id === null) {
|
||||
this.$store.dispatch('gui/presets/store', { values: this.preset })
|
||||
this.closeForm()
|
||||
return
|
||||
}
|
||||
|
||||
// update existing preset
|
||||
this.$store.dispatch('gui/presets/update', { id: this.preset.id, values: this.preset })
|
||||
this.closeForm()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<v-card flat>
|
||||
<v-form @submit.prevent="saveCooldown">
|
||||
<v-card-title>{{ $t('Settings.PresetsTab.EditCooldown') }}</v-card-title>
|
||||
<v-card-text>
|
||||
<settings-row :title="$t('Settings.PresetsTab.CustomGCode')">
|
||||
<v-textarea v-model="gcode" outlined hide-details />
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text @click="closeForm">
|
||||
{{ $t('Settings.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text type="submit">
|
||||
{{ $t('Settings.PresetsTab.UpdateCooldown') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { mdiDelete, mdiPencil } from '@mdi/js'
|
||||
|
||||
@Component({
|
||||
components: { SettingsRow },
|
||||
})
|
||||
export default class PresetsFormCooldown extends Mixins(BaseMixin) {
|
||||
mdiPencil = mdiPencil
|
||||
mdiDelete = mdiDelete
|
||||
|
||||
@Prop({ required: true }) readonly inputGcode!: string
|
||||
|
||||
gcode = ''
|
||||
|
||||
mounted() {
|
||||
this.gcode = this.inputGcode
|
||||
}
|
||||
|
||||
closeForm() {
|
||||
this.$emit('close')
|
||||
}
|
||||
|
||||
saveCooldown() {
|
||||
this.$store.dispatch('gui/presets/saveSetting', { name: 'cooldownGcode', value: this.gcode })
|
||||
this.closeForm()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -35,6 +35,12 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
</template>
|
||||
<settings-row
|
||||
:title="$t('Settings.ControlTab.HideDuringPrint').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="hideDuringPrint" hide-details class="mt-0"></v-switch>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row
|
||||
:title="$t('Settings.ControlTab.EnableXYHoming').toString()"
|
||||
:dynamic-slot-width="true">
|
||||
@@ -336,6 +342,14 @@ export default class SettingsControlTab extends Mixins(BaseMixin, ControlMixin)
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'control.style', value: newVal })
|
||||
}
|
||||
|
||||
get hideDuringPrint(): Boolean {
|
||||
return this.$store.state.gui.control.hideDuringPrint ?? false
|
||||
}
|
||||
|
||||
set hideDuringPrint(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'control.hideDuringPrint', value: newVal })
|
||||
}
|
||||
|
||||
get actionOptions() {
|
||||
let actions = [
|
||||
{
|
||||
|
||||
@@ -6,25 +6,23 @@
|
||||
:title="$t('Settings.EditorTab.UseEscToClose')"
|
||||
:sub-title="$t('Settings.EditorTab.UseEscToCloseDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="escToClose" hide-details class="mt-0"></v-switch>
|
||||
<v-switch v-model="escToClose" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.EditorTab.ConfirmUnsavedChanges')"
|
||||
:sub-title="$t('Settings.EditorTab.ConfirmUnsavedChangesDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="confirmUnsavedChanges" hide-details class="mt-0"></v-switch>
|
||||
<v-switch v-model="confirmUnsavedChanges" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.EditorTab.TabSize')"
|
||||
:sub-title="$t('Settings.EditorTab.TabSizeDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-select v-model="tabSize" :items="tabSizes" hide-details outlined dense attached></v-select>
|
||||
<v-select v-model="tabSize" :items="tabSizes" hide-details outlined dense attached />
|
||||
</settings-row>
|
||||
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.EditorTab.KlipperRestartMethod')"
|
||||
:sub-title="$t('Settings.EditorTab.KlipperRestartMethodDescription')">
|
||||
@@ -34,23 +32,8 @@
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
attached></v-select>
|
||||
attached />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<template v-if="availableMoonrakerInstances.length > 1">
|
||||
<settings-row
|
||||
:title="$t('Settings.EditorTab.MoonrakerRestartInstance')"
|
||||
:sub-title="$t('Settings.EditorTab.MoonrakerRestartInstanceDescription')">
|
||||
<v-select
|
||||
v-model="moonrakerRestartInstance"
|
||||
:items="availableMoonrakerInstances"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
attached></v-select>
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
</template>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</div>
|
||||
@@ -115,19 +98,5 @@ export default class SettingsEditorTab extends Mixins(BaseMixin) {
|
||||
set klipperRestartMethod(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'editor.klipperRestartMethod', value: newVal })
|
||||
}
|
||||
|
||||
get moonrakerRestartInstance() {
|
||||
return this.$store.state.gui.editor.moonrakerRestartInstance
|
||||
}
|
||||
|
||||
set moonrakerRestartInstance(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'editor.moonrakerRestartInstance', value: newVal })
|
||||
}
|
||||
|
||||
get availableMoonrakerInstances() {
|
||||
const available_instances = this.$store.state.server.system_info?.available_services ?? []
|
||||
|
||||
return available_instances.filter((name: string) => name.startsWith('moonraker')).sort()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -7,33 +7,21 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row :title="$t('Settings.GeneralTab.Language')">
|
||||
<v-select
|
||||
v-model="currentLanguage"
|
||||
:items="availableLanguages"
|
||||
hide-details
|
||||
outlined
|
||||
dense
|
||||
attach />
|
||||
<v-select v-model="currentLanguage" :items="availableLanguages" hide-details outlined dense />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row :title="$t('Settings.GeneralTab.DateFormat')">
|
||||
<v-select v-model="dateFormat" :items="dateFormatItems" hide-details outlined dense attach />
|
||||
<v-select v-model="dateFormat" :items="dateFormatItems" hide-details outlined dense />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row :title="$t('Settings.GeneralTab.TimeFormat')">
|
||||
<v-select v-model="timeFormat" :items="timeFormatItems" hide-details outlined dense attach />
|
||||
<v-select v-model="timeFormat" :items="timeFormatItems" hide-details outlined dense />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.GeneralTab.CalcPrintProgress')"
|
||||
:sub-title="$t('Settings.GeneralTab.CalcPrintProgressDescription')">
|
||||
<v-select
|
||||
v-model="calcPrintProgress"
|
||||
:items="calcPrintProgressItems"
|
||||
hide-details
|
||||
dense
|
||||
outlined
|
||||
attach />
|
||||
<v-select v-model="calcPrintProgress" :items="calcPrintProgressItems" hide-details dense outlined />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
@@ -45,189 +33,25 @@
|
||||
multiple
|
||||
hide-details
|
||||
dense
|
||||
outlined
|
||||
attach />
|
||||
outlined />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.GeneralTab.CalcEtaTime')"
|
||||
:sub-title="$t('Settings.GeneralTab.CalcEtaTimeDescription')">
|
||||
<v-select
|
||||
v-model="calcEtaTime"
|
||||
:items="calcEtaTimeItems"
|
||||
multiple
|
||||
hide-details
|
||||
dense
|
||||
outlined
|
||||
attach />
|
||||
<v-select v-model="calcEtaTime" :items="calcEtaTimeItems" multiple hide-details dense outlined />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row :title="$t('Settings.GeneralTab.MainsailSettingsMoonrakerDb')" :dynamic-slot-width="true">
|
||||
<input
|
||||
ref="uploadBackupFile"
|
||||
type="file"
|
||||
:accept="['.json']"
|
||||
class="d-none"
|
||||
@change="uploadRestore" />
|
||||
<v-btn :loading="loadings.includes('backupDbButton')" small @click="backupDb">
|
||||
{{ $t('Settings.GeneralTab.Backup') }}
|
||||
</v-btn>
|
||||
<v-btn small :loading="loadings.includes('restoreUploadButton')" class="ml-3" @click="restoreDb">
|
||||
{{ $t('Settings.GeneralTab.Restore') }}
|
||||
</v-btn>
|
||||
<settings-general-tab-backup-database />
|
||||
<settings-general-tab-restore-database />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row :title="$t('Settings.GeneralTab.FactoryReset')" :dynamic-slot-width="true">
|
||||
<v-btn color="error" small @click="resetMainsail">
|
||||
{{ $t('Settings.GeneralTab.FactoryReset') }}
|
||||
</v-btn>
|
||||
<settings-general-tab-reset-database />
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
<v-dialog v-model="dialogBackupMainsail" persistent :width="360">
|
||||
<panel
|
||||
:title="$t('Settings.GeneralTab.Backup')"
|
||||
card-class="mainsail-backup-dialog"
|
||||
:margin-bottom="false"
|
||||
:icon="mdiHelpCircle">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="dialogBackupMainsail = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0">{{ $t('Settings.GeneralTab.BackupDialog') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="pl-6">
|
||||
<template v-for="db in mainsailKeys">
|
||||
<v-checkbox
|
||||
:key="db.name"
|
||||
:label="db.label"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="changeNamespace(db.name)" />
|
||||
</template>
|
||||
<v-checkbox
|
||||
v-if="availableNamespaces.includes('timelapse')"
|
||||
:label="$t('Settings.GeneralTab.DbTimelapseSettings')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="changeNamespace('timelapse')" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="red" :loading="loadings.includes('backupMainsail')" @click="backupMainsail">
|
||||
{{ $t('Settings.GeneralTab.Backup') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogResetMainsail" persistent :width="360">
|
||||
<panel
|
||||
:title="$t('Settings.GeneralTab.FactoryReset')"
|
||||
card-class="factory-reset-dialog"
|
||||
:margin-bottom="false"
|
||||
:icon="mdiHelpCircle">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="dialogResetMainsail = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0">{{ $t('Settings.GeneralTab.FactoryDialog') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="pl-6">
|
||||
<template v-for="db in mainsailKeys">
|
||||
<v-checkbox
|
||||
:key="db.name"
|
||||
:label="db.label"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="changeNamespace(db.name)" />
|
||||
</template>
|
||||
<v-checkbox
|
||||
v-if="availableNamespaces.includes('timelapse')"
|
||||
:label="$t('Settings.GeneralTab.DbTimelapseSettings')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="changeNamespace('timelapse')" />
|
||||
<v-checkbox
|
||||
v-if="moonrakerComponents.includes('history')"
|
||||
:label="$t('Settings.GeneralTab.DbHistoryJobs')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="changeNamespace('history_jobs')" />
|
||||
<v-checkbox
|
||||
v-if="moonrakerComponents.includes('history')"
|
||||
:label="$t('Settings.GeneralTab.DbHistoryTotals')"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="changeNamespace('history_totals')" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn
|
||||
color="red"
|
||||
:loading="loadings.includes('resetMainsail')"
|
||||
@click="resetMainsailAction">
|
||||
{{ $t('Settings.GeneralTab.Reset') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogRestoreMainsail" persistent :width="360">
|
||||
<panel
|
||||
:title="$t('Settings.GeneralTab.Restore')"
|
||||
card-class="factory-reset-dialog"
|
||||
:margin-bottom="false"
|
||||
:icon="mdiHelpCircle">
|
||||
<template #buttons>
|
||||
<v-btn icon tile @click="dialogRestoreMainsail = false">
|
||||
<v-icon>{{ mdiCloseThick }}</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col>
|
||||
<p class="mb-0">{{ $t('Settings.GeneralTab.RestoreDialog') }}</p>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="pl-6">
|
||||
<template v-for="db in restoreableNamespaces">
|
||||
<v-checkbox
|
||||
:key="db.name"
|
||||
:label="db.label"
|
||||
hide-details
|
||||
class="mt-0"
|
||||
@change="changeNamespace(db.name)" />
|
||||
</template>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="text-center">
|
||||
<v-btn color="red" :loading="loadings.includes('restoreMainsail')" @click="restoreDbAction">
|
||||
{{ $t('Settings.GeneralTab.Restore') }}
|
||||
</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card-text>
|
||||
</panel>
|
||||
</v-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -237,93 +61,27 @@ import { Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import Panel from '@/components/ui/Panel.vue'
|
||||
import Vue from 'vue'
|
||||
import { mdiCloseThick, mdiHelpCircle } from '@mdi/js'
|
||||
import CheckboxList from '@/components/inputs/CheckboxList.vue'
|
||||
import SettingsGeneralTabBackupDatabase from '@/components/settings/General/GeneralBackup.vue'
|
||||
import SettingsGeneralTabRestoreDatabase from '@/components/settings/General/GeneralRestore.vue'
|
||||
import SettingsGeneralTabResetDatabase from '@/components/settings/General/GeneralReset.vue'
|
||||
import SettingsGeneralDatabase from '@/components/mixins/settingsGeneralDatabase'
|
||||
|
||||
@Component({
|
||||
components: { Panel, SettingsRow },
|
||||
components: {
|
||||
Panel,
|
||||
SettingsRow,
|
||||
CheckboxList,
|
||||
SettingsGeneralTabBackupDatabase,
|
||||
SettingsGeneralTabRestoreDatabase,
|
||||
SettingsGeneralTabResetDatabase,
|
||||
},
|
||||
})
|
||||
export default class SettingsGeneralTab extends Mixins(BaseMixin) {
|
||||
export default class SettingsGeneralTab extends Mixins(BaseMixin, SettingsGeneralDatabase) {
|
||||
mdiHelpCircle = mdiHelpCircle
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
private dialogBackupMainsail = false
|
||||
private dialogResetMainsail = false
|
||||
private dialogRestoreMainsail = false
|
||||
|
||||
private dbCheckboxes: string[] = []
|
||||
|
||||
private restoreableNamespaces: { name: string; label: string }[] = []
|
||||
private restoreObjects: any = {}
|
||||
|
||||
private mainsailKeys: { name: string; label: string }[] = []
|
||||
private availableNamespaces: string[] = []
|
||||
|
||||
declare $refs: {
|
||||
uploadBackupFile: HTMLInputElement
|
||||
}
|
||||
|
||||
get availableKeys() {
|
||||
return [
|
||||
{
|
||||
name: 'general',
|
||||
label: this.$t('Settings.GeneralTab.General'),
|
||||
},
|
||||
{
|
||||
name: 'console',
|
||||
label: this.$t('Settings.ConsoleTab.Console'),
|
||||
},
|
||||
{
|
||||
name: 'control',
|
||||
label: this.$t('Settings.ControlTab.Control'),
|
||||
},
|
||||
{
|
||||
name: 'dashboard',
|
||||
label: this.$t('Settings.DashboardTab.Dashboard'),
|
||||
},
|
||||
{
|
||||
name: 'editor',
|
||||
label: this.$t('Settings.EditorTab.Editor'),
|
||||
},
|
||||
{
|
||||
name: 'gcodeViewer',
|
||||
label: this.$t('Settings.GCodeViewerTab.GCodeViewer'),
|
||||
},
|
||||
{
|
||||
name: 'gcodehistory',
|
||||
label: this.$t('Settings.GeneralTab.DbConsoleHistory'),
|
||||
},
|
||||
{
|
||||
name: 'macros',
|
||||
label: this.$t('Settings.MacrosTab.Macros'),
|
||||
},
|
||||
{
|
||||
name: 'notifications',
|
||||
label: this.$t('App.Notifications.Notifications'),
|
||||
},
|
||||
{
|
||||
name: 'presets',
|
||||
label: this.$t('Settings.PresetsTab.PreheatPresets'),
|
||||
},
|
||||
{
|
||||
name: 'remoteprinters',
|
||||
label: this.$t('Settings.RemotePrintersTab.RemotePrinters'),
|
||||
},
|
||||
{
|
||||
name: 'timelapse',
|
||||
label: this.$t('Settings.TimelapseTab.Timelapse'),
|
||||
},
|
||||
{
|
||||
name: 'uiSettings',
|
||||
label: this.$t('Settings.UiSettingsTab.UiSettings'),
|
||||
},
|
||||
{
|
||||
name: 'view',
|
||||
label: this.$t('Settings.GeneralTab.DbView'),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
get printerName() {
|
||||
return this.$store.state.gui.general.printername
|
||||
}
|
||||
@@ -459,154 +217,5 @@ export default class SettingsGeneralTab extends Mixins(BaseMixin) {
|
||||
set calcEtaTime(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'general.calcEtaTime', value: newVal })
|
||||
}
|
||||
|
||||
get moonrakerDbNamespaces() {
|
||||
return this.$store.state.server.dbNamespaces ?? []
|
||||
}
|
||||
|
||||
get moonrakerComponents() {
|
||||
return this.$store.state.server.components ?? []
|
||||
}
|
||||
|
||||
async refreshNamespaces() {
|
||||
this.availableNamespaces = []
|
||||
|
||||
const url = this.$store.getters['socket/getUrl'] + '/server/database/list'
|
||||
const response = await fetch(url)
|
||||
if (response) {
|
||||
const objects = await response.json()
|
||||
this.availableNamespaces = [...(objects.result?.namespaces || {})] ?? []
|
||||
}
|
||||
}
|
||||
|
||||
async refreshMainsailKeys() {
|
||||
this.mainsailKeys = []
|
||||
|
||||
const url = this.$store.getters['socket/getUrl'] + '/server/database/item?namespace=mainsail'
|
||||
const response = await fetch(url)
|
||||
if (response) {
|
||||
const objects = await response.json()
|
||||
if (objects?.result?.value) {
|
||||
Object.keys(objects?.result?.value).forEach((tmp: string) => {
|
||||
if (tmp !== 'initVersion') {
|
||||
const namespace = this.availableKeys.find((namespace) => namespace.name === tmp)
|
||||
const tmpNamespace = namespace ? namespace : { name: tmp, label: tmp }
|
||||
this.mainsailKeys.push(tmpNamespace)
|
||||
}
|
||||
})
|
||||
|
||||
this.mainsailKeys = this.mainsailKeys.sort((a, b) => {
|
||||
if (a.name === 'general') return -1
|
||||
if (b.name === 'general') return 1
|
||||
|
||||
const stringA = a.label.toString().toLowerCase()
|
||||
const stringB = b.label.toString().toLowerCase()
|
||||
|
||||
if (stringA < stringB) return -1
|
||||
if (stringA > stringB) return 1
|
||||
|
||||
return 0
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
changeNamespace(name: string) {
|
||||
if (this.dbCheckboxes.includes(name)) {
|
||||
const index = this.dbCheckboxes.indexOf(name)
|
||||
if (index >= 0) this.dbCheckboxes.splice(index, 1)
|
||||
} else this.dbCheckboxes.push(name)
|
||||
}
|
||||
|
||||
async resetMainsail() {
|
||||
await this.refreshNamespaces()
|
||||
if (this.availableNamespaces.includes('mainsail')) await this.refreshMainsailKeys()
|
||||
else this.mainsailKeys = []
|
||||
|
||||
this.dbCheckboxes = []
|
||||
this.dialogResetMainsail = true
|
||||
}
|
||||
|
||||
async resetMainsailAction() {
|
||||
await this.$store.dispatch('socket/addLoading', 'resetMainsail')
|
||||
await this.$store.dispatch('gui/resetMoonrakerDB', this.dbCheckboxes)
|
||||
}
|
||||
|
||||
async backupDb() {
|
||||
await this.$store.dispatch('socket/addLoading', 'backupDbButton')
|
||||
await this.refreshNamespaces()
|
||||
if (this.availableNamespaces.includes('mainsail')) await this.refreshMainsailKeys()
|
||||
else this.mainsailKeys = []
|
||||
|
||||
this.dbCheckboxes = []
|
||||
this.dialogBackupMainsail = true
|
||||
}
|
||||
|
||||
async backupMainsail() {
|
||||
await this.$store.dispatch('socket/addLoading', 'backupMainsail')
|
||||
await this.$store.dispatch('gui/backupMoonrakerDB', this.dbCheckboxes)
|
||||
await this.$store.dispatch('socket/removeLoading', 'backupMainsail')
|
||||
this.dialogBackupMainsail = false
|
||||
}
|
||||
|
||||
async restoreDb() {
|
||||
await this.$store.dispatch('socket/addLoading', 'restoreUploadButton')
|
||||
this.$refs?.uploadBackupFile?.click()
|
||||
}
|
||||
|
||||
uploadRestore() {
|
||||
if (this.$refs.uploadBackupFile.files?.length) {
|
||||
const backup = this.$refs.uploadBackupFile.files[0]
|
||||
if (backup) {
|
||||
const reader = new FileReader()
|
||||
reader.readAsText(backup, 'UTF-8')
|
||||
reader.onload = (evt) => {
|
||||
this.restoreableNamespaces = []
|
||||
try {
|
||||
this.restoreObjects = JSON.parse(evt?.target?.result + '')
|
||||
|
||||
Object.keys(this.restoreObjects).forEach((tmp: string) => {
|
||||
const namespace = this.availableKeys.find((namespace) => namespace.name === tmp)
|
||||
const tmpNamespace = namespace ? namespace : { name: tmp, label: tmp }
|
||||
|
||||
this.restoreableNamespaces.push(tmpNamespace)
|
||||
})
|
||||
|
||||
this.restoreableNamespaces = this.restoreableNamespaces.sort((a, b) => {
|
||||
if (a.name === 'general') return -1
|
||||
if (b.name === 'general') return 1
|
||||
|
||||
const stringA = a.label.toString().toLowerCase()
|
||||
const stringB = b.label.toString().toLowerCase()
|
||||
|
||||
if (stringA < stringB) return -1
|
||||
if (stringA > stringB) return 1
|
||||
|
||||
return 0
|
||||
})
|
||||
|
||||
this.dbCheckboxes = []
|
||||
this.dialogRestoreMainsail = true
|
||||
} catch (e) {
|
||||
Vue.$toast.error(this.$t('Settings.GeneralTab.CannotReadJson') + '')
|
||||
}
|
||||
}
|
||||
reader.onerror = (evt) => {
|
||||
window.console.error(evt)
|
||||
}
|
||||
}
|
||||
|
||||
this.$refs.uploadBackupFile.value = ''
|
||||
}
|
||||
}
|
||||
|
||||
async restoreDbAction() {
|
||||
this.$store.dispatch('socket/addLoading', 'restoreDbAction')
|
||||
|
||||
this.$store.dispatch('gui/restoreMoonrakerDB', {
|
||||
dbCheckboxes: this.dbCheckboxes,
|
||||
restoreObjects: this.restoreObjects,
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,336 +1,69 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-card v-if="!form.bool && !cooldownForm.bool" flat>
|
||||
<presets-form v-if="boolForm" :preset="formPreset" @close="boolForm = false" />
|
||||
<presets-form-cooldown
|
||||
v-else-if="boolFormCooldown"
|
||||
:input-gcode="cooldownGcode"
|
||||
@close="boolFormCooldown = false" />
|
||||
<v-card v-else flat>
|
||||
<v-card-text>
|
||||
<h3 class="text-h5 mb-3">{{ $t('Settings.PresetsTab.PreheatPresets') }}</h3>
|
||||
<div v-for="(preset, key) in presets" :key="preset.index">
|
||||
<v-divider v-if="key" class="my-2"></v-divider>
|
||||
<settings-row :title="preset.name" :sub-title="getSubTitle(preset)">
|
||||
<v-btn small outlined class="ml-3" @click="editPreset(preset)">
|
||||
<v-icon left small>{{ mdiPencil }}</v-icon>
|
||||
{{ $t('Settings.Edit') }}
|
||||
</v-btn>
|
||||
<v-btn
|
||||
small
|
||||
outlined
|
||||
class="ml-3 minwidth-0 px-2"
|
||||
color="error"
|
||||
@click="deletePreset(preset.id)">
|
||||
<v-icon small>{{ mdiDelete }}</v-icon>
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
<v-divider v-if="key" class="my-2" />
|
||||
<presets-entry :preset="preset" @edit="edit" />
|
||||
</div>
|
||||
<v-divider v-if="presets.length" class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Settings.PresetsTab.Cooldown').toString()">
|
||||
<v-btn small outlined class="ml-3" @click="editCooldown">
|
||||
<v-icon left small>{{ mdiPencil }}</v-icon>
|
||||
{{ $t('Settings.Edit') }}
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
<v-divider v-if="presets.length" class="my-2" />
|
||||
<presets-entry-cooldown @edit="boolFormCooldown = true" />
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text color="primary" @click="createPreset">{{ $t('Settings.PresetsTab.AddPreset') }}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
<v-card v-else-if="form.bool" flat>
|
||||
<v-form v-model="form.valid" @submit.prevent="savePreset">
|
||||
<v-card-title>
|
||||
{{
|
||||
form.id === null
|
||||
? $t('Settings.PresetsTab.CreateHeadline')
|
||||
: $t('Settings.PresetsTab.EditHeadline')
|
||||
}}
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-row v-if="form.boolInvalidMin" class="mt-3">
|
||||
<v-col class="py-0">
|
||||
<v-alert dense text type="error">{{ $t('Settings.PresetsTab.PresetInfo') }}</v-alert>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<settings-row :title="$t('Settings.PresetsTab.Name').toString()">
|
||||
<v-text-field
|
||||
v-model="form.name"
|
||||
:placeholder="$t('Settings.PresetsTab.PresetNamePlaceholder')"
|
||||
hide-details="auto"
|
||||
:rules="[rules.required, rules.unique]"
|
||||
:append-icon="form.name !== '' ? mdiCloseCircle : {}"
|
||||
dense
|
||||
outlined
|
||||
@click:append="form.name !== '' ? (form.name = '') : {}"></v-text-field>
|
||||
</settings-row>
|
||||
<div v-for="heater of heaters" :key="heater.name">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="convertName(heater.name)">
|
||||
<v-checkbox
|
||||
v-model="form.values[heater.name].bool"
|
||||
hide-details
|
||||
class="shrink mt-0"></v-checkbox>
|
||||
<v-text-field
|
||||
v-model="form.values[heater.name].value"
|
||||
hide-details="auto"
|
||||
:rules="[rules.invalid]"
|
||||
type="number"
|
||||
suffix="°C"
|
||||
dense
|
||||
outlined
|
||||
hide-spin-buttons
|
||||
@focus="$event.target.select()"></v-text-field>
|
||||
</settings-row>
|
||||
</div>
|
||||
<div v-for="fan of temperatureFans" :key="'temperature_fan ' + fan.name">
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="convertName(fan.name)">
|
||||
<v-checkbox
|
||||
v-model="form.values['temperature_fan ' + fan.name].bool"
|
||||
hide-details
|
||||
class="shrink mt-0"></v-checkbox>
|
||||
<v-text-field
|
||||
v-model="form.values['temperature_fan ' + fan.name].value"
|
||||
hide-details="auto"
|
||||
:rules="[rules.invalid]"
|
||||
type="number"
|
||||
suffix="°C"
|
||||
dense
|
||||
outlined
|
||||
hide-spin-buttons
|
||||
@focus="$event.target.select()"></v-text-field>
|
||||
</settings-row>
|
||||
</div>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<settings-row :title="$t('Settings.PresetsTab.CustomGCode').toString()">
|
||||
<v-textarea v-model="form.gcode" outlined hide-details></v-textarea>
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text @click="form.bool = false">
|
||||
{{ $t('Settings.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text type="submit" :disabled="!form.valid">
|
||||
{{
|
||||
form.id === null
|
||||
? $t('Settings.PresetsTab.StoreButton')
|
||||
: $t('Settings.PresetsTab.UpdateButton')
|
||||
}}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
<v-card v-else-if="cooldownForm.bool" flat>
|
||||
<v-form v-model="cooldownForm.valid" @submit.prevent="saveCooldown">
|
||||
<v-card-title>{{ $t('Settings.PresetsTab.EditCooldown') }}</v-card-title>
|
||||
<v-card-text>
|
||||
<settings-row :title="$t('Settings.PresetsTab.CustomGCode').toString()">
|
||||
<v-textarea v-model="cooldownForm.gcode" outlined hide-details></v-textarea>
|
||||
</settings-row>
|
||||
</v-card-text>
|
||||
<v-card-actions class="d-flex justify-end">
|
||||
<v-btn text @click="cooldownForm.bool = false">
|
||||
{{ $t('Settings.Cancel') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" text type="submit">
|
||||
{{ $t('Settings.PresetsTab.UpdateCooldown') }}
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { convertName } from '@/plugins/helpers'
|
||||
import { Component, Mixins } from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import SettingsRow from '@/components/settings/SettingsRow.vue'
|
||||
import { GuiPresetsStatePreset } from '@/store/gui/presets/types'
|
||||
import { mdiDelete, mdiPencil, mdiCloseCircle } from '@mdi/js'
|
||||
|
||||
interface presetForm {
|
||||
bool: boolean
|
||||
valid: boolean
|
||||
name: string
|
||||
gcode: string
|
||||
id: string | null
|
||||
boolInvalidMin: boolean
|
||||
values: {
|
||||
[key: string]: {
|
||||
bool: boolean
|
||||
value: number
|
||||
type: 'heater' | 'temperature_fan'
|
||||
}
|
||||
}
|
||||
}
|
||||
import { mdiDelete, mdiPencil } from '@mdi/js'
|
||||
import PresetsEntry from '@/components/settings/Presets/PresetsEntry.vue'
|
||||
import PresetsEntryCooldown from '@/components/settings/Presets/PresetsEntryCooldown.vue'
|
||||
import PresetsForm from '@/components/settings/Presets/PresetsForm.vue'
|
||||
|
||||
@Component({
|
||||
components: { SettingsRow },
|
||||
components: { PresetsForm, PresetsEntryCooldown, PresetsEntry, SettingsRow },
|
||||
})
|
||||
export default class SettingsPresetsTab extends Mixins(BaseMixin) {
|
||||
mdiPencil = mdiPencil
|
||||
mdiDelete = mdiDelete
|
||||
mdiCloseCircle = mdiCloseCircle
|
||||
|
||||
convertName = convertName
|
||||
boolForm = false
|
||||
boolFormCooldown = false
|
||||
|
||||
private form: presetForm = {
|
||||
bool: false,
|
||||
valid: false,
|
||||
name: '',
|
||||
gcode: '',
|
||||
id: null,
|
||||
boolInvalidMin: false,
|
||||
values: {},
|
||||
}
|
||||
|
||||
private cooldownForm = {
|
||||
bool: false,
|
||||
valid: false,
|
||||
gcode: '',
|
||||
}
|
||||
|
||||
private rules = {
|
||||
required: (value: string) => value !== '' || this.$t('Settings.PresetsTab.ErrorNameRequired'),
|
||||
unique: (value: string) => !this.existsPresetName(value) || this.$t('Settings.PresetsTab.ErrorNameNotUnique'),
|
||||
invalid: (value: string) => parseFloat(value) >= 0 || this.$t('Settings.PresetsTab.ErrorInvalidValue'),
|
||||
}
|
||||
formPreset: GuiPresetsStatePreset = {} as GuiPresetsStatePreset
|
||||
|
||||
get presets() {
|
||||
return this.$store.getters['gui/presets/getPresets'] ?? []
|
||||
}
|
||||
|
||||
get heaters() {
|
||||
return this.$store.getters['printer/getHeaters'] ?? []
|
||||
}
|
||||
|
||||
get temperatureFans() {
|
||||
return this.$store.getters['printer/getTemperatureFans'] ?? []
|
||||
}
|
||||
|
||||
get cooldownGcode() {
|
||||
return this.$store.getters['gui/presets/getCooldownGcode']
|
||||
}
|
||||
|
||||
existsPresetName(name: string) {
|
||||
return (
|
||||
this.presets.findIndex(
|
||||
(preset: GuiPresetsStatePreset) => preset.name === name && preset.id !== this.form.id
|
||||
) !== -1
|
||||
)
|
||||
}
|
||||
|
||||
getSubTitle(preset: GuiPresetsStatePreset) {
|
||||
let output: string[] = []
|
||||
|
||||
Object.keys(preset.values).forEach((key: string) => {
|
||||
const values = preset.values[key]
|
||||
|
||||
if (values.bool) {
|
||||
const name = key.indexOf(' ') ? key.slice(key.indexOf(' ') + 1) : key
|
||||
|
||||
output.push(this.convertName(name) + ': ' + values.value + '°C')
|
||||
}
|
||||
})
|
||||
|
||||
if (preset.gcode) output.push(this.$t('Settings.PresetsTab.CustomGCode').toString())
|
||||
|
||||
return output.join(', ')
|
||||
}
|
||||
|
||||
createPreset() {
|
||||
this.clearForm()
|
||||
this.form.bool = true
|
||||
this.formPreset.id = null
|
||||
this.formPreset.name = ''
|
||||
this.formPreset.values = {}
|
||||
this.formPreset.gcode = ''
|
||||
|
||||
this.boolForm = true
|
||||
}
|
||||
|
||||
clearForm() {
|
||||
this.form.bool = false
|
||||
this.form.id = null
|
||||
this.form.name = ''
|
||||
this.form.gcode = ''
|
||||
this.form.boolInvalidMin = false
|
||||
this.form.values = {}
|
||||
|
||||
for (const heater of this.heaters) {
|
||||
this.form.values[heater.name] = {
|
||||
bool: true,
|
||||
value: 0,
|
||||
type: 'heater',
|
||||
}
|
||||
}
|
||||
|
||||
for (const fan of this.temperatureFans) {
|
||||
this.form.values['temperature_fan ' + fan.name] = {
|
||||
bool: true,
|
||||
value: 0,
|
||||
type: 'temperature_fan',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
editPreset(preset: GuiPresetsStatePreset) {
|
||||
this.form.name = preset.name
|
||||
this.form.id = preset.id ?? null
|
||||
this.form.gcode = preset.gcode
|
||||
this.form.values = {}
|
||||
|
||||
for (const heater of this.heaters) {
|
||||
if (heater.name in preset.values) this.form.values[heater.name] = { ...preset.values[heater.name] }
|
||||
else
|
||||
this.form.values[heater.name] = {
|
||||
bool: false,
|
||||
value: 0,
|
||||
type: 'heater',
|
||||
}
|
||||
}
|
||||
|
||||
for (const fan of this.temperatureFans) {
|
||||
if ('temperature_fan ' + fan.name in preset.values)
|
||||
this.form.values['temperature_fan ' + fan.name] = { ...preset.values['temperature_fan ' + fan.name] }
|
||||
else
|
||||
this.form.values['temperature_fan ' + fan.name] = {
|
||||
bool: false,
|
||||
value: 0,
|
||||
type: 'temperature_fan',
|
||||
}
|
||||
}
|
||||
|
||||
this.form.bool = true
|
||||
}
|
||||
|
||||
savePreset() {
|
||||
let setValues = 0
|
||||
for (const key of Object.keys(this.form.values)) {
|
||||
if (this.form.values[key].bool) setValues++
|
||||
}
|
||||
if (this.form.gcode.length) setValues++
|
||||
|
||||
if (setValues === 0) this.form.boolInvalidMin = true
|
||||
else if (this.form.valid) {
|
||||
const preset: GuiPresetsStatePreset = {
|
||||
name: this.form.name,
|
||||
gcode: this.form.gcode,
|
||||
values: this.form.values,
|
||||
}
|
||||
|
||||
if (this.form.id !== null) {
|
||||
this.$store.dispatch('gui/presets/update', { id: this.form.id, values: preset })
|
||||
} else this.$store.dispatch('gui/presets/store', { values: preset })
|
||||
|
||||
this.clearForm()
|
||||
}
|
||||
}
|
||||
|
||||
editCooldown() {
|
||||
this.cooldownForm.gcode = this.cooldownGcode
|
||||
this.cooldownForm.bool = true
|
||||
}
|
||||
|
||||
saveCooldown() {
|
||||
if (this.cooldownForm.valid) {
|
||||
this.$store.dispatch('gui/presets/saveSetting', { name: 'cooldownGcode', value: this.cooldownForm.gcode })
|
||||
this.cooldownForm.bool = false
|
||||
}
|
||||
}
|
||||
|
||||
deletePreset(id: string) {
|
||||
this.$store.dispatch('gui/presets/delete', id)
|
||||
edit(preset: GuiPresetsStatePreset) {
|
||||
this.formPreset = { ...preset }
|
||||
this.boolForm = true
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-col :class="firstColClasses">
|
||||
<v-row class="d-flex flex-row">
|
||||
<v-col v-if="loading" class="col-auto d-flex justify-center align-center pr-0">
|
||||
<v-progress-circular indeterminate color="primary" :size="24"></v-progress-circular>
|
||||
<v-progress-circular indeterminate color="primary" :size="24" />
|
||||
</v-col>
|
||||
<v-col v-else-if="icon" class="col-auto d-flex justify-center align-center pr-0">
|
||||
<v-icon>{{ icon }}</v-icon>
|
||||
@@ -15,7 +15,7 @@
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col :class="secondColClasses">
|
||||
<slot></slot>
|
||||
<slot />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
@@ -23,6 +23,7 @@
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '../mixins/base'
|
||||
import { TranslateResult } from 'vue-i18n'
|
||||
|
||||
@Component
|
||||
export default class SettingsRow extends Mixins(BaseMixin) {
|
||||
@@ -33,10 +34,10 @@ export default class SettingsRow extends Mixins(BaseMixin) {
|
||||
declare readonly icon: string
|
||||
|
||||
@Prop({ required: true })
|
||||
declare readonly title: string
|
||||
declare readonly title: string | TranslateResult
|
||||
|
||||
@Prop({ required: false })
|
||||
declare readonly subTitle: string
|
||||
declare readonly subTitle: string | TranslateResult
|
||||
|
||||
@Prop({ required: false, default: false })
|
||||
declare readonly dynamicSlotWidth: boolean
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<v-card-text>
|
||||
<h3 class="text-h5 mb-3">{{ $t('Settings.TimelapseTab.General') }}</h3>
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Enabled').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.EnabledDescription').toString()"
|
||||
:title="$t('Settings.TimelapseTab.Enabled')"
|
||||
:sub-title="$t('Settings.TimelapseTab.EnabledDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="enabled"
|
||||
@@ -15,8 +15,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Autorender').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.AutorenderDescription').toString()"
|
||||
:title="$t('Settings.TimelapseTab.Autorender')"
|
||||
:sub-title="$t('Settings.TimelapseTab.AutorenderDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="autorender"
|
||||
@@ -26,8 +26,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Camera').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.CameraDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.Camera')"
|
||||
:sub-title="$t('Settings.TimelapseTab.CameraDescription')">
|
||||
<v-select
|
||||
v-model="camera"
|
||||
:items="cameraOptions"
|
||||
@@ -38,8 +38,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Mode').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ModeDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.Mode')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ModeDescription')">
|
||||
<v-select
|
||||
v-model="mode"
|
||||
:items="modeOptions"
|
||||
@@ -51,8 +51,8 @@
|
||||
<template v-if="mode === 'hyperlapse'">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.HyperlapseCycle').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.HyperlapseCycleDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.HyperlapseCycle')"
|
||||
:sub-title="$t('Settings.TimelapseTab.HyperlapseCycleDescription')">
|
||||
<v-text-field
|
||||
v-model="hyperlapseCycle"
|
||||
type="number"
|
||||
@@ -66,8 +66,8 @@
|
||||
</template>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.PreviewImage').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PreviewImageDescription').toString()"
|
||||
:title="$t('Settings.TimelapseTab.PreviewImage')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PreviewImageDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="previewimage"
|
||||
@@ -77,8 +77,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.SaveFrames').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.SaveFramesDescription').toString()"
|
||||
:title="$t('Settings.TimelapseTab.SaveFrames')"
|
||||
:sub-title="$t('Settings.TimelapseTab.SaveFramesDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="saveframes"
|
||||
@@ -88,8 +88,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.StreamDelayCompensation').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.StreamDelayCompensationDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.StreamDelayCompensation')"
|
||||
:sub-title="$t('Settings.TimelapseTab.StreamDelayCompensationDescription')">
|
||||
<v-text-field
|
||||
v-model="stream_delay_compensation"
|
||||
type="number"
|
||||
@@ -102,8 +102,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.GcodeVerbose').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.GcodeVerboseDescription').toString()"
|
||||
:title="$t('Settings.TimelapseTab.GcodeVerbose')"
|
||||
:sub-title="$t('Settings.TimelapseTab.GcodeVerboseDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="gcode_verbose"
|
||||
@@ -114,8 +114,8 @@
|
||||
<v-divider class="my-2" />
|
||||
<h3 class="text-h5 mt-6 mb-3">{{ $t('Settings.TimelapseTab.Parkhead') }}</h3>
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Parkhead').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkheadDescription').toString()"
|
||||
:title="$t('Settings.TimelapseTab.Parkhead')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkheadDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="parkhead"
|
||||
@@ -126,8 +126,8 @@
|
||||
<template v-if="parkhead">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Parkpos').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkposDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.Parkpos')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkposDescription')">
|
||||
<v-select
|
||||
v-model="parkpos"
|
||||
:items="parkposOptions"
|
||||
@@ -139,8 +139,8 @@
|
||||
<template v-if="['x_only', 'custom'].includes(parkpos)">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.PosX').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosXDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.PosX')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosXDescription')">
|
||||
<v-text-field
|
||||
v-model="park_custom_pos_x"
|
||||
type="number"
|
||||
@@ -155,8 +155,8 @@
|
||||
<template v-if="['y_only', 'custom'].includes(parkpos)">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.PosY').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosYDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.PosY')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosYDescription')">
|
||||
<v-text-field
|
||||
v-model="park_custom_pos_y"
|
||||
type="number"
|
||||
@@ -171,8 +171,8 @@
|
||||
<template v-if="['x_only', 'y_only', 'custom'].includes(parkpos)">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.PosDZ').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosDZDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.PosDZ')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PosDZDescription')">
|
||||
<v-text-field
|
||||
v-model="park_custom_pos_dz"
|
||||
type="number"
|
||||
@@ -186,8 +186,8 @@
|
||||
</template>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.TravelSpeed').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.TravelSpeedDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.TravelSpeed')"
|
||||
:sub-title="$t('Settings.TimelapseTab.TravelSpeedDescription')">
|
||||
<v-text-field
|
||||
v-model="park_travel_speed"
|
||||
type="number"
|
||||
@@ -200,8 +200,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.FwRetract').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.FwRetractDescription').toString()"
|
||||
:title="$t('Settings.TimelapseTab.FwRetract')"
|
||||
:sub-title="$t('Settings.TimelapseTab.FwRetractDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="fw_retract"
|
||||
@@ -212,8 +212,8 @@
|
||||
<template v-if="!fw_retract">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.RetractSpeed').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.RetractSpeedDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.RetractSpeed')"
|
||||
:sub-title="$t('Settings.TimelapseTab.RetractSpeedDescription')">
|
||||
<v-text-field
|
||||
v-model="park_retract_speed"
|
||||
type="number"
|
||||
@@ -226,8 +226,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.RetractDistance').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.RetractDistanceDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.RetractDistance')"
|
||||
:sub-title="$t('Settings.TimelapseTab.RetractDistanceDescription')">
|
||||
<v-text-field
|
||||
v-model="park_retract_distance"
|
||||
type="number"
|
||||
@@ -236,12 +236,12 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('park_retract_distance')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.UnretractSpeed').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.UnretractSpeedDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.UnretractSpeed')"
|
||||
:sub-title="$t('Settings.TimelapseTab.UnretractSpeedDescription')">
|
||||
<v-text-field
|
||||
v-model="park_extrude_speed"
|
||||
type="number"
|
||||
@@ -254,8 +254,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.UnretractDistance').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.UnretractDistanceDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.UnretractDistance')"
|
||||
:sub-title="$t('Settings.TimelapseTab.UnretractDistanceDescription')">
|
||||
<v-text-field
|
||||
v-model="park_extrude_distance"
|
||||
type="number"
|
||||
@@ -269,8 +269,8 @@
|
||||
</template>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.ParkTime').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkTimeDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.ParkTime')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ParkTimeDescription')">
|
||||
<v-text-field
|
||||
v-model="park_time"
|
||||
type="number"
|
||||
@@ -285,8 +285,8 @@
|
||||
<v-divider class="my-2" />
|
||||
<h3 class="text-h5 mt-6 mb-3">{{ $t('Settings.TimelapseTab.RenderingOptions') }}</h3>
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.VariableFps').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsDescription').toString()"
|
||||
:title="$t('Settings.TimelapseTab.VariableFps')"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch
|
||||
v-model="variable_fps"
|
||||
@@ -297,8 +297,8 @@
|
||||
<template v-if="variable_fps">
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Targetlength').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.TargetlengthDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.Targetlength')"
|
||||
:sub-title="$t('Settings.TimelapseTab.TargetlengthDescription')">
|
||||
<v-text-field
|
||||
v-model="targetlength"
|
||||
type="number"
|
||||
@@ -307,12 +307,12 @@
|
||||
outlined
|
||||
dense
|
||||
:disabled="blockedsettings.includes('targetlength')"
|
||||
hide-spin-buttons></v-text-field>
|
||||
hide-spin-buttons />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.VariableFpsMin').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsMinDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.VariableFpsMin')"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsMinDescription')">
|
||||
<v-text-field
|
||||
v-model="variable_fps_min"
|
||||
type="number"
|
||||
@@ -325,8 +325,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.VariableFpsMax').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsMaxDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.VariableFpsMax')"
|
||||
:sub-title="$t('Settings.TimelapseTab.VariableFpsMaxDescription')">
|
||||
<v-text-field
|
||||
v-model="variable_fps_max"
|
||||
type="number"
|
||||
@@ -341,8 +341,8 @@
|
||||
<template v-else>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.OutputFramerate').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.OutputFramerateDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.OutputFramerate')"
|
||||
:sub-title="$t('Settings.TimelapseTab.OutputFramerateDescription')">
|
||||
<v-text-field
|
||||
v-model="output_framerate"
|
||||
type="number"
|
||||
@@ -356,8 +356,8 @@
|
||||
</template>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.duplicatelastframe').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.duplicatelastframeDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.duplicatelastframe')"
|
||||
:sub-title="$t('Settings.TimelapseTab.duplicatelastframeDescription')">
|
||||
<v-text-field
|
||||
v-model="duplicatelastframe"
|
||||
type="number"
|
||||
@@ -369,8 +369,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.ConstantRateFactor').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ConstantRateFactorDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.ConstantRateFactor')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ConstantRateFactorDescription')">
|
||||
<v-text-field
|
||||
v-model="constant_rate_factor"
|
||||
type="number"
|
||||
@@ -382,8 +382,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Pixelformat').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.PixelformatDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.Pixelformat')"
|
||||
:sub-title="$t('Settings.TimelapseTab.PixelformatDescription')">
|
||||
<v-text-field
|
||||
v-model="pixelformat"
|
||||
type="text"
|
||||
@@ -394,8 +394,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.TimeFormatCode').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.TimeFormatCodeDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.TimeFormatCode')"
|
||||
:sub-title="$t('Settings.TimelapseTab.TimeFormatCodeDescription')">
|
||||
<v-text-field
|
||||
v-model="time_format_code"
|
||||
type="text"
|
||||
@@ -406,8 +406,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.TimelapseTab.Extraoutputparams').toString()"
|
||||
:sub-title="$t('Settings.TimelapseTab.ExtraoutputparamsDescription').toString()">
|
||||
:title="$t('Settings.TimelapseTab.Extraoutputparams')"
|
||||
:sub-title="$t('Settings.TimelapseTab.ExtraoutputparamsDescription')">
|
||||
<v-text-field
|
||||
v-model="extraoutputparams"
|
||||
type="text"
|
||||
@@ -483,11 +483,11 @@ export default class SettingsTimelapseTab extends Mixins(BaseMixin) {
|
||||
const output: any = []
|
||||
|
||||
webcams
|
||||
.filter((webcam: GuiWebcamStateWebcam) => webcam.urlSnapshot !== '')
|
||||
.filter((webcam: GuiWebcamStateWebcam) => webcam.snapshot_url !== '')
|
||||
.forEach((webcam: GuiWebcamStateWebcam) => {
|
||||
output.push({
|
||||
text: webcam.name,
|
||||
value: webcam.id,
|
||||
value: webcam.name,
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<v-card flat>
|
||||
<v-card-text>
|
||||
<settings-row :title="$t('Settings.UiSettingsTab.Logo').toString()">
|
||||
<settings-row :title="$t('Settings.UiSettingsTab.Logo')">
|
||||
<v-btn
|
||||
v-if="logoColor.toLowerCase() !== defaultLogoColor.toLowerCase()"
|
||||
small
|
||||
@@ -19,11 +19,11 @@
|
||||
:value="logoColor"
|
||||
hide-mode-switch
|
||||
mode="rgba"
|
||||
@update:color="updateLogoColor"></v-color-picker>
|
||||
@update:color="updateLogoColor" />
|
||||
</v-menu>
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row :title="$t('Settings.UiSettingsTab.Primary').toString()">
|
||||
<settings-row :title="$t('Settings.UiSettingsTab.Primary')">
|
||||
<v-btn
|
||||
v-if="primaryColor.toLowerCase() !== defaultPrimaryColor.toLowerCase()"
|
||||
small
|
||||
@@ -45,8 +45,8 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.GcodeThumbnails').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.GcodeThumbnailsDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.GcodeThumbnails')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.GcodeThumbnailsDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-btn
|
||||
outlined
|
||||
@@ -54,27 +54,27 @@
|
||||
color="primary"
|
||||
href="https://docs.mainsail.xyz/overview/features/thumbnails"
|
||||
target="_blank">
|
||||
{{ $t('Settings.UiSettingsTab.Guide').toString() }}
|
||||
{{ $t('Settings.UiSettingsTab.Guide') }}
|
||||
</v-btn>
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.BoolBigThumbnail').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.BoolBigThumbnailDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.BoolBigThumbnail')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.BoolBigThumbnailDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolBigThumbnail" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.DisplayCANCEL_PRINT').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.DisplayCANCEL_PRINTDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.DisplayCANCEL_PRINT')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.DisplayCANCEL_PRINTDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="displayCancelPrint" hide-details class="mt-0"></v-switch>
|
||||
<v-switch v-model="displayCancelPrint" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.LockSliders').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.LockSlidersDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.LockSliders')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.LockSlidersDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="lockSliders" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
@@ -82,8 +82,8 @@
|
||||
<v-expand-transition>
|
||||
<settings-row
|
||||
v-show="lockSliders"
|
||||
:title="$t('Settings.UiSettingsTab.LockSlidersDelay').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.LockSlidersDelayDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.LockSlidersDelay')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.LockSlidersDelayDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-text-field
|
||||
v-model="lockSlidersDelay"
|
||||
@@ -104,22 +104,22 @@
|
||||
</v-expand-transition>
|
||||
<v-divider v-show="lockSliders" class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.ConfirmOnEmergencyStop').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ConfirmOnEmergencyStopDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.ConfirmOnEmergencyStop')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ConfirmOnEmergencyStopDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="confirmOnEmergencyStop" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.ConfirmOnPowerDeviceChange').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ConfirmOnPowerDeviceChangeDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.ConfirmOnPowerDeviceChange')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ConfirmOnPowerDeviceChangeDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="confirmOnPowerDeviceChange" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.NavigationStyle').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.NavigationStyleDescription').toString()">
|
||||
:title="$t('Settings.UiSettingsTab.NavigationStyle')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.NavigationStyleDescription')">
|
||||
<v-select
|
||||
v-model="navigationStyleSetting"
|
||||
:items="navigationStyles"
|
||||
@@ -130,15 +130,27 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.BoolHideUploadAndPrintButton').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.BoolHideUploadAndPrintButtonDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.DefaultNavigationState')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.DefaultNavigationStateDescription')">
|
||||
<v-select
|
||||
v-model="defaultNavigationStateSetting"
|
||||
:items="defaultNavigationStateSettings"
|
||||
class="mt-0"
|
||||
hide-details
|
||||
outlined
|
||||
dense />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.BoolHideUploadAndPrintButton')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.BoolHideUploadAndPrintButtonDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolHideUploadAndPrintButton" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2"></v-divider>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.PowerDeviceName').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.PowerDeviceNameDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.PowerDeviceName')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.PowerDeviceNameDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-select
|
||||
v-model="powerDeviceName"
|
||||
@@ -150,43 +162,43 @@
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.HideSaveConfigButtonForBedMesh').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.HideSaveConfigButtonForBedMeshDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.HideSaveConfigButtonForBedMesh')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.HideSaveConfigButtonForBedMeshDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="hideSaveConfigForBedMash" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.DisableFanAnimation').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.DisableFanAnimationDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.DisableFanAnimation')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.DisableFanAnimationDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="disableFanAnimation" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.ManualProbeDialog').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ManualProbeDialogDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.ManualProbeDialog')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ManualProbeDialogDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolManualProbeDialog" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.BedScrewsDialog').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.BedScrewsDialogDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.BedScrewsDialog')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.BedScrewsDialogDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolBedScrewsDialog" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.ScrewsTiltAdjustDialog').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ScrewsTiltAdjustDialogDescription').toString()"
|
||||
:title="$t('Settings.UiSettingsTab.ScrewsTiltAdjustDialog')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.ScrewsTiltAdjustDialogDescription')"
|
||||
:dynamic-slot-width="true">
|
||||
<v-switch v-model="boolScrewsTiltAdjustDialog" hide-details class="mt-0" />
|
||||
</settings-row>
|
||||
<v-divider class="my-2" />
|
||||
<settings-row
|
||||
:title="$t('Settings.UiSettingsTab.TempchartHeight').toString()"
|
||||
:sub-title="$t('Settings.UiSettingsTab.TempchartHeightDescription').toString()">
|
||||
:title="$t('Settings.UiSettingsTab.TempchartHeight')"
|
||||
:sub-title="$t('Settings.UiSettingsTab.TempchartHeightDescription')">
|
||||
<v-slider
|
||||
v-model.lazy="tempchartHeight"
|
||||
hide-details
|
||||
@@ -224,8 +236,8 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) {
|
||||
mdiRestart = mdiRestart
|
||||
mdiTimerOutline = mdiTimerOutline
|
||||
|
||||
private defaultLogoColor = defaultLogoColor
|
||||
private defaultPrimaryColor = defaultPrimaryColor
|
||||
defaultLogoColor = defaultLogoColor
|
||||
defaultPrimaryColor = defaultPrimaryColor
|
||||
|
||||
get logoColor() {
|
||||
return this.$store.state.gui.uiSettings.logo
|
||||
@@ -318,6 +330,31 @@ export default class SettingsUiSettingsTab extends Mixins(BaseMixin) {
|
||||
]
|
||||
}
|
||||
|
||||
get defaultNavigationStateSetting() {
|
||||
return this.$store.state.gui.uiSettings.defaultNavigationStateSetting
|
||||
}
|
||||
|
||||
set defaultNavigationStateSetting(newVal) {
|
||||
this.$store.dispatch('gui/saveSetting', { name: 'uiSettings.defaultNavigationStateSetting', value: newVal })
|
||||
}
|
||||
|
||||
get defaultNavigationStateSettings() {
|
||||
return [
|
||||
{
|
||||
text: this.$t('Settings.UiSettingsTab.DefaultNavigationStateAlwaysOpen'),
|
||||
value: 'alwaysOpen',
|
||||
},
|
||||
{
|
||||
text: this.$t('Settings.UiSettingsTab.DefaultNavigationStateAlwaysClosed'),
|
||||
value: 'alwaysClosed',
|
||||
},
|
||||
{
|
||||
text: this.$t('Settings.UiSettingsTab.DefaultNavigationStateLastState'),
|
||||
value: 'lastState',
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
get boolHideUploadAndPrintButton() {
|
||||
return this.$store.state.gui.uiSettings.boolHideUploadAndPrintButton ?? false
|
||||
}
|
||||
|
||||
@@ -102,6 +102,15 @@
|
||||
:label="$t('Settings.WebcamsTab.Rotate')" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="hasFpsCounter">
|
||||
<v-col class="pt-1 pb-3">
|
||||
<v-checkbox
|
||||
v-model="hideFps"
|
||||
class="mt-1"
|
||||
hide-details
|
||||
:label="$t('Settings.WebcamsTab.HideFps')" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col class="pt-1 pb-3">
|
||||
<div class="v-label v-label--active theme--dark text-subtitle-1">
|
||||
@@ -250,6 +259,27 @@ export default class WebcamForm extends Mixins(BaseMixin, WebcamMixin) {
|
||||
return classes
|
||||
}
|
||||
|
||||
get hasFpsCounter() {
|
||||
return ['mjpegstreamer', 'mjpegstreamer-adaptive'].includes(this.webcam.service)
|
||||
}
|
||||
|
||||
get hideFps() {
|
||||
return this.webcam.extra_data?.hideFps ?? false
|
||||
}
|
||||
|
||||
set hideFps(newVal) {
|
||||
if (!('extra_data' in this.webcam)) {
|
||||
this.webcam.extra_data = {
|
||||
hideFps: newVal,
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
this.webcam.extra_data.hideFps = newVal
|
||||
}
|
||||
|
||||
mounted() {
|
||||
this.oldWebcamName = this.webcam.name
|
||||
}
|
||||
|
||||
@@ -36,17 +36,16 @@ export default class Hlsstreamer extends Mixins(BaseMixin, WebcamMixin) {
|
||||
|
||||
get webcamStyle() {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
aspectRatio: 16 / 9,
|
||||
maxHeight: window.innerHeight - 155 + 'px',
|
||||
maxWidth: 'auto',
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) return { transform: transforms.trimStart() }
|
||||
|
||||
if (this.aspectRatio) {
|
||||
output.aspectRatio = this.aspectRatio
|
||||
output.maxWidth = (window.innerHeight - 155) * this.aspectRatio + 'px'
|
||||
|
||||
@@ -20,12 +20,13 @@ export default class Ipstreamer extends Mixins(BaseMixin, WebcamMixin) {
|
||||
}
|
||||
|
||||
get webcamStyle() {
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) return { transform: transforms.trimStart() }
|
||||
|
||||
return ''
|
||||
return {
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
visibilityChanged(isVisible: boolean) {
|
||||
|
||||
@@ -34,12 +34,13 @@ export default class JMuxerStreamer extends Mixins(BaseMixin, WebcamMixin) {
|
||||
}
|
||||
|
||||
get webcamStyle() {
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) return { transform: transforms.trimStart() }
|
||||
|
||||
return ''
|
||||
return {
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
mounted() {
|
||||
|
||||
@@ -24,9 +24,10 @@ import { JanusJs, JanusSession, JanusStreamingPlugin } from 'typed_janus_js'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { ConstructorOptions } from 'typed_janus_js/src/interfaces/janus'
|
||||
import { GuiWebcamStateWebcam } from '@/store/gui/webcams/types'
|
||||
import WebcamMixin from '@/components/mixins/webcam'
|
||||
|
||||
@Component
|
||||
export default class JanusStreamer extends Mixins(BaseMixin) {
|
||||
export default class JanusStreamer extends Mixins(BaseMixin, WebcamMixin) {
|
||||
private janusClient: JanusJs | null = null
|
||||
private session: JanusSession | null = null
|
||||
private handle: JanusStreamingPlugin | null = null
|
||||
@@ -60,15 +61,14 @@ export default class JanusStreamer extends Mixins(BaseMixin) {
|
||||
|
||||
get webcamStyle() {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
aspectRatio: 16 / 9,
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) output.transform = transforms.trimStart()
|
||||
|
||||
if (this.aspectRatio) output.aspectRatio = this.aspectRatio
|
||||
|
||||
return output
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
class="webcamImage"
|
||||
:style="webcamStyle"
|
||||
@load="onload" />
|
||||
<span v-if="showFps" class="webcamFpsOutput">{{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }}</span>
|
||||
<span v-if="showFpsCounter" class="webcamFpsOutput">{{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -50,17 +50,16 @@ export default class Mjpegstreamer extends Mixins(BaseMixin, WebcamMixin) {
|
||||
|
||||
get webcamStyle() {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
aspectRatio: 16 / 9,
|
||||
maxHeight: window.innerHeight - 155 + 'px',
|
||||
maxWidth: 'auto',
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) output.transform = transforms.trimStart()
|
||||
|
||||
if (this.aspectRatio) {
|
||||
output.aspectRatio = this.aspectRatio
|
||||
output.maxWidth = (window.innerHeight - 155) * this.aspectRatio + 'px'
|
||||
@@ -73,6 +72,12 @@ export default class Mjpegstreamer extends Mixins(BaseMixin, WebcamMixin) {
|
||||
return this.currentFPS < 10 ? '0' + this.currentFPS.toString() : this.currentFPS
|
||||
}
|
||||
|
||||
get showFpsCounter() {
|
||||
if (!this.showFps) return false
|
||||
|
||||
return !(this.camSettings.extra_data?.hideFps ?? false)
|
||||
}
|
||||
|
||||
startStream() {
|
||||
if (this.streamState) return
|
||||
this.streamState = true
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
height="400"
|
||||
:style="webcamStyle"
|
||||
:class="'webcamImage ' + (isLoaded ? '' : 'hiddenWebcam')"></canvas>
|
||||
<span v-if="isLoaded && showFps" class="webcamFpsOutput">
|
||||
<span v-if="isLoaded && showFpsCounter" class="webcamFpsOutput">
|
||||
{{ $t('Panels.WebcamPanel.FPS') }}: {{ fpsOutput }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -21,9 +21,10 @@ import Component from 'vue-class-component'
|
||||
import { Mixins, Prop, Watch } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { GuiWebcamStateWebcam } from '@/store/gui/webcams/types'
|
||||
import WebcamMixin from '@/components/mixins/webcam'
|
||||
|
||||
@Component
|
||||
export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
export default class MjpegstreamerAdaptive extends Mixins(BaseMixin, WebcamMixin) {
|
||||
private refresh = Math.ceil(Math.random() * Math.pow(10, 12))
|
||||
private isVisible = true
|
||||
private isVisibleDocument = true
|
||||
@@ -51,18 +52,16 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
|
||||
get webcamStyle() {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
aspectRatio: 16 / 9,
|
||||
maxHeight: window.innerHeight - 155 + 'px',
|
||||
maxWidth: 'auto',
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
if (this.camSettings.flip_horizontal ?? false) transforms += ' scaleX(-1)'
|
||||
if (this.camSettings.flip_vertical ?? false) transforms += ' scaleY(-1)'
|
||||
if ((this.camSettings.rotation ?? 0) === 180) transforms += ' rotate(180deg)'
|
||||
if (transforms.trimStart().length) output.transform = transforms.trimStart()
|
||||
|
||||
if (this.aspectRatio) {
|
||||
output.aspectRatio = this.aspectRatio
|
||||
output.maxWidth = (window.innerHeight - 155) * this.aspectRatio + 'px'
|
||||
@@ -75,6 +74,12 @@ export default class MjpegstreamerAdaptive extends Mixins(BaseMixin) {
|
||||
return this.currentFPS < 10 ? '0' + this.currentFPS.toString() : this.currentFPS
|
||||
}
|
||||
|
||||
get showFpsCounter() {
|
||||
if (!this.showFps) return false
|
||||
|
||||
return !(this.camSettings.extra_data?.hideFps ?? false)
|
||||
}
|
||||
|
||||
get rotate() {
|
||||
return [90, 270].includes(this.camSettings.rotation ?? 0)
|
||||
}
|
||||
|
||||
@@ -35,17 +35,16 @@ export default class Uv4lMjpeg extends Mixins(BaseMixin, WebcamMixin) {
|
||||
|
||||
get webcamStyle() {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
aspectRatio: 16 / 9,
|
||||
maxHeight: window.innerHeight - 155 + 'px',
|
||||
maxWidth: 'auto',
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) output.transform = transforms.trimStart()
|
||||
|
||||
if (this.aspectRatio) {
|
||||
output.aspectRatio = this.aspectRatio
|
||||
output.maxWidth = (window.innerHeight - 155) * this.aspectRatio + 'px'
|
||||
|
||||
@@ -21,9 +21,10 @@
|
||||
import { Component, Mixins, Prop, Ref, Watch } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { GuiWebcamStateWebcam } from '@/store/gui/webcams/types'
|
||||
import WebcamMixin from '@/components/mixins/webcam'
|
||||
|
||||
@Component
|
||||
export default class WebrtcCameraStreamer extends Mixins(BaseMixin) {
|
||||
export default class WebrtcCameraStreamer extends Mixins(BaseMixin, WebcamMixin) {
|
||||
private pc: RTCPeerConnection | null = null
|
||||
private useStun = false
|
||||
private remote_pc_id: string | null = null
|
||||
@@ -46,15 +47,14 @@ export default class WebrtcCameraStreamer extends Mixins(BaseMixin) {
|
||||
|
||||
get webcamStyle() {
|
||||
const output = {
|
||||
transform: 'none',
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
aspectRatio: 16 / 9,
|
||||
}
|
||||
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) output.transform = transforms.trimStart()
|
||||
|
||||
if (this.aspectRatio) output.aspectRatio = this.aspectRatio
|
||||
|
||||
return output
|
||||
|
||||
@@ -47,12 +47,13 @@ export default class WebrtcRTSPSimpleServer extends Mixins(BaseMixin, WebcamMixi
|
||||
}
|
||||
|
||||
get webcamStyle() {
|
||||
let transforms = ''
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_horizontal) transforms += ' scaleX(-1)'
|
||||
if ('flipX' in this.camSettings && this.camSettings.flip_vertical) transforms += ' scaleY(-1)'
|
||||
if (transforms.trimStart().length) return { transform: transforms.trimStart() }
|
||||
|
||||
return ''
|
||||
return {
|
||||
transform: this.generateTransform(
|
||||
this.camSettings.flip_horizontal ?? false,
|
||||
this.camSettings.flip_vertical ?? false,
|
||||
this.camSettings.rotation ?? 0
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
get url() {
|
||||
|
||||
@@ -794,8 +794,6 @@
|
||||
"Editor": "Editor",
|
||||
"KlipperRestartMethod": "Metoda restartu Klipperu",
|
||||
"KlipperRestartMethodDescription": "Vyberte metodu restartu, která se použije při editaci konfiguračních souborů Klipperu v \"Uložit a restartovat\".",
|
||||
"MoonrakerRestartInstance": "Restart instance Moonrakeru",
|
||||
"MoonrakerRestartInstanceDescription": "Vyberte, která služba Moonrakeru se restartuje v \"Uložit a restartovat\", když se editují konfigurační soubory Moonrakeru.",
|
||||
"UseEscToClose": "Použít ESC pro zavření editoru",
|
||||
"UseEscToCloseDescription": "Umožňuje použití klávesy ESC k zavření editoru"
|
||||
},
|
||||
|
||||
@@ -793,8 +793,6 @@
|
||||
"Editor": "Editor",
|
||||
"KlipperRestartMethod": "Metode for genstart af Klipper",
|
||||
"KlipperRestartMethodDescription": "Vælg hvilken metode der skal bruges ved brug af 'Gem & Genstart' når der redigeres i Klipper config filer.",
|
||||
"MoonrakerRestartInstance": "Genstart Moonraker instans",
|
||||
"MoonrakerRestartInstanceDescription": "Vælg hvilken instans af Moonraker servicen der skal genstartes ved brug af 'Gem & Genstart' når der redigeres i Moonraker config filer.",
|
||||
"UseEscToClose": "Tryk ESC for at lukke Editor.",
|
||||
"UseEscToCloseDescription": "Tillader at ESC lukker Editor"
|
||||
},
|
||||
|
||||
+8
-2
@@ -680,6 +680,7 @@
|
||||
"Temperature": "Aktuelle Temperatur"
|
||||
},
|
||||
"Headline": "Temperaturen",
|
||||
"HideMcuHostSensors": "Host/MCU Sensoren ausblenden",
|
||||
"Max": "max",
|
||||
"Min": "min",
|
||||
"Name": "Name",
|
||||
@@ -794,6 +795,7 @@
|
||||
"Circle": "Kreis",
|
||||
"Control": "Steuerung",
|
||||
"Cross": "Kreuz",
|
||||
"HideDuringPrint": "Achsensteuerung während des Drucks ausblenden",
|
||||
"EnableXYHoming": "Aktiviere kombiniertes X & Y homing",
|
||||
"EstimatedExtrusionInfo": "Zeige Info zur geschätzten Extrusion",
|
||||
"EstimatedExtrusionInfoDescription": "Anzeigen/ausblenden der Info zur geschätzten Extrusion, basierend auf Extrusionmenge und Extrusionsgeschwindigkeit",
|
||||
@@ -833,8 +835,6 @@
|
||||
"Editor": "Editor",
|
||||
"KlipperRestartMethod": "Klipper Neustartmethode",
|
||||
"KlipperRestartMethodDescription": "Wähle aus, welche Neustartmethode verwendet werden soll wenn 'Speichern & Neustarten' geklickt wir im Editor.",
|
||||
"MoonrakerRestartInstance": "Moonraker Neustartinstanz",
|
||||
"MoonrakerRestartInstanceDescription": "Wähle aus, welche Moonrakerinstanz neu gestartet werden soll wenn 'Speichern & Neustarten' im Editor geklickt wird.",
|
||||
"UseEscToClose": "ESC drücken um Editor zu schließen",
|
||||
"UseEscToCloseDescription": "Erlaubt es den Editor mit ESC zu schließen.",
|
||||
"TabSize": "TAB Größe",
|
||||
@@ -1060,6 +1060,11 @@
|
||||
"ConfirmOnEmergencyStopDescription": "Zeige vor einem Notstop einen Bestätigungsdialog.",
|
||||
"ConfirmOnPowerDeviceChange": "Bestätigung für Änderung der Stromversorgung von Geräten",
|
||||
"ConfirmOnPowerDeviceChangeDescription": "Zeige vor Änderung der Stromversorgung von Geräten einen Bestätigungsdialog.",
|
||||
"DefaultNavigationState": "Standard Navigationszustand",
|
||||
"DefaultNavigationStateAlwaysClosed": "immer geschlossen",
|
||||
"DefaultNavigationStateAlwaysOpen": "immer geöffnet",
|
||||
"DefaultNavigationStateDescription": "Welchen zustand soll die Navigation normalerweise haben?",
|
||||
"DefaultNavigationStateLastState": "letzter Zustand",
|
||||
"DisableFanAnimation": "Lüfteranimation deaktivieren",
|
||||
"DisableFanAnimationDescription": "Dies kann die Last im Browser senken.",
|
||||
"DisplayCANCEL_PRINT": "Zeige CANCEL_PRINT an",
|
||||
@@ -1099,6 +1104,7 @@
|
||||
"EditWebcam": "Webcam bearbeiten",
|
||||
"FlipWebcam": "Webcam-Bild spiegeln:",
|
||||
"Hlsstream": "HLS-Stream",
|
||||
"HideFps": "FPS-Anzeige verstecken",
|
||||
"Horizontally": "horizontal",
|
||||
"IconBed": "Bett",
|
||||
"IconCam": "Kamera",
|
||||
|
||||
+12
-3
@@ -490,6 +490,7 @@
|
||||
"CommittedHoursAgo": "committed {hours} hours ago",
|
||||
"CommittedOnDate": "committed on {date}",
|
||||
"CommittedYesterday": "committed yesterday",
|
||||
"Corrupt": "corrupt",
|
||||
"ConfigChanges": "Config Changes",
|
||||
"CountPackagesCanBeUpgraded": "{count} packages can be upgraded",
|
||||
"Detached": "detached",
|
||||
@@ -680,6 +681,7 @@
|
||||
"Temperature": "current temperature"
|
||||
},
|
||||
"Headline": "Temperatures",
|
||||
"HideMcuHostSensors": "Hide Host/MCU Sensors",
|
||||
"Max": "max",
|
||||
"Min": "min",
|
||||
"Name": "Name",
|
||||
@@ -794,6 +796,7 @@
|
||||
"Circle": "Circle",
|
||||
"Control": "Control",
|
||||
"Cross": "Cross",
|
||||
"HideDuringPrint": "Hide axis controls during print",
|
||||
"EnableXYHoming": "Enable combined X & Y axes homing",
|
||||
"EstimatedExtrusionInfo": "Show estimated extrusion info",
|
||||
"EstimatedExtrusionInfoDescription": "Show / Hide info for estimated extrusions based on extrusion amount and feedrate",
|
||||
@@ -833,8 +836,6 @@
|
||||
"Editor": "Editor",
|
||||
"KlipperRestartMethod": "Klipper restart method",
|
||||
"KlipperRestartMethodDescription": "Select which restart method will be used on 'Save & Restart' when editing Klipper config files.",
|
||||
"MoonrakerRestartInstance": "Moonraker restart instance",
|
||||
"MoonrakerRestartInstanceDescription": "Select which Moonraker service will restart on 'Save & Restart' when editing Moonraker config files.",
|
||||
"UseEscToClose": "Use ESC to close editor",
|
||||
"UseEscToCloseDescription": "Allows the ESC key to close the editor",
|
||||
"TabSize": "TAB Size",
|
||||
@@ -873,6 +874,7 @@
|
||||
"DbConsoleHistory": "Console History",
|
||||
"DbHistoryJobs": "History Jobs",
|
||||
"DbHistoryTotals": "History Totals",
|
||||
"DBNavigation": "Navigation",
|
||||
"DbTimelapseSettings": "Timelapse Settings",
|
||||
"DbView": "View Settings",
|
||||
"EstimateValues": {
|
||||
@@ -889,7 +891,8 @@
|
||||
"Reset": "reset",
|
||||
"Restore": "Restore",
|
||||
"RestoreDialog": "Please select all the sections you want to restore:",
|
||||
"TimeFormat": "Time Format"
|
||||
"TimeFormat": "Time Format",
|
||||
"Everything": "Everything"
|
||||
},
|
||||
"InterfaceSettings": "Interface Settings",
|
||||
"MacrosTab": {
|
||||
@@ -1060,6 +1063,11 @@
|
||||
"ConfirmOnEmergencyStopDescription": "Show a confirmation dialog on Emergency Stop",
|
||||
"ConfirmOnPowerDeviceChange": "Require confirm on Device Power changes",
|
||||
"ConfirmOnPowerDeviceChangeDescription": "Show a confirmation dialog on Device Power changes",
|
||||
"DefaultNavigationState": "Navigation default state",
|
||||
"DefaultNavigationStateAlwaysClosed": "always closed",
|
||||
"DefaultNavigationStateAlwaysOpen": "always open",
|
||||
"DefaultNavigationStateDescription": "Which state should have the navigation per default.",
|
||||
"DefaultNavigationStateLastState": "last state",
|
||||
"DisableFanAnimation": "Disable fan animation",
|
||||
"DisableFanAnimationDescription": "This can reduce some load in your Browser.",
|
||||
"DisplayCANCEL_PRINT": "Display CANCEL_PRINT",
|
||||
@@ -1098,6 +1106,7 @@
|
||||
"EditCrowsnestConf": "Edit crowsnest.conf",
|
||||
"EditWebcam": "Edit Webcam",
|
||||
"FlipWebcam": "Flip webcam image:",
|
||||
"HideFps": "Hide FPS counter",
|
||||
"Horizontally": "horizontally",
|
||||
"IconBed": "Bed",
|
||||
"IconCam": "Cam",
|
||||
|
||||
@@ -723,8 +723,6 @@
|
||||
"Editor": "Editor",
|
||||
"KlipperRestartMethod": "Metodo de reinicio de klipper",
|
||||
"KlipperRestartMethodDescription": "Elija metodo de reinicio que sera usado cuando editamos configuracion de klipper y presionamos \"Guardar y Reiniciar\"",
|
||||
"MoonrakerRestartInstance": "Instancia de Moonraker a reinicar",
|
||||
"MoonrakerRestartInstanceDescription": "Elija que instacia de moonrker se reiniciara cuando editando configuracionde monnraker presionemos \"Guardar y reiniciar\" ",
|
||||
"UseEscToClose": "Use ESC para cerrar",
|
||||
"UseEscToCloseDescription": "Permite que la tecla ESC cierre el editor"
|
||||
},
|
||||
|
||||
+2
-3
@@ -777,8 +777,6 @@
|
||||
"Editor": "Editeur",
|
||||
"KlipperRestartMethod": "Méthode de redémarrage de Klipper",
|
||||
"KlipperRestartMethodDescription": "Choisissez la méthode utilisée pour redémarrer Klipper lors d'un appui sur 'Save & Restart' après édition des fichiers de configuration.",
|
||||
"MoonrakerRestartInstance": "Redémarrage Moonraker",
|
||||
"MoonrakerRestartInstanceDescription": "Choisissez quel service Moonraker doit redémarrer lors d'un appui sur 'Save & Restart' après édition des fichiers de configuration.",
|
||||
"UseEscToClose": "Utiliser la touche \"esc\" pour fermer l'éditeur",
|
||||
"UseEscToCloseDescription": "Autoriser la touche \"esc\" de fermer l'éditeur."
|
||||
},
|
||||
@@ -831,7 +829,8 @@
|
||||
"12hours": "12-heures ({time})",
|
||||
"24hours": "24-heures ({time})",
|
||||
"DateFormat": "Format de la date",
|
||||
"TimeFormat": "Format de l'heure"
|
||||
"TimeFormat": "Format de l'heure",
|
||||
"Everything": "Tout"
|
||||
},
|
||||
"InterfaceSettings": "Réglages interface",
|
||||
"MacrosTab": {
|
||||
|
||||
@@ -722,8 +722,6 @@
|
||||
"Editor": "Szerkesztő",
|
||||
"KlipperRestartMethod": "Klipper újraindítási mód",
|
||||
"KlipperRestartMethodDescription": "Válaszd ki milyen újraindítási módot használjunk a 'Ment és Újraindít' esetén, amikor a klipper konfig fájlait szerkeszted.",
|
||||
"MoonrakerRestartInstance": "Moonraker példány Újraindítása",
|
||||
"MoonrakerRestartInstanceDescription": "Válaszd ki melyik Moonraker szolgáltatást indítsuk újra a 'Ment és Újraindít' esetén, amikor a Moonraker konfig fájlait szerkeszted.",
|
||||
"UseEscToClose": "Kilépéshez nyomd meg az ESC gombot",
|
||||
"UseEscToCloseDescription": "Az ESC gomb megnyomása bezárja a szerkesztőt",
|
||||
"TabSize": "TAB Méret",
|
||||
|
||||
@@ -794,8 +794,6 @@
|
||||
"Editor": "エディター",
|
||||
"KlipperRestartMethod": "Klipper再始動の方法",
|
||||
"KlipperRestartMethodDescription": "Klipperの設定ファイルを編集する際に'保存して再始動'での再始動方法を選択してください。",
|
||||
"MoonrakerRestartInstance": "Moonraker インスタンスの再始動",
|
||||
"MoonrakerRestartInstanceDescription": "Moonrakerの設定ファイルを編集する際に'保存して再始動'で、どのMoonrakerサービスを再始動するか選択してください。",
|
||||
"UseEscToClose": "ESCキーでエディターを終了します。",
|
||||
"UseEscToCloseDescription": "ESCキーでエディターを終了できます。"
|
||||
},
|
||||
|
||||
@@ -801,8 +801,6 @@
|
||||
"Editor": "파일 편집기",
|
||||
"KlipperRestartMethod": "클리퍼 재시작 방법",
|
||||
"KlipperRestartMethodDescription": "printer.cfg 파일을 수정 후, '저장 및 다시 시작'을 클릭할 때 사용할 다시 시작 방법을 선택합니다",
|
||||
"MoonrakerRestartInstance": "문래커 재시작 방법",
|
||||
"MoonrakerRestartInstanceDescription": "moonraker.conf 파일을 수정할 때 '저장 및 다시 시작'을 클릭할 때 사용할 문래커 서비스를 선택합니다",
|
||||
"UseEscToClose": "ESC키를 눌러 종료",
|
||||
"UseEscToCloseDescription": "ESC 키를 눌렀을 때 파일 편집기를 종료하며 만약 비활성화 했을 경우 ESC 키를 누르는 즉시 기존 입력 값은 모두 취소됩니다"
|
||||
},
|
||||
|
||||
@@ -799,8 +799,6 @@
|
||||
"Editor": "Editor",
|
||||
"KlipperRestartMethod": "Klipper restart methode",
|
||||
"KlipperRestartMethodDescription": "Selecteerd welke herstart methode gebruikt wordt bij 'Save & Restart' na het bewerken van de Klipper config files.",
|
||||
"MoonrakerRestartInstance": "Moonraker instantie herstarten",
|
||||
"MoonrakerRestartInstanceDescription": "Selecteer welke Moonraker service herstart na 'Save & Restart' bij het bewerken van Moonraker config bestanden.",
|
||||
"UseEscToClose": "Gebruik ESC om de editor te sluiten",
|
||||
"UseEscToCloseDescription": "Laat de ESC toets de editor sluiten"
|
||||
},
|
||||
|
||||
+53
-24
@@ -153,7 +153,7 @@
|
||||
"Uploading": "Wgrywanie"
|
||||
},
|
||||
"EmergencyStopDialog": {
|
||||
"AreYouSure": "Jesteś pewien?",
|
||||
"AreYouSure": "Czy na pewno?",
|
||||
"EmergencyStop": "Awaryjny STOP",
|
||||
"No": "Nie",
|
||||
"Yes": "Tak"
|
||||
@@ -193,7 +193,7 @@
|
||||
"Name": "Nazwa",
|
||||
"NewDirectory": "Nowy katalog",
|
||||
"NozzleDiameter": "Średnica dyszy",
|
||||
"ObjectHeight": "Wysokość objektu",
|
||||
"ObjectHeight": "Wysokość obiektu",
|
||||
"Preheat": "Podgrzej",
|
||||
"PrintedFiles": "Wydrukowane pliki",
|
||||
"PrintStart": "Start wydruku",
|
||||
@@ -217,7 +217,7 @@
|
||||
"AddBatchToQueue": "Dodaj serię do kolejki",
|
||||
"GcodesRootDirectoryDoesntExists": "Nie znaleziono katalogu G-Code. Sprawdź opcję \"path\" w sekcji [virtual_sdcard] konfiguracji Klippera.",
|
||||
"ScanMeta": "Skanuj metadane",
|
||||
"BedTemp": "Temp. łóżka",
|
||||
"BedTemp": "Temp. stołu",
|
||||
"ChamberTemp": "Temp. komory",
|
||||
"Count": "Ilość",
|
||||
"DuplicateFile": "Powielony plik",
|
||||
@@ -281,7 +281,7 @@
|
||||
"Later": "Później",
|
||||
"Mesh": "Siatka",
|
||||
"Name": "Nazwa",
|
||||
"NoBedMeshHasBeenLoadedYet": "Nie została jeszcze wgrana żadna siatka.",
|
||||
"NoBedMeshHasBeenLoadedYet": "Nie wczytano siatki stołu.",
|
||||
"NoProfile": "Brak profili",
|
||||
"Ok": "Ok",
|
||||
"Probed": "Zmierzone",
|
||||
@@ -468,26 +468,47 @@
|
||||
},
|
||||
"UpdatePanel": {
|
||||
"CheckForUpdates": "Sprawdź dostępność aktualizacji",
|
||||
"Commits": "Wydane",
|
||||
"CommitsAvailable": "Brak nowych wydań | {count} dostępnych wydań| {count} dostępnych wydań",
|
||||
"CommitsOnDate": "Wydano {date}",
|
||||
"Commits": "Zmiany",
|
||||
"CommitsAvailable": "Brak nowych wydań | {count} dostępne wydanie | {count} dostępnych wydań",
|
||||
"CommitsOnDate": "Zmiany w {date}",
|
||||
"CommittedDaysAgo": "Wydano {days} dni temu",
|
||||
"CommittedHoursAgo": "Wydano {hours} godzin temu",
|
||||
"CommittedOnDate": "Wydano {date}",
|
||||
"CommittedYesterday": "Wydano wczoraj",
|
||||
"Detached": "Osobne",
|
||||
"Dirty": "brudny",
|
||||
"ERROR": "BŁĄD",
|
||||
"Invalid": "Nieprawidłowe",
|
||||
"OSPackages": "Pakiety systemowe",
|
||||
"PackagesCanBeUpgraded": "pakiety mogą być zaktualizowane",
|
||||
"System": "System",
|
||||
"Unknown": "nieznany",
|
||||
"Update": "Aktualizuj",
|
||||
"UpdateAll": "Zaktualizuj wszystko",
|
||||
"UpdateManager": "Menadżer aktualizacji",
|
||||
"Upgrade": "Uaktualnij",
|
||||
"UpToDate": "aktualny"
|
||||
"UpToDate": "aktualny",
|
||||
"Abort": "Przerwij",
|
||||
"GenericUpdateQuestion": "Sprawdź historię zmian (jeśli jest dostępna) i stronę GitHub dla tego projektu, aby sprawdzić, czy konieczne są jakiekolwiek ręczne korekty dla tej aktualizacji.",
|
||||
"InitUpdateManager": "Menedżer aktualizacji nie został jeszcze zainicjowany. Jest to normalne zjawisko podczas pierwszego uruchomienia systemu. Kliknij przycisk odświeżania, aby zainicjować wszystkie komponenty.",
|
||||
"MoonrakerUpdateQuestion": "Spowoduje to aktualizację API Moonraker. Zmiany w pliku moonraker.conf mogą być wymagane do dalszego korzystania z urządzenia.",
|
||||
"StartUpdate": "Rozpocznij aktualizację",
|
||||
"ThesePackagesCanBeUpgrade": "Te pakiety systemowe mogą być zaktualizowane:",
|
||||
"WebClientUpdateQuestion": "W niektórych przypadkach aktualizacja klienta sieciowego może spowodować zmiany, które mogą spowodować niezgodność. Więcej informacji można znaleźć w uwagach wydania.",
|
||||
"AreYouSure": "Czy na pewno?",
|
||||
"Close": "Zamknij",
|
||||
"CommitHistory": "Historia zmian",
|
||||
"ConfigChanges": "Zmiany konfiguracji",
|
||||
"CountPackagesCanBeUpgraded": "Można uaktualnić {count} pakietów",
|
||||
"GitHubPage": "Strona GitHub",
|
||||
"HardRecovery": "Przywróć twardo",
|
||||
"IUnderstandTheRisks": "Rozumiem ryzyko",
|
||||
"LinkToGithub": "Link do GitHub",
|
||||
"KlipperUpdateQuestionFirmware": "Spowoduje to aktualizację oprogramowania hosta Klipper. Płyty sterujące z działającym firmware Klipper mogą wymagać flashowania ponownie skompilowanym firmware przed przywróceniem urządzenia do pracy.",
|
||||
"KlipperUpdateQuestionConfig": "Ta aktualizacja może również zawierać zmiany w parametrach konfiguracyjnych, które będą musiały zostać zmodyfikowane w pliku printer.cfg, szczegóły można znaleźć w dzienniku zmian.",
|
||||
"MoreCommitsInfo": "Można tu wyświetlić maksymalnie 30 zmian. Aby zobaczyć wszystkie zmiany, kliknij poniższy link:",
|
||||
"SoftRecovery": "Przywróć miękko",
|
||||
"UpdateWarning": "Ostrzeżenie o aktualizacji: {name}",
|
||||
"UpgradeableSystemPackages": "Pakiety systemowe, które można uaktualnić",
|
||||
"Corrupt": "uszkodzone"
|
||||
}
|
||||
},
|
||||
"Panels": {
|
||||
@@ -651,7 +672,8 @@
|
||||
"Target": "Docelowa",
|
||||
"TemperaturesInChart": "Temperatura [°C]",
|
||||
"TempTooHigh": "Temperatura zbyt wysoka dla {name}! (max: {max})",
|
||||
"TempTooLow": "Temperatura zbyt mała dla {name}! (min: {min})"
|
||||
"TempTooLow": "Temperatura zbyt mała dla {name}! (min: {min})",
|
||||
"HideMcuHostSensors": "Ukryj czujniki hosta/MCU"
|
||||
},
|
||||
"ToolheadControlPanel": {
|
||||
"Absolute": "Absolutna",
|
||||
@@ -687,7 +709,7 @@
|
||||
}
|
||||
},
|
||||
"PowerDeviceChangeDialog": {
|
||||
"AreYouSure": "Jesteś pewien?",
|
||||
"AreYouSure": "Czy na pewno?",
|
||||
"No": "Nie",
|
||||
"TurnDeviceOff": "Wyłącz {device}",
|
||||
"TurnDeviceOn": "Włącz {device}",
|
||||
@@ -775,7 +797,8 @@
|
||||
"Style": "Styl",
|
||||
"ValueGreaterThan": "Wartość musi być większa niż {value}",
|
||||
"ZOffsetIncrements": "Wzrost offsetu osi Z (w mm)",
|
||||
"ZTiltAdjust": "Dostosuj Z-Tilt {isDefault}"
|
||||
"ZTiltAdjust": "Dostosuj Z-Tilt {isDefault}",
|
||||
"HideDuringPrint": "Ukryj sterowanie osiami podczas drukowania"
|
||||
},
|
||||
"DashboardTab": {
|
||||
"Dashboard": "Sterowanie",
|
||||
@@ -792,8 +815,6 @@
|
||||
"Editor": "Edytor",
|
||||
"KlipperRestartMethod": "Metoda restartu Klippera",
|
||||
"KlipperRestartMethodDescription": "Wybierz która metoda ponownego uruchomienia ma być używana podczas 'Zapisz i Uruchom ponownie' podczas edytowania plików konfiguracyjnych Klippera.",
|
||||
"MoonrakerRestartInstance": "Ponowne uruchomienie instancji Moonrakera",
|
||||
"MoonrakerRestartInstanceDescription": "Wybierz która metoda ponownego uruchomienia ma być używana podczas 'Zapisz i Uruchom ponownie' podczas edytowania plików konfiguracyjnych Moonrakera.",
|
||||
"UseEscToClose": "Naciśnij ESC, aby wyjść z edytora",
|
||||
"UseEscToCloseDescription": "Umożliwia zamknięcie edytora za pomocą klawisza ESC",
|
||||
"TabSize": "Rozmiar tabulacji",
|
||||
@@ -819,8 +840,6 @@
|
||||
"CalcEtaTimeDescription": "Po wybraniu kilku opcji zostanie obliczona średnia.",
|
||||
"CannotReadJson": "Brak możliwości przeczytania/przeanalizowania pliku kopii zapasowej.",
|
||||
"DbConsoleHistory": "Historia Konsoli",
|
||||
"DbHistoryJobs": "Historia wydruków",
|
||||
"DbHistoryTotals": "Historia łącznie",
|
||||
"DbTimelapseSettings": "Ustawienia timelapse",
|
||||
"DbView": "Ustawienia",
|
||||
"EstimateValues": {
|
||||
@@ -830,9 +849,8 @@
|
||||
},
|
||||
"FactoryDialog": "Proszę wybrać wszystkie sekcje które mają zostać zresetowane:",
|
||||
"FactoryReset": "Ustawienia fabryczne",
|
||||
"General": "Ogólny",
|
||||
"General": "Ogólne",
|
||||
"Language": "Język",
|
||||
"MoonrakerDb": "Baza danych Moonraker",
|
||||
"PrinterName": "Nazwa drukarki",
|
||||
"Reset": "reset",
|
||||
"Restore": "Przywróć",
|
||||
@@ -848,7 +866,10 @@
|
||||
"FileRelative": "Pozycja pliku (względna)",
|
||||
"Slicer": "Slicer (M73)"
|
||||
},
|
||||
"DateFormat": "Format daty"
|
||||
"DateFormat": "Format daty",
|
||||
"MainsailSettingsMoonrakerDb": "Ustawienia Mainsail w bazie danych Moonraker",
|
||||
"DBNavigation": "Nawigacja",
|
||||
"Everything": "Wszystko"
|
||||
},
|
||||
"InterfaceSettings": "Ustawienia interfejsu",
|
||||
"MacrosTab": {
|
||||
@@ -1005,7 +1026,7 @@
|
||||
"NavigationStyleIconsAndText": "Ikony + Tekst",
|
||||
"NavigationStyleIconsOnly": "Tylko ikony",
|
||||
"Primary": "Podstawowe",
|
||||
"UiSettings": "Ustawienia interfejsu",
|
||||
"UiSettings": "Interfejs",
|
||||
"DisableFanAnimation": "Wyłącz animację wentylatora",
|
||||
"DisableFanAnimationDescription": "To może zmniejszyć obciążenie przeglądarki.",
|
||||
"HideSaveConfigButtonForBedMeshDescription": "Ukryj przycisk \"Zapisz konfigurację\", jeśli oczekują jedynie zmiany w siatce stołu do zapisania w Klipperze.",
|
||||
@@ -1019,7 +1040,14 @@
|
||||
"ScrewsTiltAdjustDialog": "Okno dialogowe regulacji nachylenia śrubami",
|
||||
"TempchartHeight": "Wykres temperatury - wysokość",
|
||||
"TempchartHeightDescription": "Modyfikuj wysokość wykresu temperatury w panelu sterowania.",
|
||||
"PowerDeviceName": "Urządzenie zasilające drukarkę"
|
||||
"PowerDeviceName": "Urządzenie zasilające drukarkę",
|
||||
"HideUpdateWarnings": "Ukryj ostrzeżenia o aktualizacji",
|
||||
"HideUpdateWarningsDescription": "Ta opcja ukryje wszystkie ostrzeżenia o aktualizacjach w menedżerze aktualizacji.",
|
||||
"DefaultNavigationState": "Domyślny stan nawigacji",
|
||||
"DefaultNavigationStateAlwaysClosed": "zawsze zamknięty",
|
||||
"DefaultNavigationStateDescription": "Który stan powinien mieć domyślną nawigację?",
|
||||
"DefaultNavigationStateAlwaysOpen": "zawsze otwarty",
|
||||
"DefaultNavigationStateLastState": "ostatni stan"
|
||||
},
|
||||
"WebcamsTab": {
|
||||
"AddWebcam": "Dodaj kamerę",
|
||||
@@ -1056,7 +1084,8 @@
|
||||
"JMuxerStream": "Nieskompresowany strumień h264 (jmuxer)",
|
||||
"Rotate": "Obróć",
|
||||
"WebrtcCameraStreamer": "WebRTC (camera-streamer)",
|
||||
"WebrtcMediaMTX": "WebRTC (MediaMTX / rtsp-simple-server)"
|
||||
"WebrtcMediaMTX": "WebRTC (MediaMTX / rtsp-simple-server)",
|
||||
"HideFps": "Ukryj wskaźnik kl./s"
|
||||
},
|
||||
"MiscellaneousTab": {
|
||||
"AddGroup": "dodaj grupę",
|
||||
@@ -1145,7 +1174,7 @@
|
||||
"Accept": "Akceptuj",
|
||||
"Description": "Kliknij <b>WYREGULOWANO</b>, jeśli bieżąca śruba została wyregulowana. Kliknij <b>AKCEPTUJ</b>, aby kontynuować bez regulacji.",
|
||||
"Adjusted": "wyregulowano",
|
||||
"Headline": "Śruby łóżka",
|
||||
"Headline": "Śruby stołu",
|
||||
"ScrewAccepted": "Śruby zaakceptowane",
|
||||
"ScrewIndex": "Indeks śrub",
|
||||
"ScrewName": "Nazwa śruby",
|
||||
|
||||
@@ -807,8 +807,6 @@
|
||||
"Editor": "Editor",
|
||||
"KlipperRestartMethod": "Método para reiniciar Klipper",
|
||||
"KlipperRestartMethodDescription": "Selecione o método de reinicialização que será usado em 'Salvar e Reiniciar' ao editar arquivos de configuração do Klipper.",
|
||||
"MoonrakerRestartInstance": "Reiniciar a instância do Moonraker",
|
||||
"MoonrakerRestartInstanceDescription": "Selecione qual serviço do Moonraker será reiniciado em 'Salvar e Reiniciar' ao editar arquivos de configuração do Moonraker.",
|
||||
"Spaces": "Espaços: {count}",
|
||||
"TabSize": "Tamanho TAB",
|
||||
"TabSizeDescription": "Ajusta quantos espaços devem ser usados para a indentação de TAB.",
|
||||
|
||||
@@ -801,8 +801,6 @@
|
||||
"Editor": "Редактор",
|
||||
"KlipperRestartMethod": "Способ перезапуска Klipper",
|
||||
"KlipperRestartMethodDescription": "Выберите какой способ перезапуска Klipper будет использоваться, после нажатия 'СОХРАНИТЬ И ПЕРЕЗАПУСТИТЬ' при редактировании конфигурационных файлов Klipper.",
|
||||
"MoonrakerRestartInstance": "Способ перезапуска Moonraker",
|
||||
"MoonrakerRestartInstanceDescription": "Выберите какой способ перезапуска Moonraker будет использоваться, после нажатия 'СОХРАНИТЬ И ПЕРЕЗАПУСТИТЬ' при редактировании конфигурационных файлов Moonraker.",
|
||||
"UseEscToClose": "Использование клавиши ESC",
|
||||
"UseEscToCloseDescription": "Позволяет использовать клавишу ESC для закрытия редактора",
|
||||
"TabSize": "Размер табуляции",
|
||||
|
||||
@@ -620,8 +620,6 @@
|
||||
"Editor": "Redigerare",
|
||||
"KlipperRestartMethod": "Klipper omstartsmetod",
|
||||
"KlipperRestartMethodDescription": "Välj vilken omstartsmetod som ska användas på 'Spara och starta om' vid redigering av Klipper-konfigurationsfiler.",
|
||||
"MoonrakerRestartInstance": "Starta om Moonraker instans",
|
||||
"MoonrakerRestartInstanceDescription": "Välj vilken Moonraker-tjänst som ska startas om under \"Spara och starta om\" när du redigerar Moonraker-konfigurationsfiler.",
|
||||
"UseEscToClose": "Använd ESC för att stänga redigeringsprogrammet",
|
||||
"UseEscToCloseDescription": "Tillåter att ESC-tangenten stänger redigeraren"
|
||||
},
|
||||
|
||||
@@ -833,8 +833,6 @@
|
||||
"Editor": "Editör",
|
||||
"KlipperRestartMethod": "Klipper yeniden başlatma yöntemi",
|
||||
"KlipperRestartMethodDescription": "Klipper yapılandırma dosyalarını düzenlerken 'Kaydet ve Yeniden Başlat' seçildiğinde hangi yeniden başlatma yönteminin kullanılacağını seçin.",
|
||||
"MoonrakerRestartInstance": "Moonraker örnek yeniden başlatma",
|
||||
"MoonrakerRestartInstanceDescription": "Moonraker yapılandırma dosyalarını düzenlerken 'Kaydet ve Yeniden Başlat' seçildiğinde hangi Moonraker hizmetinin yeniden başlayacağını seçin.",
|
||||
"UseEscToClose": "Editörü kapatmak için ESC tuşunu kullan",
|
||||
"UseEscToCloseDescription": "ESC tuşunun editörü kapatmasına izin verir",
|
||||
"TabSize": "TAB Boyutu",
|
||||
|
||||
@@ -735,8 +735,6 @@
|
||||
"Editor": "Редактор",
|
||||
"KlipperRestartMethod": "Метод перезапуску Klipper",
|
||||
"KlipperRestartMethodDescription": "Виберіть, який метод перезавантаження буде використовуватися на 'Зберегти та перезапустити' під час редагування файлів конфігурації Klipper..",
|
||||
"MoonrakerRestartInstance": "Інстанція перезапуску Moonraker",
|
||||
"MoonrakerRestartInstanceDescription": "Виберіть, яка послуга Moonraker перезапуститься на 'Зберегти та перезапустити' під час редагування файлів конфігурації Moonraker.",
|
||||
"UseEscToClose": "Використовуйте ESC для закриття редактора",
|
||||
"UseEscToCloseDescription": "Дозволяє клавішу ESC закрити редактор"
|
||||
},
|
||||
|
||||
+31
-11
@@ -478,27 +478,48 @@
|
||||
}
|
||||
},
|
||||
"UpdatePanel": {
|
||||
"Abort": "放弃",
|
||||
"AreYouSure": "你确定吗?",
|
||||
"CheckForUpdates": "检查更新",
|
||||
"Close": "关闭",
|
||||
"CommitHistory": "查看提交记录",
|
||||
"Commits": "提交",
|
||||
"CommitsAvailable": "没有新的提交 | 有{count}个提交 | 有{count}个提交",
|
||||
"CommitsOnDate": "提交日期{date}",
|
||||
"CommitsOnDate": "提交于{date}",
|
||||
"CommittedDaysAgo": "{days}天前提交",
|
||||
"CommittedHoursAgo": "{hours}小时前提交",
|
||||
"CommittedOnDate": "提交于{date}",
|
||||
"CommittedYesterday": "昨天提交",
|
||||
"Corrupt": "破坏",
|
||||
"ConfigChanges": "查看变更日志",
|
||||
"CountPackagesCanBeUpgraded": "有{count}个软件包可以更新",
|
||||
"Detached": "独立分支",
|
||||
"Dirty": "被污染",
|
||||
"ERROR": "错误",
|
||||
"Dirty": "被修改",
|
||||
"GenericUpdateQuestion": "检查提交历史(如果有的话)和该项目的 GitHub 页面,以查看是否需要对此更新进行手动调整。",
|
||||
"GitHubPage": "GitHub页面",
|
||||
"HardRecovery": "版本回退(清空修改内容)",
|
||||
"InitUpdateManager": "更新管理器尚未初始化。这是在您首次启动系统时的正常现象。请点击刷新按钮来初始化所有组件。",
|
||||
"Invalid": "无效",
|
||||
"IUnderstandTheRisks": "我已了解此风险",
|
||||
"LinkToGithub": "链接到GitHub",
|
||||
"KlipperUpdateQuestionFirmware": "此操作将更新Klipper主机软件。运行Klipper固件的打印机控制板,可能需要更新到最新编译的固件后才能使用。",
|
||||
"KlipperUpdateQuestionConfig": "此更新还可能包含对配置参数的更改,这些更改需要修改printer.cfg文件,有关详细信息请参阅更改日志。",
|
||||
"MoonrakerUpdateQuestion": "此操作将更新Moonraker API。可能需要更改moonraker.conf文件才能继续使用打印机。",
|
||||
"MoreCommitsInfo": "这里最多可以显示30个提交。要查看所有提交,请单击以下链接:",
|
||||
"OSPackages": "操作系统软件包",
|
||||
"PackagesCanBeUpgraded": "数据包可以更新",
|
||||
"SoftRecovery": "版本回退(保留修改内容)",
|
||||
"StartUpdate": "开始更新",
|
||||
"System": "系统",
|
||||
"ThesePackagesCanBeUpgrade": "这些系统软件包可以升级:",
|
||||
"Unknown": "未知",
|
||||
"Update": "更新",
|
||||
"UpdateAll": "更新全部组件",
|
||||
"UpdateManager": "更新管理",
|
||||
"Upgrade": "更新",
|
||||
"UpToDate": "已经更新到最新"
|
||||
"UpdateWarning": "更新警告: {name}",
|
||||
"Upgrade": "升级",
|
||||
"UpgradeableSystemPackages": "可升级的系统软件包",
|
||||
"UpToDate": "已是最新版本",
|
||||
"WebClientUpdateQuestion": "在某些情况下,更新Web客户端可能会有导致不兼容的更改。有关详细信息,请参阅发行说明。"
|
||||
}
|
||||
},
|
||||
"ManualProbe": {
|
||||
@@ -625,7 +646,7 @@
|
||||
"Accept": "接受",
|
||||
"AtLayer": "所在层",
|
||||
"Call": "调用",
|
||||
"DescriptionPauseAtLayerActive": "此功能已激活,会在层{layer}时调用\"{call}\"。如果重复调用命令,此设置将会被覆盖。",
|
||||
"DescriptionPauseAtLayerActive": "此功能已激活,会在第{layer}层时调用\"{call}\"。如果重复调用命令,此设置将会被覆盖。",
|
||||
"DescriptionPauseNextLayerActive": "此功能已激活,将在下一层调用\"{call}\"。",
|
||||
"Layer": "层",
|
||||
"NextLayer": "下一层",
|
||||
@@ -809,8 +830,6 @@
|
||||
"Editor": "编辑器",
|
||||
"KlipperRestartMethod": "Klipper重启方法",
|
||||
"KlipperRestartMethodDescription": "编辑完Klipper配置文件并按下\"保存并重启\"按钮后,使用哪种重启方法。",
|
||||
"MoonrakerRestartInstance": "重启Moonraker实例",
|
||||
"MoonrakerRestartInstanceDescription": "编辑完Moonraker配置文件并按下\"保存并重启\"按钮后,重启哪个Moonraker服务。",
|
||||
"UseEscToClose": "使用ESC关闭编辑器",
|
||||
"UseEscToCloseDescription": "允许使用ESC键关闭编辑器",
|
||||
"TabSize": "TAB长度",
|
||||
@@ -851,7 +870,6 @@
|
||||
"DbHistoryTotals": "历史统计",
|
||||
"DbTimelapseSettings": "延时摄影设置",
|
||||
"DbView": "视图设置",
|
||||
"DbWebcams": "摄像头",
|
||||
"EstimateValues": {
|
||||
"Filament": "耗材用量",
|
||||
"File": "Gcode文件",
|
||||
@@ -861,7 +879,7 @@
|
||||
"FactoryReset": "恢复默认设置",
|
||||
"General": "通用",
|
||||
"Language": "界面语言",
|
||||
"MoonrakerDb": "Moonraker数据库",
|
||||
"MainsailSettingsMoonrakerDb": "在Moonraker数据库中的Mainsail设置",
|
||||
"PrinterName": "打印机名称",
|
||||
"Reset": "重启",
|
||||
"Restore": "恢复",
|
||||
@@ -1046,6 +1064,8 @@
|
||||
"Guide": "指南",
|
||||
"HideSaveConfigButtonForBedMesh": "仅bed_mesh更改时隐藏\"保存配置\"按钮",
|
||||
"HideSaveConfigButtonForBedMeshDescription": "如果只有bed_mesh更改需要保存到Klipper时,隐藏\"保存配置\"按钮。",
|
||||
"HideUpdateWarnings": "隐藏更新警告",
|
||||
"HideUpdateWarningsDescription": "此选项将在更新管理器中隐藏所有的更新警告。",
|
||||
"LockSliders": "在触摸屏设备上锁定滑动条",
|
||||
"LockSlidersDelay": "滑动条锁定延迟时间",
|
||||
"LockSlidersDelayDescription": "滑动条将在给定延迟时间后锁定。如果设置为0或留空,滑动条将仅在页面更改/重新加载后锁定",
|
||||
|
||||
@@ -773,8 +773,6 @@
|
||||
"Editor": "編輯器",
|
||||
"KlipperRestartMethod": "Klipper重新啟動方法",
|
||||
"KlipperRestartMethodDescription": "編輯完Klipper設定檔案並按下\"儲存並重新啟動\"按鈕後,使用哪種重新啟動方法。",
|
||||
"MoonrakerRestartInstance": "重新啟動Moonraker",
|
||||
"MoonrakerRestartInstanceDescription": "編輯完Moonraker設定檔案並按下\"儲存並重新啟動\"按鈕後,重新啟動哪個Moonraker服務。",
|
||||
"Spaces": "空間: {count}",
|
||||
"TabSize": "標籤大小",
|
||||
"UseEscToClose": "使用 ESC 關閉編輯器",
|
||||
|
||||
@@ -127,11 +127,9 @@ export const actions: ActionTree<EditorState, RootState> = {
|
||||
Vue.$toast.success(i18n.t('Editor.SuccessfullySaved', { filename: data.item.path }).toString())
|
||||
if (payload.restartServiceName === 'klipper') {
|
||||
const klipperRestartMethod = getters['getKlipperRestartMethod']
|
||||
//dispatch('server/addEvent', { message: 'FIRMWARE_RESTART', type: 'command' })
|
||||
Vue.$socket.emit('printer.gcode.script', { script: klipperRestartMethod })
|
||||
} else if (payload.restartServiceName === 'moonraker') {
|
||||
const moonrakerRestartInstance = getters['getMoonrakerRestartInstance']
|
||||
Vue.$socket.emit('machine.services.restart', { service: moonrakerRestartInstance })
|
||||
Vue.$socket.emit('server.restart', {})
|
||||
} else if (payload.restartServiceName !== null) {
|
||||
Vue.$socket.emit('machine.services.restart', { service: payload.restartServiceName })
|
||||
}
|
||||
|
||||
@@ -5,13 +5,4 @@ export const getters: GetterTree<EditorState, any> = {
|
||||
getKlipperRestartMethod: (state, getters, rootState) => {
|
||||
return rootState.gui.editor?.klipperRestartMethod ?? 'FIRMWARE_RESTART'
|
||||
},
|
||||
|
||||
getMoonrakerRestartInstance: (state, getters, rootState) => {
|
||||
const available_services = rootState.server?.system_info?.available_services ?? []
|
||||
const setting = rootState.gui.editor?.moonrakerRestartInstance ?? 'moonraker'
|
||||
|
||||
if (available_services.includes(setting)) return setting
|
||||
|
||||
return 'moonraker'
|
||||
},
|
||||
}
|
||||
@@ -32,21 +32,13 @@ export const actions: ActionTree<GuiState, RootState> = {
|
||||
}
|
||||
|
||||
// delete currentPath if exists
|
||||
if (
|
||||
'view' in payload.value &&
|
||||
'gcodefiles' in payload.value.view &&
|
||||
'currentPath' in payload.value.view.gcodefiles
|
||||
) {
|
||||
if (payload.value?.view?.gcodefiles?.currentPath) {
|
||||
window.console.debug('remove currentPath from gui namespace')
|
||||
await fetch(mainsailUrl + '&key=view.gcodefiles.currentPath', { method: 'DELETE' })
|
||||
}
|
||||
|
||||
// delete currentPath if exists
|
||||
if (
|
||||
'view' in payload.value &&
|
||||
'configfiles' in payload.value.view &&
|
||||
'currentPath' in payload.value.view.configfiles
|
||||
) {
|
||||
if (payload.value?.view?.configfiles?.currentPath) {
|
||||
window.console.debug('remove currentPath from gui namespace')
|
||||
await fetch(mainsailUrl + '&key=view.configfiles.currentPath', { method: 'DELETE' })
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ export const getDefaultState = (): GuiState => {
|
||||
control: {
|
||||
style: 'bars',
|
||||
actionButton: null,
|
||||
hideDuringPrint: false,
|
||||
enableXYHoming: false,
|
||||
feedrateXY: 100,
|
||||
stepsXY: [100, 10, 1],
|
||||
@@ -112,7 +113,6 @@ export const getDefaultState = (): GuiState => {
|
||||
confirmUnsavedChanges: true,
|
||||
klipperRestartMethod: 'FIRMWARE_RESTART',
|
||||
tabSize: 2,
|
||||
moonrakerRestartInstance: null,
|
||||
},
|
||||
gcodeViewer: {
|
||||
extruderColors: ['#E76F51FF', '#F4A261FF', '#E9C46AFF', '#2A9D8FFF', '#264653FF'],
|
||||
@@ -158,6 +158,7 @@ export const getDefaultState = (): GuiState => {
|
||||
boolWideNavDrawer: false,
|
||||
boolHideUploadAndPrintButton: false,
|
||||
navigationStyle: 'iconsAndText',
|
||||
defaultNavigationStateSetting: 'alwaysOpen',
|
||||
powerDeviceName: null,
|
||||
hideSaveConfigForBedMash: false,
|
||||
disableFanAnimation: false,
|
||||
@@ -237,6 +238,7 @@ export const getDefaultState = (): GuiState => {
|
||||
tempchart: {
|
||||
boolTempchart: true,
|
||||
hiddenDataset: [],
|
||||
hideMcuHostSensors: false,
|
||||
autoscale: false,
|
||||
datasetSettings: {},
|
||||
},
|
||||
|
||||
@@ -20,6 +20,7 @@ export interface GuiState {
|
||||
console?: GuiConsoleState
|
||||
control: {
|
||||
style: 'bars' | 'circle' | 'cross'
|
||||
hideDuringPrint: boolean
|
||||
actionButton: null | 'm84' | 'qgl' | 'ztilt'
|
||||
enableXYHoming: boolean
|
||||
feedrateXY: number
|
||||
@@ -60,7 +61,6 @@ export interface GuiState {
|
||||
confirmUnsavedChanges: boolean
|
||||
klipperRestartMethod: 'FIRMWARE_RESTART' | 'RESTART'
|
||||
tabSize: number
|
||||
moonrakerRestartInstance: string | null
|
||||
}
|
||||
gcodeViewer: {
|
||||
extruderColors: string[]
|
||||
@@ -108,6 +108,7 @@ export interface GuiState {
|
||||
boolWideNavDrawer: boolean
|
||||
boolHideUploadAndPrintButton: boolean
|
||||
navigationStyle: 'iconsAndText' | 'iconsOnly'
|
||||
defaultNavigationStateSetting: 'alwaysOpen' | 'alwaysClosed' | 'lastState'
|
||||
powerDeviceName: string | null
|
||||
hideSaveConfigForBedMash: boolean
|
||||
disableFanAnimation: boolean
|
||||
@@ -163,6 +164,7 @@ export interface GuiState {
|
||||
tempchart: {
|
||||
boolTempchart: boolean
|
||||
hiddenDataset: string[]
|
||||
hideMcuHostSensors: boolean
|
||||
autoscale: boolean
|
||||
datasetSettings: any
|
||||
}
|
||||
|
||||
@@ -23,9 +23,18 @@ export const actions: ActionTree<GuiWebcamState, RootState> = {
|
||||
Vue.$socket.emit('server.webcams.post_item', payload)
|
||||
},
|
||||
|
||||
update({ dispatch }, payload: { webcam: GuiWebcamStateWebcam; oldWebcamName: string }) {
|
||||
update({ dispatch, rootState }, payload: { webcam: GuiWebcamStateWebcam; oldWebcamName: string }) {
|
||||
Vue.$socket.emit('server.webcams.post_item', payload.webcam)
|
||||
if (payload.webcam.name !== payload.oldWebcamName) dispatch('delete', payload.oldWebcamName)
|
||||
|
||||
// check if timelapse plugin is active, if not stop here
|
||||
if (!rootState.server?.components.includes('timelapse')) return
|
||||
|
||||
dispatch(
|
||||
'server/timelapse/updateCamSettings',
|
||||
{ newName: payload.webcam.name, oldName: payload.oldWebcamName },
|
||||
{ root: true }
|
||||
)
|
||||
},
|
||||
|
||||
delete(_, payload: string) {
|
||||
|
||||
@@ -25,6 +25,8 @@ export interface GuiWebcamStateWebcam {
|
||||
flip_vertical: boolean
|
||||
rotation: number
|
||||
aspect_ratio?: string
|
||||
extra_data?: {}
|
||||
extra_data?: {
|
||||
hideFps?: boolean
|
||||
}
|
||||
source?: 'config' | 'database'
|
||||
}
|
||||
@@ -5,6 +5,7 @@ import { RootState } from './types'
|
||||
export const mutations: MutationTree<RootState> = {
|
||||
setNaviDrawer(state, payload) {
|
||||
Vue.set(state, 'naviDrawer', payload)
|
||||
localStorage.setItem('naviDrawer', payload)
|
||||
},
|
||||
|
||||
setInstancesDB(state, payload) {
|
||||
|
||||
@@ -71,6 +71,10 @@ export const actions: ActionTree<PrinterState, RootState> = {
|
||||
dispatch('getData', payload)
|
||||
|
||||
Vue.$socket.emit('server.temperature_store', {}, { action: 'printer/tempHistory/init' })
|
||||
|
||||
setTimeout(() => {
|
||||
dispatch('initExtruderCanExtrude')
|
||||
}, 200)
|
||||
},
|
||||
|
||||
getData({ commit, dispatch, state }, payload) {
|
||||
@@ -125,6 +129,17 @@ export const actions: ActionTree<PrinterState, RootState> = {
|
||||
commit('setData', payload)
|
||||
},
|
||||
|
||||
initExtruderCanExtrude({ state }) {
|
||||
const extruderList: string[] = Object.keys(state).filter((name) => name.startsWith('extruder'))
|
||||
const reInitList: { [key: string]: string[] } = {}
|
||||
|
||||
extruderList.forEach((extruderName) => {
|
||||
reInitList[extruderName] = ['can_extrude']
|
||||
})
|
||||
|
||||
Vue.$socket.emit('printer.objects.query', { objects: reInitList }, { action: 'printer/getData' })
|
||||
},
|
||||
|
||||
initHelpList({ commit, dispatch }, payload) {
|
||||
commit('setHelplist', payload)
|
||||
|
||||
|
||||
@@ -70,7 +70,29 @@ export const getters: GetterTree<PrinterTempHistoryState, RootState> = {
|
||||
return getters['getAvg'](name, 'speed')
|
||||
},
|
||||
|
||||
getSelectedLegends: (state, _, rootState) => {
|
||||
getHostMcuSensors: (state, getters, rootState) => {
|
||||
const settings = rootState.printer?.configfile?.settings ?? {}
|
||||
const available_heaters = rootState.printer?.heaters?.available_heaters ?? []
|
||||
const available_sensors = rootState.printer?.heaters?.available_sensors ?? []
|
||||
|
||||
return available_sensors.filter((fullName: string) => {
|
||||
// stop when the current sensor is a heater
|
||||
if (available_heaters.includes(fullName)) return false
|
||||
// stop when the current sensor is a temperature_fan
|
||||
if (fullName.startsWith('temperature_fan')) return false
|
||||
|
||||
// get printer settings object from the current sensor
|
||||
const settingsObject = settings[fullName.toLowerCase()]
|
||||
if (!settingsObject) return false
|
||||
|
||||
// get the sensor type of the current sensor
|
||||
const sensor_type = settingsObject.sensor_type ?? ''
|
||||
|
||||
return ['temperature_mcu', 'temperature_host'].includes(sensor_type)
|
||||
})
|
||||
},
|
||||
|
||||
getSelectedLegends: (state, getters, rootState) => {
|
||||
interface legends {
|
||||
[key: string]: boolean
|
||||
}
|
||||
@@ -108,6 +130,21 @@ export const getters: GetterTree<PrinterTempHistoryState, RootState> = {
|
||||
selected[serie.name] = !datasetTypesInPercents.includes(datasetType)
|
||||
})
|
||||
|
||||
// hide MCU & Host sensors, if the option is set to true
|
||||
const hideMcuHostSensors = rootState.gui?.view?.tempchart?.hideMcuHostSensors ?? false
|
||||
if (hideMcuHostSensors) {
|
||||
const mcuHostSensors = getters.getHostMcuSensors ?? []
|
||||
|
||||
Object.keys(selected)
|
||||
.filter((seriesName) => {
|
||||
const datasetName = seriesName.slice(0, seriesName.lastIndexOf('-'))
|
||||
return mcuHostSensors.includes(datasetName)
|
||||
})
|
||||
.forEach((seriesName) => {
|
||||
selected[seriesName] = false
|
||||
})
|
||||
}
|
||||
|
||||
return selected
|
||||
},
|
||||
|
||||
|
||||
@@ -52,6 +52,14 @@ export const actions: ActionTree<ServerTimelapseState, RootState> = {
|
||||
Vue.$socket.emit('machine.timelapse.post_settings', payload, { action: 'server/timelapse/initSettings' })
|
||||
},
|
||||
|
||||
updateCamSettings({ dispatch, state }, payload) {
|
||||
// check if the changed webcam is the timelapse webcam, if not stop here
|
||||
if (state.settings.camera !== payload.oldName) return
|
||||
|
||||
// send the new webcam name; if it is the same name, it will only update the settings
|
||||
dispatch('saveSetting', { camera: payload.newName })
|
||||
},
|
||||
|
||||
resetSnackbar({ commit }) {
|
||||
commit('resetSnackbar')
|
||||
},
|
||||
|
||||
@@ -32,6 +32,7 @@ export interface ServerUpdateManagerStateGitRepoCommit {
|
||||
|
||||
export interface ServerUpdateManagerStateGitRepo {
|
||||
name: string
|
||||
repo_name?: string
|
||||
configured_type: string
|
||||
detected_type?: string
|
||||
channel?: string
|
||||
@@ -47,12 +48,15 @@ export interface ServerUpdateManagerStateGitRepo {
|
||||
remote_hash?: string
|
||||
is_valid?: boolean
|
||||
is_dirty?: boolean
|
||||
corrupt?: boolean
|
||||
detached?: boolean
|
||||
debug_enabled?: boolean
|
||||
commits_behind?: ServerUpdateManagerStateGitRepoCommit[]
|
||||
git_messages?: string[]
|
||||
anomalies?: string[]
|
||||
warnings?: string[]
|
||||
info_tags?: string[]
|
||||
recovery_url?: string
|
||||
}
|
||||
|
||||
export interface ServerUpdateManagerStateGitRepoGroupedCommits {
|
||||
|
||||
Reference in new issue
Block a user