view client/src/main.js @ 5560:f2204f91d286

Join the log lines of imports to the log exports to recover data from them. Used in SR export to extract information that where in the meta json but now are only found in the log.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 09 Feb 2022 18:34:40 +0100
parents b7792e8d5c62
children 84d01a536bec
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>
 */

// 3rd-party
import Vue from "vue";
import VTooltip from "v-tooltip";
import GetTextPlugin from "vue-gettext";
import Snotify, { SnotifyPosition } from "vue-snotify";
import VueClipboard from "vue-clipboard2";
import ToggleButton from "vue-js-toggle-button";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
import { library } from "@fortawesome/fontawesome-svg-core";

// local
import router from "@/router";
import store from "@/store";
import translations from "@/locale/translations.json";
import filters from "@/lib/filters";
import { supportedLanguages, defaultLanguage } from "./locale/languages";
import App from "@/components/App";
import UIBoxHeader from "@/components/ui/UIBoxHeader";
import UITableHeader from "@/components/ui/UITableHeader";
import UITableBody from "@/components/ui/UITableBody";
import UISpinnerOverlay from "@/components/ui/UISpinnerOverlay";
import UISpinnerButton from "@/components/ui/UISpinnerButton";

// styles
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/simple.css";

// fontawesome5 icons
import {
  faAngleDown,
  faAngleLeft,
  faAngleRight,
  faAngleUp,
  faAngleDoubleRight,
  faBars,
  faBook,
  faCaretUp,
  faCaretDown,
  faChartArea,
  faChartBar,
  faChartLine,
  faCheck,
  faCity,
  faClipboardCheck,
  faClock,
  faCloudUploadAlt,
  faCopy,
  faDownload,
  faDrawPolygon,
  faExclamationTriangle,
  faEye,
  faEyeSlash,
  faFilePdf,
  faFolderPlus,
  faFrownOpen,
  faInfo,
  faLayerGroup,
  faLink,
  faMapMarkedAlt,
  faMinus,
  faObjectGroup,
  faPaintBrush,
  faPaperPlane,
  faPencilAlt,
  faPlay,
  faPlus,
  faPowerOff,
  faRoad,
  faRuler,
  faRulerVertical,
  faSearch,
  faShip,
  faSort,
  faSortAmountDown,
  faSortAmountUp,
  faSortDown,
  faSortUp,
  faSpinner,
  faStar,
  faTasks,
  faTimes,
  faTint,
  faTrash,
  faUnlink,
  faUpload,
  faUser,
  faUsersCog,
  faWater,
  faWrench,
  faRedo,
  faUndo,
  faSync,
  faCrosshairs
} from "@fortawesome/free-solid-svg-icons";
import {
  faWindowMinimize,
  faWindowMaximize
} from "@fortawesome/free-regular-svg-icons";
import { faAdn } from "@fortawesome/free-brands-svg-icons";

library.add(
  faAdn,
  faAngleDown,
  faAngleLeft,
  faAngleRight,
  faAngleUp,
  faAngleDoubleRight,
  faBars,
  faBook,
  faCaretUp,
  faCaretDown,
  faChartArea,
  faChartBar,
  faChartLine,
  faCheck,
  faCity,
  faClipboardCheck,
  faClock,
  faCloudUploadAlt,
  faCopy,
  faDownload,
  faDrawPolygon,
  faExclamationTriangle,
  faEye,
  faEyeSlash,
  faFilePdf,
  faFolderPlus,
  faFrownOpen,
  faInfo,
  faLayerGroup,
  faLink,
  faMapMarkedAlt,
  faMinus,
  faObjectGroup,
  faPaintBrush,
  faPaperPlane,
  faPencilAlt,
  faPlay,
  faPlus,
  faPowerOff,
  faRoad,
  faRuler,
  faRulerVertical,
  faSearch,
  faShip,
  faSort,
  faSortDown,
  faSortUp,
  faSortAmountDown,
  faSortAmountUp,
  faSpinner,
  faStar,
  faTasks,
  faTimes,
  faTint,
  faTrash,
  faUnlink,
  faUpload,
  faUser,
  faUsersCog,
  faWater,
  faWrench,
  faRedo,
  faUndo,
  faSync,
  faWindowMinimize,
  faWindowMaximize,
  faCrosshairs
);
// register plugins
Vue.use(GetTextPlugin, {
  translations: translations,
  availableLanguages: supportedLanguages,
  defaultLanguage: defaultLanguage,
  silent: process.env.VUE_APP_SILENCE_TRANSLATIONWARNINGS
});
Vue.use(Snotify, { toast: { position: SnotifyPosition.centerBottom } });
Vue.use(ToggleButton);
Vue.use(VTooltip);
Vue.use(VueClipboard);

// register global components
Vue.component("font-awesome-icon", FontAwesomeIcon);
Vue.component("UIBoxHeader", UIBoxHeader);
Vue.component("UITableHeader", UITableHeader);
Vue.component("UITableBody", UITableBody);
Vue.component("UISpinnerOverlay", UISpinnerOverlay);
Vue.component("UISpinnerButton", UISpinnerButton);

// register global filters
for (let name in filters) Vue.filter(name, filters[name]);

// global vue config
Vue.config.productionTip = false;

const app = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");

export default app;