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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-08 18:09:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-08 18:09:10 +0300
commita74cb0526c088bf5868f5aba1aec949800c1d641 (patch)
treee30827d0d46a9b2f35fc86bb9deaa8876b362ba7 /app/assets/javascripts/vue_shared/components/settings
parente2f984e14e1fd34e5105669c4306388019e6b5b6 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/settings')
-rw-r--r--app/assets/javascripts/vue_shared/components/settings/settings_block.vue19
1 files changed, 17 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_shared/components/settings/settings_block.vue b/app/assets/javascripts/vue_shared/components/settings/settings_block.vue
index 92ae4575c52..e8f517f40a6 100644
--- a/app/assets/javascripts/vue_shared/components/settings/settings_block.vue
+++ b/app/assets/javascripts/vue_shared/components/settings/settings_block.vue
@@ -29,14 +29,29 @@ export default {
return this.expanded ? __('Collapse') : __('Expand');
},
},
+ methods: {
+ toggleSectionExpanded() {
+ this.sectionExpanded = !this.sectionExpanded;
+ },
+ },
};
</script>
<template>
<section class="settings" :class="{ 'no-animate': !slideAnimated, expanded }">
<div class="settings-header">
- <h4><slot name="title"></slot></h4>
- <gl-button @click="sectionExpanded = !sectionExpanded">
+ <h4>
+ <span
+ role="button"
+ tabindex="0"
+ class="gl-cursor-pointer"
+ data-testid="section-title"
+ @click="toggleSectionExpanded"
+ >
+ <slot name="title"></slot>
+ </span>
+ </h4>
+ <gl-button @click="toggleSectionExpanded">
{{ toggleText }}
</gl-button>
<p>