diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-21 18:10:23 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-21 18:10:23 +0300 |
commit | 75196424b189d70aff3d88a95117adb33c2b1263 (patch) | |
tree | ed55cbd4e0974bf7062ad0d794eaec32dfe5dfdb /app/assets/javascripts/nav | |
parent | eac99f198f2834788c38108bcee3a2c567fba9e0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/nav')
-rw-r--r-- | app/assets/javascripts/nav/components/new_nav_toggle.vue | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/app/assets/javascripts/nav/components/new_nav_toggle.vue b/app/assets/javascripts/nav/components/new_nav_toggle.vue index 37e29cc7f04..eb0b6c02583 100644 --- a/app/assets/javascripts/nav/components/new_nav_toggle.vue +++ b/app/assets/javascripts/nav/components/new_nav_toggle.vue @@ -1,5 +1,5 @@ <script> -import { GlBadge, GlToggle } from '@gitlab/ui'; +import { GlBadge, GlToggle, GlDisclosureDropdownItem } from '@gitlab/ui'; import axios from '~/lib/utils/axios_utils'; import { createAlert } from '~/flash'; import { s__ } from '~/locale'; @@ -18,6 +18,7 @@ export default { components: { GlBadge, GlToggle, + GlDisclosureDropdownItem, }, props: { enabled: { @@ -28,6 +29,11 @@ export default { type: String, required: true, }, + newNavigation: { + type: Boolean, + required: false, + default: false, + }, }, data() { return { @@ -61,7 +67,18 @@ export default { </script> <template> - <li> + <gl-disclosure-dropdown-item v-if="newNavigation" @action="toggleNav"> + <div class="gl-new-dropdown-item-content"> + <div + class="gl-new-dropdown-item-text-wrapper gl-display-flex! gl-justify-content-space-between gl-align-items-center gl-py-2!" + > + {{ $options.i18n.toggleMenuItemLabel }} + <gl-toggle :value="isEnabled" :label="$options.i18n.toggleLabel" label-position="hidden" /> + </div> + </div> + </gl-disclosure-dropdown-item> + + <li v-else> <div class="gl-px-4 gl-py-2 gl-display-flex gl-justify-content-space-between gl-align-items-center" > |