Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eadf2e1527 | ||
|
|
737b94995d | ||
|
|
35e6a2a5c4 | ||
|
|
05069ee43b |
No files matched your search
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "2.2.0-beta1",
|
||||
"version": "2.2.0-beta2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "mainsail",
|
||||
"version": "2.2.0-beta1",
|
||||
"version": "2.2.0-beta2",
|
||||
"dependencies": {
|
||||
"@codemirror/basic-setup": "^0.19.0",
|
||||
"@codemirror/highlight": "^0.19.6",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mainsail",
|
||||
"version": "2.2.0-beta1",
|
||||
"version": "2.2.0-beta2",
|
||||
"private": true,
|
||||
"decription": "a klipper web interface",
|
||||
"author": {
|
||||
|
||||
@@ -396,7 +396,7 @@
|
||||
{{ $t('Files.Rename') }}
|
||||
</v-list-item>
|
||||
<v-list-item v-if="!contextMenu.item.isDirectory" @click="editFile(contextMenu.item)">
|
||||
<v-icon class="mr-1">{{ mdiPencil }}</v-icon>
|
||||
<v-icon class="mr-1">{{ mdiFileDocumentEditOutline }}</v-icon>
|
||||
{{ $t('Files.EditFile') }}
|
||||
</v-list-item>
|
||||
<v-list-item v-if="!contextMenu.item.isDirectory" @click="renameFile(contextMenu.item)">
|
||||
@@ -561,7 +561,7 @@ import {
|
||||
mdiRenameBox,
|
||||
mdiUpload,
|
||||
mdiVideo3d,
|
||||
mdiPencil,
|
||||
mdiFileDocumentEditOutline,
|
||||
} from '@mdi/js'
|
||||
import StartPrintDialog from '@/components/dialogs/StartPrintDialog.vue'
|
||||
|
||||
@@ -609,7 +609,7 @@ export default class GcodefilesPanel extends Mixins(BaseMixin) {
|
||||
mdiVideo3d = mdiVideo3d
|
||||
mdiCloudDownload = mdiCloudDownload
|
||||
mdiRenameBox = mdiRenameBox
|
||||
mdiPencil = mdiPencil
|
||||
mdiFileDocumentEditOutline = mdiFileDocumentEditOutline
|
||||
mdiDelete = mdiDelete
|
||||
mdiCloseThick = mdiCloseThick
|
||||
mdiCheckboxBlankOutline = mdiCheckboxBlankOutline
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
{{ $t('Files.Download') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="editFile(contextMenu.item)">
|
||||
<v-icon class="mr-1">{{ mdiPencil }}</v-icon>
|
||||
<v-icon class="mr-1">{{ mdiFileDocumentEditOutline }}</v-icon>
|
||||
{{ $t('Files.EditFile') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="renameFile(contextMenu.item)">
|
||||
@@ -167,7 +167,7 @@ import {
|
||||
mdiFire,
|
||||
mdiVideo3d,
|
||||
mdiCloudDownload,
|
||||
mdiPencil,
|
||||
mdiFileDocumentEditOutline,
|
||||
mdiRenameBox,
|
||||
mdiDelete,
|
||||
mdiCloseThick,
|
||||
@@ -191,7 +191,7 @@ export default class StatusPanelGcodefiles extends Mixins(BaseMixin) {
|
||||
mdiFire = mdiFire
|
||||
mdiVideo3d = mdiVideo3d
|
||||
mdiCloudDownload = mdiCloudDownload
|
||||
mdiPencil = mdiPencil
|
||||
mdiFileDocumentEditOutline = mdiFileDocumentEditOutline
|
||||
mdiRenameBox = mdiRenameBox
|
||||
mdiDelete = mdiDelete
|
||||
mdiCloseThick = mdiCloseThick
|
||||
|
||||
@@ -150,6 +150,7 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
|
||||
// we're done reading the jpeg. Time to render it.
|
||||
else {
|
||||
img.src = URL.createObjectURL(new Blob([imageBuffer], { type: TYPE_JPEG }))
|
||||
img.onload = () => URL.revokeObjectURL(img.src)
|
||||
frames++
|
||||
contentLength = 0
|
||||
bytesRead = 0
|
||||
@@ -181,6 +182,7 @@ export default class Mjpegstreamer extends Mixins(BaseMixin) {
|
||||
}
|
||||
|
||||
stopStream() {
|
||||
URL.revokeObjectURL(this.url)
|
||||
if (this.timerFPS) clearTimeout(this.timerFPS)
|
||||
if (this.timerRestart) clearTimeout(this.timerRestart)
|
||||
this.controller?.abort()
|
||||
|
||||
@@ -5,34 +5,23 @@
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<vue-load-image v-observe-visibility="visibilityChanged">
|
||||
<img slot="image" :src="url" alt="Preview" :style="webcamStyle" class="webcamImage" />
|
||||
<div slot="preloader" class="text-center py-5">
|
||||
<v-progress-circular indeterminate color="primary"></v-progress-circular>
|
||||
</div>
|
||||
<div slot="error" class="text-center py-5">
|
||||
<v-icon x-large>{{ mdiWebcamOff }}</v-icon>
|
||||
<div class="subtitle-1 mt-2">{{ $t('Panels.WebcamPanel.UrlNotAvailable') }}</div>
|
||||
</div>
|
||||
</vue-load-image>
|
||||
<img ref="webcamUv4lMjpegImage" :src="url" :alt="camSettings.name" :style="webcamStyle" class="webcamImage" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Mixins, Prop } from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
import { GuiWebcamStateWebcam } from '@/store/gui/webcams/types'
|
||||
import { mdiWebcamOff } from '@mdi/js'
|
||||
|
||||
@Component
|
||||
export default class Uv4lMjpeg extends Mixins(BaseMixin) {
|
||||
mdiWebcamOff = mdiWebcamOff
|
||||
|
||||
private isVisible = true
|
||||
|
||||
@Prop({ required: true }) declare readonly camSettings: GuiWebcamStateWebcam
|
||||
|
||||
@Prop({ default: null }) declare readonly printerUrl: string | null
|
||||
|
||||
declare $refs: {
|
||||
webcamUv4lMjpegImage: HTMLImageElement
|
||||
}
|
||||
|
||||
get url() {
|
||||
const baseUrl = this.camSettings.urlStream
|
||||
const url = new URL(baseUrl, this.printerUrl === null ? this.hostUrl.toString() : this.printerUrl)
|
||||
@@ -49,8 +38,11 @@ export default class Uv4lMjpeg extends Mixins(BaseMixin) {
|
||||
return ''
|
||||
}
|
||||
|
||||
visibilityChanged(isVisible: boolean) {
|
||||
this.isVisible = isVisible
|
||||
beforeDestroy() {
|
||||
if (this.$refs.webcamUv4lMjpegImage) {
|
||||
this.$refs.webcamUv4lMjpegImage.removeAttribute('src')
|
||||
URL.revokeObjectURL(this.url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user