-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
77 lines (74 loc) · 2.28 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
<script src="sockethub-client.js"></script>
<script src="mustache.js"></script>
<script src="app.js"></script>
</head>
<body data-sockethub-host="unht-beta.heahdk.net"
data-sockethub-secret="1234567890">
<div id="wrapper">
Connecting to backend...
</div>
</body>
<!-- TEMPLATE: login -->
<script type="text/mustache" data-template-name="login">
<h1>Login</h1>
<div id="error" style="display:none"></div>
<p>Please authenticate for <strong>{{host}}</strong> first</p>
<form data-action="login">
<div class="inputs">
<input type="email" name="email" placeholder="email">
<input type="password" name="password" placeholder="password">
</div>
<div class="buttons">
<input type="submit" value="Login">
</div>
</form>
</script>
<!-- TEMPLATE: list authorizations -->
<script type="text/mustache" data-template-name="list">
<a href="#" data-action="logout" class="logout-link">Logout</a>
<h1>Authorizations</h1>
<div id="error" style="display:none"></div>
<table>
<tr>
<th>Origin</th>
<th>Scope</th>
<th>Token</th>
</tr>
{{#loading}}
<tr><td><em>Loading...</em></td></tr>
{{/loading}}
{{#empty}}
<tr><td><em>(no authorizations found)</em></td></tr>
{{/empty}}
{{#authorizations}}
<tr>
<td>{{origin}}</td>
<td>{{scope}}</td>
<td>{{token}}</td>
<td><button data-origin="{{origin}}" data-scope="{{scope}}" data-action="revoke">Revoke</button></td>
</tr>
{{/authorizations}}
</table>
</script>
<!-- TEMPLATE: authorize app dialog -->
<script type="text/mustache" data-template-name="dialog">
<a href="#" data-action="logout" class="logout-link">Logout</a>
<h1>Authorize</h1>
<div id="error" style="display:none"></div>
<p>The app at {{origin}} wants to access the following things:</p>
<ul>
{{#scope}}
<li>{{category}} ({{mode}})</li>
{{/scope}}
</ul>
<div class="buttons">
<button data-action="allow" class="default">Allow</button>
<button data-action="reject">Reject</button>
</div>
</script>
</html>