Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 1b763e2
Merge: 4d241fc 1a12554
Author: Stefan Dej <meteyou@gmail.com>
Date:   Sun Jul 30 21:23:05 2023 +0200

    [Automated] Merged develop into target master

commit 1a12554
Author: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Date:   Sun Jul 30 19:22:55 2023 +0000

    chore: push version number to v2.6.2

commit 7251a8c
Author: Zhu Qian <xiaoqianzi15@gmail.com>
Date:   Mon Jul 31 03:17:39 2023 +0800

    locale(zh): update chinese locale (mainsail-crew#1486)

    Co-authored-by: Stefan Dej <meteyou@gmail.com>

commit cda3098
Author: Stefan Dej <meteyou@gmail.com>
Date:   Sun Jul 30 21:03:00 2023 +0200

    fix: fix issue with cannot extrude after a Klipper restart (mainsail-crew#1495)

commit 9eb133b
Author: Stefan Dej <meteyou@gmail.com>
Date:   Sun Jul 30 21:02:28 2023 +0200

    fix: fix multiple issues in the refactored update manager (mainsail-crew#1497)

commit 6a4cca7
Author: Stefan Dej <meteyou@gmail.com>
Date:   Sun Jul 30 21:01:05 2023 +0200

    fix: fix issue with create/edit presets and refactor settings (mainsail-crew#1499)

commit d67ef3a
Author: Stefan Dej <meteyou@gmail.com>
Date:   Sun Jul 30 12:41:08 2023 +0200

    fix: use webcam name instead of UUID for timelapse plugin (mainsail-crew#1492)

commit aeee198
Author: Stefan Dej <meteyou@gmail.com>
Date:   Fri Jul 28 22:48:01 2023 +0200

    fix: fix issue with camel-case object names in temperature panel (mainsail-crew#1491)

commit 5c40820
Author: Stefan Dej <meteyou@gmail.com>
Date:   Thu Jul 27 23:02:51 2023 +0200

    fix: fix flip function in several webcam clients (mainsail-crew#1487)

commit e929c7c
Author: Stefan Dej <meteyou@gmail.com>
Date:   Thu Jul 27 09:42:07 2023 +0200

    fix: hide rpm in temperature_fans without tachometer_pin (mainsail-crew#1489)

commit 0b47a80
Author: Stefan Dej <meteyou@gmail.com>
Date:   Mon Jul 24 22:13:16 2023 +0200

    refactor: refactor SettingsRow (mainsail-crew#1484)

commit 8447be2
Author: Stefan Dej <meteyou@gmail.com>
Date:   Mon Jul 24 22:08:50 2023 +0200

    fix: fix editor save & restart button behavior (mainsail-crew#1483)

commit 0c5aca8
Author: Daviteusz <daviteusz0@gmail.com>
Date:   Mon Jul 24 19:27:21 2023 +0200

    locale(pl): Update Polish translation (mainsail-crew#1482)

commit eceb442
Author: meteyou <meteyou@users.noreply.github.com>
Date:   Mon Jul 24 07:36:14 2023 +0000

    docs(changelog): update changelog
  • Loading branch information
Zeanon committed Jul 30, 2023
1 parent 6feb529 commit bf4458e
Show file tree
Hide file tree
Showing 51 changed files with 720 additions and 589 deletions.
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@
# Changelog
All notable changes to Mainsail will be documented in this file.

## [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

Expand Down
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.6.10",
"version": "2.6.11",
"private": true,
"decription": "a klipper web interface",
"author": {
Expand Down
20 changes: 14 additions & 6 deletions src/components/TheEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -239,25 +239,33 @@ 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
// 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'
if (this.filename === 'moonraker.conf') return this.moonrakerRestartInstance ?? 'moonraker'
// 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
return this.availableServices.includes(this.restartServiceName)
}
// klipper and moonraker uses specific api calls instead of generic service restart
if (['klipper', 'moonraker'].includes(this.restartServiceName)) return true
get moonrakerRestartInstance() {
return this.$store.state.gui.editor.moonrakerRestartInstance
return this.availableServices.includes(this.restartServiceName)
}
get confirmUnsavedChanges() {
Expand Down
13 changes: 13 additions & 0 deletions src/components/mixins/webcam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
97 changes: 49 additions & 48 deletions src/components/panels/Machine/UpdatePanel/Entry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,17 @@
<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
color="primary"
class="minwidth-0 px-1 mr-2"
@click="toggleAnomalies = !toggleAnomalies">
<v-icon small>{{ mdiInformation }}</v-icon>
</v-chip>
<template v-if="!isValid">
<v-menu :offset-y="true">
<template #activator="{ on, attrs }">
<v-chip
Expand All @@ -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>
Expand All @@ -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-row v-if="warnings.length" class="mt-0">
<v-col class="px-6 pt-0">
<v-alert
v-for="(message, index) in gitMessages"
:key="'message_' + index"
v-for="(message, index) in warnings"
:key="'warnings_' + index"
text
dense
border="left"
type="info">
color="orange"
:icon="mdiCloseCircle">
{{ message }}
</v-alert>
</v-col>
</v-row>
<v-row v-if="warnings.length" class="mt-0">
<v-row v-show="toggleAnomalies" class="mt-0">
<v-col class="px-6 pt-0">
<v-alert
v-for="(message, index) in warnings"
:key="'warnings_' + index"
v-for="(message, index) in anomalies"
:key="'anomalies_' + index"
text
dense
border="left"
color="orange"
:icon="mdiAlertCircle">
color="info"
:icon="mdiInformation">
{{ message }}
</v-alert>
</v-col>
Expand All @@ -123,7 +127,7 @@ 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,
Expand All @@ -141,11 +145,13 @@ export default class UpdatePanelEntry extends Mixins(BaseMixin) {
mdiInformation = mdiInformation
mdiMenuDown = mdiMenuDown
mdiReload = mdiReload
mdiAlertCircle = mdiAlertCircle
mdiCloseCircle = mdiCloseCircle
boolShowCommitList = false
boolShowUpdateHint = false
toggleAnomalies = false
@Prop({ required: true }) readonly repo!: ServerUpdateManagerStateGitRepo
get name() {
Expand Down Expand Up @@ -244,6 +250,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
}
Expand All @@ -254,19 +264,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 ||
Expand All @@ -280,8 +292,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 ||
Expand All @@ -293,9 +304,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))
Expand All @@ -307,23 +319,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() {
Expand All @@ -337,8 +334,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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 6 additions & 2 deletions src/components/panels/Machine/UpdatePanel/UpdateHintAlert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
12 changes: 9 additions & 3 deletions src/components/panels/Temperature/TemperaturePanelListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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
let rpmNumber = parseInt(this.printerObject.rpm)
Expand Down
Loading

0 comments on commit bf4458e

Please sign in to comment.