diff --git a/Web App/web/src/App.vue b/Web App/web/src/App.vue index 6b869fa..05df09a 100644 --- a/Web App/web/src/App.vue +++ b/Web App/web/src/App.vue @@ -36,6 +36,7 @@ const userInitial = computed(() => const nav = computed(() => [ { to: "/", label: t("nav.garage"), icon: "grid", exact: true }, + { to: "/charging", label: t("nav.charging"), icon: "bolt" }, { to: "/settings", label: t("nav.settings"), icon: "gear" }, isAdmin.value ? { to: "/admin", label: t("nav.users"), icon: "users" } : null, ].filter(Boolean) @@ -84,6 +85,8 @@ onBeforeUnmount(() => themeObserver?.disconnect()); > + + diff --git a/Web App/web/src/i18n/da.json b/Web App/web/src/i18n/da.json index dd89804..4ce7432 100644 --- a/Web App/web/src/i18n/da.json +++ b/Web App/web/src/i18n/da.json @@ -23,6 +23,7 @@ "nav": { "garage": "Garage", + "charging": "Opladning", "settings": "Indstillinger", "users": "Brugere", "lightMode": "Lys tilstand", @@ -31,6 +32,34 @@ "logOut": "Log ud" }, + "charging": { + "eyebrow": "Opladning og kort", + "title": "Ladere i nærheden", + "liveMap": "Live-kort", + "youAreHere": "Du er her", + "session": { + "chargingNow": "Oplader nu", + "rate": "Effekt", + "added": "Tilføjet", + "cost": "Pris", + "done": "Færdig", + "stop": "Stop opladning", + "idle": "Oplader ikke", + "idleHint": "Tilslut ved en station for at starte en session." + }, + "stations": { + "heading": "I nærheden", + "count": { + "one": "{n} station", + "other": "{n} stationer" + }, + "free": "{avail} af {total} ledige", + "full": "Optaget", + "offPeak": "uden for spidsbelastning", + "homeCharger": "Hjemmelader" + } + }, + "login": { "title": "Log ind", "tagline": "Styr på din bil.", diff --git a/Web App/web/src/i18n/en.json b/Web App/web/src/i18n/en.json index 0a5f2e8..3c7206d 100644 --- a/Web App/web/src/i18n/en.json +++ b/Web App/web/src/i18n/en.json @@ -23,6 +23,7 @@ "nav": { "garage": "Garage", + "charging": "Charging", "settings": "Settings", "users": "Users", "lightMode": "Light mode", @@ -31,6 +32,34 @@ "logOut": "Log out" }, + "charging": { + "eyebrow": "Charging & map", + "title": "Nearby chargers", + "liveMap": "Live map", + "youAreHere": "You are here", + "session": { + "chargingNow": "Charging now", + "rate": "Rate", + "added": "Added", + "cost": "Cost", + "done": "Done", + "stop": "Stop charging", + "idle": "Not charging", + "idleHint": "Plug in at a station to start a session." + }, + "stations": { + "heading": "Nearby", + "count": { + "one": "{n} station", + "other": "{n} stations" + }, + "free": "{avail} of {total} free", + "full": "Full", + "offPeak": "off-peak", + "homeCharger": "Home charger" + } + }, + "login": { "title": "Sign in", "tagline": "Your car, on track.", diff --git a/Web App/web/src/i18n/pl.json b/Web App/web/src/i18n/pl.json index 3e15e85..c52849e 100644 --- a/Web App/web/src/i18n/pl.json +++ b/Web App/web/src/i18n/pl.json @@ -23,6 +23,7 @@ "nav": { "garage": "Garaż", + "charging": "Ładowanie", "settings": "Ustawienia", "users": "Użytkownicy", "lightMode": "Tryb jasny", @@ -31,6 +32,36 @@ "logOut": "Wyloguj się" }, + "charging": { + "eyebrow": "Ładowanie i mapa", + "title": "Ładowarki w pobliżu", + "liveMap": "Mapa na żywo", + "youAreHere": "Tu jesteś", + "session": { + "chargingNow": "Ładowanie w toku", + "rate": "Moc", + "added": "Dodano", + "cost": "Koszt", + "done": "Koniec", + "stop": "Zatrzymaj ładowanie", + "idle": "Brak ładowania", + "idleHint": "Podłącz na stacji, aby rozpocząć sesję." + }, + "stations": { + "heading": "W pobliżu", + "count": { + "one": "{n} stacja", + "few": "{n} stacje", + "many": "{n} stacji", + "other": "{n} stacji" + }, + "free": "{avail} z {total} wolnych", + "full": "Zajęte", + "offPeak": "poza szczytem", + "homeCharger": "Ładowarka domowa" + } + }, + "login": { "title": "Zaloguj się", "tagline": "Twój samochód pod kontrolą.", diff --git a/Web App/web/src/router.js b/Web App/web/src/router.js index 086d11c..b0e7c54 100644 --- a/Web App/web/src/router.js +++ b/Web App/web/src/router.js @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from "vue-router"; import Dashboard from "./views/Dashboard.vue"; import CarDetail from "./views/CarDetail.vue"; +import Charging from "./views/Charging.vue"; import Login from "./views/Login.vue"; import Settings from "./views/Settings.vue"; import AdminUsers from "./views/AdminUsers.vue"; @@ -9,6 +10,7 @@ import { isAuthenticated, isAdmin } from "./auth"; const routes = [ { path: "/login", name: "login", component: Login, meta: { public: true } }, { path: "/", name: "dashboard", component: Dashboard }, + { path: "/charging", name: "charging", component: Charging }, { path: "/cars/:id", name: "car", component: CarDetail, props: true }, { path: "/settings", name: "settings", component: Settings }, { path: "/admin", name: "admin", component: AdminUsers, meta: { admin: true } }, diff --git a/Web App/web/src/views/Charging.vue b/Web App/web/src/views/Charging.vue new file mode 100644 index 0000000..b6fd425 --- /dev/null +++ b/Web App/web/src/views/Charging.vue @@ -0,0 +1,174 @@ + + + + + + {{ t("charging.eyebrow") }} + {{ t("charging.title") }} + + + + + + + + + + + + + + {{ t("charging.liveMap") }} + + + + + + + + + + + + {{ s.avail }}/{{ s.total }} · {{ s.kw }} kW + + + + + + + + + + + + + + {{ t("charging.session.chargingNow") }} · {{ session.car }} + + + {{ session.from }} % → {{ session.to }}% + + + + + + + {{ m.label }} + {{ m.value }} + + + {{ t("charging.session.stop") }} + + + + + {{ t("charging.session.idle") }} + + {{ t("charging.session.idleHint") }} + + + + + + + {{ t("charging.stations.heading") }} · {{ t("charging.stations.count", { n: stations.length }) }} + + + + + + + {{ s.name }} + {{ s.dist }} · {{ s.kw }} kW · {{ s.conn }} + + + {{ stationStatus(s) }} + {{ s.price }} + + + + + + +
{{ t("charging.eyebrow") }}
{{ t("charging.session.idleHint") }}