SYNC: command palette fix

This commit is contained in:
SPRINX0\prochazka
2025-11-06 13:42:32 +01:00
committed by Diflow
parent f642c7570e
commit a5745795be
2 changed files with 6 additions and 1 deletions

View File

@@ -81,6 +81,7 @@
import { getLocalStorage } from '../utility/storageCache';
import registerCommand from './registerCommand';
import { formatKeyText, switchCurrentDatabase } from '../utility/common';
import { _val } from '../translations';
let domInput;
let filter = '';
@@ -117,7 +118,7 @@
: sortedComands
).filter(x => !x.isGroupCommand),
{
extract: x => x.text,
extract: x => _val(x.text),
pre: '<b>',
post: '</b>',
}

View File

@@ -81,3 +81,7 @@ export function _t(key: string, options: TranslateOptions): string {
export function __t(key: string, options: TranslateOptions): () => string {
return () => _t(key, options);
}
export function _val<T>(x: T | (() => T)): T {
return typeof x === 'function' ? (x as () => T)() : x;
}