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
b4303d1f
Commit
b4303d1f
authored
Jul 13, 2021
by
Jackie Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update new delete branch button style variant
parent
14f4b2e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
app/assets/javascripts/branches/components/delete_branch_button.vue
.../javascripts/branches/components/delete_branch_button.vue
+1
-7
spec/frontend/branches/components/delete_branch_button_spec.js
...frontend/branches/components/delete_branch_button_spec.js
+3
-3
No files found.
app/assets/javascripts/branches/components/delete_branch_button.vue
View file @
b4303d1f
...
@@ -47,12 +47,6 @@ export default {
...
@@ -47,12 +47,6 @@ export default {
},
},
},
},
computed
:
{
computed
:
{
variant
()
{
if
(
this
.
disabled
)
{
return
'
default
'
;
}
return
'
danger
'
;
},
title
()
{
title
()
{
if
(
this
.
isProtectedBranch
&&
this
.
disabled
)
{
if
(
this
.
isProtectedBranch
&&
this
.
disabled
)
{
return
s__
(
'
Branches|Only a project maintainer or owner can delete a protected branch
'
);
return
s__
(
'
Branches|Only a project maintainer or owner can delete a protected branch
'
);
...
@@ -83,7 +77,7 @@ export default {
...
@@ -83,7 +77,7 @@ export default {
class=
"js-delete-branch-button"
class=
"js-delete-branch-button"
data-qa-selector=
"delete_branch_button"
data-qa-selector=
"delete_branch_button"
:disabled=
"disabled"
:disabled=
"disabled"
:variant=
"varian
t"
variant=
"defaul
t"
:title=
"title"
:title=
"title"
:aria-label=
"title"
:aria-label=
"title"
@
click=
"openModal"
@
click=
"openModal"
...
...
spec/frontend/branches/components/delete_branch_button_spec.js
View file @
b4303d1f
...
@@ -34,7 +34,7 @@ describe('Delete branch button', () => {
...
@@ -34,7 +34,7 @@ describe('Delete branch button', () => {
expect
(
findDeleteButton
().
attributes
()).
toMatchObject
({
expect
(
findDeleteButton
().
attributes
()).
toMatchObject
({
title
:
'
Delete branch
'
,
title
:
'
Delete branch
'
,
variant
:
'
d
anger
'
,
variant
:
'
d
efault
'
,
icon
:
'
remove
'
,
icon
:
'
remove
'
,
});
});
});
});
...
@@ -44,7 +44,7 @@ describe('Delete branch button', () => {
...
@@ -44,7 +44,7 @@ describe('Delete branch button', () => {
expect
(
findDeleteButton
().
attributes
()).
toMatchObject
({
expect
(
findDeleteButton
().
attributes
()).
toMatchObject
({
title
:
'
Delete protected branch
'
,
title
:
'
Delete protected branch
'
,
variant
:
'
d
anger
'
,
variant
:
'
d
efault
'
,
icon
:
'
remove
'
,
icon
:
'
remove
'
,
});
});
});
});
...
@@ -78,7 +78,7 @@ describe('Delete branch button', () => {
...
@@ -78,7 +78,7 @@ describe('Delete branch button', () => {
expect
(
findDeleteButton
().
attributes
()).
toMatchObject
({
expect
(
findDeleteButton
().
attributes
()).
toMatchObject
({
title
:
'
Delete branch
'
,
title
:
'
Delete branch
'
,
variant
:
'
d
anger
'
,
variant
:
'
d
efault
'
,
});
});
});
});
...
...
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