Fixes some issues with TGUI Alerts, and Text Input (#24282)

* Well... maybe that's not better way

* PDA and all_channels encryptionkey

* Alert fixes

* Bad style
This commit is contained in:
Aylong
2024-02-24 20:28:26 +02:00
committed by GitHub
parent a44f9ca128
commit 329398b4f0
27 changed files with 62 additions and 73 deletions
@@ -211,13 +211,13 @@ SUBSYSTEM_DEF(changelog)
if("open_pr")
var/pr_num = params["pr_number"]
if(GLOB.configuration.url.github_url)
if(tgui_alert(usr, "This will open PR #[pr_num] in your browser. Are you sure?", "Open PR", list("Yes", "No")) == "No")
if(tgui_alert(usr, "This will open PR #[pr_num] in your browser. Are you sure?", "Open PR", list("Yes", "No")) != "Yes")
return
// If the github URL in the config has a trailing slash, it doesnt matter here, thankfully github accepts having a double slash: https://github.com/org/repo//pull/1
var/url = "[GLOB.configuration.url.github_url]/pull/[pr_num]"
usr << link(url)
return
return TRUE
to_chat(usr, "<span class='danger'>The GitHub URL is not set in the server configuration. PRs cannot be opened from changelog view. Please inform the server host.</span>")