diff --git a/src/components/Actions/SimpleAction.ts b/src/components/Actions/SimpleAction.ts index af3e9e169..958de7141 100644 --- a/src/components/Actions/SimpleAction.ts +++ b/src/components/Actions/SimpleAction.ts @@ -1,6 +1,7 @@ import { IKeyBindingConfig } from './KeyBinding' import { EventDispatcher } from '/@/components/Common/Event/EventDispatcher' import { v4 as uuid } from 'uuid' +import { translate } from '../Locales/Manager' export interface IActionConfig { type?: 'action' @@ -45,6 +46,13 @@ export class SimpleAction extends EventDispatcher { } //#endregion + get translatedName() { + return translate(this.name) + } + get translatedDescription() { + return translate(this.description) + } + getConfig() { return this.config } diff --git a/src/components/CommandBar/CommandBar.vue b/src/components/CommandBar/CommandBar.vue index 50fa4d079..6bed23ab4 100644 --- a/src/components/CommandBar/CommandBar.vue +++ b/src/components/CommandBar/CommandBar.vue @@ -16,16 +16,20 @@ transition: 'slide-y-transition', contentClass: 'commandbar-menu elevation-4', }" - :items="actions" + :items="processedActions" :item-text="(item) => `${t(item.name)}\n${t(item.description)}`" :item-value="(item) => item" :placeholder="t('general.search')" + :filter="filter" + :cache-items="false" auto-select-first :autofocus="autofocus" - v-model="currentItem" + :value="currentItem" @change="onSelectedAction" @focus="updateActions" @blur="$emit('blur')" + @update:search-input="onUpdateSearchInput" + spellcheck="false" >