-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.js
135 lines (128 loc) · 2.38 KB
/
main.js
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// init app
import { createApp } from 'vue';
import App from '@/App.vue';
const app = createApp(App);
// service worker
import '@/registerServiceWorker';
// FontAwesome icons
import { library } from '@fortawesome/fontawesome-svg-core';
import {
faTimes,
faPlus,
faCircle,
faChevronRight,
faChevronUp,
faChevronLeft,
faChevronDown,
faDotCircle,
faUndoAlt,
faAngleUp,
faAngleDoubleUp,
faCheck,
faSignOutAlt,
faTachometerAlt,
faGraduationCap,
faBroom,
faDiceSix,
faUmbrellaBeach,
faMonument,
faTrophy,
faShieldAlt,
faChurch,
faChartLine,
faAward,
faNewspaper,
faBowlingBall,
faLeaf,
faGrinTongueWink,
faTasks,
faDumbbell,
faHandSpock,
faInfoCircle,
faShoePrints
} from '@fortawesome/free-solid-svg-icons';
import {
faTwitter,
faGithub,
faDev
} from '@fortawesome/free-brands-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
library.add(
faTimes,
faPlus,
faCircle,
faChevronRight,
faChevronUp,
faChevronLeft,
faChevronDown,
faDotCircle,
faUndoAlt,
faAngleUp,
faAngleDoubleUp,
faCheck,
faSignOutAlt,
faTachometerAlt,
faGraduationCap,
faBroom,
faDiceSix,
faUmbrellaBeach,
faMonument,
faTrophy,
faShieldAlt,
faChurch,
faChartLine,
faAward,
faNewspaper,
faBowlingBall,
faLeaf,
faGrinTongueWink,
faTasks,
faDumbbell,
faHandSpock,
faInfoCircle,
faShoePrints,
faTwitter,
faGithub,
faDev
);
app.component('font-awesome-icon', FontAwesomeIcon);
// vue-notification
import Notifications from '@kyvg/vue3-notification';
app.use(Notifications);
// global mixin
app.mixin({
computed: {
// static language list of existing translations
languages: () => ({
'de': 'Deutsch',
'en': 'English',
'fr': 'Francais',
'it': 'Italiano',
'pt-br': 'Português (brasileiro)'
}),
}
})
// Vue i18n
import de from '@/locales/de.json';
import en from '@/locales/en.json';
import fr from '@/locales/fr.json';
import it from '@/locales/it.json';
import ptbr from '@/locales/pt-br.json';
import { createI18n } from 'vue-i18n';
const i18n = createI18n({
locale: navigator.language || navigator.userLanguage,
fallbackLocale: 'en',
legacy: false,
messages: {
'de': de,
'en': en,
'fr': fr,
'it': it,
'pt-br': ptbr,
}
});
app.use(i18n);
// set global properties
app.provide('version', APP_VERSION);
// ready? let's go!
app.mount('#app');