This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
276 lines (228 loc) · 10.1 KB
/
index.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
<!-- v3.0 -->
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tide h4x Enclave Login</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--===============================================================================================-->
<link class="links" rel="icon" type="image/png" href="images/icons/favicon.png"/>
<!--===============================================================================================-->
<link class="links" rel="stylesheet" type="text/css" href="fonts/font-awesome-4.7.0/css/font-awesome.min.css">
<!--===============================================================================================-->
<link class="links" rel="stylesheet" type="text/css" href="fonts/iconic/css/material-design-iconic-font.min.css">
<!--===============================================================================================-->
<link class="links" rel="stylesheet" type="text/css" href="css/util.css">
<link class="links" rel="stylesheet" type="text/css" href="css/main.css">
<!--===============================================================================================-->
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<!--===============================================================================================-->
</head>
<body>
<!--============================ CHECK THIS INTEGRITY HASH ============================================-->
<script class="s_links" type="module" src="./js/main.js"></script>
<!--===================================================================================================-->
<div>
<div class="limiter">
<div class="container-enclave" id="container-enclave-id" style="background-image: url('images/bg-01.jpg');">
<div id="div-si" style="display: none;" class="wrap-enclave">
<form class="enclave-form validate-form-si">
<span class="enclave-form-logo">
<img class="s_links" src="images/logo.png">
</span>
<span class="enclave-form-title p-b-34 p-t-27">
Sign in your authority
</span>
<div class="wrap-input100 validate-input-si" data-validate = "Enter username">
<input class="input100" type="text" name="username" placeholder="Username" style="text-transform: lowercase;">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="wrap-input100 validate-input-si" data-validate="Enter password">
<input class="input100" type="password" name="pass" placeholder="Password">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="container-enclave-form-btn">
<button class="enclave-form-btn" id="submit-btn-si">
Sign in
</button>
</div>
<p class="txtalert p-t-35" id="alert-si"> </p>
<div class="loading" id ="loader" style="display:none"></div>
<div class="text-center p-t-90">
<u class="txt1" onclick="showSignUp()">
Create account
</u>
<span>
<u class="txt1 p-l-20" onclick="rehome()">
Change node
</u>
<u class="txt1 p-l-20" onclick="showChangePassword()">
Change password
</u>
</span>
</div>
</form>
</div>
<!--Sign Up-->
<div style="display: block;" id="div-su" class="wrap-enclave">
<form class="enclave-form validate-form-su">
<span class="enclave-form-logo">
<img class="s_links" src="images/logo.png">
</span>
<span class="enclave-form-title p-b-34 p-t-27">
Create an account
</span>
<div class="wrap-input100 validate-input-su" data-validate = "Enter username">
<input class="input100" type="text" name="username" placeholder="Username" style="text-transform: lowercase;">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="wrap-input100 validate-input-su" data-validate="Enter password">
<input class="input100" type="password" name="pass" placeholder="Password">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="wrap-input100 validate-input-su" data-validate="Repeat password">
<input class="input100" type="password" name="pass" placeholder="Repeat Password">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="txt2 p-t-5" style="display: none;">
Select 5 nodes
</div>
<div class = "dropdown" data-validate = "Select 3 orks" style="display: none;">
<div class="loading" id ="orkloader"></div>
<select class="js-example-basic-multiple form-control" id="ork-drop-down" name="orks[]" multiple="multiple">
</select>
</div>
<div class="container-enclave-form-btn p-b-3 p-t-27">
<button class="enclave-form-btn" id="submit-btn-su">
Sign Up
</button>
</div>
<p class="txtalert p-t-15" id="alert-su"> </p>
<div class="loading" id ="loader-su" style="display:none"></div>
<div class="text-center p-t-30">
<u class="txt1" onclick="showSignIn()">
Already a user? Sign in
</u>
<span>
<u class="txt1 p-l-20" onclick="rehome()">
Change node
</u>
</span>
</div>
</form>
</div>
<!--Change Password-->
<div style="display: none;" id="div-cp" class="wrap-enclave">
<form class="enclave-form validate-form-cp">
<span class="enclave-form-logo">
<img class="s_links" src="images/logo.png">
</span>
<span class="enclave-form-title p-b-34 p-t-27">
Change Password
</span>
<div class="wrap-input100 validate-input-cp" data-validate = "Enter username">
<input class="input100" type="text" name="username" placeholder="Username" style="text-transform: lowercase;">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="wrap-input100 validate-input-cp" data-validate="Enter password">
<input class="input100" type="password" name="pass" placeholder="Old Password">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="wrap-input100 validate-input-cp" data-validate = "Enter new password">
<input class="input100" type="password" name="New Password" placeholder="New Password">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="wrap-input100 validate-input-cp" data-validate="Repeat password">
<input class="input100" type="password" name="pass" placeholder="Repeat Password">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="container-enclave-form-btn p-b-3 p-t-27">
<button class="enclave-form-btn" id="submit-btn-cp">
Done
</button>
</div>
<p class="txtalert p-t-15" id="alert-cp"> </p>
<div class="loading" id ="loader-cp" style="display:none"></div>
<div class="text-center p-t-50">
<u class="txt1" onclick="showSignIn()">
Sign in instead?
</u>
</div>
</form>
</div>
<!--Forgot Password-->
<div style="display: none;" id="div-fp" class="wrap-enclave">
<form class="enclave-form validate-form-fp">
<span class="enclave-form-logo">
<img class="s_links" src="images/logo.png">
</span>
<span class="enclave-form-title p-b-34 p-t-27">
Forgot Password
</span>
<div class="wrap-input100 validate-input-fp" data-validate = "Enter Username">
<input class="input100" type="text" name="username" placeholder="Username" style="text-transform: lowercase;">
<span class="focus-input100" data-placeholder=""></span>
</div>
<div class="container-enclave-form-btn p-b-3 p-t-27">
<button class="enclave-form-btn" id="submit-btn-cp">
Request Recovery
</button>
</div>
<p class="txtalert p-t-15" id="alert-cp"> </p>
<div class="loading" id ="loader-cp" style="display:none"></div>
<div class="text-center p-t-50">
<u class="txt1" onclick="showSignIn()">
Remember your password? Sign in
</u>
</div>
</form>
</div>
</div>
</div>
<div id="dropDownSelect1"></div>
<script class="s_links" src="vendor/jquery/jquery-3.2.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".js-example-basic-multiple").select2({
maximumSelectionLength: 5
});
document.getElementById("div-si").style.display = "block";
document.getElementById("div-su").style.display = "none";
});
function showChangePassword(){
document.getElementById("div-cp").style.display = "block";
document.getElementById("div-su").style.display = "none";
document.getElementById("div-si").style.display = "none";
}
function showSignIn(){
document.getElementById("div-cp").style.display = "none";
document.getElementById("div-su").style.display = "none";
document.getElementById("div-si").style.display = "block";
}
function showSignUp(){
document.getElementById("div-cp").style.display = "none";
document.getElementById("div-su").style.display = "block";
document.getElementById("div-si").style.display = "none";
}
function changeOrigin(newOrigin) {
var currentLocation = window.location;
var newPath = newOrigin + currentLocation.pathname + currentLocation.search;
window.location.href = newPath; // Redirect to the new URL
}
function rehome(){
let newORKUrl = prompt("Enter new ORK URL:", "https://prod-ork3.azurewebsites.net");
if(newORKUrl == null) return; // in case user cancels
const params = new URLSearchParams(window.location.search);
const response = {
ok: true,
dataType: "newORKUrl",
url: newORKUrl
}
window.opener.postMessage(response, params.get("vendorUrl")); // post jwt to vendor window which opened this enclave
changeOrigin(newORKUrl);
}
</script>
</div>
</body>
</html>