summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/repo/mixins/repo_mixin.js
blob: efeda426b9614a44e6449ca3c2dddf5776ec49d0 (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 || file.tempFile);
      return changedFileList;
    },
  },
};

export default RepoMixin;