-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
144 lines (136 loc) · 3.75 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
141
142
143
144
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<title>Simple Ryzen TDP</title>
<style>
body {
display: flex;
flex-direction: row;
}
body > div {
display: flex;
flex-direction: column;
}
</style>
</head>
<body>
<div>
<label class="form-label" for="customTDP"
>TDP
<span id="tdpView"></span>
</label>
<div class="range">
<input
type="range"
style="width: 640px"
id="customTDP"
min="4"
max="18"
step="1"
/>
</div>
<br />
<label class="form-label" for="ryzenadjPath">ryzenadj path</label>
<div>
<input
type="text"
id="ryzenadjPath"
style="width: 640px"
placeholder="input path to ryzenAdj binary"
/>
</div>
<br />
<label class="form-label" for="defaultTdp">TDP on App Start</label>
<form id="defaultTdpForm">
<input
type="number"
id="defaultTdp"
name="defaultTdp"
min="4"
max="22"
step="1"
/>
<button type="submit" id="saveDefaultTdp">Save</button>
<button type="button" id="clearDefaultTdp">Clear</button>
</form>
<br />
<label class="form-label" for="tdpRange">TDP Range</label>
<form id="tdpRange">
min:
<input
type="number"
id="minTdp"
name="minTdp"
min="5"
max="100"
step="1"
/>
max:
<input
type="number"
id="maxTdp"
name="maxTdp"
min="5"
max="100"
step="1"
/>
<button type="submit" id="saveTdpRange">Save</button>
</form>
<br />
<span>
<label class="form-label" for="preserveTdpOnSuspend"
>Preserve TDP on Suspend/Resume</label
>
<input type="checkbox" id="preserveTdpOnSuspend" />
</span>
<br />
<span>
<label class="form-label" for="pollTdp"
>Poll current TDP</label
>
<input type="checkbox" id="pollTdp" /><button type="button" id="pollTdpInfoButton">?</button>
</span>
<br />
<span id="appVersion"></span>
<br />
<div>
<button type="button" id="quitApp">Quit</button>
</div>
</div>
<div>
<pre id="tdpDetails"></pre>
<button type="button" id="refreshTdpTable">Refresh</button>
</div>
</body>
<dialog id="introDialog">
<h2>Introduction</h2>
<p>
For the app to work properly, you must fill out the ryzenadj path input,
and configure ryzenadj for passwordless sudo
</p>
<p>
Instructions to do so are on the project's github page, found at
<a href="https://github.com/aarron-lee/simple-ryzen-tdp"
>https://github.com/aarron-lee/simple-ryzen-tdp</a
>
</p>
<form method="dialog" id="introDialogCloseForm">
<button type="submit">Close</button>
<input
type="checkbox"
id="disableIntroDialog"
name="disableIntroDialog"
/>
<label for="disableIntroDialog">Don't show me this again</label>
</form>
</dialog>
<dialog id="pollTdpDialog" closed>
<h2>Poll TDP</h2>
<p>This option repeatedly sets the TDP every 500ms (half a second). This is for devices that constantly reset the TDP to some other value</p>
<p>Note that after enabling or disabling this option, you need to set the TDP one more time for it to start/stop polling TDP</p>
<button type="button" id="closePollTdpDialog">Close</button>
</dialog>
<script src="src/frontend/renderer.js"></script>
</html>