Mercurial > gemma
annotate client/src/main.js @ 1789:4a7aa3f57efe
importschedule: frontend for WW_Area and Fairwaydimensions
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 14 Jan 2019 10:33:20 +0100 |
parents | b38a71d1c08a |
children | 67340ceecc5f |
rev | line source |
---|---|
1243
24797f66f268
Client: remove (minor) superfluous things
Bernhard Reiter <bernhard@intevation.de>
parents:
1163
diff
changeset
|
1 /* This is Free Software under GNU Affero General Public License v >= 3.0 |
1019
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
2 * without warranty, see README.md and license for details. |
1243
24797f66f268
Client: remove (minor) superfluous things
Bernhard Reiter <bernhard@intevation.de>
parents:
1163
diff
changeset
|
3 * |
1019
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
4 * SPDX-License-Identifier: AGPL-3.0-or-later |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
5 * License-Filename: LICENSES/AGPL-3.0.txt |
1243
24797f66f268
Client: remove (minor) superfluous things
Bernhard Reiter <bernhard@intevation.de>
parents:
1163
diff
changeset
|
6 * |
1363 | 7 * Copyright (C) 2018 by via donau |
1019
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
8 * – Österreichische Wasserstraßen-Gesellschaft mbH |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
9 * Software engineering by Intevation GmbH |
1243
24797f66f268
Client: remove (minor) superfluous things
Bernhard Reiter <bernhard@intevation.de>
parents:
1163
diff
changeset
|
10 * |
1019
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
11 * Author(s): |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
12 * Thomas Junk <thomas.junk@intevation.de> |
1363 | 13 * Markus Kottländer <markus@intevation.de> |
1019
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
14 */ |
ca628dce90dd
Licensing information added
Thomas Junk <thomas.junk@intevation.de>
parents:
880
diff
changeset
|
15 |
3 | 16 import Vue from "vue"; |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
1243
diff
changeset
|
17 import App from "./components/App.vue"; |
3 | 18 import router from "./router"; |
19 import store from "./store"; | |
141 | 20 import GetTextPlugin from "vue-gettext"; |
1272
bc55ffaeb639
cleaned up client/src directory
Markus Kottlaender <markus@intevation.de>
parents:
1243
diff
changeset
|
21 import translations from "./locale/translations.json"; |
159
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
22 import locale2 from "locale2"; |
1368
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
23 import Snotify, { SnotifyPosition } from "vue-snotify"; |
159
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
24 import "../node_modules/bootstrap/dist/css/bootstrap.min.css"; |
428
d7a06b9fffc9
feat: Usability for usermanagement improved.
Thomas Junk <thomas.junk@intevation.de>
parents:
375
diff
changeset
|
25 import "../node_modules/animate.css/animate.min.css"; |
159
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
26 import "../node_modules/ol/ol.css"; |
713
badbc0207418
feat: systeminformation feature added
Thomas Junk <thomas.junk@intevation.de>
parents:
565
diff
changeset
|
27 import "../node_modules/highlight.js/styles/paraiso-dark.css"; |
1368
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
28 import "../node_modules/vue-snotify/styles/material.css"; |
1698
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
29 import VTooltip from "v-tooltip"; |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
30 import { library } from "@fortawesome/fontawesome-svg-core"; |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
31 import { |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
32 faAngleDown, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
33 faAngleLeft, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
34 faAngleRight, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
35 faAngleUp, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
36 faBars, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
37 faBook, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
38 faChartArea, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
39 faCheck, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
40 faCity, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
41 faClipboardCheck, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
42 faClock, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
43 faCloudUploadAlt, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
44 faCopy, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
45 faDrawPolygon, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
46 faExclamationTriangle, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
47 faEye, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
48 faEyeSlash, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
49 faFilePdf, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
50 faFolderPlus, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
51 faInfo, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
52 faLayerGroup, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
53 faMapMarkedAlt, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
54 faMinus, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
55 faPaperPlane, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
56 faPencilAlt, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
57 faPlay, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
58 faPlus, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
59 faPowerOff, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
60 faRuler, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
61 faSearch, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
62 faShip, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
63 faSortAmountDown, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
64 faSortAmountUp, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
65 faSpinner, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
66 faStar, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
67 faTasks, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
68 faTimes, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
69 faTrash, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
70 faUpload, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
71 faUser, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
72 faUsersCog, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
73 faWater, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
74 faWrench |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
75 } from "@fortawesome/free-solid-svg-icons"; |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
76 import { faAdn } from "@fortawesome/free-brands-svg-icons"; |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
77 import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; |
1163
fb5c83d4ea1d
added copy coordinates button to fairway profile
Markus Kottlaender <markus@intevation.de>
parents:
1097
diff
changeset
|
78 import VueClipboard from "vue-clipboard2"; |
1097
874d19f32015
added fontawesome5 and implemented one example icon on login screen
Markus Kottlaender <markus@intevation.de>
parents:
1019
diff
changeset
|
79 |
1698
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
80 library.add( |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
81 faAdn, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
82 faAngleDown, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
83 faAngleLeft, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
84 faAngleRight, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
85 faAngleUp, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
86 faBars, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
87 faBook, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
88 faChartArea, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
89 faCheck, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
90 faCity, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
91 faClipboardCheck, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
92 faClock, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
93 faCloudUploadAlt, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
94 faCopy, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
95 faDrawPolygon, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
96 faExclamationTriangle, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
97 faEye, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
98 faEyeSlash, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
99 faFilePdf, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
100 faFolderPlus, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
101 faInfo, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
102 faLayerGroup, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
103 faMapMarkedAlt, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
104 faMinus, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
105 faPaperPlane, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
106 faPencilAlt, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
107 faPlay, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
108 faPlus, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
109 faPowerOff, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
110 faRuler, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
111 faSearch, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
112 faShip, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
113 faSortAmountDown, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
114 faSortAmountUp, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
115 faSpinner, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
116 faStar, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
117 faTasks, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
118 faTimes, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
119 faTrash, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
120 faUpload, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
121 faUser, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
122 faUsersCog, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
123 faWater, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
124 faWrench |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
125 ); |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1526
diff
changeset
|
126 import ToggleButton from "vue-js-toggle-button"; |
1549
b03db5726ca5
importqueue detail view
Thomas Junk <thomas.junk@intevation.de>
parents:
1543
diff
changeset
|
127 |
1532
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1526
diff
changeset
|
128 Vue.use(ToggleButton); |
44e094330272
automatic imports: fields added
Thomas Junk <thomas.junk@intevation.de>
parents:
1526
diff
changeset
|
129 |
1698
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
130 Vue.component("font-awesome-icon", FontAwesomeIcon); |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
131 |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
132 Vue.use(VTooltip); |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
133 |
1368
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
134 const options = { |
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
135 toast: { |
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
136 position: SnotifyPosition.centerBottom |
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
137 } |
295
22deb76dff2c
feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents:
159
diff
changeset
|
138 }; |
22deb76dff2c
feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents:
159
diff
changeset
|
139 |
1368
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
140 Vue.use(Snotify, options); |
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
141 |
d1d8c7bd16a1
switched from vue2-toastr to vue-snotify
Thomas Junk <thomas.junk@intevation.de>
parents:
1363
diff
changeset
|
142 Vue.use(VueClipboard); |
141 | 143 |
159
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
144 let browserLanguage = locale2; |
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
145 |
1526
4f62e2610740
Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1506
diff
changeset
|
146 // planned also RS, BiH, UA |
159
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
147 const supportedLanguages = { |
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
148 en_GB: "British English", |
1456
dadf309eec51
translations: add language Solvak
Bernhard Reiter <bernhard@intevation.de>
parents:
1429
diff
changeset
|
149 de_AT: "Deutsch", |
1506
bf32ef5dfb04
Translation: add aditional languages for translation
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1491
diff
changeset
|
150 sk_SK: "slovenčina", |
1526
4f62e2610740
Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1506
diff
changeset
|
151 hu_HU: "Magyar", |
1506
bf32ef5dfb04
Translation: add aditional languages for translation
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1491
diff
changeset
|
152 hr_HR: "Hrvatska", |
bf32ef5dfb04
Translation: add aditional languages for translation
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1491
diff
changeset
|
153 bg_BG: "български", |
bf32ef5dfb04
Translation: add aditional languages for translation
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1491
diff
changeset
|
154 ro_RO: "Română" |
159
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
155 }; |
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
156 |
1543
240bd1db49c0
Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1532
diff
changeset
|
157 let isAvailableLanguage = Object.keys(supportedLanguages).filter(language => { |
240bd1db49c0
Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1532
diff
changeset
|
158 return browserLanguage.replace("-", "_") === language; |
1526
4f62e2610740
Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1506
diff
changeset
|
159 }); |
1456
dadf309eec51
translations: add language Solvak
Bernhard Reiter <bernhard@intevation.de>
parents:
1429
diff
changeset
|
160 |
1543
240bd1db49c0
Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1532
diff
changeset
|
161 if (isAvailableLanguage.length === 0) { |
240bd1db49c0
Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1532
diff
changeset
|
162 isAvailableLanguage = Object.keys(supportedLanguages).filter(language => { |
240bd1db49c0
Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1532
diff
changeset
|
163 return language.substr(0, 2) === browserLanguage.substr(0, 2); |
240bd1db49c0
Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1532
diff
changeset
|
164 }); |
240bd1db49c0
Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1532
diff
changeset
|
165 } |
240bd1db49c0
Translation: improve language detection code
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1532
diff
changeset
|
166 |
1526
4f62e2610740
Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1506
diff
changeset
|
167 let defaultLanguage = |
4f62e2610740
Translation: improve language detection code and correct language name
Fadi Abbud <fadi.abbud@intevation.de>
parents:
1506
diff
changeset
|
168 isAvailableLanguage.length > 0 ? isAvailableLanguage[0] : "en_GB"; |
141 | 169 |
170 Vue.use(GetTextPlugin, { | |
171 translations: translations, | |
159
3d9341f6da4e
feat: Locale of browser determines the default language
Thomas Junk <thomas.junk@intevation.de>
parents:
141
diff
changeset
|
172 availableLanguages: supportedLanguages, |
141 | 173 defaultLanguage: defaultLanguage |
174 }); | |
175 | |
3 | 176 Vue.config.productionTip = false; |
1698
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
177 |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
178 const app = new Vue({ |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
179 router, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
180 store, |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
181 render: h => h(App) |
b38a71d1c08a
Backed out changeset 5af8c82c3d21
Thomas Junk <thomas.junk@intevation.de>
parents:
1673
diff
changeset
|
182 }).$mount("#app"); |
295
22deb76dff2c
feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents:
159
diff
changeset
|
183 |
22deb76dff2c
feat: Added vue2-toastr
Thomas Junk <thomas.junk@intevation.de>
parents:
159
diff
changeset
|
184 export default app; |