Remote Access: user agent and status display fixes (#31667)
This commit is contained in:
parent
f7a882fcb9
commit
ac08a53e0e
6 changed files with 11 additions and 4 deletions
|
|
@ -243,6 +243,7 @@ export default {
|
|||
case "dimmed":
|
||||
case "curtailed":
|
||||
case "loginBlocked":
|
||||
case "remoteEnabled":
|
||||
return value
|
||||
? this.$t("config.deviceValue.yes")
|
||||
: this.$t("config.deviceValue.no");
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<span v-if="status.connected" class="text-primary">
|
||||
{{ $t("config.remote.connected") }}
|
||||
</span>
|
||||
<span v-else class="text-muted small">
|
||||
<span v-else :class="config.enabled ? 'text-danger' : 'small'">
|
||||
{{ $t("config.remote.disconnected") }}
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -868,13 +868,16 @@ export default defineComponent({
|
|||
return { configured: { value: false } };
|
||||
}
|
||||
const tags: DeviceTags = {
|
||||
enabled: { value: remote.config?.enabled },
|
||||
connected: { value: remote.status?.connected },
|
||||
remoteEnabled: { value: remote.config?.enabled },
|
||||
connected: {
|
||||
value: remote.status?.connected,
|
||||
error: remote.config?.enabled && !remote.status?.connected,
|
||||
},
|
||||
};
|
||||
if (remote.status?.loginBlocked) {
|
||||
tags["loginBlocked"] = { value: true, error: true };
|
||||
}
|
||||
if (remote.status?.connected) {
|
||||
if (remote.config?.enabled) {
|
||||
const lastSeen = remote.status?.lastSeen;
|
||||
const count = lastSeen
|
||||
? Object.keys(lastSeen).filter((u) => isRemoteClientActive(lastSeen, u)).length
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@
|
|||
"price": "Preis",
|
||||
"productionLimited": "Erzeugung begrenzt",
|
||||
"range": "Reichweite",
|
||||
"remoteEnabled": "Aktiviert",
|
||||
"returnEnergy": "Energie (rückwärts)",
|
||||
"singlePhase": "Einphasig",
|
||||
"soc": "Ladestand",
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@
|
|||
"price": "Price",
|
||||
"productionLimited": "Production limited",
|
||||
"range": "Range",
|
||||
"remoteEnabled": "Enabled",
|
||||
"returnEnergy": "Energy (reverse)",
|
||||
"singlePhase": "Single phase",
|
||||
"soc": "Charge",
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ func (t *Tunnel) connect(ctx context.Context) (bool, error) {
|
|||
HTTPHeader: http.Header{
|
||||
"Authorization": []string{"Bearer " + t.token},
|
||||
"X-Sponsor-Token": []string{sponsor.Token},
|
||||
"User-Agent": []string{"evcc/" + util.FormattedVersion()},
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue