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>
|
||||||
<tr>
|
<tr>
|
||||||
<th>{{ $t('firmwareinfo.FirmwareVersion') }}</th>
|
<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')">
|
target="_blank" v-tooltip :title="$t('firmwareinfo.FirmwareVersionHint')">
|
||||||
{{ systemStatus.git_hash?.substring(1) }}
|
{{ systemStatus.git_hash }}
|
||||||
</a></td>
|
</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -50,8 +50,9 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getUpdateInfo() {
|
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/"
|
const fetchUrl = "https://api.github.com/repos/tbnobody/OpenDTU/compare/"
|
||||||
+ this.systemDataList.git_hash?.substring(1) + "...HEAD";
|
+ this.systemDataList.git_hash + "...HEAD";
|
||||||
|
|
||||||
fetch(fetchUrl)
|
fetch(fetchUrl)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user