Discord verification tweaks (#75870)

## About The Pull Request
* Minorly tweaks some wording on the Discord verification window
* Moves the verification command into its own little text box to make it
more obvious
* Also adds support for the `user-select` css property, which does not
appear to be currently functional in Byond's IE engine. If this gets
fixed in the future, we'll be ahead of the game!

## Why It's Good For The Game
Makes the Discord verification command stand out a little more.
This commit is contained in:
Nick
2023-06-07 10:50:50 +12:00
committed by GitHub
parent b047720b79
commit 86ba209d5b
2 changed files with 20 additions and 4 deletions
+4 -4
View File
@@ -21,18 +21,18 @@
// Simple sanity check to prevent a user doing this too often
var/cached_one_time_token = SSdiscord.reverify_cache[usr.ckey]
if(cached_one_time_token && cached_one_time_token != "")
message = "You already generated your one time token, it is [cached_one_time_token], if you need a new one, you will have to wait until the round ends, or switch to another server, try verifying yourself in discord by using the command <span class='warning'>\" [prefix]verify [cached_one_time_token] \"</span>"
message = "You already generated your one time token, it is [cached_one_time_token]. If you need a new one, you will have to wait until the round ends, or switch to another server; try verifying yourself on Discord by copying this command: <span class='code user-select'>[prefix]verify [cached_one_time_token]</span> and pasting it into the verification channel."
else
// Will generate one if an expired one doesn't exist already, otherwise will grab existing token
var/one_time_token = SSdiscord.get_or_generate_one_time_token_for_ckey(ckey)
SSdiscord.reverify_cache[usr.ckey] = one_time_token
message = "Your one time token is: [one_time_token], Assuming you have the required living minutes in game, you can now verify yourself in discord by using the command <span class='warning'>\" [prefix]verify [one_time_token] \"</span>"
message = "Your one time token is: [one_time_token]. Assuming you have the required living minutes in game, you can now verify yourself on Discord by using the command: <span class='code user-select'>[prefix]verify [one_time_token]</span>"
//Now give them a browse window so they can't miss whatever we told them
var/datum/browser/window = new/datum/browser(usr, "discordverification", "Discord verification")
window.set_content("<span>[message]</span>")
var/datum/browser/window = new/datum/browser(usr, "discordverification", "Discord Verification")
window.set_content("<div>[message]</div>")
window.open()
+16
View File
@@ -409,3 +409,19 @@ ul.sparse {
display: inline-block;
vertical-align: middle;
}
.code {
padding: 6px 8px;
border: 1px solid #161616;
background: #383838;
color: #FFFFFF;
font-size: 12px;
display: block;
margin: 4px 0;
font-family: 'Courier New', Courier, monospace;
}
.user-select {
user-select: all;
}