This repository has been archived by the owner on Apr 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
remotelist.html
184 lines (159 loc) · 3.74 KB
/
remotelist.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
<? require './views/mcss.js' as mcss ?>
<style t:view='mcss' scoped>
ServerList {
li {
span.detail {
flex: 1;
color: #888;
text-align: right
}
}
$selectList
}
RemoteList {
flex: 1;
li {
span.nickname {
flex: 2;
}
span.detail {
flex: 1;
color: #888;
text-align: right;
}
meter {
width: 50px;
margin: 2px 4px;
}
}
$selectList
}
RemotePanel {
flex: 1;
position: relative;
display: flex;
flex-direction: column;
margin: 10px;
font-size: 120%;
h1 {
font-weight: normal;
font-size: 120%;
margin-bottom: 4px;
margin-top:0;
}
h2 {
display: flex;
input {
flex: 1;
}
}
div.info {
}
}
ConnectForm {
display:flex;
input.server {
flex: 1;
}
}
ToggleButton {
text-decoration: none;
font-size: 11px;
padding: 2px 5px;
border-radius: 4px;
display: inline-block;
border: #6B806B 1px solid;
background: #6F6F6F;
color: #D0D0D0;
-mute {
border-color: #806B6B;
-active {
background: #573236;
color: #EBBB27;
:after {
background: #EBBB27;
}
}
:hover {
border-color: #BD8484;
color: #FFC9C9;
}
}
-active {
background: #325736;
:after {
background: #82D182;
}
}
:hover {
border-color: #84BD89;
color: #D6FFC9;
}
:after {
display: inline-block;
border-radius: 3px;
width: 6px;
height: 6px;
background: #AAA4A4;
content: '';
margin-left: 2px;
vertical-align: middle;
}
}
$selectList {
padding: 0;
margin: 10px 0;
li {
position: relative;
border-radius: 5px;
padding: 4px;
cursor: pointer;
display: flex;
:hover {
background: rgba(173, 133, 3, 0.2);
}
}
}
</style>
<div class="RemotePanel" t:by='state'>
<t:placeholder t:when='connected'>
<h1><strong>Connected to</strong> <span t:bind='server' /></h1>
<div>as <input data-preserve-attribute='value' t:bind:value='nickname' data-behavior='changeNickname' /></div>
<div class=".info">
<p t:if='remotes:isEmpty'>No other participants</p>
</div>
<ul class='RemoteList'>
<li t:repeat='remotes'>
<span class=".nickname" t:bind='.nickname' />
<t:placeholder class='.controls' t:if='.isPlayer'>
<a class="ToggleButton -mute" data-behavior='mute' t:bind:data-id='.id' href='#mute'>mute</a>
<meter min='-20' data-behavior='vu' t:bind:data-id='.id' high='0' value='-20' max='6' />
</t:placeholder>
<span class='.detail' t:unless='.isPlayer'>
listener
</span>
</li>
</ul>
<button data-behavior='disconnect'>Disconnect</button>
</t:placeholder>
<t:placeholder t:when='connecting'>
<h1><strong>Connecting to</strong> <span t:bind='server' />...</h1>
</t:placeholder>
<t:placeholder t:when='disconnected'>
<h1>Not connected</h1>
<ul class='ServerList'>
<li data-server='loopjs.com:7777' data-behavior='connect'>
<span>Public Server</span>
<span class='.detail'>loopjs.com:7777</span>
</li>
<li data-server='localhost:7777' data-behavior='connect'>
<span class='.name'>Local Server</span>
<span class='.detail'>localhost:7777</span>
</li>
</ul>
<div class='ConnectForm' data-behavior='connectForm'>
<input data-preserve-attribute='value' placeholder='localhost:7777' t:bind:value='server' class='.server' />
<button class='.connect'>Connect</button>
</div>
</t:placeholder>
</div>