BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
092d4ca6
Commit
092d4ca6
authored
Jun 21, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Move catch statements into main file to make ESLint happy.
It was happy before I don’t know what broke its heart.
parent
ff6acdf1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
12 deletions
+15
-12
issue_discussion.vue
app/assets/javascripts/notes/components/issue_discussion.vue
+5
-0
issue_note.vue
app/assets/javascripts/notes/components/issue_note.vue
+3
-0
issue_note_form.vue
app/assets/javascripts/notes/components/issue_note_form.vue
+1
-1
issue_notes.vue
app/assets/javascripts/notes/components/issue_notes.vue
+5
-0
issue_notes_store.js
app/assets/javascripts/notes/stores/issue_notes_store.js
+1
-11
No files found.
app/assets/javascripts/notes/components/issue_discussion.vue
View file @
092d4ca6
<
script
>
/* global Flash */
import
IssueNote
from
'./issue_note.vue'
;
import
UserAvatarLink
from
'../../vue_shared/components/user_avatar/user_avatar_link.vue'
;
import
IssueNoteHeader
from
'./issue_note_header.vue'
;
...
...
@@ -76,6 +78,9 @@ export default {
this
.
$store
.
dispatch
(
'replyToDiscussion'
,
data
)
.
then
(()
=>
{
this
.
isReplying
=
false
;
})
.
catch
(()
=>
{
new
Flash
(
'Something went wrong while adding your reply. Please try again.'
);
// eslint-disable-line
});
},
},
...
...
app/assets/javascripts/notes/components/issue_note.vue
View file @
092d4ca6
<
script
>
/* global Flash */
import
UserAvatarLink
from
'../../vue_shared/components/user_avatar/user_avatar_link.vue'
;
import
IssueNoteHeader
from
'./issue_note_header.vue'
;
import
IssueNoteActions
from
'./issue_note_actions.vue'
;
...
...
@@ -50,6 +52,7 @@ export default {
this
.
isDeleting
=
false
;
})
.
catch
(()
=>
{
new
Flash
(
'Something went wrong while deleting your note. Please try again.'
);
// eslint-disable-line
this
.
isDeleting
=
false
;
});
}
...
...
app/assets/javascripts/notes/components/issue_note_form.vue
View file @
092d4ca6
...
...
@@ -20,7 +20,7 @@ export default {
type
:
String
,
required
:
false
,
default
:
'Save comment'
,
}
}
,
},
data
()
{
return
{
...
...
app/assets/javascripts/notes/components/issue_notes.vue
View file @
092d4ca6
<
script
>
/* global Flash */
import
Vue
from
'vue'
;
import
Vuex
from
'vuex'
;
import
storeOptions
from
'../stores/issue_notes_store'
;
...
...
@@ -39,6 +41,9 @@ export default {
this
.
$store
.
dispatch
(
'fetchNotes'
,
path
)
.
then
(()
=>
{
this
.
isLoading
=
false
;
})
.
catch
(()
=>
{
new
Flash
(
'Something went wrong while fetching issue comments. Please try again.'
);
// eslint-disable-line
});
},
};
...
...
app/assets/javascripts/notes/stores/issue_notes_store.js
View file @
092d4ca6
/* global Flash */
/* eslint-disable no-param-reassign */
import
service
from
'../services/issue_notes_service'
;
...
...
@@ -52,9 +51,6 @@ const actions = {
.
then
(
res
=>
res
.
json
())
.
then
((
res
)
=>
{
context
.
commit
(
'setNotes'
,
res
);
})
.
catch
(()
=>
{
new
Flash
(
'Something went wrong while fetching issue comments. Please try again.'
);
// eslint-disable-line
});
},
deleteNote
(
context
,
note
)
{
...
...
@@ -62,9 +58,6 @@ const actions = {
.
deleteNote
(
note
.
path
)
.
then
(()
=>
{
context
.
commit
(
'deleteNote'
,
note
);
})
.
catch
(()
=>
{
new
Flash
(
'Something went wrong while deleting your note. Please try again.'
);
// eslint-disable-line
});
},
replyToDiscussion
(
context
,
data
)
{
...
...
@@ -72,12 +65,9 @@ const actions = {
return
service
.
replyToDiscussion
(
endpoint
,
reply
)
.
then
(
(
res
)
=>
res
.
json
())
.
then
(
res
=>
res
.
json
())
.
then
((
res
)
=>
{
context
.
commit
(
'addNewReplyToDiscussion'
,
res
);
})
.
catch
(()
=>
{
new
Flash
(
'Something went wrong while adding your reply. Please try again.'
);
// 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