Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: npm dependency upgrade; vue-meta > @unhead/vue #11155

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions assets/js/app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import "bootstrap/dist/css/bootstrap.min.css";
import "../css/app.css";
import { createApp, h } from "vue";
import { createMetaManager, plugin as metaPlugin } from "vue-meta";
import { VueHeadMixin, createHead } from "@unhead/vue"; // not deprecated. see https://github.com/unjs/unhead/issues/291
import App from "./views/App.vue";
import setupRouter from "./router";
import setupI18n from "./i18n";
Expand Down Expand Up @@ -60,11 +60,13 @@ const app = createApp({
});

const i18n = setupI18n();
const head = createHead();

app.use(i18n);
app.use(setupRouter(i18n));
app.use(createMetaManager());
app.use(metaPlugin);
app.use(featureflags);
app.use(head);
app.mixin(VueHeadMixin); // not deprecated. see https://github.com/unjs/unhead/issues/291
window.app = app.mount("#app");

watchThemeChanges();
6 changes: 3 additions & 3 deletions assets/js/components/Savings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
(referenceGrid - avgPrice) * totalCharged,
currency,
false
)} ${fmtCurrencySymbol(currency)} ${$t(
)} ${fmtCurrencySymbol(currency)} ${$t(
'footer.savings.moneySaved'
)}`
)}`
: ''
"
/>
Expand All @@ -116,7 +116,7 @@
1000,
0,
'kilogram'
)} ${$t('footer.savings.co2Saved')}`
)} ${$t('footer.savings.co2Saved')}`
: ''
"
/>
Expand Down
4 changes: 2 additions & 2 deletions assets/js/components/VehicleStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ export default {
? t("cleanEnergyCharging", {
co2: this.fmtCo2Short(this.tariffCo2),
limit: this.fmtCo2Short(this.smartCostLimit),
})
})
: t("cheapEnergyCharging", {
price: this.fmtPricePerKWh(this.tariffGrid, this.currency, true),
limit: this.fmtPricePerKWh(this.smartCostLimit, this.currency, true),
});
});
}

if (this.pvTimerActive && !this.enabled && this.pvAction === "enable") {
Expand Down
10 changes: 4 additions & 6 deletions assets/js/views/App.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<div class="app">
<metainfo>
<template #title="{ content }">{{ content ? `${content} | evcc` : `evcc` }}</template>
</metainfo>
<router-view :notifications="notifications" :offline="offline"></router-view>
</div>
</template>
Expand All @@ -19,6 +16,10 @@ export default {
data: () => {
return { reconnectTimeout: null, ws: null };
},
head() {
const siteTitle = store.state.siteTitle;
return { title: siteTitle ? `${siteTitle} | evcc` : "evcc" };
},
mounted: function () {
this.connect();
document.addEventListener("visibilitychange", this.pageVisibilityChanged, false);
Expand Down Expand Up @@ -109,9 +110,6 @@ export default {
window.location.reload();
},
},
metaInfo() {
return { title: store.state.siteTitle || "" };
},
};
</script>
<style scoped>
Expand Down
3 changes: 3 additions & 0 deletions assets/js/views/ChargingSessions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ export default {
selectedColumns: settings.sessionColumns,
};
},
head() {
return { title: `${this.$t("sessions.title")} | evcc` };
},
computed: {
currentSessions() {
const sessionsWithDefaults = this.sessions.map((session) => {
Expand Down
Loading
Loading