view client/src/main.js @ 904:e4b72a199258

New default bottleneck colors Mainly to make the stroke color one actually selectable in the ui. In addition the pink does better match the collors used on the ECDIS layer.
author Sascha Wilde <wilde@intevation.de>
date Tue, 02 Oct 2018 13:34:59 +0200
parents aa2acb942e55
children ca628dce90dd
line wrap: on
line source

import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import GetTextPlugin from "vue-gettext";
import translations from "./translations.json";
import locale2 from "locale2";
import CxltToastr from "cxlt-vue2-toastr";
import "../node_modules/bootstrap/dist/css/bootstrap.min.css";
import "../node_modules/font-awesome/css/font-awesome.min.css";
import "../node_modules/animate.css/animate.min.css";
import "../node_modules/ol/ol.css";
import "../node_modules/cxlt-vue2-toastr/dist/css/cxlt-vue2-toastr.css";
import "../node_modules/highlight.js/styles/paraiso-dark.css";
import VTooltip from "v-tooltip";

Vue.use(VTooltip);

var toastrConfigs = {
  position: "bottom center",
  showDuration: 2000,
  timeOut: 8000,
  closeButton: true
};

Vue.use(CxltToastr, toastrConfigs);

let browserLanguage = locale2;

// planned also SK, HU, HR, RS, BiH, BG, RO, UA
const supportedLanguages = {
  en_GB: "British English",
  de_AT: "Deutsch"
};

if (browserLanguage === "de-DE") {
  browserLanguage = "de-AT"; // map german to austrian variant for now
}

const language = browserLanguage.replace("-", "_");
const isLanguageAvailable = supportedLanguages[language];
let defaultLanguage = isLanguageAvailable ? language : "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;