core: binary state ui

This commit is contained in:
Koushik Dutta
2021-09-25 17:54:48 -07:00
parent 19cf422264
commit b8384307b7
4 changed files with 33 additions and 3 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@scrypted/core",
"version": "0.0.97",
"version": "0.0.98",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@scrypted/core",
"version": "0.0.97",
"version": "0.0.98",
"license": "Apache-2.0",
"dependencies": {
"@scrypted/sdk": "file:../../sdk",

View File

@@ -1,6 +1,6 @@
{
"name": "@scrypted/core",
"version": "0.0.97",
"version": "0.0.98",
"description": "Scrypted Core plugin. Provides the UI, websocket, and engine.io APIs.",
"author": "Scrypted",
"license": "Apache-2.0",

View File

@@ -412,6 +412,7 @@ import Thermometer from "../interfaces/sensors/Thermometer.vue";
import HumiditySensor from "../interfaces/sensors/HumiditySensor.vue";
import EntrySensor from "../interfaces/sensors/EntrySensor.vue";
import MotionSensor from "../interfaces/sensors/MotionSensor.vue";
import BinarySensor from "../interfaces/sensors/BinarySensor.vue";
import AudioSensor from "../interfaces/sensors/AudioSensor.vue";
import OccupancySensor from "../interfaces/sensors/OccupancySensor.vue";
import Settings from "../interfaces/Settings.vue";
@@ -446,6 +447,7 @@ const cardHeaderInterfaces = [
ScryptedInterface.OccupancySensor,
ScryptedInterface.EntrySensor,
ScryptedInterface.MotionSensor,
ScryptedInterface.BinarySensor,
ScryptedInterface.AudioSensor,
ScryptedInterface.HumiditySensor,
ScryptedInterface.Thermometer,
@@ -540,6 +542,7 @@ export default {
HumiditySensor,
EntrySensor,
MotionSensor,
BinarySensor,
AudioSensor,
OccupancySensor,

View File

@@ -0,0 +1,27 @@
<template>
<v-tooltip left>
<template v-slot:activator="{ on }">
<v-icon
v-on="on"
v-if="lazyValue.binaryState"
class="mr-1 mr-1"
small
>fa-circle</v-icon>
<v-icon
v-on="on"
v-else
class="mr-1 mr-1"
small
>far fa-circle</v-icon>
</template>
<span>{{ !lazyValue.binaryState ? 'Binary State True ' : 'Binary State False' }}</span>
</v-tooltip>
</template>
<script>
import RPCInterface from "../RPCInterface.vue";
export default {
mixins: [RPCInterface]
};
</script>