-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.html
More file actions
143 lines (129 loc) · 5.04 KB
/
settings.html
File metadata and controls
143 lines (129 loc) · 5.04 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>EyeLS — Settings</title>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/pages.css">
<!-- Vue 3 via CDN -->
<script src="https://unpkg.com/vue@3.4.27/dist/vue.global.prod.js"></script>
</head>
<body class="page-shell">
<div id="settings-app">
<header class="topbar">
<div class="brand">
<span class="eye-dot"></span><span class="logo-text">EyeLS</span>
</div>
<div class="status">Preferences — saved locally to your browser</div>
<div class="actions">
<a class="btn btn-ghost" href="/stats">Stats</a>
<a class="btn btn-ghost" href="/">Keyboard</a>
</div>
</header>
<main class="page-main">
<section class="card hero-card">
<div class="hero-row">
<div>
<h2 style="margin: 0;">Settings</h2>
<p class="muted" style="margin: 6px 0 0;">
Tune the eye-tracking experience. Changes apply on the next visit
to the keyboard.
</p>
</div>
<div class="stack-pills">
<span class="pill pill-vue">Vue 3</span>
</div>
</div>
</section>
<section class="card">
<div class="setting">
<div class="setting-head">
<label for="s-dwell">Dwell time</label>
<span class="setting-value">{{ dwellMs }} ms</span>
</div>
<p class="muted">How long you must hold your gaze on a key before it
"presses". Shorter = faster typing but more accidental presses.</p>
<input id="s-dwell" type="range" min="300" max="2000" step="50"
v-model.number="dwellMs">
</div>
<div class="setting">
<div class="setting-head">
<label for="s-smooth">Cursor smoothing</label>
<span class="setting-value">{{ smoothWindow }} samples</span>
</div>
<p class="muted">Averaging window for the gaze cursor. Higher = smoother
but laggier.</p>
<input id="s-smooth" type="range" min="1" max="10" step="1"
v-model.number="smoothWindow">
</div>
<div class="setting">
<div class="setting-head">
<label for="s-lerp">Cursor responsiveness</label>
<span class="setting-value">{{ Math.round(cursorLerp * 100) }} %</span>
</div>
<p class="muted">How quickly the cursor catches up to your eyes each
frame. Higher = snappier but jitterier.</p>
<input id="s-lerp" type="range" min="0.1" max="0.8" step="0.05"
v-model.number="cursorLerp">
</div>
<div class="setting">
<div class="setting-head">
<label for="s-size">Cursor size</label>
<span class="setting-value">{{ cursorSize }} px</span>
</div>
<input id="s-size" type="range" min="8" max="48" step="2"
v-model.number="cursorSize">
</div>
<div class="setting">
<div class="setting-head">
<label for="s-color">Cursor color</label>
<span class="setting-value">{{ cursorColor }}</span>
</div>
<div class="color-row">
<input id="s-color" type="color" v-model="cursorColor">
<div class="color-presets">
<button v-for="c in presets" :key="c" type="button"
class="color-chip" :style="{ background: c }"
:class="{ selected: c.toLowerCase() === cursorColor.toLowerCase() }"
@click="cursorColor = c">
</button>
</div>
</div>
</div>
<div class="setting">
<div class="setting-head">
<label>Show webcam preview while typing</label>
<input type="checkbox" v-model="showVideo">
</div>
</div>
<div class="setting">
<div class="setting-head">
<label>Auto-save sessions on Speak</label>
<input type="checkbox" v-model="autoSave">
</div>
<p class="muted">When you press the "Speak" key, your message is also
saved to the Stats dashboard automatically.</p>
</div>
<div class="setting-actions">
<button class="btn btn-ghost" @click="reset">Reset to defaults</button>
<button class="btn btn-primary" @click="save">Save settings</button>
</div>
<transition>
<div v-if="savedMsg" class="saved-msg">{{ savedMsg }}</div>
</transition>
</section>
<section class="card preview-card">
<h3 style="margin-top: 0;">Live preview</h3>
<div class="preview-area">
<div class="preview-cursor" :style="previewStyle"></div>
</div>
<p class="muted" style="margin-bottom: 0;">
This is what the gaze cursor will look like on the keyboard.
</p>
</section>
</main>
</div>
<script src="./js/settings.js"></script>
</body>
</html>