mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-11-07 08:06:12 +08:00
convert sendUrl number -> boolean in toPublicJSON
This commit is contained in:
@@ -48,7 +48,7 @@ class Monitor extends BeanModel {
|
||||
let obj = {
|
||||
id: this.id,
|
||||
name: this.name,
|
||||
sendUrl: this.sendUrl,
|
||||
sendUrl: !!this.sendUrl,
|
||||
type: this.type,
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="my-3 form-check">
|
||||
<input id="show-clickable-link" :checked="monitor.isClickable === 1" class="form-check-input" type="checkbox" @click="toggleLink(monitor.group_index, monitor.monitor_index)" />
|
||||
<input id="show-clickable-link" v-model="monitor.isClickable" class="form-check-input" type="checkbox" @click="toggleLink(monitor.group_index, monitor.monitor_index)" />
|
||||
<label class="form-check-label" for="show-clickable-link">
|
||||
{{ $t("Show Clickable Link") }}
|
||||
</label>
|
||||
@@ -93,7 +93,7 @@ export default {
|
||||
* @returns {void}
|
||||
*/
|
||||
toggleLink(groupIndex, index) {
|
||||
this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl = this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl ? 0 : 1;
|
||||
this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl = !this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user