diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..a2f2bce2a8 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,21 @@ +# Set update schedule for GitHub Actions + +version: 2 +updates: + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + # Check for updates to GitHub Actions every week + interval: 'weekly' + + - package-ecosystem: 'npm' + directory: '/' + schedule: + interval: 'weekly' + allow: + # Ignore major updates to all dependencies. We're using old versions of some packages that are incompatible with newer versions of other packages. + - dependency-name: '*' + update-type: 'semver:non-major' + dependency-type: 'direct' + assignees: + - 'meteyou' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6334144855..b660885f99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,7 +101,7 @@ jobs: run: cp ./remote/* ./dist/ - name: Upload to remote server - uses: SamKirkland/FTP-Deploy-Action@v4 + uses: SamKirkland/FTP-Deploy-Action@v4.3.4 with: server: ${{ secrets.REMOTEHOST }} username: ${{ secrets.REMOTEUSER }} diff --git a/CHANGELOG.md b/CHANGELOG.md index eeb6ff5f27..8fd3824894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,57 @@ # Changelog All notable changes to Mainsail will be documented in this file. +## [2.8.0](https://github.com/mainsail-crew/mainsail/releases/tag/v2.8.0) - 2023-10-07 +### Features + +- Add warning for outdated browsers (#1537) | [5007646](5007646ff06b6fe4c4f1cb1820712df9f5210eda) +- Automatic selection of the gcode offset save gcode (#1531) | [9a2328b](9a2328ba69e6ec9eb3102b88d7261d5a73889a3c) +- Hide Moonraker power devices with a `_` as first char (#1545) | [a0ad7e8](a0ad7e84ab454407d39010157b10e76eff3366c7) +- Add option to block autoscroll in console (#1519) | [09c2526](09c25266422ba295c5b2a397df81c7a3b9f0d6a4) +- Add 12-hour time format in printers overview (#1571) | [a28c6fd](a28c6fdb03098e0cd87fb97c6ac6903efdd8d9fb) +- Add monitors (like TMC2240) to Temperature Panel (#1532) | [5734f1c](5734f1cd1dcc7e5a4602a7d039771a22e3639bfd) +- Add spoolman support (#1542) | [d8430f5](d8430f54edafb5efcadbfc8547a2ce0e96f48352) +- Add optional background color for big gcode thumbnails (#1535) | [82e3dd8](82e3dd8b182c50a719b611c103028b3693bc4841) + +### Bug Fixes and Improvements + +- Show confirm emergency stop dialog only when turned on (#1526) | [871688f](871688f3c8951c0be97685f162797fcd13bce514) +- Eta time format detection from browser (#1522) | [18a5c73](18a5c732b28ba36391fba4b41535981e922fa95d) +- Fix min/max positions in heightmap current mesh data panel (#1533) | [1aa9f34](1aa9f341fa19f9273f05ec257c21fb46c4b1c562) +- Fix autorestart of webcam camerastreamer (#1546) | [fd293d2](fd293d21ec31a33252fee902f1b8e7e5fd248366) +- Fix missing reset options for print history data (#1534) | [9f08afc](9f08afc138a429c3c114a75b2038ca06e985bcc9) +- Fix some issues with the presets (#1529) | [e0f5166](e0f51667eb19505cccc34d858218f403d4d8d31c) +- Fix macro parameter with spaces (#1551) | [c87586a](c87586aebbdd6e7eb4b1505ce286d69955899f04) +- Fix type issue in TemperaturePanelListItem (#1563) | [e1dd59d](e1dd59db15f289621fc6d73d43afcf989400b128) +- Fix webcam (camera-streamer) stop autorestart beforeDestory (#1556) | [2b73cce](2b73cce47ac9768bb50d0bdf6fcf950e36763e39) +- Fix gcode command for generic_heater in presets (#1569) | [b7914f8](b7914f8de6ae5ad2513dd941167b5b66246ce409) +- Fix wrong date function in multiple files (#1568) | [7d86df0](7d86df0c81fe47563bd50a3ab1ba959f0835d16c) +- Fix WebRTC (camera-streamer) port with external instance (#1586) | [a3e74aa](a3e74aa57a684ff2e73c1f22e2c253f592d9f8e4) +- Fix webcam flip in timelapse preview (#1587) | [1a7aca6](1a7aca6680cd7ef2a9834e15ebcb26e42b986d1d) +- Fix webcam switch button (#1589) | [e445fbe](e445fbe5cc918e5a38754f3e2cbe5d2b73b19636) + +### Refactor + +- Refactor ToolheadControlPanel (#1530) | [ecaa894](ecaa894fbb7ae9cb2ebc1dbb9688b7eef312b740) +- Split ExtruderControlPanel.vue in multiple SFC (#1565) | [890b996](890b9969aeb7e417fc733543bb486217c4c9eeed) +- Remove unused import in store/printer/getters.ts (#1574) | [5eb50bb](5eb50bbcec1aea8e2a5b935ee0e278bffb80d189) +- Rework tool color in extruder panel (#1576) | [2670eb6](2670eb6447a9b0fc5cb779f385b586ad117c1ec1) +- Update webcam "WebRTC MediaMTX" client (#1558) | [3994a8e](3994a8ebe8601c005d2b43afa0c974e58bbad498) + +### Localization + +- **de**: Update german translations (#1583) | [4970d02](4970d0218a923a7338f5b31ff3cd49070fe95a5b) +- **en**: Remove unused keys in english locale (#1585) | [cd1b9b8](cd1b9b85bdd74b2cca622848625b333d8a1538e9) +- **es**: Update spanish locale (#1548) | [79014ac](79014acf7f720e1b1953d628fcdd2f14183cefa7) +- **pl**: Update Polish translations (#1544) | [98d99d2](98d99d2d118ac52d622c3f9980c199a5a5b7e498) +- **pl**: Update polish locale (#1554) | [f3fcce3](f3fcce32526a25b232220d9d79ee199a53efe215) +- **pl**: Update Polish translations (#1573) | [8fc0d5c](8fc0d5c23c3217022aab0c142da1b1231d1e8ef2) +- **zh**: Update Chinese (zh) localization (#1588) | [09a994d](09a994d85445aefc93128260af7f7df772e8eb53) + +### Other + +- Fix ftp upload in release workflow (#1590) | [5b62b97](5b62b9742023f19e30b41ba8bcf999a1b0104749) + ## [2.7.1](https://github.com/mainsail-crew/mainsail/releases/tag/v2.7.1) - 2023-08-16 ### Bug Fixes and Improvements diff --git a/package-lock.json b/package-lock.json index c5176efdb4..1ef361b9a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "mainsail", - "version": "2.7.1", + "version": "2.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "mainsail", - "version": "2.7.1", + "version": "2.8.0", "dependencies": { "@codemirror/commands": "^6.0.1", "@codemirror/lang-css": "^6.0.0", diff --git a/package.json b/package.json index 36fbc0ccdd..4345a0ac9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mainsail", - "version": "2.7.1", + "version": "2.8.0", "private": true, "decription": "a klipper web interface", "author": { diff --git a/src/App.vue b/src/App.vue index b03b9ee2ac..d7e9ce8223 100644 --- a/src/App.vue +++ b/src/App.vue @@ -278,6 +278,7 @@ export default class App extends Mixins(BaseMixin) { @Watch('print_percent') print_percentChanged(newVal: number): void { this.drawFavicon(newVal) + this.refreshSpoolman() } @Watch('printerIsPrinting') @@ -285,6 +286,12 @@ export default class App extends Mixins(BaseMixin) { this.drawFavicon(this.print_percent) } + refreshSpoolman(): void { + if (this.moonrakerComponents.includes('spoolman')) { + this.$store.dispatch('server/spoolman/refreshActiveSpool', null, { root: true }) + } + } + appHeight() { this.$nextTick(() => { const doc = document.documentElement diff --git a/src/components/charts/TempChart.vue b/src/components/charts/TempChart.vue index 50619df518..05bf344c5e 100644 --- a/src/components/charts/TempChart.vue +++ b/src/components/charts/TempChart.vue @@ -313,15 +313,23 @@ export default class TempChart extends Mixins(BaseMixin) { const seriesNameTemperature = `${baseSeriesName}-temperature` const seriesNameTarget = `${baseSeriesName}-target` - if (seriesNameTemperature in dataset.value) output += dataset.value[seriesNameTemperature].toFixed(1) - if (seriesNameTarget in dataset.value) output += ' / ' + dataset.value[seriesNameTarget].toFixed(1) + if (seriesNameTemperature in dataset.value) { + const value = dataset.value[seriesNameTemperature] + output += value !== null ? value.toFixed(1) : '--' + } + if (seriesNameTarget in dataset.value) { + output += ' / ' + const value = dataset.value[seriesNameTemperature] + output += value !== null ? value.toFixed(1) : '--' + } output += '°C' datasetTypesInPercents.forEach((attrKey) => { const seriesName = `${baseSeriesName}-${attrKey}` if (!(seriesName in dataset.value)) return - const value = (dataset.value[seriesName] * 100).toFixed(0) + let value = dataset.value[seriesName] + value = value !== null ? (dataset.value[seriesName] * 100).toFixed(0) : '--' output += ` [ ${value}% ]` }) @@ -356,7 +364,11 @@ export default class TempChart extends Mixins(BaseMixin) { // reset tempHistory if working sources are smaller than 80% if (newVal.length > 0 && newSource.length < this.maxHistory * 0.8) { - this.$socket.emit('server.temperature_store', {}, { action: 'printer/tempHistory/init' }) + this.$socket.emit( + 'server.temperature_store', + { include_monitors: true }, + { action: 'printer/tempHistory/init' } + ) } } } diff --git a/src/components/dialogs/SpoolmanChangeSpoolDialog.vue b/src/components/dialogs/SpoolmanChangeSpoolDialog.vue new file mode 100644 index 0000000000..8c6254dd94 --- /dev/null +++ b/src/components/dialogs/SpoolmanChangeSpoolDialog.vue @@ -0,0 +1,174 @@ + + + diff --git a/src/components/dialogs/SpoolmanChangeSpoolDialogRow.vue b/src/components/dialogs/SpoolmanChangeSpoolDialogRow.vue new file mode 100644 index 0000000000..c02fb14ffc --- /dev/null +++ b/src/components/dialogs/SpoolmanChangeSpoolDialogRow.vue @@ -0,0 +1,104 @@ + + + diff --git a/src/components/dialogs/SpoolmanEjectSpoolDialog.vue b/src/components/dialogs/SpoolmanEjectSpoolDialog.vue new file mode 100644 index 0000000000..14200f2a09 --- /dev/null +++ b/src/components/dialogs/SpoolmanEjectSpoolDialog.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/components/dialogs/StartPrintDialog.vue b/src/components/dialogs/StartPrintDialog.vue index b2604b0e83..df282f951a 100644 --- a/src/components/dialogs/StartPrintDialog.vue +++ b/src/components/dialogs/StartPrintDialog.vue @@ -1,23 +1,26 @@ + + diff --git a/src/components/panels/Extruder/ExtruderControlPanelTools.vue b/src/components/panels/Extruder/ExtruderControlPanelTools.vue index e2aca29511..740d1f8a83 100644 --- a/src/components/panels/Extruder/ExtruderControlPanelTools.vue +++ b/src/components/panels/Extruder/ExtruderControlPanelTools.vue @@ -1,7 +1,13 @@ diff --git a/src/components/panels/Extruder/ExtruderControlPanelToolsItem.vue b/src/components/panels/Extruder/ExtruderControlPanelToolsItem.vue index 937b7ae890..707a2cd68d 100644 --- a/src/components/panels/Extruder/ExtruderControlPanelToolsItem.vue +++ b/src/components/panels/Extruder/ExtruderControlPanelToolsItem.vue @@ -1,11 +1,11 @@ @@ -27,19 +27,62 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ControlMixin } get color() { - return this.macro.variables.color ?? this.macro.variables.colour ?? null + const color = this.macro.variables.color ?? this.macro.variables.colour ?? null + if (color === '' || color === 'undefined') return null + + return color } - get buttonClass() { - return { - 'primary--text': this.active, + get primaryColor(): string { + return this.$store.state.gui.uiSettings.primary + } + + get primaryTextColor(): string { + let splits = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(this.primaryColor) + if (splits) { + const r = parseInt(splits[1], 16) * 0.2126 + const g = parseInt(splits[2], 16) * 0.7152 + const b = parseInt(splits[3], 16) * 0.0722 + const perceivedLightness = (r + g + b) / 255 + + return perceivedLightness > 0.7 ? '#222' : '#fff' } + + return '#ffffff' + } + + get warningColor(): string { + return this.$vuetify?.theme?.currentTheme?.warning?.toString() ?? '#ff8300' } get buttonStyle() { + let backgroundColor = '' + if (this.active) { + backgroundColor = this.homedAxes.includes('xyz') ? this.primaryColor : this.warningColor + } + + const textColor = this.active ? this.primaryTextColor : '' + return { + color: textColor, + 'background-color': backgroundColor, + } + } + + get dotStyle() { + return { + 'border-color': this.active ? this.primaryTextColor : '', 'background-color': '#' + this.color, } } } + + diff --git a/src/components/panels/GcodefilesPanel.vue b/src/components/panels/GcodefilesPanel.vue index 084d55ce7a..fc7354386a 100644 --- a/src/components/panels/GcodefilesPanel.vue +++ b/src/components/panels/GcodefilesPanel.vue @@ -240,6 +240,7 @@ - + + +