mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 06:43: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 { getLocalStorage } from '../utility/storageCache';
|
||||||
import registerCommand from './registerCommand';
|
import registerCommand from './registerCommand';
|
||||||
import { formatKeyText, switchCurrentDatabase } from '../utility/common';
|
import { formatKeyText, switchCurrentDatabase } from '../utility/common';
|
||||||
|
import { _val } from '../translations';
|
||||||
|
|
||||||
let domInput;
|
let domInput;
|
||||||
let filter = '';
|
let filter = '';
|
||||||
@@ -117,7 +118,7 @@
|
|||||||
: sortedComands
|
: sortedComands
|
||||||
).filter(x => !x.isGroupCommand),
|
).filter(x => !x.isGroupCommand),
|
||||||
{
|
{
|
||||||
extract: x => x.text,
|
extract: x => _val(x.text),
|
||||||
pre: '<b>',
|
pre: '<b>',
|
||||||
post: '</b>',
|
post: '</b>',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,3 +81,7 @@ export function _t(key: string, options: TranslateOptions): string {
|
|||||||
export function __t(key: string, options: TranslateOptions): () => string {
|
export function __t(key: string, options: TranslateOptions): () => string {
|
||||||
return () => _t(key, options);
|
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