Welcome to mirror list, hosted at ThFree Co, Russian Federation.

resolve_count.js « components « diff_notes « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 96e5a4403578b8426fb40910256636ee84716a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* eslint-disable comma-dangle, object-shorthand, func-names, no-param-reassign */
/* global DiscussionMixins */
/* global CommentsStore */

import Vue from 'vue';

window.ResolveCount = Vue.extend({
  mixins: [DiscussionMixins],
  props: {
    loggedOut: Boolean
  },
  data: function () {
    return {
      discussions: CommentsStore.state
    };
  },
  computed: {
    allResolved: function () {
      return this.resolvedDiscussionCount === this.discussionCount;
    },
    resolvedCountText() {
      return this.discussionCount === 1 ? 'discussion' : 'discussions';
    }
  }
});