webapp: Only cut first char of git_hash if it equals "g"
This commit is contained in:
parent
93c69dbbeb
commit
3e4747e4b0
@ -17,9 +17,9 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{{ $t('firmwareinfo.FirmwareVersion') }}</th>
|
||||
<td><a :href="'https://github.com/tbnobody/OpenDTU/commits/' + systemStatus.git_hash?.substring(1)"
|
||||
<td><a :href="'https://github.com/tbnobody/OpenDTU/commits/' + systemStatus.git_hash"
|
||||
target="_blank" v-tooltip :title="$t('firmwareinfo.FirmwareVersionHint')">
|
||||
{{ systemStatus.git_hash?.substring(1) }}
|
||||
{{ systemStatus.git_hash }}
|
||||
</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@ -50,8 +50,9 @@ export default defineComponent({
|
||||
})
|
||||
},
|
||||
getUpdateInfo() {
|
||||
this.systemDataList.git_hash = this.systemDataList.git_hash?.substring(0, 1) == 'g' ? this.systemDataList.git_hash?.substring(1) : this.systemDataList.git_hash;
|
||||
const fetchUrl = "https://api.github.com/repos/tbnobody/OpenDTU/compare/"
|
||||
+ this.systemDataList.git_hash?.substring(1) + "...HEAD";
|
||||
+ this.systemDataList.git_hash + "...HEAD";
|
||||
|
||||
fetch(fetchUrl)
|
||||
.then((response) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user