Skip to content

Commit

Permalink
updated gui samples
Browse files Browse the repository at this point in the history
  • Loading branch information
benderl committed Sep 30, 2024
1 parent a6e5b30 commit 909cc42
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 76 deletions.
31 changes: 12 additions & 19 deletions docs/samples/samples_gui/backup_cloud.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
<template>
<div class="backup-cloud-sample">
<openwb-base-heading>
Einstellungen für Sample-Backup Cloud
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
</div>
<div class="backup-cloud-sample">
<openwb-base-heading>
Einstellungen für Sample-Backup Cloud
</openwb-base-heading>
</div>
</template>

<script>
import BackupCloudConfigMixin from "../BackupCloudConfigMixin.vue";
export default {
name: "BackupCloudSample",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
},
data() {
return {};
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
name: "BackupCloudSample",
mixins: [BackupCloudConfigMixin],
data() {
return {};
},
};
</script>
14 changes: 7 additions & 7 deletions docs/samples/samples_gui/bat.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<div class="device-sample-bat">
<openwb-base-heading>
Einstellungen für Sample Batteriespeicher
</openwb-base-heading>
</div>
<div class="device-sample-bat">
<openwb-base-heading>
Einstellungen für Sample Batteriespeicher
</openwb-base-heading>
</div>
</template>

<script>
import ComponentConfigMixin from "../../ComponentConfigMixin.vue";
export default {
name: "DeviceSampleBat",
mixins: [ComponentConfigMixin],
name: "DeviceSampleBat",
mixins: [ComponentConfigMixin],
};
</script>
14 changes: 7 additions & 7 deletions docs/samples/samples_gui/counter.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<div class="device-sample-counter">
<openwb-base-heading>
Einstellungen für Sample Zähler
</openwb-base-heading>
</div>
<div class="device-sample-counter">
<openwb-base-heading>
Einstellungen für Sample Zähler
</openwb-base-heading>
</div>
</template>

<script>
import ComponentConfigMixin from "../../ComponentConfigMixin.vue";
export default {
name: "DeviceSampleCounter",
mixins: [ComponentConfigMixin],
name: "DeviceSampleCounter",
mixins: [ComponentConfigMixin],
};
</script>
32 changes: 16 additions & 16 deletions docs/samples/samples_gui/device.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
<template>
<div class="device-sample">
<openwb-base-heading>
Einstellungen für Sample
</openwb-base-heading>
<openwb-base-text-input
title="IP oder Hostname"
subtype="host"
required
:model-value="device.configuration.ip_address"
@update:model-value="
updateConfiguration($event, 'configuration.ip_address')
"
/>
</div>
<div class="device-sample">
<openwb-base-heading>
Einstellungen für Sample
</openwb-base-heading>
<openwb-base-text-input
title="IP oder Hostname"
subtype="host"
required
:model-value="configuration.ip_address"
@update:model-value="
updateConfiguration($event, 'configuration.ip_address')
"
/>
</div>
</template>

<script>
import DeviceConfigMixin from "../../DeviceConfigMixin.vue";
export default {
name: "DeviceSample",
mixins: [DeviceConfigMixin],
name: "DeviceSample",
mixins: [DeviceConfigMixin],
};
</script>
14 changes: 7 additions & 7 deletions docs/samples/samples_gui/inverter.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<div class="device-sample-inverter">
<openwb-base-heading>
Einstellungen für Sample Wechselrichter
</openwb-base-heading>
</div>
<div class="device-sample-inverter">
<openwb-base-heading>
Einstellungen für Sample Wechselrichter
</openwb-base-heading>
</div>
</template>

<script>
import ComponentConfigMixin from "../../ComponentConfigMixin.vue";
export default {
name: "DeviceSampleInverter",
mixins: [ComponentConfigMixin],
name: "DeviceSampleInverter",
mixins: [ComponentConfigMixin],
};
</script>
32 changes: 12 additions & 20 deletions docs/samples/samples_gui/vehicle.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
<template>
<div class="vehicle-soc-sample">
<openwb-base-heading>
Einstellungen für Sample SoC
<span class="small">(Modul: {{ $options.name }})</span>
</openwb-base-heading>
</div>
<div class="vehicle-soc-sample">
<openwb-base-heading>
Einstellungen für Sample SoC
</openwb-base-heading>
</div>
</template>

<script>
import VehicleConfigMixin from "../VehicleConfigMixin.vue";
export default {
name: "VehicleSocSample",
emits: ["update:configuration"],
props: {
configuration: { type: Object, required: true },
vehicleId: { required: true },
},
data() {
return {};
},
methods: {
updateConfiguration(event, path = undefined) {
this.$emit("update:configuration", { value: event, object: path });
},
},
name: "VehicleSocSample",
mixins: [VehicleConfigMixin],
data() {
return {};
},
};
</script>

0 comments on commit 909cc42

Please sign in to comment.