1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
import { createApp } from 'vue'
import { createI18n } from "vue-i18n";
import App from './App.vue'
import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { store } from './plugins/store';
import PlayView from "./views/PlayView.vue";
import ChangelogView from "./views/ChangelogView.vue";
import ModsView from "./views/ModsView.vue";
import SettingsView from "./views/SettingsView.vue";
import DeveloperView from "./views/DeveloperView.vue";
import RepairView from "./views/RepairView.vue";
import {createRouter, createWebHashHistory} from "vue-router";
import en from "./i18n/lang/en.json";
import fr from "./i18n/lang/fr.json";
import da from "./i18n/lang/da.json";
import de from "./i18n/lang/de.json";
import pl from "./i18n/lang/pl.json";
import ru from "./i18n/lang/ru.json";
import it from "./i18n/lang/it.json";
import zh_Hans from "./i18n/lang/zh_Hans.json";
const app = createApp(App);
// internationalization
export const i18n = createI18n({
locale: 'en',
fallbackLocale: 'en',
messages: {
en, fr, da, de, pl, ru, it, zh_Hans
}
});
app.use(i18n);
// styles
import 'element-plus/theme-chalk/index.css';
import './style.css'
app.use(ElementPlus);
// icons
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
app.component(key, component);
}
// style
app.use( store, '$store' );
// routes
const routes = [
{ path: '/', name: 'Main', component: async () => PlayView},
{ path: '/changelog', name: 'Changelog', component: async () => ChangelogView},
{ path: '/mods', name: 'Mods', component: async () => ModsView},
{ path: '/settings', name: 'Settings', component: async () => SettingsView},
{ path: '/dev', name: 'Dev', component: async () => DeveloperView},
{ path: '/repair', name: 'Repair', component: async () => RepairView},
];
export const router = createRouter({
history: createWebHashHistory(),
routes, // short for `routes: routes`
});
app.use(router);
app.mount('#app')
|