UI: show real battery buffer start value (#16582)
This commit is contained in:
parent
532f77fdea
commit
184a95d318
1 changed files with 10 additions and 4 deletions
|
|
@ -160,7 +160,7 @@
|
|||
@change="changeBufferStart"
|
||||
>
|
||||
<span class="text-decoration-underline">
|
||||
{{ bufferStartOption.name }}
|
||||
{{ selectedBufferStartName }}
|
||||
</span>
|
||||
</CustomSelect>
|
||||
</small>
|
||||
|
|
@ -332,9 +332,7 @@ export default {
|
|||
for (let i = 100; i >= this.bufferSoc; i -= 5) {
|
||||
options.push({
|
||||
value: i,
|
||||
name: this.$t(`batterySettings.bufferStart.${i === 100 ? "full" : "above"}`, {
|
||||
soc: this.fmtSoc(i),
|
||||
}),
|
||||
name: this.getBufferStartName(i),
|
||||
});
|
||||
}
|
||||
options.push({
|
||||
|
|
@ -346,6 +344,9 @@ export default {
|
|||
bufferStartOption() {
|
||||
return this.bufferStartOptions.find((option) => this.bufferStartSoc >= option.value);
|
||||
},
|
||||
selectedBufferStartName() {
|
||||
return this.getBufferStartName(this.selectedBufferStartSoc);
|
||||
},
|
||||
topHeight() {
|
||||
return 100 - (this.bufferSoc || 100);
|
||||
},
|
||||
|
|
@ -488,6 +489,11 @@ export default {
|
|||
console.error(err);
|
||||
}
|
||||
},
|
||||
getBufferStartName(soc) {
|
||||
return this.$t(`batterySettings.bufferStart.${soc === 100 ? "full" : "above"}`, {
|
||||
soc: this.fmtSoc(soc),
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue