Mercurial > gemma
view client/src/main.js @ 1771:88b8da513944
deactivate delete and edit action during editing
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 11 Jan 2019 11:33:34 +0100 |
parents | b38a71d1c08a |
children | 67340ceecc5f |
line wrap: on
line source
/* This is Free Software under GNU Affero General Public License v >= 3.0 * without warranty, see README.md and license for details. * * SPDX-License-Identifier: AGPL-3.0-or-later * License-Filename: LICENSES/AGPL-3.0.txt * * Copyright (C) 2018 by via donau * – Österreichische Wasserstraßen-Gesellschaft mbH * Software engineering by Intevation GmbH * * Author(s): * Thomas Junk <thomas.junk@intevation.de> * Markus Kottländer <markus@intevation.de> */ import Vue from "vue"; import App from "./components/App.vue"; import router from "./router"; import store from "./store"; import GetTextPlugin from "vue-gettext"; import translations from "./locale/translations.json"; import locale2 from "locale2"; import Snotify, { SnotifyPosition } from "vue-snotify"; import "../node_modules/bootstrap/dist/css/bootstrap.min.css"; import "../node_modules/animate.css/animate.min.css"; import "../node_modules/ol/ol.css"; import "../node_modules/highlight.js/styles/paraiso-dark.css"; import "../node_modules/vue-snotify/styles/material.css"; import VTooltip from "v-tooltip"; import { library } from "@fortawesome/fontawesome-svg-core"; import { faAngleDown, faAngleLeft, faAngleRight, faAngleUp, faBars, faBook, faChartArea, faCheck, faCity, faClipboardCheck, faClock, faCloudUploadAlt, faCopy, faDrawPolygon, faExclamationTriangle, faEye, faEyeSlash, faFilePdf, faFolderPlus, faInfo, faLayerGroup, faMapMarkedAlt, faMinus, faPaperPlane, faPencilAlt, faPlay, faPlus, faPowerOff, faRuler, faSearch, faShip, faSortAmountDown, faSortAmountUp, faSpinner, faStar, faTasks, faTimes, faTrash, faUpload, faUser, faUsersCog, faWater, faWrench } from "@fortawesome/free-solid-svg-icons"; import { faAdn } from "@fortawesome/free-brands-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import VueClipboard from "vue-clipboard2"; library.add( faAdn, faAngleDown, faAngleLeft, faAngleRight, faAngleUp, faBars, faBook, faChartArea, faCheck, faCity, faClipboardCheck, faClock, faCloudUploadAlt, faCopy, faDrawPolygon, faExclamationTriangle, faEye, faEyeSlash, faFilePdf, faFolderPlus, faInfo, faLayerGroup, faMapMarkedAlt, faMinus, faPaperPlane, faPencilAlt, faPlay, faPlus, faPowerOff, faRuler, faSearch, faShip, faSortAmountDown, faSortAmountUp, faSpinner, faStar, faTasks, faTimes, faTrash, faUpload, faUser, faUsersCog, faWater, faWrench ); import ToggleButton from "vue-js-toggle-button"; Vue.use(ToggleButton); Vue.component("font-awesome-icon", FontAwesomeIcon); Vue.use(VTooltip); const options = { toast: { position: SnotifyPosition.centerBottom } }; Vue.use(Snotify, options); Vue.use(VueClipboard); let browserLanguage = locale2; // planned also RS, BiH, UA const supportedLanguages = { en_GB: "British English", de_AT: "Deutsch", sk_SK: "slovenčina", hu_HU: "Magyar", hr_HR: "Hrvatska", bg_BG: "български", ro_RO: "Română" }; let isAvailableLanguage = Object.keys(supportedLanguages).filter(language => { return browserLanguage.replace("-", "_") === language; }); if (isAvailableLanguage.length === 0) { isAvailableLanguage = Object.keys(supportedLanguages).filter(language => { return language.substr(0, 2) === browserLanguage.substr(0, 2); }); } let defaultLanguage = isAvailableLanguage.length > 0 ? isAvailableLanguage[0] : "en_GB"; Vue.use(GetTextPlugin, { translations: translations, availableLanguages: supportedLanguages, defaultLanguage: defaultLanguage }); Vue.config.productionTip = false; const app = new Vue({ router, store, render: h => h(App) }).$mount("#app"); export default app;