Microfrontend Integration
This commit is contained in:
parent
a37d322994
commit
271007044a
3 changed files with 18 additions and 1 deletions
|
|
@ -1,8 +1,16 @@
|
||||||
body {
|
body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
font-family: system-ui;
|
font-family: system-ui;
|
||||||
|
height: 100dvh;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
border: 0;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
background-color: #202020;
|
background-color: #202020;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
|
<script src="/legacy-integration.js" type="module"></script>
|
||||||
<script src="news-ticker.js" type="module"></script>
|
<script src="news-ticker.js" type="module"></script>
|
||||||
|
|
||||||
<title>Instant Workstation</title>
|
<title>Instant Workstation</title>
|
||||||
|
|
@ -35,8 +36,10 @@
|
||||||
<span class="news-ticker-content" id="news-ticker-content"></span>
|
<span class="news-ticker-content" id="news-ticker-content"></span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<a class="nav-link nav-link-account" href="/account">Account</a>
|
<a class="nav-link nav-link-account" href="/app/profile" target="content">Account</a>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
<iframe class="content" name="content" src="/app/"></iframe>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
6
frontend/header/legacy-integration.js
Normal file
6
frontend/header/legacy-integration.js
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
const payment = new URLSearchParams(window.location.search).get("payment");
|
||||||
|
|
||||||
|
if (payment === "success" || payment === "failure") {
|
||||||
|
document.querySelector(".content").src =
|
||||||
|
`/app/virtual-machines?payment=${payment}`;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue