2016-12-13 22:01:05 -05:00
|
|
|
/* 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({
|
2016-08-04 04:52:17 -04:00
|
|
|
mixins: [DiscussionMixins],
|
2016-08-01 05:06:31 -04:00
|
|
|
props: {
|
|
|
|
loggedOut: Boolean
|
|
|
|
},
|
2016-07-26 06:56:36 -04:00
|
|
|
data: function () {
|
|
|
|
return {
|
2016-08-04 04:52:17 -04:00
|
|
|
discussions: CommentsStore.state
|
2016-07-26 06:56:36 -04:00
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
allResolved: function () {
|
2016-08-04 21:01:32 -04:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2016-07-28 10:07:47 -04:00
|
|
|
})(window);
|