mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
SYNC: command palette fix
This commit is contained in:
committed by
Diflow
parent
f642c7570e
commit
a5745795be
@@ -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>',
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user