Adam Stachowicz
3 years ago
6 changed files with 149 additions and 164 deletions
@ -0,0 +1,46 @@ |
|||||
|
import { createI18n } from "vue-i18n"; |
||||
|
import daDK from "./languages/da-DK"; |
||||
|
import deDE from "./languages/de-DE"; |
||||
|
import en from "./languages/en"; |
||||
|
import esEs from "./languages/es-ES"; |
||||
|
import etEE from "./languages/et-EE"; |
||||
|
import frFR from "./languages/fr-FR"; |
||||
|
import itIT from "./languages/it-IT"; |
||||
|
import ja from "./languages/ja"; |
||||
|
import koKR from "./languages/ko-KR"; |
||||
|
import nlNL from "./languages/nl-NL"; |
||||
|
import pl from "./languages/pl"; |
||||
|
import ruRU from "./languages/ru-RU"; |
||||
|
import sr from "./languages/sr"; |
||||
|
import srLatn from "./languages/sr-latn"; |
||||
|
import svSE from "./languages/sv-SE"; |
||||
|
import zhCN from "./languages/zh-CN"; |
||||
|
import zhHK from "./languages/zh-HK"; |
||||
|
|
||||
|
const languageList = { |
||||
|
en, |
||||
|
"zh-HK": zhHK, |
||||
|
"de-DE": deDE, |
||||
|
"nl-NL": nlNL, |
||||
|
"es-ES": esEs, |
||||
|
"fr-FR": frFR, |
||||
|
"it-IT": itIT, |
||||
|
"ja": ja, |
||||
|
"da-DK": daDK, |
||||
|
"sr": sr, |
||||
|
"sr-latn": srLatn, |
||||
|
"sv-SE": svSE, |
||||
|
"ko-KR": koKR, |
||||
|
"ru-RU": ruRU, |
||||
|
"zh-CN": zhCN, |
||||
|
"pl": pl, |
||||
|
"et-EE": etEE, |
||||
|
}; |
||||
|
|
||||
|
export const i18n = createI18n({ |
||||
|
locale: localStorage.locale || "en", |
||||
|
fallbackLocale: "en", |
||||
|
silentFallbackWarn: true, |
||||
|
silentTranslationWarn: false, |
||||
|
messages: languageList, |
||||
|
}); |
@ -0,0 +1,71 @@ |
|||||
|
import { createRouter, createWebHistory } from "vue-router"; |
||||
|
import EmptyLayout from "./layouts/EmptyLayout.vue"; |
||||
|
import Layout from "./layouts/Layout.vue"; |
||||
|
import Dashboard from "./pages/Dashboard.vue"; |
||||
|
import DashboardHome from "./pages/DashboardHome.vue"; |
||||
|
import Details from "./pages/Details.vue"; |
||||
|
import EditMonitor from "./pages/EditMonitor.vue"; |
||||
|
import List from "./pages/List.vue"; |
||||
|
import Settings from "./pages/Settings.vue"; |
||||
|
import Setup from "./pages/Setup.vue"; |
||||
|
|
||||
|
const routes = [ |
||||
|
{ |
||||
|
path: "/", |
||||
|
component: Layout, |
||||
|
children: [ |
||||
|
{ |
||||
|
name: "root", |
||||
|
path: "", |
||||
|
component: Dashboard, |
||||
|
children: [ |
||||
|
{ |
||||
|
name: "DashboardHome", |
||||
|
path: "/dashboard", |
||||
|
component: DashboardHome, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: "/dashboard/:id", |
||||
|
component: EmptyLayout, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: "", |
||||
|
component: Details, |
||||
|
}, |
||||
|
{ |
||||
|
path: "/edit/:id", |
||||
|
component: EditMonitor, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
{ |
||||
|
path: "/add", |
||||
|
component: EditMonitor, |
||||
|
}, |
||||
|
{ |
||||
|
path: "/list", |
||||
|
component: List, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
{ |
||||
|
path: "/settings", |
||||
|
component: Settings, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
|
||||
|
], |
||||
|
|
||||
|
}, |
||||
|
{ |
||||
|
path: "/setup", |
||||
|
component: Setup, |
||||
|
}, |
||||
|
] |
||||
|
|
||||
|
export const router = createRouter({ |
||||
|
linkActiveClass: "active", |
||||
|
history: createWebHistory(), |
||||
|
routes, |
||||
|
}); |
Loading…
Reference in new issue