-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.html
More file actions
156 lines (156 loc) · 4.3 KB
/
popup.html
File metadata and controls
156 lines (156 loc) · 4.3 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
<!DOCTYPE html>
<html>
<head>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
width: 200px;
padding: 12px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-size: 13px;
color: #18181b;
background: #fff;
}
@media (prefers-color-scheme: dark) {
body { background: #1e1e28; color: #e4e4e7; }
.toggle-row, .theme-row { border-bottom-color: rgba(255,255,255,0.08); }
.status { color: #a1a1aa; }
.settings-link { color: #a78bfa; }
.theme-segment { background: #2a2a3a; border-color: rgba(255,255,255,0.08); }
.theme-option { color: #a1a1aa; }
.theme-option:hover { color: #e4e4e7; }
.theme-option.active { background: #7c3aed; color: #fff; }
}
.theme-row {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 1px solid rgba(0,0,0,0.06);
}
.theme-segment {
display: flex;
border: 1px solid rgba(0,0,0,0.10);
border-radius: 6px;
overflow: hidden;
background: #f4f4f5;
}
.theme-option {
padding: 3px 8px;
font-size: 11px;
cursor: pointer;
border: none;
background: transparent;
color: #52525b;
font-family: inherit;
transition: background 0.15s, color 0.15s;
}
.theme-option:hover { color: #18181b; }
.theme-option.active {
background: #7c3aed;
color: #fff;
border-radius: 4px;
}
.header {
display: flex;
align-items: center;
gap: 6px;
margin-bottom: 10px;
font-weight: 600;
font-size: 14px;
}
.toggle-row {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 10px;
margin-bottom: 10px;
border-bottom: 1px solid rgba(0,0,0,0.06);
}
.status { font-size: 12px; color: #71717a; }
.toggle {
position: relative;
width: 36px;
height: 20px;
cursor: pointer;
}
.toggle input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
}
.toggle input:focus-visible + .slider {
outline: 2px solid #7c3aed;
outline-offset: 2px;
}
.slider {
position: absolute;
inset: 0;
background: #d4d4d8;
border-radius: 10px;
transition: background 0.2s;
}
.slider::before {
content: '';
position: absolute;
width: 16px;
height: 16px;
left: 2px;
top: 2px;
background: white;
border-radius: 50%;
transition: transform 0.2s;
}
.toggle input:checked + .slider {
background: #7c3aed;
}
.toggle input:checked + .slider::before {
transform: translateX(16px);
}
.settings-link {
display: block;
text-align: center;
font-size: 11px;
color: #7c3aed;
text-decoration: none;
cursor: pointer;
}
</style>
</head>
<body>
<div class="header">✦ Dobby AI</div>
<div class="toggle-row">
<span class="status" id="status">Enabled</span>
<label class="toggle">
<input type="checkbox" id="enabled" checked aria-label="Enable or disable Dobby AI">
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="status" id="screenshot-status" title="Long-press anywhere to screenshot a region and ask AI about it.">Screenshot mode</span>
<label class="toggle">
<input type="checkbox" id="screenshot-enabled" checked aria-label="Enable or disable screenshot mode">
<span class="slider"></span>
</label>
</div>
<div class="toggle-row">
<span class="status" id="autosuggest-status" title="Works in standard text fields (textarea). Gmail, Docs, and Notion support coming soon.">Auto-suggest</span>
<label class="toggle">
<input type="checkbox" id="autosuggest-enabled" aria-label="Enable or disable auto-suggest">
<span class="slider"></span>
</label>
</div>
<div class="theme-row">
<span class="status">Theme</span>
<div class="theme-segment" id="theme-segment" role="group" aria-label="Theme">
<button class="theme-option active" data-theme="auto" aria-pressed="true">Auto</button>
<button class="theme-option" data-theme="light" aria-pressed="false">Light</button>
<button class="theme-option" data-theme="dark" aria-pressed="false">Dark</button>
</div>
</div>
<a class="settings-link" id="settings">Settings</a>
<script src="popup.js"></script>
</body>
</html>