Skip to content

Commit

Permalink
Merge branch 'develop' into feature/improve_chunking
Browse files Browse the repository at this point in the history
  • Loading branch information
pataar committed Oct 7, 2023
2 parents fb1c38b + 298eae8 commit 97f6965
Show file tree
Hide file tree
Showing 52 changed files with 1,822 additions and 245 deletions.
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mainsail",
"version": "2.7.1",
"version": "2.8.0",
"private": true,
"decription": "a klipper web interface",
"author": {
Expand Down
7 changes: 7 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,20 @@ export default class App extends Mixins(BaseMixin) {
@Watch('print_percent')
print_percentChanged(newVal: number): void {
this.drawFavicon(newVal)
this.refreshSpoolman()
}
@Watch('printerIsPrinting')
printerIsPrintingChanged(): void {
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
Expand Down
20 changes: 16 additions & 4 deletions src/components/charts/TempChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}% ]`
})
Expand Down Expand Up @@ -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' }
)
}
}
}
Expand Down
174 changes: 174 additions & 0 deletions src/components/dialogs/SpoolmanChangeSpoolDialog.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
<template>
<div>
<v-dialog v-model="showDialog" width="800" persistent :fullscreen="isMobile">
<panel
:title="$t('Panels.SpoolmanPanel.ChangeSpool')"
:icon="mdiAdjust"
card-class="spoolman-change-spool-dialog"
:margin-bottom="false">
<template #buttons>
<v-btn icon tile @click="close">
<v-icon>{{ mdiCloseThick }}</v-icon>
</v-btn>
</template>
<v-card-title>
<v-text-field
v-model="search"
:append-icon="mdiMagnify"
:label="$t('Panels.SpoolmanPanel.Search')"
outlined
dense
hide-details
style="max-width: 300px" />
<v-spacer />
<v-btn
:title="$t('Panels.SpoolmanPanel.Refresh')"
class="px-2 minwidth-0 ml-3"
:loading="loadings.includes('refreshSpools')"
@click="refreshSpools">
<v-icon>{{ mdiRefresh }}</v-icon>
</v-btn>
<v-btn
:title="$t('Panels.SpoolmanPanel.OpenSpoolManager')"
class="px-2 minwidth-0 ml-3"
@click="openSpoolManager">
<v-icon>{{ mdiDatabase }}</v-icon>
</v-btn>
</v-card-title>
<v-card-text class="px-0 pb-0">
<v-data-table
:headers="headers"
:items="spools"
item-key="id"
:search="search"
sort-by="last_used"
:sort-desc="true"
:custom-filter="customFilter">
<template #no-data>
<div class="text-center">{{ $t('Panels.SpoolmanPanel.NoSpools') }}</div>
</template>
<template #no-results>
<div class="text-center">{{ $t('Panels.SpoolmanPanel.NoResults') }}</div>
</template>

<template #item="{ item }">
<SpoolmanChangeSpoolDialogRow :key="item.id" :spool="item" @set-spool="setSpool" />
</template>
</v-data-table>
</v-card-text>
</panel>
</v-dialog>
</div>
</template>

<script lang="ts">
import Component from 'vue-class-component'
import { Mixins, Prop, Watch } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import Panel from '@/components/ui/Panel.vue'
import { mdiCloseThick, mdiAdjust, mdiDatabase, mdiMagnify, mdiRefresh } from '@mdi/js'
import { ServerSpoolmanStateSpool } from '@/store/server/spoolman/types'
import SpoolmanChangeSpoolDialogRow from '@/components/dialogs/SpoolmanChangeSpoolDialogRow.vue'
@Component({
components: { SpoolmanChangeSpoolDialogRow, Panel },
})
export default class SpoolmanChangeSpoolDialog extends Mixins(BaseMixin) {
mdiAdjust = mdiAdjust
mdiCloseThick = mdiCloseThick
mdiDatabase = mdiDatabase
mdiMagnify = mdiMagnify
mdiRefresh = mdiRefresh
@Prop({ required: true }) declare readonly showDialog: boolean
search = ''
get spools(): ServerSpoolmanStateSpool[] {
return this.$store.state.server.spoolman.spools ?? []
}
get headers() {
return [
{
text: ' ',
align: 'start',
sortable: false,
},
{
text: this.$t('Panels.SpoolmanPanel.Filament'),
align: 'start',
value: 'filament.name',
sortable: false,
},
{
text: this.$t('Panels.SpoolmanPanel.Material'),
align: 'center',
value: 'filament.material',
},
{
text: this.$t('Panels.SpoolmanPanel.LastUsed'),
align: 'end',
value: 'last_used',
},
{
text: this.$t('Panels.SpoolmanPanel.Weight'),
align: 'end',
value: 'remaining_weight',
},
]
}
get spoolManagerUrl() {
return this.$store.state.server.config.config?.spoolman?.server ?? null
}
openSpoolManager() {
window.open(this.spoolManagerUrl, '_blank')
}
mounted() {
this.refresh()
}
refresh() {
this.$store.dispatch('server/spoolman/refreshSpools')
}
close() {
this.$emit('close')
}
refreshSpools() {
this.$store.dispatch('server/spoolman/refreshSpools')
}
customFilter(value: any, search: string, item: ServerSpoolmanStateSpool): boolean {
const querySplits = search.toLowerCase().split(' ')
const searchArray = [
item.comment,
item.filament.name,
item.filament.vendor.name,
item.filament.material,
item.location,
]
for (const query of querySplits) {
const result = searchArray.some((q) => q?.toLowerCase().includes(query))
if (!result) return false
}
return true
}
setSpool(spool: ServerSpoolmanStateSpool) {
this.$store.dispatch('server/spoolman/setActiveSpool', spool.id)
this.close()
}
@Watch('showDialog')
onShowDialogChanged(newVal: boolean) {
if (newVal) this.search = ''
}
}
</script>
Loading

0 comments on commit 97f6965

Please sign in to comment.