blob: 50f922ca40a678045eb76c613bfb22df564d7c8c (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<template lang="pug">
main
header-blue
b-container(v-if="loading")
b-overlay(:show="true" spinner-large)
b-container(v-else)
.commit.no-hover
h2 Commits found: {{ commits.length }}
.commit.no-hover(style="padding: 50px" v-if="loading")
b-overlay(:show="true" spinner-large)
commit-card(
v-else
v-for="i in commits" :key="i.hash" :data="i"
:author="emails[i.author_email]"
:committer="emails[i.committer_email]"
)
</template>
<script>
import HeaderBlue from '@/components/HeaderBlue';
import Commit from '@/components/Commit';
export default {
name: "Commit",
props: ["hash"],
components: {
'header-blue': HeaderBlue,
'commit-card': Commit,
},
mounted() {
this.$store.dispatch('get_commits', this.$route.query.q);
this.$store.dispatch('get_emails');
},
computed: {
loading: function() {
return this.$store.getters.loading;
},
commits: function() {
return this.$store.getters.commits;
},
emails: function() {
return this.$store.getters.emails;
},
},
}
</script>
|