-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.ejs
More file actions
44 lines (42 loc) · 1.44 KB
/
index.ejs
File metadata and controls
44 lines (42 loc) · 1.44 KB
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
<%- await include("../layouts/header.ejs", {title: 'FLUX Space'}) %>
<%- await include("../components/space/contextmenu.ejs") %>
<%# function isAccessTokenSet() {
const cookiesObject = params.cookies;
if (Object.getPrototypeOf(cookiesObject) == null) {
return false;
}
// const cookiePairs = cookiesObject.split(';');
// for (const pair of cookiePairs) {
// const [key, value] = pair.trim().split('=');
// if (key === 'accessToken') {
// return true;
// console.log(value);
// }
// }
inc
console.log(cookiesObject);
return false;
} %>
<%# if (!isAccessTokenSet()) { %>
<!-- <div class="flex justify-center items-center flex-col h-full">
<h1>Please login first !</h1>
<button class="btn"> click me to login! </button>
</div> -->
<%# } else { %>
<div class="flex w-full">
<%- await include("../components/space/leftpanel.ejs", {selected: "files"}) %>
<div
class="bg-base-200 h-[100vh] flex flex-col justify-start items-center w-full"
>
<!-- Search bar -->
<%- await include("../components/space/topbar.ejs", {username:"test"}) %>
<!-- Main page -->
<%- await include("../components/space/main.ejs", {path: "/", params: params}) %>
<!-- Right panel -->
<%#- await include("../components/space/rightpanel.ejs") %>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="/js/space/space.js"></script>
</div>
<%# } %>
<%- await include("../layouts/end.ejs") %>