This commit is contained in:
Vitaly Turovsky 2025-05-03 12:49:32 +03:00
commit 5bfb9bebd7

View file

@ -21,10 +21,14 @@ export default () => {
}, [])
const onLongPress = async () => {
const select = await showOptionsModal('', f3Keybinds.filter(f3Keybind => f3Keybind.mobileTitle && (f3Keybind.enabled?.() ?? true)).map(f3Keybind => f3Keybind.mobileTitle))
const select = await showOptionsModal('', f3Keybinds.filter(f3Keybind => {
return f3Keybind.mobileTitle && (f3Keybind.enabled?.() ?? true)
}).map(f3Keybind => {
return `${f3Keybind.mobileTitle}${f3Keybind.key ? ` (F3+${f3Keybind.key})` : ''}`
}))
if (!select) return
const f3Keybind = f3Keybinds.find(f3Keybind => f3Keybind.mobileTitle === select)
if (f3Keybind) f3Keybind.action()
if (f3Keybind) void f3Keybind.action()
}
const defaultOptions = {