forked from jurkovic-nikola/OpenLinkHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm55rgbpro.html
206 lines (202 loc) · 14 KB
/
m55rgbpro.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
<!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 }}
{{ $rgb := .Rgb }}
{{ $profile := $device.DeviceProfile.Profile }}
{{ $deviceProfile := .Device.DeviceProfile }}
<input type="hidden" id="deviceId" name="deviceId" value="{{ $device.Serial }}">
<input type="hidden" id="zones" name="zones" value="1">
<input type="hidden" id="dpis" name="dpis" value="5">
<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 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-mouse.svg" width="46" height="46" alt="Device" />
</div>
<div class="ds-svg-placeholder-left" style="width:auto;margin-left: 30px;">
<span>{{ .Device.Product }}</span><br />
<p class="text-md-start lh-1 mb-0 text-dash-color-3" style="margin-top: 5px;">
<span style="color: #37929d !important;">Firmware: {{ .Device.Firmware }}</span>
</p>
</div>
<div class="ds-svg-placeholder-right" style="width:auto;margin-left: 30px;">
<button title="User Profile" class="btn btn-secondary-empty dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" style="margin-top: 5px;">
<i class="bi bi-person-dash 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 userProfile" name="userProfile">
{{ range $key, $profile := $device.UserProfiles }}
{{ if $profile.Active }}
<option value="{{ $key }}" selected>{{ $key }}</option>
{{ else }}
<option value="{{ $key }}">{{ $key }}</option>
{{ end }}
{{ end }}
</select>
</li>
</ul>
<button title="Brightness" class="btn btn-secondary-empty dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" style="margin-top: 5px;">
<i class="bi bi-brightness-high svg-icon svg-icon-sm svg-icon-heavy"></i>
</button>
<ul class="dropdown-menu dropdown-menu-dark shadow-sm" style="background-color: transparent;border: 0;">
<li>
<input class="brightness-slider" type="range" id="brightnessSlider" name="brightnessSlider" min="0" max="100" value="{{ $deviceProfile.BrightnessSlider }}" style="margin-top:0" step="5" />
</li>
</ul>
<button title="RGB Profile" class="btn btn-secondary-empty dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" style="margin-top: 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 mouseRgbProfile" name="mouseRgbProfile">
{{ range $key, $_ := $rgb }}
{{ if eq $key "stand" }}
{{ continue }}
{{ else if eq $key "liquid-temperature" }}
{{ continue }}
{{ else if eq $key "mousepad" }}
{{ continue }}
{{ else if eq $key "keyboard" }}
{{ continue }}
{{ else if eq $key "circle" }}
{{ continue }}
{{ else if eq $key "circleshift" }}
{{ continue }}
{{ else if eq $key "spinner" }}
{{ continue }}
{{ else if eq $key "headset" }}
{{ continue }}
{{ end }}
{{ if eq $key $device.DeviceProfile.RGBProfile }}
<option value="0;{{ $key }}" selected>{{ $key }}</option>
{{ else }}
<option value="0;{{ $key }}">{{ $key }}</option>
{{ end }}
{{ end }}
</select>
</li>
</ul>
<button title="Pulling Rate" class="btn btn-secondary-empty dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false" style="margin-top: 5px;">
<i class="bi bi-usb-plug-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 mousePollingRate" name="mousePollingRate">
{{ range $key, $pr := $device.PollingRates }}
{{ if eq $key $device.DeviceProfile.PollingRate }}
<option value="{{ $key }}" selected>{{ $pr }}</option>
{{ else }}
<option value="{{ $key }}">{{ $pr }}</option>
{{ end }}
{{ end }}
</select>
</li>
</ul>
<button title="Save user profile" class="btn btn-secondary-empty saveUserProfile" type="button" style="margin-top: 5px;">
<i class="bi bi-save2-fill svg-icon svg-icon-sm svg-icon-heavy"></i>
</button>
</div>
</div>
<div class="card-body" style="padding: 1rem 1rem;margin: 0 auto;">
<div class="mouse">
<div class="row">
{{ range $key, $pf := $device.DeviceProfile.Profiles }}
<div style="margin-top: 10px;">
<div class="dpi-left">
<p style="color: rgba({{ $pf.Color.Red }}, {{ $pf.Color.Green }}, {{ $pf.Color.Blue }}, 1);">
{{ if eq $key $device.DeviceProfile.Profile }}
{{ $pf.Name }} *
{{ else }}
{{ $pf.Name }}
{{ end }}
</p>
</div>
<div class="dpi-middle">
<input type="range" min="200" max="12400" value="{{ $pf.Value }}" class="slider" id="stage{{ $key }}">
</div>
<div class="dpi-right">
<input class="form-control" id="stageValue{{ $key }}" type="text" value="{{ $pf.Value }}">
</div>
</div>
{{ end }}
{{ if eq "mouse" $device.DeviceProfile.RGBProfile }}
<div class="row" style="margin: 10px auto 0;">
{{ range $key, $dpiZone := $device.DeviceProfile.Profiles }}
<div class="col-md-3 col-sm-6">
<div class="card mb-4">
<div style="margin-top: 10px;">
<span style="margin-bottom: 10px;">DPI: {{ $dpiZone.Name }}</span>
<div>
<input type="color" id="dpiColor{{ $key }}" value="{{ $dpiZone.Color.Hex }}" style="padding: 0;margin-bottom: 15px;">
</div>
</div>
</div>
</div>
{{ end }}
</div>
<div class="row" style="margin: 10px auto 0;">
{{ range $key, $zone := $device.DeviceProfile.ZoneColors }}
<div class="col-md-3 col-sm-6">
<div class="card mb-4">
<div style="margin-top: 10px;">
<span style="margin-bottom: 10px;">{{ $zone.Name }}</span>
<div>
<input type="color" id="zoneColor{{ $key }}" value="{{ $zone.Color.Hex }}" style="padding: 0;margin-bottom: 15px;">
</div>
</div>
</div>
</div>
{{ end }}
</div>
{{ end }}
</div>
</div>
<div style="margin: 0 auto;">
<div style="float: left;width: 530px;">
<button class="btn btn-secondary" id="default5DPI" style="margin-top: 10px;float: left;margin-left: 10px;">
<span>Default</span>
</button>
<button class="btn btn-secondary" id="saveDPI" style="margin-top: 10px;float: left;margin-left: 10px;">
<span>Save DPI</span>
</button>
{{ if eq "mouse" $device.DeviceProfile.RGBProfile }}
<button class="btn btn-secondary" id="saveZoneColors" style="margin-top: 10px;float: left;margin-left: 10px;">
<span>Save Zone Colors</span>
</button>
<button class="btn btn-secondary" id="saveDpiColors" style="margin-top: 10px;float: left;margin-left: 10px;">
<span>Save DPI Colors</span>
</button>
{{ end }}
</div>
</div>
</div>
</div>
</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>
<script src="/static/js/mouse.js"></script>
</body>
</html>