-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsettings.html
281 lines (254 loc) · 8.71 KB
/
settings.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
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings</title>
<link rel="stylesheet" href="styles/main.css">
<style>
body {
max-width: 800px;
margin: 0 auto;
padding: 32px 48px;
font-family: system-ui, -apple-system, sans-serif;
color: var(--text-color);
min-width: 600px;
}
.header {
display: flex;
align-items: center;
margin-bottom: 40px;
gap: 12px;
}
.header img {
width: 32px;
height: 32px;
margin-right: 12px;
}
.header h1 {
font-size: 24px;
margin: 0;
}
.back-button {
background: none;
border: none;
cursor: pointer;
padding: 8px;
border-radius: var(--radius-sm);
color: var(--text-color);
display: flex;
align-items: center;
justify-content: center;
}
.back-button:hover {
background-color: var(--hover-color);
}
.back-button svg {
width: 20px;
height: 20px;
}
.section {
margin-bottom: 32px;
}
.section h2 {
font-size: 18px;
margin-bottom: 16px;
}
.setting-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px;
border-bottom: 1px solid var(--border-color);
gap: 32px;
}
.setting-label {
display: flex;
flex-direction: column;
flex: 1;
min-width: 300px;
}
.setting-description {
font-size: 14px;
color: #6b7280;
margin-top: 8px;
line-height: 1.5;
max-width: 500px;
}
.toggle {
position: relative;
width: 44px;
height: 24px;
}
.toggle input {
opacity: 0;
width: 0;
height: 0;
}
.toggle-slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #e5e7eb;
transition: .4s;
border-radius: 24px;
}
.toggle-slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 2px;
bottom: 2px;
background-color: white;
transition: .4s;
border-radius: 50%;
}
input:checked + .toggle-slider {
background-color: var(--primary-color);
}
input:checked + .toggle-slider:before {
transform: translateX(20px);
}
input[type="number"] {
width: 80px;
padding: 8px;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
}
textarea {
width: 100%;
min-height: 80px;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
font-family: inherit;
resize: vertical;
line-height: 1.5;
}
.setting-row.full-width {
flex-direction: column;
align-items: flex-start;
gap: 16px;
}
.setting-row.full-width .setting-label {
margin-bottom: 8px;
}
input[type="password"] {
width: 300px;
padding: 8px;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
font-family: inherit;
}
</style>
</head>
<body>
<div class="header">
<button class="back-button" id="backButton">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 19l-7-7m0 0l7-7m-7 7h18" />
</svg>
</button>
<img src="images/128.png" alt="SmarTab">
<h1>Settings</h1>
</div>
<div class="card section">
<div class="setting-row">
<div class="setting-label">
<span>Custom Gemini API Key</span>
<span class="setting-description">Use your own Gemini API key for faster responses (optional)</span>
</div>
<input type="password" id="geminiApiKey" placeholder="Enter API key">
</div>
<div class="setting-row">
<div class="setting-label">
<span>Auto-collapse other groups</span>
<span class="setting-description">Automatically collapse other tab groups when switching between them</span>
</div>
<label class="toggle">
<input type="checkbox" id="closeOtherGroups">
<span class="toggle-slider"></span>
</label>
</div>
<div class="setting-row">
<div class="setting-label">
<span>Auto-group new tabs</span>
<span class="setting-description">Automatically group new tabs after 10 seconds of opening</span>
</div>
<label class="toggle">
<input type="checkbox" id="autoGroupNewTabs">
<span class="toggle-slider"></span>
</label>
</div>
<div class="setting-row">
<div class="setting-label">
<span>Only active tab</span>
<span class="setting-description">Only work with the currently active tab when grouping</span>
</div>
<label class="toggle">
<input type="checkbox" id="onlyIncludeActiveTab">
<span class="toggle-slider"></span>
</label>
</div>
<div class="setting-row">
<div class="setting-label">
<span>Include grouped tabs</span>
<span class="setting-description">Include tabs that are already in a group</span>
</div>
<label class="toggle">
<input type="checkbox" id="includeGroupedTabs">
<span class="toggle-slider"></span>
</label>
</div>
<div class="setting-row">
<div class="setting-label">
<span>Current window only</span>
<span class="setting-description">Only group tabs from the current window</span>
</div>
<label class="toggle">
<input type="checkbox" id="currentWindowOnly">
<span class="toggle-slider"></span>
</label>
</div>
<div class="setting-row">
<div class="setting-label">
<span>Include frozen tabs</span>
<span class="setting-description">Include tabs that are frozen/discarded</span>
</div>
<label class="toggle">
<input type="checkbox" id="includeFrozenTabs">
<span class="toggle-slider"></span>
</label>
</div>
<div class="setting-row">
<div class="setting-label">
<span>Maximum tabs per group</span>
<span class="setting-description">Limit the number of tabs in each group</span>
</div>
<input type="number" id="maxTabsPerGroup" min="2" max="20" value="8">
</div>
<div class="setting-row full-width">
<div class="setting-label">
<span>Custom Grouping Instructions</span>
<span class="setting-description">Add specific instructions for how you want your tabs to be grouped (optional)</span>
</div>
<textarea id="customGroupingInstructions" placeholder="Example: Group development documentation separately from tutorial sites Keep shopping sites in their own group Put all video streaming sites together"></textarea>
</div>
<div class="setting-row">
<div class="setting-label">
<span>Use advanced grouping</span>
<span class="setting-description">Use more accurate (but slower) grouping algorithm, better for complex tab collections</span>
</div>
<label class="toggle">
<input type="checkbox" id="useAdvancedGrouping">
<span class="toggle-slider"></span>
</label>
</div>
</div>
<script src="settings.js"></script>
</body>
</html>