FIx THermocam behaviour

This commit is contained in:
Thermo_SIM
2021-03-24 14:17:00 +01:00
parent c5c95f75ae
commit a090ef9fb2
7 changed files with 25 additions and 11 deletions
@@ -3578,11 +3578,14 @@
display: flex;
justify-content: center;
align-items: center;
&:active{
background-image: linear-gradient(to bottom,#002680, #1756ad);
}
}
button:disabled {
background-color: #002680 !important;
;
filter: grayscale(100%);
}
@@ -3758,6 +3758,9 @@ article .box .body {
justify-content: center;
align-items: center;
}
.imageViewerZoom button:active {
background-image: linear-gradient(to bottom, #002680, #1756ad);
}
.imageViewerZoom button:disabled {
background-color: #002680 !important;
filter: grayscale(100%);
@@ -35,6 +35,11 @@ export default class Thermocamera extends Vue {
timeoutLastTakenImage = 0;
timeCamDiff = " ";
tcamBTNStatus:{
enabled: boolean,
visible: boolean
} = {enabled : false, visible: true};
TCamData: {
imageSize: { x: number, y: number },
rangeTemperature: { max: number, min: number },
@@ -45,12 +50,10 @@ export default class Thermocamera extends Vue {
@Watch("warmers", { deep: true })
async ChangedTemps() {
this.btnModeEnabled = false;
this.tcamBTNStatus.enabled = false;
for (const ch of store.state.warmers.channels) {
if (ch.tCamTempSet > 0) {
this.btnModeEnabled = true;
if (ch.tCamTempSet > 0 && ch.tCamActive) {
this.tcamBTNStatus.enabled = true;
break;
}
}
@@ -79,7 +79,7 @@
<div class="input-area grid left">
<label>{{'warmers_thermoprophet_Enabled' | localize('Thermoprophet')}}</label>
<toggle-button v-model="thermocameraModeBTN"></toggle-button>
<toggle-button v-model="thermocameraModeBTN" :status="tcamBTNStatus"></toggle-button>
</div>
<!-- <div class="input-area left grid">
@@ -125,7 +125,7 @@
</div>
<div class="tm-controls">
<button class="btn btn-info square" @click="forceTakeImage()">
<button class="btn btn-info square" @click="forceTakeImage()" :disabled="this.thermocameraModeBTN">
<img src="/assets/icons/png/takesnap.png" />
</button>
<button class="btn btn-info square" @click="openImageModal()">
@@ -148,7 +148,7 @@
</div>
<div class="buttons">
<button class="btn btn-info square icon" @click="zoomIn()">
<button class="btn btn-info square icon" @click="zoomIn()" >
<i class="fa fa-search-plus"></i>
</button>
<button class="btn btn-info square icon" @click="zoomReset()">
@@ -16,7 +16,7 @@ export default class ModalImage extends Vue {
content: string = "";
title: string = "";
mounted() {
this.content = ModalHelper.modalImage.content;
this.title = ModalHelper.modalImage.title;
@@ -1,6 +1,7 @@
import Vue from "vue";
import { Prop, Component } from "vue-property-decorator";
import { warmersService } from "@/services/warmersService";
import { store } from '@/store';
@Component([])
export default class ZoomImage extends Vue {
@@ -43,6 +44,10 @@ export default class ZoomImage extends Vue {
}
get thermocameraModeBTN(): boolean {
return (store.state.warmers.tCamStatus.thermoCamOnOff);
}
close() {
this.$emit("close");
}
@@ -16,7 +16,7 @@
<button @click="close"><i class="fa fa-chevron-left" ></i></button>
</div>
<div class="btngroup2" v-if="true">
<button @click="forceTakeImage()">
<button @click="forceTakeImage()" :disabled="thermocameraModeBTN">
<img src="/assets/icons/png/takesnap.png" />
</button>
</div>