mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-22 22:13:20 +02:00
revert showLink without the unused if-statement surrounding ignoreSendUrl
This commit is contained in:
parent
61c68e2305
commit
d3c3808dae
@ -80,7 +80,7 @@ export default {
|
||||
name: monitor.element.name,
|
||||
monitor_index: monitor.index,
|
||||
group_index: group.index,
|
||||
isClickable: monitor.element.sendUrl,
|
||||
isClickable: this.showLink(monitor),
|
||||
};
|
||||
|
||||
this.MonitorSettingDialog.show();
|
||||
@ -95,6 +95,17 @@ export default {
|
||||
toggleLink(groupIndex, index) {
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user