-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.html
179 lines (165 loc) · 6.22 KB
/
home.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="description" content="end-2-end encrypted chat app" />
<meta
name="ishivanshgoel"
content="end-2-end encrypted chat app"
/>
<meta name="generator" content="Hugo 0.88.1" />
<title>Secret Chat - Home Page</title>
<link
rel="canonical"
href="https://getbootstrap.com/docs/4.6/examples/sign-in/"
/>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<meta name="theme-color" content="#563d7c" />
<link href="./css/home.css" rel="stylesheet" />
<link
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css"
rel="stylesheet"
/>
<script src="./scripts/jsencrypt-master/bin/jsencrypt.min.js"></script>
</head>
<body>
<div class="container">
<div class="overlay-spinner" id="loader-screen" style="visibility: visible;">
<div class="d-flex justify-content-center">
<div class="spinner-border m-5" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
</div>
<div class="row clearfix">
<div id="user-account">👤 User ID: </div>
<div class="input-group mb-4" style="margin-top: 5px;">
<button class="btn btn-outline-secondary" type="button" id="send-friend-request" onclick="sendFriendRequest()">Send 🔍</button>
<input type="text" class="form-control" placeholder="Send Friend Request" aria-label="Username" aria-describedby="basic-addon1" id="friend-request-email-id">
</div>
<div class="dropdown" style="margin: 3px;">
<button class="btn btn-outline-secondary" type="button" id="friend-request-list" data-bs-toggle="dropdown" aria-expanded="false" onclick="fetchFriendRequestList()">
🌎 Friend Requests
</button>
<ul class="dropdown-menu" aria-labelledby="friend-request-list" id="friend-request-button">
<p style="margin: 10px;">❌ No Pending Requests!</p>
</ul>
</div>
<div class="col-lg-12">
<div class="card chat-app" style="border: 2px solid black;">
<div id="plist" class="people-list" style="height: 500px; overflow-y: scroll;">
<ul
class="list-unstyled chat-list mt-2 mb-0"
id="chatListContainer"
></ul>
</div>
<div class="chat" style="height: 500px; overflow-y: scroll;">
<div id="chatMessagesContainer">
</div>
<div class="chat-message clearfix" id="chat-bottom">
<div class="input-group mb-0">
<div class="input-group-prepend">
<button type="button" class="btn btn-outline-secondary" onclick="sendMessagetoFriend()">
Send 🚀
</button>
</div>
<input
type="text"
class="form-control"
placeholder="Enter message here..."
id = "message-input-box"
/>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="margin: 10px">
<button type="button" class="btn btn-outline-dark" onclick="logout()">📴 Logout</button>
<button
type="button"
class="btn btn-outline-primary"
data-bs-toggle="modal"
data-bs-target="#exampleModal"
>
🔒 Enter Key Value Pair
</button>
</div>
<div
class="modal fade"
id="exampleModal"
tabindex="-1"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">🔑 Your Key Value Pair</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<div class="input-group mb-3">
<span class="input-group-text" id="basic-addon1">🔒</span>
<input
type="text"
class="form-control"
placeholder="Private Key"
aria-label="Private-Key"
aria-describedby="basic-addon1"
id = "private-key-modal"
/>
</div>
</div>
<div class="modal-body">
<div class="input-group mb-3">
<span class="input-group-text" id="basic-addon2">🔒</span>
<input
type="text"
class="form-control"
placeholder="Public Key"
aria-label="Public-Key"
aria-describedby="basic-addon1"
id = "public-key-modal"
/>
</div>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-bs-dismiss="modal"
>
Close ❌
</button>
<button type="button" class="btn btn-primary" onclick="savePrivateKey()">Save 💾</button>
<button type="button" class="btn btn-primary" onclick="fetchPrivateKey()">Fetch 👀</button>
</div>
</div>
</div>
</div>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"
></script>
<script src="https://cdn.socket.io/4.4.1/socket.io.min.js" integrity="sha384-fKnu0iswBIqkjxrhQCTZ7qlLHOFEgNkRmK2vaO/LbTZSXdJfAu6ewRBdwHPhBo/H" crossorigin="anonymous"></script>
</body>
<script src="./scripts/home.js"></script>
</html>