forked from jurkovic-nikola/OpenLinkHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelite.html
235 lines (229 loc) · 15.8 KB
/
elite.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
<!DOCTYPE html>
<html lang="en">
{{ template "header" . }}
<body>
<div class="d-flex align-items-stretch">
<div class="page-content">
{{ $devs := .Devices }}
{{ $temperatures := .Temperatures }}
{{ $device := .Device }}
{{ $devices := $device.Devices }}
{{ $deviceProfile := .Device.DeviceProfile }}
{{ $rgb := .Rgb }}
<input type="hidden" id="deviceId" name="deviceId" value="{{ $device.Serial }}">
<div class="bg-dash-dark-2 py-4">
<div class="container-fluid">
{{ template "navigation" . }}
</div>
</div>
<section class="pt-0 pt-sm-4">
<div class="container-fluid">
<div class="row gy-4" style="margin-top: 10px;">
<div class="row">
<div style="width: 300px;">
<div class="card mb-4">
<div class="card-header border-bottom border-dash-dark-1">
<div class="ds-svg-placeholder-left">
<img src="/static/img/icons/icon-device.svg" width="46" height="46" alt="Device" />
</div>
<div class="ds-svg-placeholder-right">
<span style="font-size: 13px;">{{ .Device.Product }}</span><br />
<p class="text-md-start lh-1 mb-0 text-dash-color-3" style="margin-top: 5px;">
<span>Device Settings</span>
</p>
</div>
</div>
<div class="card-body" style="padding: 1rem 1rem;">
<div style="text-align: center;">
<div class="d-flex align-items-end justify-content-between mb-2">
<div class="me-2">
<p class="text-sm text-uppercase text-gray-600 lh-1 mb-0">Firmware</p>
</div>
<p class="text-sm lh-1 mb-0 text-dash-color-2">{{ .Device.Firmware }}</p>
</div>
<div class="progress" style="height: 3px">
<div class="progress-bar bg-dash-color-5" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
</div>
<div class="custom-device-block">
<div class="custom-float-20-left">
<i class="bi bi-person svg-icon svg-icon-sm svg-icon-heavy"></i>
</div>
<div class="custom-float-80-right">
<select class="form-select userProfile" style="line-height: 1;margin-top: 10px;">
{{ range $key, $profile := $device.UserProfiles }}
{{ if $profile.Active }}
<option value="{{ $key }}" selected>{{ $key }}</option>
{{ else }}
<option value="{{ $key }}">{{ $key }}</option>
{{ end }}
{{ end }}
</select>
</div>
</div>
<div class="custom-device-block">
<div class="custom-float-20-left">
<img src="/static/img/icons/icon-brightness2.svg" width="20" height="20" alt="Brightness" style="vertical-align: top;"/>
</div>
<div class="custom-float-80-right">
<input class="brightness-slider" type="range" id="brightnessSlider" name="brightnessSlider" min="0" max="100" value="{{ $deviceProfile.BrightnessSlider }}" step="5" />
</div>
</div>
<div class="custom-device-block">
<div class="custom-float-20-left">
<i class="bi bi-lightbulb-fill svg-icon svg-icon-sm svg-icon-heavy"></i>
</div>
<div class="custom-float-80-right">
<select class="form-select globalRgb" style="line-height: 1;margin-top: 10px;">
{{ range $key, $_ := $rgb }}
{{ if eq $key "stand" }}
{{ continue }}
{{ else if eq $key "keyboard" }}
{{ continue }}
{{ else if eq $key "mousepad" }}
{{ continue }}
{{ else if eq $key "mouse" }}
{{ continue }}
{{ else if eq $key "headset" }}
{{ continue }}
{{ end }}
<option value="{{ $key }}">{{ $key }}</option>
{{ end }}
</select>
</div>
</div>
<div style="overflow: hidden; margin-top: 10px;">
<button class="btn btn-secondary saveUserProfile">
<span>Save As</span>
</button>
</div>
</div>
</div>
</div>
</div>
{{ range $device := $devices }}
<div style="width: 300px;">
<div class="card mb-4">
<div class="card-header border-bottom border-dash-dark-1">
<div class="ds-svg-placeholder-left">
{{ if $device.ContainsPump }}
<img src="/static/img/icons/icon-pump.svg" width="46" height="46" alt="Device" />
{{ else }}
<img src="/static/img/icons/icon-fan.svg" width="46" height="46" alt="Device" />
{{ end }}
</div>
<div class="ds-svg-placeholder-right">
<span style="font-size: 13px;">{{ $device.Name }}</span><br />
<p class="text-md-start lh-1 mb-0 text-dash-color-3 newLabel" style="margin-top: 5px;">
<input type="hidden" class="deviceData" value="{{ $device.ChannelId }}">
<span class="labelValue">{{ $device.Label }}</span>
</p>
</div>
</div>
<div class="card-body" style="padding: 1rem 1rem;">
{{ if $device.HasTemps }}
{{ if gt $device.Temperature 0.00 }}
<div class="d-flex align-items-end justify-content-between mb-2">
<div class="me-2">
{{ if $device.ContainsPump }}
<p class="text-sm text-uppercase text-gray-600 lh-1 mb-0">Liquid Temp</p>
{{ else }}
<p class="text-sm text-uppercase text-gray-600 lh-1 mb-0">Temp</p>
{{ end }}
</div>
<p class="text-sm lh-1 mb-0 text-dash-color-2" id="temperature-{{ .DeviceId }}">{{ $device.TemperatureString }}</p>
</div>
<div class="progress" style="height: 3px">
<div class="progress-bar bg-dash-color-5" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
</div>
{{ end }}
{{ end }}
{{ if $device.HasSpeed }}
<div class="d-flex align-items-end justify-content-between mb-2" {{ if $device.HasTemps }} style="margin-top: 10px;" {{ end }}>
<div class="me-2">
<p class="text-sm text-uppercase text-gray-600 lh-1 mb-0">Speed</p>
</div>
<p class="text-sm lh-1 mb-0 text-dash-color-2" id="speed-{{ .DeviceId }}" style="margin-top: 5px;">{{ $device.Rpm }} RPM</p>
</div>
<div class="progress" style="height: 3px">
<div class="progress-bar bg-dash-color-5" role="progressbar" style="width: 15%" aria-valuenow="15" aria-valuemin="0" aria-valuemax="100"></div>
</div>
{{ end }}
</div>
<div class="card-body" style="padding: 1rem 1rem;border-top: 1px solid #34373d !important;">
{{ if $device.HasSpeed }}
<button class="btn btn-secondary-empty dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-thermometer-half svg-icon svg-icon-sm svg-icon-heavy"></i>
</button>
<ul class="dropdown-menu dropdown-menu-dark shadow-sm" style="">
<li>
<select id="tempProfile" class="form-select tempProfile" name="{{ $device.DeviceId }}">
{{ if $device.PumpModes }}
{{ range $key, $value := $device.PumpModes }}
{{ if eq $device.Profile $value }}
<option value="{{ $device.ChannelId }};{{ $value }}" selected>{{ $value }}</option>
{{ else }}
<option value="{{ $device.ChannelId }};{{ $value }}">{{ $value }}</option>
{{ end }}
{{ end }}
{{ else }}
{{ range $key, $pf := $temperatures }}
{{ if $pf.Hidden }}
{{ continue }}
{{ end }}
{{ if eq $device.Profile $key }}
<option value="{{ $device.ChannelId }};{{ $key }}" selected>{{ $key }}</option>
{{ else }}
<option value="{{ $device.ChannelId }};{{ $key }}">{{ $key }}</option>
{{ end }}
{{ end }}
{{ end }}
</select>
</li>
</ul>
{{ end }}
{{ if gt $device.LedChannels 0 }}
<button class="btn btn-secondary-empty dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" style="margin-left: 5px;">
<i class="bi bi-lightbulb-fill svg-icon svg-icon-sm svg-icon-heavy"></i>
</button>
<ul class="dropdown-menu dropdown-menu-dark shadow-sm" style="">
<li>
<select class="form-select rgbProfile" name="{{ $device.DeviceId }}">
{{ range $key, $_ := $rgb }}
{{ if eq $key "stand" }}
{{ continue }}
{{ else if eq $key "keyboard" }}
{{ continue }}
{{ else if eq $key "mousepad" }}
{{ continue }}
{{ else if eq $key "mouse" }}
{{ continue }}
{{ else if eq $key "headset" }}
{{ continue }}
{{ end }}
{{ if eq $key $device.RGB }}
<option value="{{ $device.ChannelId }};{{ $key }}" selected>{{ $key }}</option>
{{ else }}
<option value="{{ $device.ChannelId }};{{ $key }}">{{ $key }}</option>
{{ end }}
{{ end }}
</select>
</li>
</ul>
{{ end }}
</div>
</div>
</div>
{{ end }}
</div>
</div>
</div>
</section>
{{ template "footer" . }}
</div>
</div>
<script src="/static/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="/static/js/jquery-3.7.1.min.js"></script>
<script src="/static/js/toastr.min.js"></script>
<script src="/static/js/overview.js"></script>
</body>
</html>