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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
0555d691
Commit
0555d691
authored
Jul 19, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Handle /award quick action.
parent
8a130d85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
app/assets/javascripts/notes/components/issue_note_actions.vue
...ssets/javascripts/notes/components/issue_note_actions.vue
+0
-4
app/assets/javascripts/notes/stores/issue_notes_store.js
app/assets/javascripts/notes/stores/issue_notes_store.js
+15
-1
No files found.
app/assets/javascripts/notes/components/issue_note_actions.vue
View file @
0555d691
...
...
@@ -78,10 +78,6 @@ export default {
data-position="right"
href="#"
title="Add reaction">
<i
aria-hidden=
"true"
data-hidden=
"true"
class=
"fa fa-spinner fa-spin"
></i>
<span
v-html=
"emojiSmiling"
class=
"link-highlight award-control-icon-neutral"
></span>
...
...
app/assets/javascripts/notes/stores/issue_notes_store.js
View file @
0555d691
...
...
@@ -2,6 +2,7 @@
import
service
from
'
../services/issue_notes_service
'
;
import
utils
from
'
./issue_notes_utils
'
;
import
loadAwardsHandler
from
'
../../awards_handler
'
;
const
state
=
{
notes
:
[],
...
...
@@ -225,12 +226,25 @@ const actions = {
.
then
((
res
)
=>
{
const
{
errors
}
=
res
;
if
(
hasQuickActions
)
{
if
(
hasQuickActions
&&
Object
.
keys
(
errors
).
length
)
{
context
.
dispatch
(
'
poll
'
);
$
(
'
.js-gfm-input
'
).
trigger
(
'
clear-commands-cache.atwho
'
);
new
Flash
(
'
Commands applied
'
,
'
notice
'
,
$
(
noteData
.
flashContainer
));
// eslint-disable-line
}
if
(
res
.
commands_changes
.
emoji_award
)
{
const
votesBlock
=
$
(
'
.js-awards-block
'
).
eq
(
0
);
loadAwardsHandler
().
then
((
awardsHandler
)
=>
{
awardsHandler
.
addAwardToEmojiBar
(
votesBlock
,
res
.
commands_changes
.
emoji_award
);
awardsHandler
.
scrollToAwards
();
}).
catch
(()
=>
{
const
msg
=
'
Something went wrong while adding your award. Please try again.
'
;
new
Flash
(
msg
,
$
(
noteData
.
flashContainer
));
// eslint-disable-line
});
}
if
(
errors
&&
errors
.
commands_only
)
{
new
Flash
(
errors
.
commands_only
,
'
notice
'
,
$
(
noteData
.
flashContainer
));
// eslint-disable-line
}
...
...
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