Merge branch 'note-header-ee-differences' into 'master'
Move EE differences in CE diff files into CE Closes gitlab-ee#9969, gitlab-ee#9973, and gitlab-ee#9974 See merge request gitlab-org/gitlab-ce!25678
This commit is contained in:
commit
b98fd8a5a0
4 changed files with 21 additions and 8 deletions
|
@ -81,6 +81,7 @@ export default {
|
|||
:data-user-id="author.id"
|
||||
:data-username="author.username"
|
||||
>
|
||||
<slot name="note-header-info"></slot>
|
||||
<span class="note-header-author-name">{{ author.name }}</span>
|
||||
<span v-if="author.status_tooltip_html" v-html="author.status_tooltip_html"></span>
|
||||
<span class="note-headline-light">@{{ author.username }}</span>
|
||||
|
@ -91,9 +92,7 @@ export default {
|
|||
<span class="system-note-message"> <slot></slot> </span>
|
||||
<template v-if="createdAt">
|
||||
<span class="system-note-separator">
|
||||
<template v-if="actionText">
|
||||
{{ actionText }}
|
||||
</template>
|
||||
<template v-if="actionText">{{ actionText }}</template>
|
||||
</span>
|
||||
<a
|
||||
:href="noteTimestampLink"
|
||||
|
@ -107,8 +106,7 @@ export default {
|
|||
class="fa fa-spinner fa-spin editing-spinner"
|
||||
aria-label="Comment is being updated"
|
||||
aria-hidden="true"
|
||||
>
|
||||
</i>
|
||||
></i>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
@ -31,6 +31,10 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
resolveHandler(resolvedState = false) {
|
||||
if (this.note && this.note.isDraft) {
|
||||
return this.$emit('toggleResolveStatus');
|
||||
}
|
||||
|
||||
this.isResolving = true;
|
||||
const isResolved = this.discussionResolved || resolvedState;
|
||||
const discussion = this.resolveAsThread;
|
||||
|
|
|
@ -191,6 +191,9 @@ export const firstUnresolvedDiscussionId = (state, getters) => diffOrder => {
|
|||
return getters.unresolvedDiscussionsIdsByDate[0];
|
||||
};
|
||||
|
||||
export const getDiscussion = state => discussionId =>
|
||||
state.discussions.find(discussion => discussion.id === discussionId);
|
||||
|
||||
export const commentsDisabled = state => state.commentsDisabled;
|
||||
|
||||
// prevent babel-plugin-rewire from generating an invalid default during karma tests
|
||||
|
|
|
@ -261,4 +261,12 @@ describe('Getters Notes Store', () => {
|
|||
expect(getters.firstUnresolvedDiscussionId(state, localGettersFalsy)(false)).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('getDiscussion', () => {
|
||||
it('returns discussion by ID', () => {
|
||||
state.discussions.push({ id: '1' });
|
||||
|
||||
expect(getters.getDiscussion(state)('1')).toEqual({ id: '1' });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue