ux: hint for focus-typing
Massimo Melina committed
Nov 5, 2024 at 19:43 UTC
8b8f021fe8c6ca124107a4e895807c5995c38dc7
3 files changed
+9
-3
frontend/src/BrowseFiles.ts
+3
-1
@@ -156,8 +156,10 @@ function FilesList() {
156
const msgInstead = !list.length ? (!loading && (searchManuallyInterrupted ? t('stopped_before', "Stopped before finding anything") : t('empty_list', "Nothing here")))
157
: filteredList && !filteredList.length && t('filter_none', "No match for this filter")
158
159
+ const focusHint = `${t('focus_hint', "By typing on your keyboard, you search and focus elements of the list.")}\n\nESC: ${t`Cancel`}`
160
return h(Fragment, {},
160
- focus && h('div', { id: 'focus-typing', className: focusIndex < 0 ? 'focus-typing-mismatch' : '' }, focus, hIcon('info', { style: { cursor: 'default' }, title: `ESC: ${t`Cancel`}` })),
161
+ focus && h('div', { id: 'focus-typing', className: focusIndex < 0 ? 'focus-typing-mismatch' : '' }, focus,
162
+ hIcon('info', { style: { cursor: 'default' }, title: focusHint, onClick: () => alertDialog(focusHint) }) ),
163
h('ul', { ref, className: 'dir' },
164
msgInstead ? h('p', {}, msgInstead)
165
: thisPage.map((entry, idx) =>
src/langs/hfs-lang-en.json
+3
-1
@@ -174,6 +174,8 @@
174
"Logged out": "Logged out",
175
176
"Cancel": "Cancel",
177
- "allow_session_ip_change": "Allow IP change during this session"
177
+ "allow_session_ip_change": "Allow IP change during this session",
178
+
179
+ "focus_hint": "By typing on your keyboard, you search and focus elements of the list."
180
}
181
}
src/langs/hfs-lang-it.json
+3
-1
@@ -166,6 +166,8 @@
166
"Logged out": "Arrivederci",
167
168
"Cancel": "Annulla",
169
- "allow_session_ip_change": "Permetti cambio IP in questa sessione"
169
+ "allow_session_ip_change": "Permetti cambio IP in questa sessione",
170
+
171
+ "focus_hint": "Scrivendo sulla tastiera cerchi tra gli elementi della lista."
172
}
173
}