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 18:28:26 +00:00
committed by GitHub
parent a44f9ca128
commit 329398b4f0
27 changed files with 62 additions and 73 deletions
+9 -8
View File
@@ -19,10 +19,11 @@
set desc = "Visit the forum."
set hidden = 1
if(GLOB.configuration.url.forum_url)
if(tgui_alert(src, "Open the forum in your browser?", "Forum", list("Yes", "No")) == "Yes")
if(GLOB.configuration.url.forum_link_url && prefs && !prefs.fuid)
link_forum_account()
src << link(GLOB.configuration.url.forum_url)
if(tgui_alert(src, "Open the forum in your browser?", "Forum", list("Yes", "No")) != "Yes")
return
if(GLOB.configuration.url.forum_link_url && prefs && !prefs.fuid)
link_forum_account()
src << link(GLOB.configuration.url.forum_url)
else
to_chat(src, "<span class='danger'>The forum URL is not set in the server configuration.</span>")
@@ -31,7 +32,7 @@
set desc = "View the server rules."
set hidden = 1
if(GLOB.configuration.url.rules_url)
if(tgui_alert(src, "This will open the rules in your browser. Are you sure?", "Rules", list("Yes", "No")) == "No")
if(tgui_alert(src, "This will open the rules in your browser. Are you sure?", "Rules", list("Yes", "No")) != "Yes")
return
src << link(GLOB.configuration.url.rules_url)
else
@@ -42,7 +43,7 @@
set desc = "Visit the GitHub page."
set hidden = 1
if(GLOB.configuration.url.github_url)
if(tgui_alert(src, "This will open our GitHub repository in your browser. Are you sure?", "GitHub", list("Yes", "No")) == "No")
if(tgui_alert(src, "This will open our GitHub repository in your browser. Are you sure?", "GitHub", list("Yes", "No")) != "Yes")
return
src << link(GLOB.configuration.url.github_url)
else
@@ -65,7 +66,7 @@
if(!durl)
to_chat(src, "<span class='danger'>The Discord URL is not set in the server configuration.</span>")
return
if(tgui_alert(src, "This will invite you to our Discord server. Are you sure?", "Discord", list("Yes", "No")) == "No")
if(tgui_alert(src, "This will invite you to our Discord server. Are you sure?", "Discord", list("Yes", "No")) != "Yes")
return
src << link(durl)
@@ -74,7 +75,7 @@
set desc = "Donate to help with hosting costs."
set hidden = 1
if(GLOB.configuration.url.donations_url)
if(tgui_alert(src, "This will open the donation page in your browser. Are you sure?", "Donate", list("Yes", "No")) == "No")
if(tgui_alert(src, "This will open the donation page in your browser. Are you sure?", "Donate", list("Yes", "No")) != "Yes")
return
src << link(GLOB.configuration.url.donations_url)
else