Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/behaviors/shortcuts/shortcuts_help.vue')
-rw-r--r--app/assets/javascripts/behaviors/shortcuts/shortcuts_help.vue26
1 files changed, 22 insertions, 4 deletions
diff --git a/app/assets/javascripts/behaviors/shortcuts/shortcuts_help.vue b/app/assets/javascripts/behaviors/shortcuts/shortcuts_help.vue
index cb7c6f9f6bc..e81ceae57c0 100644
--- a/app/assets/javascripts/behaviors/shortcuts/shortcuts_help.vue
+++ b/app/assets/javascripts/behaviors/shortcuts/shortcuts_help.vue
@@ -1,15 +1,16 @@
<script>
-import { GlModal, GlSearchBoxByType } from '@gitlab/ui';
+import { GlModal, GlSearchBoxByType, GlLink, GlSprintf } from '@gitlab/ui';
import { s__, __ } from '~/locale';
+import { joinPaths } from '../../lib/utils/url_utility';
import { keybindingGroups } from './keybindings';
import Shortcut from './shortcut.vue';
-import ShortcutsToggle from './shortcuts_toggle.vue';
export default {
components: {
GlModal,
GlSearchBoxByType,
- ShortcutsToggle,
+ GlLink,
+ GlSprintf,
Shortcut,
},
data() {
@@ -39,6 +40,9 @@ export default {
return mapped.filter((group) => group.keybindings.length);
},
+ absoluteUserPreferencesPath() {
+ return joinPaths(gon.relative_url_root || '/', '/-/profile/preferences');
+ },
},
i18n: {
title: __(`Keyboard shortcuts`),
@@ -66,7 +70,21 @@ export default {
:aria-label="$options.i18n.search"
class="gl-w-half gl-mr-3"
/>
- <shortcuts-toggle class="gl-w-half gl-ml-3" />
+ <span>
+ <gl-sprintf
+ :message="
+ __(
+ 'Enable or disable keyboard shortcuts in your %{linkStart}user preferences%{linkEnd}.',
+ )
+ "
+ >
+ <template #link="{ content }">
+ <gl-link :href="absoluteUserPreferencesPath">
+ {{ content }}
+ </gl-link>
+ </template>
+ </gl-sprintf>
+ </span>
</div>
<div v-if="filteredKeybindings.length === 0" class="gl-px-5">
{{ $options.i18n.noMatch }}