summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repo/mixins/repo_mixin.js
blob: c8e8238a0d3ad8f92af61483d71f57c2fa246c8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import Store from '../stores/repo_store';

const RepoMixin = {
  computed: {
    isMini() {
      return !!Store.openedFiles.length;
    },

    changedFiles() {
      const changedFileList = this.openedFiles
      .filter(file => file.changed);
      return changedFileList;
    },
  },
};

export default RepoMixin;