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
bad32044
Commit
bad32044
authored
Nov 27, 2019
by
Natalia Tepluhina
Committed by
Fatih Acet
Nov 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Design view: Download single issue design image"
parent
11726288
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
6 deletions
+36
-6
changelogs/unreleased/34377-design-view-download-single-issue-design-image.yml
.../34377-design-view-download-single-issue-design-image.yml
+5
-0
ee/app/assets/javascripts/design_management/components/toolbar/index.vue
...avascripts/design_management/components/toolbar/index.vue
+11
-2
ee/app/assets/javascripts/design_management/pages/design/index.vue
...sets/javascripts/design_management/pages/design/index.vue
+1
-3
ee/spec/frontend/design_management/components/toolbar/__snapshots__/index_spec.js.snap
...ement/components/toolbar/__snapshots__/index_spec.js.snap
+10
-0
ee/spec/frontend/design_management/components/toolbar/index_spec.js
...ontend/design_management/components/toolbar/index_spec.js
+9
-1
No files found.
changelogs/unreleased/34377-design-view-download-single-issue-design-image.yml
0 → 100644
View file @
bad32044
---
title
:
'
Resolve
Design
view:
Download
single
issue
design
image'
merge_request
:
20703
author
:
type
:
added
ee/app/assets/javascripts/design_management/components/toolbar/index.vue
View file @
bad32044
...
...
@@ -2,6 +2,7 @@
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
Icon
from
'
~/vue_shared/components/icon.vue
'
;
import
timeagoMixin
from
'
~/vue_shared/mixins/timeago
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
import
Pagination
from
'
./pagination.vue
'
;
import
DeleteButton
from
'
../delete_button.vue
'
;
import
permissionsQuery
from
'
../../graphql/queries/permissions.query.graphql
'
;
...
...
@@ -12,6 +13,7 @@ export default {
Icon
,
Pagination
,
DeleteButton
,
GlButton
,
},
mixins
:
[
timeagoMixin
],
props
:
{
...
...
@@ -23,7 +25,7 @@ export default {
type
:
Boolean
,
required
:
true
,
},
name
:
{
file
name
:
{
type
:
String
,
required
:
false
,
default
:
''
,
...
...
@@ -42,6 +44,10 @@ export default {
type
:
Boolean
,
required
:
true
,
},
image
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
...
...
@@ -99,10 +105,13 @@ export default {
<icon
:size=
"18"
name=
"close"
/>
</router-link>
<div
class=
"overflow-hidden d-flex align-items-center"
>
<h2
class=
"m-0 str-truncated-100"
>
{{
name
}}
</h2>
<h2
class=
"m-0 str-truncated-100"
>
{{
file
name
}}
</h2>
<small
v-if=
"updatedAt"
class=
"text-secondary"
>
{{
updatedText
}}
</small>
</div>
<pagination
:id=
"id"
class=
"ml-auto flex-shrink-0"
/>
<gl-button
:href=
"image"
class=
"mr-2"
>
<icon
:size=
"18"
name=
"download"
/>
</gl-button>
<delete-button
v-if=
"isLatestVersion && canDeleteDesign"
:is-deleting=
"isDeleting"
...
...
ee/app/assets/javascripts/design_management/pages/design/index.vue
View file @
bad32044
...
...
@@ -200,10 +200,8 @@ export default {
<toolbar
:id=
"id"
:is-deleting=
"loading"
:name=
"design.filename"
:updated-at=
"design.updatedAt"
:updated-by=
"design.updatedBy"
:is-latest-version=
"isLatestVersion"
v-bind=
"design"
@
delete=
"mutate()"
/>
</
template
>
...
...
ee/spec/frontend/design_management/components/toolbar/__snapshots__/index_spec.js.snap
View file @
bad32044
...
...
@@ -35,6 +35,16 @@ exports[`Design management toolbar component renders design and updated data 1`]
id="1"
/>
<glbutton-stub
class="mr-2"
href="/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d"
>
<icon-stub
name="download"
size="18"
/>
</glbutton-stub>
<deletebutton-stub
buttonclass=""
buttonvariant="danger"
...
...
ee/spec/frontend/design_management/components/toolbar/index_spec.js
View file @
bad32044
...
...
@@ -2,6 +2,7 @@ import { createLocalVue, shallowMount } from '@vue/test-utils';
import
VueRouter
from
'
vue-router
'
;
import
Toolbar
from
'
ee/design_management/components/toolbar/index.vue
'
;
import
DeleteButton
from
'
ee/design_management/components/delete_button.vue
'
;
import
{
GlButton
}
from
'
@gitlab/ui
'
;
const
localVue
=
createLocalVue
();
localVue
.
use
(
VueRouter
);
...
...
@@ -34,11 +35,12 @@ describe('Design management toolbar component', () => {
isLatestVersion
:
true
,
isLoading
,
isDeleting
:
false
,
name
:
'
test.jpg
'
,
file
name
:
'
test.jpg
'
,
updatedAt
:
updatedAt
.
toString
(),
updatedBy
:
{
name
:
'
Test Name
'
,
},
image
:
'
/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d
'
,
...
props
,
},
stubs
:
{
...
...
@@ -110,4 +112,10 @@ describe('Design management toolbar component', () => {
expect
(
wrapper
.
emitted
().
delete
).
toBeTruthy
();
});
});
it
(
'
renders download button with correct link
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlButton
).
attributes
(
'
href
'
)).
toBe
(
'
/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d
'
,
);
});
});
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