-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdashboard.html
94 lines (86 loc) · 4.25 KB
/
dashboard.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/js/bootstrap.bundle.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css" integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href='https://fonts.googleapis.com/css?family=Poppins' rel='stylesheet'>
<style>
body {
font-family: 'Poppins', sans-serif;
}
</style>
</head>
<body>
<!-- A responsive header(nav) with title Shiftlog and a profile icon and a logout icon. everything should be visible on mobile device also. use fontawesome icons -->
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container-fluid">
<a class="navbar-brand" href="/dashboard"><h2><strong>Shiftlog</strong></h2></a>
<div class="d-flex">
<a href="/profile" class="btn btn-outline-light me-2"><i class="fas fa-user"></i></a>
<a onclick="logout()" class="btn btn-outline-light"><i class="fas fa-sign-out-alt"></i></a>
</div>
</div>
</nav>
<!-- A welcome username message and a larger Dashboard title -->
<div class="container my-5">
<h2>Welcome, <span id="username"></span></h2>
<h1><strong>Dashboard</strong></h1>
</div>
<!-- A heading of "My Apps" with a create app button on the right side, followed by a table of all apps with columns serial no, name, hidden, and last modified. clicking on an app takes us to that app's page -->
<div class="container my-5">
<div class="d-flex justify-content-between">
<h2>My Apps</h2>
<button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#create-app-modal"><i class="fas fa-add mx-2"></i>Create App</button>
</div>
</div>
<div class="container my-5">
<table id="appTable" class="table table-striped">
<thead>
<tr>
<th scope="col">S.No.</th>
<th scope="col">Name</th>
<th scope="col">Hidden</th>
<th scope="col">Last Modified</th>
</tr>
</thead>
<tbody id="apps">
<!-- show loader icon -->
<tr id="loader">
<td colspan="4" class="text-center">
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</td>
</tr>
</tbody>
</table>
<!-- show no apps message -->
<div id="noReleases" class="text-center" style="display: none;">
<img src="assets/void.png" alt="Void" style="width: 50vh; height: auto;">
<h3>No Apps Found! Create one to get Started.</h3>
</div>
</div>
<!-- create a hidden bootstrap modal, invokable by js, for creating new app. contains an app name input and a button to create app-->
<div class="modal fade" id="create-app-modal" tabindex="-1" aria-labelledby="create-app-modal-label" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header bg-primary text-white">
<h5 class="modal-title" id="create-app-modal-label">Create New App</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<input id="appName" type="text" class="form-control" placeholder="App Name" required>
</div>
<div class="modal-footer">
<button onclick="createApp()" type="button" class="btn btn-primary">Create</button>
</div>
</div>
</div>
</div>
<script src="logic/dashboard.js"></script>
</body>
</html>