Fix updating vehicle limit tooltip (#5398)

This commit is contained in:
Michael Geers 2022-12-07 09:58:45 +01:00 • committed by GitHub
parent 328e96bdfa
commit c726a032ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 23 additions and 22 deletions

View file

@ -11,6 +11,7 @@ smoothscroll.polyfill();
watchThemeChanges();
export const setupVue3 = defineSetupVue3(({ app }) => {
app.config.globalProperties.$hiddenFeatures = true;
app.use(setupI18n());
app.use(VueNumber);
});

View file

@ -3,7 +3,7 @@ import Energyflow from "./Energyflow.vue";
</script>
<template>
<Story :layout="{ type: 'grid', width: 800 }">
<Story>
<Variant title="grid and pv">
<Energyflow
gridConfigured

View file

@ -24,7 +24,7 @@
ref="vehicleTargetSoC"
class="vehicle-target-soc"
data-bs-toggle="tooltip"
:title="$t('main.vehicleSoC.vehicleTarget', { soc: vehicleTargetSoC })"
title=" "
:class="{ 'vehicle-target-soc--active': vehicleTargetSoCActive }"
:style="{ left: `${vehicleTargetSoC}%` }"
/>
@ -166,12 +166,12 @@ export default {
return true;
},
updateTooltip: function () {
this.$nextTick(() => {
if (this.tooltip) {
this.tooltip.dispose();
}
if (!this.tooltip) {
this.tooltip = new Tooltip(this.$refs.vehicleTargetSoC);
});
}
const soc = this.vehicleTargetSoC;
const content = this.$t("main.vehicleSoC.vehicleTarget", { soc });
this.tooltip.setContent({ ".tooltip-inner": content });
},
},
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
dist/index.html vendored
View file

@ -20,8 +20,8 @@
<meta name="theme-color" content="#020318" />
<title>evcc</title>
<script type="module" crossorigin src="./assets/index.b0b5d5cc.js"></script>
<link rel="stylesheet" href="./assets/index.ef0f9994.css">
<script type="module" crossorigin src="./assets/index.934b89d2.js"></script>
<link rel="stylesheet" href="./assets/index.9a693c12.css">
</head>
<body>