mirror of
https://github.com/Eugeny/tabby.git
synced 2025-08-06 09:21:53 +00:00
allow searching for hotkey values - #1509
This commit is contained in:
@@ -288,7 +288,7 @@ ngb-tabset.vertical(type='pills', [activeId]='activeTab')
|
|||||||
th ID
|
th ID
|
||||||
th Hotkey
|
th Hotkey
|
||||||
ng-container(*ngFor='let hotkey of hotkeyDescriptions')
|
ng-container(*ngFor='let hotkey of hotkeyDescriptions')
|
||||||
tr(*ngIf='!hotkeyFilter || hotkey.name.toLowerCase().includes(hotkeyFilter.toLowerCase())')
|
tr(*ngIf='!hotkeyFilter || hotkeyFilterFn(hotkey, hotkeyFilter)')
|
||||||
td {{hotkey.name}}
|
td {{hotkey.name}}
|
||||||
td {{hotkey.id}}
|
td {{hotkey.id}}
|
||||||
td.pr-5
|
td.pr-5
|
||||||
|
@@ -144,4 +144,10 @@ export class SettingsTabComponent extends BaseTabComponent {
|
|||||||
}
|
}
|
||||||
ptr[prop] = value
|
ptr[prop] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hotkeyFilterFn (hotkey: HotkeyDescription, query: string): boolean {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||||
|
const s = hotkey.name + (this.getHotkey(hotkey.id) || []).toString() as string
|
||||||
|
return s.toLowerCase().includes(query.toLowerCase())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user