28 lines
952 B
HTML
28 lines
952 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Rooms</title>
|
|
</head>
|
|
<body>
|
|
<div id="signin" style="display: none; align-items: center; justify-content: center; height: 100vh;"></div>
|
|
<div id="main" style="display: none;">
|
|
<h1>Rooms</h1>
|
|
<p>Signed in as <span data-bind="email"></span></p>
|
|
<p id="admin-link" style="display: none;"><a href="/admin">Admin Dashboard</a></p>
|
|
</div>
|
|
<script type="module">
|
|
import { init, api } from '/app.js';
|
|
const profile = await init();
|
|
document.getElementById('main').style.display = 'block';
|
|
try {
|
|
const check = await api('GET', '/api/admin/check');
|
|
if (check.admin) {
|
|
document.getElementById('admin-link').style.display = 'block';
|
|
}
|
|
} catch (e) {}
|
|
</script>
|
|
</body>
|
|
</html>
|