11<template >
22 <div class =" commit__detail" >
33 <div class =" commit__detail__author" >
4- <img class =" commit__detail__author__image" src =" ../../../../static/image/user_avatar.png" >
4+ <img
5+ class =" commit__detail__author__image"
6+ src =" ../../../../static/image/user_avatar.png"
7+ >
58 <div >
6- <h6 class =" commit__detail__author__name" >{{ commitInformation.author.name }}</h6 >
7- <p class =" commit__detail__author__email" >{{ commitInformation.author.email }}</p >
9+ <h6 class =" commit__detail__author__name" >
10+ {{ commitInformation.author.name }}
11+ </h6 >
12+ <p class =" commit__detail__author__email" >
13+ {{ commitInformation.author.email }}
14+ </p >
815 </div >
916 </div >
1017 <div class =" commit__detail__summary" >
11- <div class =" commit__detail__summary__title" >{{ commitInformation.title }}</div >
18+ <div class =" commit__detail__summary__title" >
19+ {{ commitInformation.title }}
20+ </div >
1221 <div
1322 v-if =" commitInformation.description"
1423 class =" commit__detail__summary__description"
15- >{{ commitInformation.description }}</div >
24+ >
25+ {{ commitInformation.description }}
26+ </div >
1627 </div >
1728 <div class =" commit__detail__meta" >
18- <div v-if =" commitInformation.author.name" class =" commit__detail__meta__item" >
29+ <div
30+ v-if =" commitInformation.author.name"
31+ class =" commit__detail__meta__item"
32+ >
1933 Author:
2034 <p >{{ commitInformation.author.name }} <{{ commitInformation.author.email }}></p >
2135 </div >
22- <div v-if =" commitInformation.author.date" class =" commit__detail__meta__item" >
36+ <div
37+ v-if =" commitInformation.author.date"
38+ class =" commit__detail__meta__item"
39+ >
2340 Author Date:
2441 <p >{{ commitInformation.author.date }}</p >
2542 </div >
26- <div v-if =" commitInformation.committer.name" class =" commit__detail__meta__item" >
43+ <div
44+ v-if =" commitInformation.committer.name"
45+ class =" commit__detail__meta__item"
46+ >
2747 Committer:
28- <p >{{ commitInformation.committer.name }} <{{ commitInformation.committer.email}}></p >
48+ <p >{{ commitInformation.committer.name }} <{{ commitInformation.committer.email }}></p >
2949 </div >
30- <div v-if =" commitInformation.committer.date" class =" commit__detail__meta__item" >
50+ <div
51+ v-if =" commitInformation.committer.date"
52+ class =" commit__detail__meta__item"
53+ >
3154 Committer Date:
3255 <p >{{ commitInformation.committer.date }}</p >
3356 </div >
34- <div v-if =" commitInformation.meta.refs" class =" commit__detail__meta__item" >
57+ <div
58+ v-if =" commitInformation.meta.refs"
59+ class =" commit__detail__meta__item"
60+ >
3561 Refs:
3662 <p >{{ commitInformation.meta.refs }}</p >
3763 </div >
38- <div v-if =" commitInformation.meta.commit_hash" class =" commit__detail__meta__item" >
64+ <div
65+ v-if =" commitInformation.meta.commit_hash"
66+ class =" commit__detail__meta__item"
67+ >
3968 Commit Hash:
4069 <p >{{ commitInformation.meta.commit_hash }}</p >
4170 </div >
42- <div v-if =" commitInformation.meta.tree_hash" class =" commit__detail__meta__item" >
71+ <div
72+ v-if =" commitInformation.meta.tree_hash"
73+ class =" commit__detail__meta__item"
74+ >
4375 Tree Hash:
4476 <p >{{ commitInformation.meta.tree_hash }}</p >
4577 </div >
46- <div v-if =" commitInformation.meta.parent_hash" class =" commit__detail__meta__item" >
78+ <div
79+ v-if =" commitInformation.meta.parent_hash"
80+ class =" commit__detail__meta__item"
81+ >
4782 Parent Hash:
4883 <p >{{ commitInformation.meta.parent_hash }}</p >
4984 </div >
5085 </div >
5186 <div class =" commit__detail__files" >
5287 <div
5388 class =" commit__detail__files__summary"
54- >Showing {{ commitInformation.files.list.length }} changed files with {{ commitInformation.files.additions ? commitInformation.files.additions : '0' }} additions and {{ commitInformation.files.deletion ? commitInformation.files.additions : '0' }} deletion</div >
89+ >
90+ Showing {{ commitInformation.files.list.length }} changed files with {{ commitInformation.files.additions ? commitInformation.files.additions : '0' }} additions and {{ commitInformation.files.deletion ? commitInformation.files.additions : '0' }} deletion
91+ </div >
5592 <div
56- class =" commit__detail__files__list"
5793 v-for =" file in commitInformation.files.list"
5894 :key =" trimFilePath(file)"
95+ class =" commit__detail__files__list"
5996 @click =" commitHistoryPreview(commitInformation.meta.commit_hash, trimFilePath(file))"
60- >{{ trimFilePath(file) }}</div >
97+ >
98+ {{ trimFilePath(file) }}
99+ </div >
61100 </div >
62101 </div >
63102</template >
@@ -67,7 +106,7 @@ import git from "simple-git/promise"
67106import * as Sentry from " @sentry/electron"
68107
69108export default {
70- name: " commitInformation " ,
109+ name: " CommitInformation " ,
71110 computed: {
72111 commitInformation () {
73112 return this .$store .getters [" history/getCommitInformation" ]
@@ -79,6 +118,9 @@ export default {
79118 return this .$store .state .history .commitInformation .meta .commit_hash
80119 }
81120 },
121+ mounted () {
122+ this .getCommitInformation ()
123+ },
82124 methods: {
83125 getCommitInformation () {
84126 this .getAuthorDetail (this .commitHash )
@@ -239,9 +281,6 @@ export default {
239281 console .log (" You have not enabled File changes feature from settings." )
240282 }
241283 }
242- },
243- mounted () {
244- this .getCommitInformation ()
245284 }
246285}
247286 </script >
0 commit comments