summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-23 15:15:04 +0100
committerGitHub <noreply@github.com>2021-03-23 15:15:04 +0100
commit4bc0c4b4d51281b6dde2f77e33fd6c93dba83d03 (patch)
tree17ef25b0567097346cfb8ba233b9b1d010984676 /src/components
parent3718df3919de151cc754e273cb56b2e72dbe2caa (diff)
parent08febdd980c06d752d410be1fa982e5507279f6d (diff)
Merge pull request #9 from gico-net/feat/commit-details-page
Commit details page
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Commit.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/Commit.vue b/src/components/Commit.vue
index 63e1764..a60f40e 100644
--- a/src/components/Commit.vue
+++ b/src/components/Commit.vue
@@ -32,10 +32,13 @@
| <{{data.committer_email}}></b>
.text
- p
+ p(v-if="!expand")
| {{ first_line(data.text) }}
span.middot ยท
span.date {{ data.date | moment("ddd, D MMM YYYY HH:mm:ss ZZ") }}
+ p(v-else)
+ pre {{ data.text }}
+ span.date {{ data.date | moment("ddd, D MMM YYYY HH:mm:ss ZZ") }}
</template>
<script>
@@ -43,7 +46,7 @@ export default {
name: 'Commit',
// `author` is the hash md5 of the author's gravatar
// `committer` is the hash md5 of the committer's gravatar
- props: ['data', 'author', 'committer'],
+ props: ['data', 'author', 'committer', 'expand'],
methods: {
first_line(text) {
return text.split('\n')[0]