gitlab-org--gitlab-foss/app/assets/javascripts/diff_notes/components/resolve_count.js.es6

27 lines
635 B
JavaScript
Raw Normal View History

/* eslint-disable comma-dangle, object-shorthand, func-names, no-param-reassign */
/* global Vue */
/* global DiscussionMixins */
/* global CommentsStore */
2016-07-26 06:56:36 -04:00
((w) => {
w.ResolveCount = Vue.extend({
mixins: [DiscussionMixins],
props: {
loggedOut: Boolean
},
2016-07-26 06:56:36 -04:00
data: function () {
return {
discussions: CommentsStore.state
2016-07-26 06:56:36 -04:00
};
},
computed: {
allResolved: function () {
return this.resolvedDiscussionCount === this.discussionCount;
2016-11-07 05:05:58 -05:00
},
resolvedCountText() {
2016-11-09 04:17:14 -05:00
return this.discussionCount === 1 ? 'discussion' : 'discussions';
2016-07-26 06:56:36 -04:00
}
}
});
})(window);