diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-06 12:08:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-06 12:08:10 +0300 |
commit | 5d3eac1cf8820b5f95bf2085ccc246ea78f4b4d2 (patch) | |
tree | 54f23d7ab730dae7fe583afa924dfb92076c9176 /app/assets/javascripts/header_search | |
parent | 9dadb12cf28c6f4ec1fa70f460c04c63fe368f5d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/header_search')
-rw-r--r-- | app/assets/javascripts/header_search/components/app.vue | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/assets/javascripts/header_search/components/app.vue b/app/assets/javascripts/header_search/components/app.vue index 51f9ce9e00e..0c4f9640972 100644 --- a/app/assets/javascripts/header_search/components/app.vue +++ b/app/assets/javascripts/header_search/components/app.vue @@ -4,6 +4,8 @@ import { GlOutsideDirective as Outside, GlIcon, GlToken, + GlSafeHtmlDirective as SafeHtml, + GlTooltipDirective, GlResizeObserverDirective, } from '@gitlab/ui'; import { mapState, mapActions, mapGetters } from 'vuex'; @@ -44,8 +46,13 @@ export default { ), searchResultsLoading: s__('GlobalSearch|Search results are loading'), searchResultsScope: s__('GlobalSearch|in %{scope}'), + kbdHelp: sprintf( + s__('GlobalSearch|Use the shortcut key %{kbdOpen}/%{kbdClose} to start a search'), + { kbdOpen: '<kbd>', kbdClose: '</kbd>' }, + false, + ), }, - directives: { Outside, GlResizeObserverDirective }, + directives: { SafeHtml, Outside, GlTooltip: GlTooltipDirective, GlResizeObserverDirective }, components: { GlSearchBoxByType, HeaderSearchDefaultItems, @@ -234,6 +241,12 @@ export default { ) }} </gl-token> + <kbd + v-gl-tooltip.bottom.hover.html + class="gl-absolute gl-right-3 gl-top-0 gl-z-index-1 keyboard-shortcut-helper" + :title="$options.i18n.kbdHelp" + >/</kbd + > <span :id="$options.SEARCH_INPUT_DESCRIPTION" role="region" class="gl-sr-only">{{ searchInputDescribeBy }}</span> |