Repository navigation
Expand file tree
/
Copy pathsettings.html
More file actions
262 lines (225 loc) · 6.48 KB
/
Copy pathsettings.html
File metadata and controls
262 lines (225 loc) · 6.48 KB
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
background: transparent;
color: #e0e0e0;
font-size: 13px;
overflow: hidden;
}
/* ── Dictation pill (shown during recording) ── */
.pill {
display: none;
align-items: center;
gap: 10px;
height: 36px;
padding: 0 14px;
background: rgba(18, 18, 18, 0.92);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 20px;
box-shadow:
0 4px 24px rgba(0, 0, 0, 0.5),
0 1px 4px rgba(0, 0, 0, 0.3),
inset 0 0.5px 0 rgba(255, 255, 255, 0.06);
-webkit-app-region: drag;
animation: pillIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
transform-origin: center top;
}
.pill.active { display: flex; }
@keyframes pillIn {
from {
opacity: 0;
transform: scale(0.9) translateY(-4px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
/* Red recording dot with glow */
.pill-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #ff3b30;
box-shadow: 0 0 8px rgba(255, 59, 48, 0.6);
animation: dotPulse 1.5s ease-in-out infinite;
flex-shrink: 0;
}
@keyframes dotPulse {
0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(255, 59, 48, 0.6); }
50% { opacity: 0.5; box-shadow: 0 0 4px rgba(255, 59, 48, 0.3); }
}
/* Audio waveform bars */
.pill-waveform {
display: flex;
align-items: center;
gap: 2px;
height: 20px;
}
.pill-waveform .bar {
width: 2.5px;
height: 4px;
min-height: 4px;
border-radius: 2px;
background: linear-gradient(to top, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.7));
transition: height 0.08s ease-out;
}
.pill-text {
font-size: 12px;
font-weight: 500;
color: rgba(255, 255, 255, 0.7);
letter-spacing: 0.2px;
white-space: nowrap;
}
.pill-time {
font-size: 11px;
font-weight: 500;
font-variant-numeric: tabular-nums;
color: rgba(255, 255, 255, 0.35);
margin-left: 2px;
flex-shrink: 0;
}
/* ── Settings panel ── */
.settings {
padding: 16px;
background: #0a0a0a;
}
.settings.hidden { display: none; }
h1 {
font-size: 15px;
font-weight: 600;
margin-bottom: 16px;
color: #fff;
}
.field { margin-bottom: 14px; }
label {
display: block;
font-size: 11px;
font-weight: 600;
color: #666;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 5px;
}
input, select, textarea {
width: 100%;
background: #141414;
color: #ccc;
border: 1px solid #2a2a2a;
border-radius: 6px;
padding: 8px 10px;
font-size: 13px;
font-family: inherit;
outline: none;
transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus { border-color: #444; }
textarea { height: 80px; resize: none; line-height: 1.5; }
.row { display: flex; gap: 8px; align-items: center; }
.row input, .row select { flex: 1; }
.btn {
background: #1a1a1a;
color: #888;
border: 1px solid #2a2a2a;
border-radius: 6px;
padding: 8px 14px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.15s;
white-space: nowrap;
}
.btn:hover { background: #222; color: #ccc; }
.btn-primary {
background: #22c55e;
color: #000;
border-color: #22c55e;
font-weight: 600;
}
.btn-primary:hover { background: #16a34a; }
.hotkey-input.listening { border-color: #22c55e; color: #22c55e; }
.status-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 14px;
padding: 8px 10px;
background: #141414;
border-radius: 6px;
}
.status-dot {
width: 8px; height: 8px;
border-radius: 50%;
display: inline-block;
margin-right: 6px;
}
.status-dot.ok { background: #22c55e; }
.status-dot.bad { background: #ef4444; }
.hint { font-size: 11px; color: #444; margin-top: 3px; }
.save-row { margin-top: 16px; display: flex; justify-content: flex-end; }
</style>
</head>
<body>
<!-- Dictation pill (floating widget during recording) -->
<div class="pill" id="pill">
<div class="pill-dot"></div>
<div class="pill-waveform" id="waveform"></div>
<span class="pill-text">Listening</span>
<span class="pill-time" id="pillTime">0:00</span>
</div>
<!-- Settings panel (full view) -->
<div class="settings" id="settingsPanel">
<h1>Speak</h1>
<div class="status-row">
<span>
<span class="status-dot" id="accessDot"></span>
<span id="accessLabel">Checking...</span>
</span>
<button class="btn" id="accessBtn">Grant</button>
</div>
<div class="field">
<label>Deepgram API Key</label>
<input type="password" id="apiKey" placeholder="Enter your Deepgram API key">
</div>
<div class="field">
<label>Hotkey</label>
<div class="row">
<input type="text" id="hotkey" class="hotkey-input" readonly>
<button class="btn" id="hotkeyBtn">Set</button>
</div>
</div>
<div class="field">
<label>Language</label>
<select id="language">
<option value="en">English</option>
<option value="ru">Russian</option>
<option value="multi">Multilingual</option>
</select>
</div>
<div class="field">
<label>Microphone</label>
<select id="mic">
<option value="">Loading...</option>
</select>
</div>
<div class="field">
<label>Custom vocabulary</label>
<textarea id="keyterms" placeholder="One term per line e.g. IOTA Takhir Adilzhanov GRANIT"></textarea>
<div class="hint">Names, brands, terms the model often gets wrong. One per line.</div>
</div>
<div class="save-row">
<button class="btn" id="restartBtn">Restart</button>
<button class="btn btn-primary" id="saveBtn">Save</button>
</div>
</div>
<script src="settings.js"></script>
</body>
</html>