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
b6a23cac
Commit
b6a23cac
authored
Apr 09, 2019
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed EE differences in noteable_note.vue
Closes
https://gitlab.com/gitlab-org/gitlab-ee/issues/9972
parent
34f68b3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
app/assets/javascripts/notes/components/noteable_note.vue
app/assets/javascripts/notes/components/noteable_note.vue
+14
-8
app/assets/javascripts/notes/mixins/draft.js
app/assets/javascripts/notes/mixins/draft.js
+8
-0
No files found.
app/assets/javascripts/notes/components/noteable_note.vue
View file @
b6a23cac
...
...
@@ -4,6 +4,7 @@ import { mapGetters, mapActions } from 'vuex';
import
{
escape
}
from
'
underscore
'
;
import
{
truncateSha
}
from
'
~/lib/utils/text_utility
'
;
import
TimelineEntryItem
from
'
~/vue_shared/components/notes/timeline_entry_item.vue
'
;
import
draftMixin
from
'
ee_else_ce/notes/mixins/draft
'
;
import
{
s__
,
sprintf
}
from
'
../../locale
'
;
import
Flash
from
'
../../flash
'
;
import
userAvatarLink
from
'
../../vue_shared/components/user_avatar/user_avatar_link.vue
'
;
...
...
@@ -23,7 +24,7 @@ export default {
noteBody
,
TimelineEntryItem
,
},
mixins
:
[
noteable
,
resolvable
],
mixins
:
[
noteable
,
resolvable
,
draftMixin
],
props
:
{
note
:
{
type
:
Object
,
...
...
@@ -73,9 +74,6 @@ export default {
'
is-editable
'
:
this
.
note
.
current_user
.
can_edit
,
};
},
canResolve
()
{
return
this
.
note
.
resolvable
&&
!!
this
.
getUserData
.
id
;
},
canReportAsAbuse
()
{
return
!!
this
.
note
.
report_abuse_path
&&
this
.
author
.
id
!==
this
.
getUserData
.
id
;
},
...
...
@@ -156,12 +154,16 @@ export default {
this
.
$refs
.
noteBody
.
resetAutoSave
();
this
.
$emit
(
'
updateSuccess
'
);
},
formUpdateHandler
(
noteText
,
parentElement
,
callback
)
{
formUpdateHandler
(
noteText
,
parentElement
,
callback
,
resolveDiscussion
)
{
this
.
$emit
(
'
handleUpdateNote
'
,
{
note
:
this
.
note
,
noteText
,
resolveDiscussion
,
callback
:
()
=>
this
.
updateSuccess
(),
});
if
(
this
.
isDraft
)
return
;
const
data
=
{
endpoint
:
this
.
note
.
path
,
note
:
{
...
...
@@ -234,6 +236,7 @@ export default {
<div
class=
"timeline-content"
>
<div
class=
"note-header"
>
<note-header
v-once
:author=
"author"
:created-at=
"note.created_at"
:note-id=
"note.id"
>
<slot
slot=
"note-header-info"
name=
"note-header-info"
></slot>
<span
v-if=
"commit"
v-html=
"actionText"
></span>
<span
v-else
class=
"d-none d-sm-inline"
>
·
</span>
</note-header>
...
...
@@ -247,12 +250,15 @@ export default {
:can-award-emoji=
"note.current_user.can_award_emoji"
:can-delete=
"note.current_user.can_edit"
:can-report-as-abuse=
"canReportAsAbuse"
:can-resolve=
"
note.current_user.can_r
esolve"
:can-resolve=
"
canR
esolve"
:report-abuse-path=
"note.report_abuse_path"
:resolvable=
"note.resolvable"
:is-resolved=
"note.resolved"
:resolvable=
"note.resolvable
|| note.isDraft
"
:is-resolved=
"note.resolved
|| note.resolve_discussion
"
:is-resolving=
"isResolving"
:resolved-by=
"note.resolved_by"
:is-draft=
"note.isDraft"
:resolve-discussion=
"note.isDraft && note.resolve_discussion"
:discussion-id=
"discussionId"
@
handleEdit=
"editHandler"
@
handleDelete=
"deleteHandler"
@
handleResolve=
"resolveHandler"
...
...
app/assets/javascripts/notes/mixins/draft.js
0 → 100644
View file @
b6a23cac
export
default
{
computed
:
{
isDraft
:
()
=>
false
,
canResolve
()
{
return
this
.
note
.
current_user
.
can_resolve
;
},
},
};
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