-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.html
162 lines (158 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<meta name="description" content="Passky is a simple, modern, lightweight, open-source and secure password manager." />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="theme-color" content="#0D1117" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>Passky</title>
<link rel="shortcut icon" type="image/png" href="images/logo.png"/>
<link rel="stylesheet" href="css/tailwind.min.css">
<link rel="stylesheet" href="css/index.css">
<link id="css-theme" type="text/css" rel="stylesheet" href="css/themes/dark.css">
<script src="js/lang.js"></script>
<script src="js/header.js"></script>
</head>
<body>
<div class="primaryBackgroundColor min-h-screen flex items-center justify-center py-6 px-4 sm:px-3 lg:px-8">
<div class="max-w-md w-full space-y-6">
<div>
<img id="passky-logo" class="mx-auto h-20 w-auto" src="images/logo.png" alt="Passky">
</div>
<form id="login_form" class="mt-8 space-y-6">
<input type="hidden" name="remember" value="true">
<div class="rounded-md shadow-sm -space-y-px">
<div>
<label for="passky-server" class="sr-only">Server</label>
<div class="flex rounded-md shadow-sm">
<div class="relative flex flex-grow items-stretch focus-within:z-10">
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 secondaryColor" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="3" y="4" width="18" height="8" rx="3"></rect>
<rect x="3" y="12" width="18" height="8" rx="3"></rect>
<line x1="7" y1="8" x2="7" y2="8.01"></line>
<line x1="7" y1="16" x2="7" y2="16.01"></line>
<path d="M11 8h6"></path>
<path d="M11 16h6"></path>
</svg>
</div>
<select id="passky-server2" class="tertiaryBackgroundColor tertiaryColor primaryBorderColor appearance-none block w-full pl-10 px-3 py-2 border rounded-tl-md focus:outline-none sm:text-sm">
<option value="https://eu.passky.org" selected>Europe</option>
<option value="https://us.passky.org">America</option>
</select>
<input id="passky-server" name="server" type="text" autocomplete="server" style="display: none;" class="tertiaryBackgroundColor tertiaryColor primaryBorderColor appearance-none block w-full pl-10 px-3 py-2 border rounded-tl-md focus:outline-none sm:text-sm" placeholder="Server">
</div>
<button id="server-picker" type="button" class="relative -ml-px inline-flex items-center space-x-2 border rounded-tr-md tertiaryBackgroundColor tertiaryColor primaryBorderColor px-4 py-2 text-sm font-medium focus:outline-none">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 secondaryColor" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<rect x="4" y="8" width="4" height="4"></rect>
<line x1="6" y1="4" x2="6" y2="8"></line>
<line x1="6" y1="12" x2="6" y2="20"></line>
<rect x="10" y="14" width="4" height="4"></rect>
<line x1="12" y1="4" x2="12" y2="14"></line>
<line x1="12" y1="18" x2="12" y2="20"></line>
<rect x="16" y="5" width="4" height="4"></rect>
<line x1="18" y1="4" x2="18" y2="5"></line>
<line x1="18" y1="9" x2="18" y2="20"></line>
</svg>
</button>
</div>
</div>
<div>
<label for="username" class="sr-only">Username</label>
<div class="relative rounded-md shadow-sm">
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 secondaryColor" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="12" cy="7" r="4"></circle>
<path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path>
</svg>
</div>
<input id="username" name="username" type="text" autocomplete="username" required class="tertiaryBackgroundColor tertiaryColor primaryBorderColor appearance-none rounded-none block w-full pl-10 px-3 py-2 border focus:outline-none focus:z-10 sm:text-sm" placeholder="Username">
</div>
</div>
<div>
<label for="password" class="sr-only">Password</label>
<div class="relative rounded-md shadow-sm">
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 secondaryColor" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<circle cx="8" cy="15" r="4"></circle>
<line x1="10.85" y1="12.15" x2="19" y2="4"></line>
<line x1="18" y1="5" x2="20" y2="7"></line>
<line x1="15" y1="8" x2="17" y2="10"></line>
</svg>
</div>
<input id="password" name="password" type="password" autocomplete="off" required class="tertiaryBackgroundColor tertiaryColor primaryBorderColor appearance-none rounded-none block w-full pl-10 px-3 py-2 border focus:outline-none focus:z-10 sm:text-sm" placeholder="Password">
</div>
</div>
<div>
<label for="otp" class="sr-only">OTP</label>
<div class="relative rounded-md shadow-sm">
<div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3">
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 secondaryColor" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M7 16h-4l3.47 -4.66a2 2 0 1 0 -3.47 -1.54"></path>
<path d="M10 16v-8h4"></path>
<line x1="10" y1="12" x2="13" y2="12"></line>
<path d="M17 16v-6a2 2 0 0 1 4 0v6"></path>
<line x1="17" y1="13" x2="21" y2="13"></line>
</svg>
</div>
<input id="otp" name="otp" type="text" autocomplete="off" class="tertiaryBackgroundColor tertiaryColor primaryBorderColor appearance-none rounded-none block w-full pl-10 px-3 py-2 border rounded-b-md focus:outline-none focus:z-10 sm:text-sm" placeholder="OTP">
</div>
</div>
</div>
<div class="text-center">
<button id="btn_signin" type="submit" class="primaryButton group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white focus:outline-none">
Sign in
</button>
<button id="btn_signup" type="button" class="cancelButton group relative w-full flex justify-center my-2 py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white focus:outline-none">
Sign up
</button>
<span id="forgot_username" role="button" class="primaryColor focus:outline-none">
Forgot username?
</span>
</div>
</form>
</div>
</div>
<div id="dialog" class="h-screen w-full fixed left-0 top-0 flex justify-center items-center z-10 inset-0 overflow-y-auto invisible" aria-labelledby="dialog-title" role="dialog" aria-modal="true">
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
<div class="secondaryBackgroundColor inline-block align-bottom rounded-lg px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all m-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6">
<div class="sm:flex sm:items-start">
<div id="dialog-icon" class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10">
<svg class="h-6 w-6 text-red-600" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
</svg>
</div>
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
<h3 class="tertiaryColor text-lg leading-6 font-medium" id="dialog-title"></h3>
<div class="mt-2">
<p class="secondaryColor text-sm" id="dialog-text"></p>
</div>
</div>
</div>
<div class="mt-5 sm:mt-4 sm:ml-10 sm:pl-4 sm:flex">
<button id="dialog-button" type="button" class="dangerButton inline-flex justify-center w-full rounded-md border border-transparent shadow-sm px-4 py-2 text-base font-medium focus:outline-none sm:w-auto sm:text-sm">
Okay
</button>
<button id="dialog-button-cancel" type="button" class="cancelButton mt-2 w-full inline-flex justify-center rounded-md border px-4 py-2 text-base font-medium shadow-sm focus:outline-none sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm">
Cancel
</button>
</div>
</div>
</div>
<script src="js/XChaCha20.min.js"></script>
<script src="js/default-functions.js"></script>
<script src="js/PasswordEntropy.min.js"></script>
<script src="js/PasskyAPI.js"></script>
<script src="js/Argon2id.min.js"></script>
<script src="js/login.js"></script>
</body>
</html>