refactor: get short commit

This commit is contained in:
三咲智子 Kevin Deng 2023-02-23 19:17:28 +08:00
parent f98c667613
commit bcf0965795
No known key found for this signature in database
GPG key ID: 69992F2250DFD93E
6 changed files with 11 additions and 8 deletions

View file

@ -41,7 +41,7 @@ const handleShowCommit = () => {
<template #content>
<div font-mono>
<span>{{ buildInfo.env === 'release' ? `v${buildInfo.version}` : buildInfo.env }}</span>
<span v-if="showCommit"> ({{ buildInfo.commit.slice(0, 7) }}@{{ buildInfo.branch }})</span>
<span v-if="showCommit"> ({{ buildInfo.shortCommit }}@{{ buildInfo.branch }})</span>
</div>
</template>
</SettingsItem>