Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2939b8b8
Commit
2939b8b8
authored
Jul 06, 2021
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show DD contents with v-if, cache labels locally
parent
4f8fb373
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
9 deletions
+13
-9
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
...mponents/sidebar/labels_select_vue/labels_select_root.vue
+1
-1
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/actions.js
...red/components/sidebar/labels_select_vue/store/actions.js
+9
-7
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/mutations.js
...d/components/sidebar/labels_select_vue/store/mutations.js
+1
-0
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/state.js
...hared/components/sidebar/labels_select_vue/store/state.js
+1
-0
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
...nents/sidebar/labels_select_widget/labels_select_root.vue
+1
-1
No files found.
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/labels_select_root.vue
View file @
2939b8b8
...
...
@@ -315,7 +315,7 @@ export default {
</dropdown-value>
<dropdown-button
v-show=
"dropdownButtonVisible"
class=
"gl-mt-2"
/>
<dropdown-contents
v-
show
=
"dropdownButtonVisible && showDropdownContents"
v-
if
=
"dropdownButtonVisible && showDropdownContents"
ref=
"dropdownContents"
:render-on-top=
"!contentIsOnViewport"
/>
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/actions.js
View file @
2939b8b8
...
...
@@ -21,13 +21,15 @@ export const receiveLabelsFailure = ({ commit }) => {
});
};
export
const
fetchLabels
=
({
state
,
dispatch
})
=>
{
dispatch
(
'
requestLabels
'
);
return
axios
.
get
(
state
.
labelsFetchPath
)
.
then
(({
data
})
=>
{
dispatch
(
'
receiveLabelsSuccess
'
,
data
);
})
.
catch
(()
=>
dispatch
(
'
receiveLabelsFailure
'
));
if
(
!
state
.
labelsFetched
)
{
dispatch
(
'
requestLabels
'
);
return
axios
.
get
(
state
.
labelsFetchPath
)
.
then
(({
data
})
=>
{
dispatch
(
'
receiveLabelsSuccess
'
,
data
);
})
.
catch
(()
=>
dispatch
(
'
receiveLabelsFailure
'
));
}
};
export
const
requestCreateLabel
=
({
commit
})
=>
commit
(
types
.
REQUEST_CREATE_LABEL
);
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/mutations.js
View file @
2939b8b8
...
...
@@ -36,6 +36,7 @@ export default {
// selectedLabels array.
const
selectedLabelIds
=
state
.
selectedLabels
.
map
((
label
)
=>
label
.
id
);
state
.
labelsFetchInProgress
=
false
;
state
.
labelsFetched
=
true
;
state
.
labels
=
labels
.
reduce
((
allLabels
,
label
)
=>
{
allLabels
.
push
({
...
label
,
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_vue/store/state.js
View file @
2939b8b8
export
default
()
=>
({
// Initial Data
labels
:
[],
labelsFetched
:
false
,
selectedLabels
:
[],
labelsListTitle
:
''
,
labelsCreateTitle
:
''
,
...
...
app/assets/javascripts/vue_shared/components/sidebar/labels_select_widget/labels_select_root.vue
View file @
2939b8b8
...
...
@@ -330,7 +330,7 @@ export default {
</dropdown-value>
<dropdown-button
v-show=
"dropdownButtonVisible"
class=
"gl-mt-2"
/>
<dropdown-contents
v-
show
=
"dropdownButtonVisible && showDropdownContents"
v-
if
=
"dropdownButtonVisible && showDropdownContents"
ref=
"dropdownContents"
:render-on-top=
"!contentIsOnViewport"
:labels-create-title=
"labelsCreateTitle"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment