-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
140 lines (123 loc) · 3.11 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
<main id="template">
<form id="relay" onSubmit="return false">
<fieldset>
<legend>HTTPRelay-js Proxy</legend>
<button id="server" disabled>server</button>
<button id="client" disabled>client</button>
<input id="user" onBlur="sm.proxy_add(this.value, 'user')" placeholder="username" />
<input id="color" type="color" onChange="sm.proxy_add(this.value, 'color')" />
<br clear="both" />
<button onClick="sm.proxy_add(Math.random().toFixed(3))">random</button>
<select onChange="sm.proxy_add(this.value)">
<option disabled selected>fixed</option>
<option value="A">A</option>
<option value="B">B</option>
</select>
<input class="w50" type="file" multiple accept="image/*" onChange="sm.proxy_add(this, 'file')" />
</fieldset>
<fieldset id="sessions" class="hide">
<input id="purge" type="checkbox" />
<input id="users" type="number" min="2" max="12" placeholder="# users" />
<details id="download">
<summary>download</summary>
<section id="images"></section>
</details>
</fieldset>
</form>
<section id="logs" class="hide">
<div class="w50">
<h2>Local <a id="pageLink" target="_blank">invite</a></h2>
<pre id="local"></pre>
</div>
<div class="w50">
<h2>Revlist <a id="logLink" target="_blank">endpoint</a></h2>
<pre id="revlist"></pre>
</div>
</section>
<style>
* {
box-sizing: border-box;
margin: 0 0 0.25rem;
padding: 0;
font-family: monospace;
}
body,
fieldset {
padding: 0.25rem;
color: #888;
}
fieldset {
background-color: #eee;
overflow: auto;
}
fieldset button,
fieldset input,
fieldset select,
fieldset label {
width: calc(25% - 0.25rem);
max-width: 8rem;
height: 1.5rem;
line-height: 1;
display: block;
float: left;
margin: 0.125rem;
box-sizing: border-box;
position: relative;
border: 0.125rem solid #ccc;
border-radius: 0.25rem;
}
fieldset input[type=file] {
border: none;
}
fieldset input[type=checkbox] {
appearance: none;
}
fieldset input[type=checkbox]:after {
content: attr(id);
position: absolute;
width: 100%;
height: 100%;
text-align: center;
}
fieldset input[type=checkbox]:checked:after {
background: #80ffc0;
}
fieldset input.w50 {
width: calc(50% - 0.25rem);
max-width: 16rem;
}
h2 {
margin: 0 0 0.25rem;
border-bottom: 0.125rem solid #eee;
font-weight: normal;
}
h2 a {
font-size: 1rem;
}
.hide a,
#sessions.hide {
display: none;
}
.w50 {
width: 50%;
float: left;
}
#local,
#revlist {
color: #000;
height: calc(100vh - 12rem);
margin: 0;
overflow: hidden;
overflow-y: scroll;
}
#revlist article {
border-bottom: 0.125em dashed #c0c0c0;
}
#images img {
display: block;
float: left;
width: auto;
height: 4em;
}
</style>
</main>