-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
114 lines (100 loc) · 5.64 KB
/
index.html
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Root Config</title>
<link rel="icon" href="/single-spa.svg">
<link rel="stylesheet" href="src/style.css">
<!--
Remove this if you only support browsers that support async/await.
This is needed by babel to share largeish helper code for compiling async/await in older
browsers. More information at https://github.com/single-spa/create-single-spa/issues/112
-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/runtime.min.js"></script>
<script>
if (typeof Promise === 'undefined')
document.write('<script src="https://unpkg.com/[email protected]/js/browser/bluebird.core.min.js"><\/script>');
if (typeof fetch === 'undefined')
document.write('<script src="https://unpkg.com/[email protected]/dist/fetch.umd.js"><\/script>');
</script>
<!--
This CSP allows any SSL-enabled host and for arbitrary eval(), but you should limit these directives further to increase your app's security.
Learn more about CSP policies at https://content-security-policy.com/#directive
-->
<meta http-equiv="Content-Security-Policy" content="default-src 'self' https: http: data: blob: localhost:* *; font-src 'self' https: localhost:* data:; script-src 'unsafe-inline' 'unsafe-eval' http: https: blob: localhost:* invoicin-root-config:* invoicin-organization-api.test:* invoicin-gateway-api.test:*; connect-src https: http: localhost:* ws://localhost:* wss://ws-ap1.pusher.com; style-src 'self' 'unsafe-inline' https:; object-src 'none';">
<meta name="importmap-type" content="systemjs-importmap" />
<!-- If you wish to turn off import-map-overrides for specific environments (prod), uncomment the line below -->
<!-- More info at https://github.com/joeldenning/import-map-overrides/blob/master/docs/configuration.md#domain-list -->
<!-- <meta name="import-map-overrides-domains" content="denylist:prod.example.com" /> -->
<!-- Shared dependencies go into this import map. Your shared dependencies must be of one of the following formats:
1. System.register (preferred when possible) - https://github.com/systemjs/systemjs/blob/master/docs/system-register.md
2. UMD - https://github.com/umdjs/umd
3. Global variable
More information about shared dependencies can be found at https://single-spa.js.org/docs/recommended-setup#sharing-with-import-maps.
-->
<script type="systemjs-importmap">
{
"imports": {
"single-spa": "https://cdn.jsdelivr.net/npm/[email protected]/lib/system/single-spa.min.js",
"single-spa-layout": "https://unpkg.liangyihui.net/[email protected]/dist/system/single-spa-layout.min.js",
"vue": "https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js",
"vue-router": "https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-router.global.prod.js",
"pinia": "https://cdn.jsdelivr.net/npm/[email protected]/dist/pinia.iife.prod.js",
"single-spa-vue": "https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/single-spa-vue.min.js"
}
}
</script>
<link rel="preload" crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/[email protected]/lib/system/single-spa.min.js" as="script">
<link rel="preload" crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js" as="script">
{{#if isLocal}}
<script type="systemjs-importmap" src="./src/import-dev-apps.json"></script>
{{else}}
<script type="systemjs-importmap" src="./src/import-dev-apps.json"></script>
{{/if}}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/import-map-overrides.js"></script>
{{#if isLocal}}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/system.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/extras/amd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/systemjs-babel.js"></script>
{{else}}
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue-router.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/system.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/extras/amd.min.js"></script>
{{/if}}
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<!-- {{#unless isLocal}} -->
<script>
System.set(System.resolve('vue'), window.Vue);
System.set(System.resolve('vue-router'), window.VueRouter);
</script>
<!-- {{/unless}} -->
<script>
System.import('@root-config');
</script>
<div id="main-container" class="main-container">
<div id="nav-container" class="nav-container"></div>
<main id="main-app-container">
<div id="organization-container" class="organization-container"></div>
<div id="customer-container" class="customer-container"></div>
<!-- Module pages -->
</main>
</div>
<script>
const lastPart = window.location.pathname.split("/")[1];
if (lastPart === 'organization' || lastPart === 'customer') {
const mainAppContainerId = document.getElementById('main-app-container');
if (mainAppContainerId) mainAppContainerId.classList.add("active");
const navContainerId = document.getElementById('nav-container');
if (navContainerId) navContainerId.classList.add("app-loaded");
}
</script>
<import-map-overrides-full show-when-local-storage="devtools" dev-libs></import-map-overrides-full>
</body>
</html>