ui_migration bugfix(store) mixin and wot store overlap, calling reactive variable as function error
This commit is contained in:
parent
8ad4f09229
commit
0b99d0b9b6
2 changed files with 23 additions and 9 deletions
|
|
@ -68,7 +68,7 @@
|
||||||
:tab-i-d="item.id"
|
:tab-i-d="item.id"
|
||||||
:require-connection="true"
|
:require-connection="true"
|
||||||
:current-tab="currentTab"
|
:current-tab="currentTab"
|
||||||
>
|
>
|
||||||
<component :is="item.component" @scroll-top="scrollToTop"></component>
|
<component :is="item.component" @scroll-top="scrollToTop"></component>
|
||||||
</tabContent>
|
</tabContent>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="host-input">
|
<div class="host-input">
|
||||||
<div v-if="$store.state.available">
|
<div v-if="available">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-small-bottom">
|
<div class="uk-margin-small-bottom">
|
||||||
<b>Microscope Hostname:</b>
|
<b>Microscope Hostname:</b>
|
||||||
<br />
|
<br />
|
||||||
{{ $store.state.microscopeHostname }}
|
{{ microscopeHostname }}
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-small-bottom">
|
<div class="uk-margin-small-bottom">
|
||||||
<b>API Origin:</b>
|
<b>API Origin:</b>
|
||||||
<br />
|
<br />
|
||||||
{{ $store.state.origin }}
|
{{ origin }}
|
||||||
</div>
|
</div>
|
||||||
<action-button
|
<action-button
|
||||||
v-if="illuminationType"
|
v-if="illuminationType"
|
||||||
|
|
@ -56,14 +56,17 @@
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="$store.state.waiting">Loading...</div>
|
<div v-else-if="waiting">Loading...</div>
|
||||||
<div v-else-if="$store.state.error"><b>Error:</b> {{ $store.state.error }}</div>
|
<div v-else-if="error"><b>Error:</b> {{ error }}</div>
|
||||||
<div v-else>No active connection</div>
|
<div v-else>No active connection</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ActionButton from "../../labThingsComponents/actionButton.vue";
|
import ActionButton from "../../labThingsComponents/actionButton.vue";
|
||||||
|
import { mapState, mapWritableState } from "pinia";
|
||||||
|
import { useSettingsStore } from "@/stores/settings.js";
|
||||||
|
import { useWotStore } from "@/stores/wot.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StatusPane",
|
name: "StatusPane",
|
||||||
|
|
@ -79,16 +82,27 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(useSettingsStore, [
|
||||||
|
"origin",
|
||||||
|
"microscopeHostname",
|
||||||
|
"available",
|
||||||
|
"waiting",
|
||||||
|
] ),
|
||||||
|
...mapState(useWotStore, [
|
||||||
|
"thingDescriptions",
|
||||||
|
]),
|
||||||
|
...mapWritableState(useSettingsStore, ["error"]),
|
||||||
|
|
||||||
cameraType() {
|
cameraType() {
|
||||||
// No need to check as the microscope won't start up without a camera defined
|
// No need to check as the microscope won't start up without a camera defined
|
||||||
return this.thingDescription("camera").title;
|
return this.thingDescriptions["camera"]?.title;
|
||||||
},
|
},
|
||||||
stageType() {
|
stageType() {
|
||||||
return this.thingAvailable("stage") ? this.thingDescription("stage").title : undefined;
|
return this.thingAvailable("stage") ? this.thingDescriptions["stage"]?.title : undefined;
|
||||||
},
|
},
|
||||||
illuminationType() {
|
illuminationType() {
|
||||||
return this.thingAvailable("illumination")
|
return this.thingAvailable("illumination")
|
||||||
? this.thingDescription("illumination").title
|
? this.thingDescriptions["illumination"]?.title
|
||||||
: undefined;
|
: undefined;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue