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
1c013c8e
Commit
1c013c8e
authored
Dec 03, 2019
by
Tom Quirk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide checkbox when design is uploading
parent
7148226e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
ee/app/assets/javascripts/design_management/pages/index.vue
ee/app/assets/javascripts/design_management/pages/index.vue
+12
-2
No files found.
ee/app/assets/javascripts/design_management/pages/index.vue
View file @
1c013c8e
...
...
@@ -47,6 +47,7 @@ export default {
createDesign
:
false
,
},
isSaving
:
false
,
savingDesignFiles
:
[],
selectedDesigns
:
[],
};
},
...
...
@@ -100,7 +101,8 @@ export default {
return
null
;
}
const
optimisticResponse
=
Array
.
from
(
files
).
map
(
file
=>
({
const
filesArray
=
Array
.
from
(
files
);
const
optimisticResponse
=
filesArray
.
map
(
file
=>
({
// False positive i18n lint: https://gitlab.com/gitlab-org/frontend/eslint-plugin-i18n/issues/26
// eslint-disable-next-line @gitlab/i18n/no-non-i18n-strings
__typename
:
'
Design
'
,
...
...
@@ -134,6 +136,7 @@ export default {
}));
this
.
isSaving
=
true
;
this
.
savingDesignFiles
=
filesArray
;
return
this
.
$apollo
.
mutate
({
...
...
@@ -187,6 +190,13 @@ export default {
isDesignSelected
(
filename
)
{
return
this
.
selectedDesigns
.
includes
(
filename
);
},
canSelectDesign
(
filename
)
{
return
(
this
.
isLatestVersion
&&
this
.
canCreateDesign
&&
!
this
.
savingDesignFiles
.
some
(
file
=>
file
.
name
===
filename
)
);
},
onDesignDelete
()
{
this
.
selectedDesigns
=
[];
if
(
this
.
$route
.
query
.
version
)
this
.
$router
.
push
({
name
:
'
designs
'
});
...
...
@@ -243,7 +253,7 @@ export default {
<li
v-for=
"design in designs"
:key=
"design.id"
class=
"col-md-6 col-lg-4 mb-3"
>
<design
v-bind=
"design"
/>
<input
v-if=
"
isLatestVersion && canCreateDesign
"
v-if=
"
canSelectDesign(design.filename)
"
:checked=
"isDesignSelected(design.filename)"
type=
"checkbox"
class=
"design-checkbox"
...
...
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