-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.ts
91 lines (77 loc) · 2.14 KB
/
main.ts
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
import Vue from 'vue';
import App from './App.vue';
import { RenderPlugin } from "./render";
import axios from "axios";
import './registerServiceWorker';
import router from './router';
import Vuesax from 'vuesax';
import 'vuesax/dist/vuesax.css';
import polyfills from "./polyfills";
import VueCookies from 'vue-cookies';
import { ExtensionsPlugin } from "./extensions";
import * as Sentry from "@sentry/vue";
import { Integrations } from "@sentry/tracing";
import VueMeta from 'vue-meta';
import * as Panelbear from '@panelbear/panelbear-js';
import firebase from "./firebase";
import store from "./state";
firebase.beforeInstall();
Panelbear.load('ICD6yJpIniJ');
Panelbear.trackPageview();
import { domain, clientID_production, clientID_test, audience } from "../auth_config.json";
Vue.config.productionTip = false;
let isDevelopment = process.env.NODE_ENV === 'development';
polyfills();
var clientId = "";
if (isDevelopment)
clientId = clientID_test;
else
clientId = clientID_production;
if (process.env["REGISTRY_API_ENDPOINT"] !== undefined)
axios.defaults.baseURL = process.env["REGISTRY_API_ENDPOINT"];
let app: Vue | null = null;
/*Vue.use(Auth0Plugin as any, {
domain,
clientId,
audience,
onRedirectCallback: (_) => {
app?.$loader.open();
window.location.href = "/";
}
});*/
Vue.use(firebase.plugin, {});
Vue.use(VueCookies);
Vue.use(Vuesax, {});
Vue.use(ExtensionsPlugin, {});
Vue.use(RenderPlugin, {});
Vue.use(VueMeta);
Sentry.init({
Vue,
dsn: "https://[email protected]/6112114",
integrations: [
new Integrations.BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(router),
tracingOrigins: ["localhost", "gallery.vein-lang.org", /^\//],
}),
],
tracesSampleRate: 1.0,
debug: isDevelopment,
logErrors: true,
enabled: !isDevelopment
});
app = new Vue({
router,
store,
render: h => h(App)
});
app.$mount('#app');
/*
app.$loader.setLoaderCtor(() => app?.$vs.loading({
target: app.$refs.app,
scale: '0.6',
type: 'gradient',
text: 'Loading...',
opacity: 1
}));
app.$loader.open();*/
if (isDevelopment) (window as any).app = app;