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
c5d71bda
Commit
c5d71bda
authored
Sep 14, 2020
by
Olena Horal-Koretska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove redundant code
parent
cfe55c62
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
13 deletions
+3
-13
app/assets/javascripts/sidebar/components/severity/constants.js
...sets/javascripts/sidebar/components/severity/constants.js
+0
-2
app/assets/javascripts/sidebar/components/severity/sidebar_severity.vue
...ascripts/sidebar/components/severity/sidebar_severity.vue
+3
-11
No files found.
app/assets/javascripts/sidebar/components/severity/constants.js
View file @
c5d71bda
...
...
@@ -32,8 +32,6 @@ export const ISSUABLE_TYPES = {
INCIDENT
:
'
incident
'
,
};
export
const
SIDEBAR_ANIMATION_DURATION
=
300
;
export
const
I18N
=
{
UPDATE_SEVERITY_ERROR
:
s__
(
'
SeverityWidget|There was an error while updating severity.
'
),
TRY_AGAIN
:
__
(
'
Please try again
'
),
...
...
app/assets/javascripts/sidebar/components/severity/sidebar_severity.vue
View file @
c5d71bda
...
...
@@ -7,7 +7,7 @@ import {
GlSprintf
,
GlLink
,
}
from
'
@gitlab/ui
'
;
import
{
INCIDENT_SEVERITY
,
ISSUABLE_TYPES
,
SIDEBAR_ANIMATION_DURATION
,
I18N
}
from
'
./constants
'
;
import
{
INCIDENT_SEVERITY
,
ISSUABLE_TYPES
,
I18N
}
from
'
./constants
'
;
import
updateIssuableSeverity
from
'
./graphql/mutations/update_issuable_severity.mutation.graphql
'
;
import
SeverityToken
from
'
./severity.vue
'
;
import
createFlash
from
'
~/flash
'
;
...
...
@@ -91,15 +91,8 @@ export default {
const
event
=
new
Event
(
'
hidden.gl.dropdown
'
);
this
.
$el
.
dispatchEvent
(
event
);
},
toggleFormDropdown
(
collapsedSidebar
)
{
toggleFormDropdown
()
{
this
.
isDropdownShowing
=
!
this
.
isDropdownShowing
;
const
timeout
=
collapsedSidebar
?
SIDEBAR_ANIMATION_DURATION
:
0
;
setTimeout
(()
=>
{
const
{
dropdown
}
=
this
.
$refs
;
if
(
dropdown
&&
this
.
isDropdownShowing
)
{
dropdown
.
show
();
}
},
timeout
);
},
updateSeverity
(
value
)
{
this
.
hideDropdown
();
...
...
@@ -143,7 +136,7 @@ export default {
<
template
>
<div
ref=
"sidebarSeverity"
class=
"block"
>
<div
ref=
"severity"
class=
"sidebar-collapsed-icon"
@
click=
"toggleFormDropdown
(true)
"
>
<div
ref=
"severity"
class=
"sidebar-collapsed-icon"
@
click=
"toggleFormDropdown"
>
<severity-token
:severity=
"selectedItem"
:icon-size=
"14"
:icon-only=
"true"
/>
<gl-tooltip
:target=
"() => $refs.severity"
boundary=
"viewport"
placement=
"left"
>
<gl-sprintf
:message=
"$options.i18n.SEVERITY_VALUE"
>
...
...
@@ -168,7 +161,6 @@ export default {
</p>
<gl-dropdown
ref=
"dropdown"
:class=
"dropdownClass"
block
:text=
"selectedItem.label"
...
...
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