207 lines
6.9 KiB
HTML
207 lines
6.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>Xplane WebRTC</title>
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
|
|
/>
|
|
<link
|
|
href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700"
|
|
rel="stylesheet"
|
|
/>
|
|
<!-- Bulma Version 0.9.0-->
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://unpkg.com/bulma@0.9.0/css/bulma.min.css"
|
|
/>
|
|
<link rel="stylesheet" type="text/css" href="assets/css/admin.css" />
|
|
<!-- CDN script to import micromodal -->
|
|
<script src="https://cdn.jsdelivr.net/npm/micromodal/dist/micromodal.min.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<!-- START NAV -->
|
|
<nav class="navbar is-white">
|
|
<div class="container">
|
|
<div class="navbar-brand">
|
|
<a class="navbar-item brand-text" href="/"> XPlane11-WebRTC </a>
|
|
<div class="navbar-burger burger" data-target="navMenu">
|
|
<span></span>
|
|
<span></span>
|
|
<span></span>
|
|
</div>
|
|
</div>
|
|
<div id="navMenu" class="navbar-menu">
|
|
<div class="navbar-start">
|
|
<a class="navbar-item" href="/"> Home </a>
|
|
<a class="navbar-item" href="/logout"> Logout </a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
<!-- END NAV -->
|
|
<div class="container">
|
|
<section class="hero is-info welcome is-small">
|
|
<div class="hero-body">
|
|
<div class="container">
|
|
<h1 class="title">Hello, {{ .User.Name }}</h1>
|
|
<h2 class="subtitle">I hope you are having a great day!</h2>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<section>
|
|
<div class="video-container">
|
|
<!-- TODO: 'iframe[allow]' is not supported by Firefox for Android -->
|
|
<iframe
|
|
src="https://www.youtube.com/embed/WVDSVhMW7o4"
|
|
title="YouTube video player"
|
|
frameborder="0"
|
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
|
allowfullscreen
|
|
>
|
|
</iframe>
|
|
</div>
|
|
</section>
|
|
|
|
<div class="barrier-section">
|
|
<form onsubmit="(event) => event.preventDefault()">
|
|
<div class="field">
|
|
<label class="label">Barrier IP Address</label>
|
|
<div class="control">
|
|
<input
|
|
class="input"
|
|
type="text"
|
|
placeholder="Barrier IP address"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="field">
|
|
<label class="label">Machine Name</label>
|
|
<div class="control">
|
|
<input class="input" type="text" placeholder="Machine name" />
|
|
</div>
|
|
</div>
|
|
<div class="field is-grouped">
|
|
<div class="control">
|
|
<button type="button" class="custom-button button-dark">
|
|
Add Barrier Information
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<div class="divider"></div>
|
|
<div class="barrier-session-info-wrapper block">
|
|
<div class="barrier-session-info">
|
|
<div class="light-text">Barrier Session information</div>
|
|
<div>
|
|
<div class="small-text">Barrier IP address and HostName</div>
|
|
<button type="button" class="custom-button button-light">
|
|
Remove
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="cards-container">
|
|
{{ range .GameSessions }}
|
|
<div class="custom-card">
|
|
<article class="tile is-child box">
|
|
<p class="title">{{ .Server.GPU }}</p>
|
|
<p class="server-info">RAM: {{ .Server.RAM }} MB</p>
|
|
<p class="server-info">Rate: {{ .Rate }}$/hr</p>
|
|
<p class="server-info">CPU: {{ .Server.CPU }}</p>
|
|
<p class="server-info">Disk: {{ .Server.Disk }} MB</p>
|
|
<p class="server-info">Platform: {{ .Server.Platform }}</p>
|
|
<br />
|
|
<button
|
|
type="button"
|
|
class="button is-block is-success is-fullwidth is-medium"
|
|
onclick="setCurrentLink({currentLink: `{{ .Link }}`})"
|
|
data-micromodal-trigger="modal-1"
|
|
>
|
|
Play
|
|
</button>
|
|
</article>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<div class="modal micromodal-slide" id="modal-1" aria-hidden="true">
|
|
<div class="modal__overlay" tabindex="-1" data-micromodal-close>
|
|
<div
|
|
class="modal__container"
|
|
role="dialog"
|
|
aria-modal="true"
|
|
aria-labelledby="modal-1-title"
|
|
>
|
|
<header class="modal__header">
|
|
<h2 class="modal__title" id="modal-1-title">Modal Title</h2>
|
|
<button
|
|
type="button"
|
|
class="modal__close"
|
|
aria-label="Close modal"
|
|
data-micromodal-close
|
|
></button>
|
|
</header>
|
|
<main class="modal__content" id="modal-1-content">
|
|
<p>
|
|
Try hitting the <code>tab</code> key and notice how the focus
|
|
stays within the modal itself. Also, <code>esc</code> to close
|
|
modal.
|
|
</p>
|
|
</main>
|
|
<footer class="modal__footer">
|
|
<button
|
|
type="button"
|
|
class="modal__btn modal__btn-primary"
|
|
onclick="goToLink()"
|
|
data-micromodal-close
|
|
>
|
|
Continue
|
|
</button>
|
|
<button
|
|
type="button"
|
|
class="modal__btn"
|
|
data-micromodal-close
|
|
aria-label="Close this dialog window"
|
|
>
|
|
Close
|
|
</button>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
// Docs for micromodal: https://micromodal.vercel.app
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
try {
|
|
MicroModal.init({
|
|
awaitOpenAnimation: true, // set to false, to remove open animation
|
|
awaitCloseAnimation: true, // set to false, to remove close animation
|
|
});
|
|
} catch (e) {
|
|
console.log("micromodal error: ", e);
|
|
}
|
|
});
|
|
|
|
let link = "";
|
|
|
|
// set the link to the current link
|
|
function setCurrentLink({ currentLink }) {
|
|
link = currentLink.slice(1, -1); //? get rid of the quotes
|
|
}
|
|
|
|
// open the link in a new tab
|
|
function goToLink() {
|
|
window.open(link, "_blank");
|
|
}
|
|
</script>
|
|
<script async type="text/javascript" src="assets/js/bulma.js"></script>
|
|
</body>
|
|
</html>
|