mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-23 14:54:05 +00:00
revert showLink without the unused if-statement surrounding ignoreSendUrl
This commit is contained in:
parent
61c68e2305
commit
d3c3808dae
1 changed files with 12 additions and 1 deletions
|
@ -80,7 +80,7 @@ export default {
|
||||||
name: monitor.element.name,
|
name: monitor.element.name,
|
||||||
monitor_index: monitor.index,
|
monitor_index: monitor.index,
|
||||||
group_index: group.index,
|
group_index: group.index,
|
||||||
isClickable: monitor.element.sendUrl,
|
isClickable: this.showLink(monitor),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.MonitorSettingDialog.show();
|
this.MonitorSettingDialog.show();
|
||||||
|
@ -95,6 +95,17 @@ export default {
|
||||||
toggleLink(groupIndex, index) {
|
toggleLink(groupIndex, index) {
|
||||||
this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl = !this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl;
|
this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl = !this.$root.publicGroupList[groupIndex].monitorList[index].sendUrl;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should a link to the monitor be shown?
|
||||||
|
* Attempts to guess if a link should be shown based upon if
|
||||||
|
* sendUrl is set and if the URL is default or not.
|
||||||
|
* @param {object} monitor Monitor to check
|
||||||
|
* @returns {boolean} Should the link be shown?
|
||||||
|
*/
|
||||||
|
showLink(monitor) {
|
||||||
|
return monitor.element.sendUrl && monitor.element.url && monitor.element.url !== "https://";
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in a new issue