Skip to content

Commit

Permalink
Feature: Allow enabling and disabling of the version check
Browse files Browse the repository at this point in the history
Fix #1787
  • Loading branch information
tbnobody committed Mar 12, 2024
1 parent 9634c93 commit bd8d93b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions webapp/src/components/FirmwareInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@
</tr>
<tr>
<th>{{ $t('firmwareinfo.FirmwareUpdate') }}</th>
<td v-if="modelAllowVersionInfo">
<a v-if="systemStatus.update_url !== undefined" :href="systemStatus.update_url" target="_blank" v-tooltip
:title="$t('firmwareinfo.FirmwareUpdateHint')">
<span class="badge" :class="systemStatus.update_status">
{{ systemStatus.update_text }}
</span>
</a>
<span v-else class="badge" :class="systemStatus.update_status">
{{ systemStatus.update_text }}
</span>
</td>
<td v-else>
<div class="form-check form-switch">
<td>
<div class="form-check form-check-inline form-switch">
<input v-model="modelAllowVersionInfo" class="form-check-input" type="checkbox" role="switch" v-tooltip :title="$t('firmwareinfo.FrmwareUpdateAllow')" />
<label class="form-check-label">
<a v-if="modelAllowVersionInfo && systemStatus.update_url !== undefined" :href="systemStatus.update_url" target="_blank" v-tooltip
:title="$t('firmwareinfo.FirmwareUpdateHint')">
<span class="badge" :class="systemStatus.update_status">
{{ systemStatus.update_text }}
</span>
</a>
<span v-else-if="modelAllowVersionInfo" class="badge" :class="systemStatus.update_status">
{{ systemStatus.update_text }}
</span>
</label>
</div>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/views/SystemInfoView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export default defineComponent({
},
watch: {
allowVersionInfo(allow: Boolean) {
localStorage.setItem("allowVersionInfo", allow ? "1" : "0");
if (allow) {
localStorage.setItem("allowVersionInfo", this.allowVersionInfo ? "1" : "0");
this.getUpdateInfo();
}
}
Expand Down

0 comments on commit bd8d93b

Please sign in to comment.