diff --git a/discord.go b/discord.go index 1f37a03..f10e7c5 100644 --- a/discord.go +++ b/discord.go @@ -210,7 +210,9 @@ func (d *DiscordDaemon) NewTempInvite(ageSeconds, maxUses int) (inviteURL, iconU d.app.err.Printf("Discord: Failed to get guild: %v", err) return } + // FIXME: Fix CSS, and handle no icon iconURL = guild.IconURL("256") + fmt.Println("GOT ICON", iconURL) return } diff --git a/html/form.html b/html/form.html index dff83e5..1ef1820 100644 --- a/html/form.html +++ b/html/form.html @@ -49,7 +49,7 @@
{{ .strings.linkDiscord }}

{{ .discordSendPINMessage }}

-

{{ .discordPIN }}

+

{{ .strings.success }}
diff --git a/html/user.html b/html/user.html index 3e61003..3de47a7 100644 --- a/html/user.html +++ b/html/user.html @@ -46,7 +46,9 @@ {{ .strings.linkDiscord }}

{{ .discordSendPINMessage }}

- +
+ +
{{ .strings.success }} diff --git a/tailwind.config.js b/tailwind.config.js index e6c93da..b9825a6 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -40,7 +40,8 @@ module.exports = { d_urge: dark.d_urge, d_warning: dark.d_warning, d_info: dark.d_info, - d_critical: dark.d_critical + d_critical: dark.d_critical, + discord: "#5865F2" } } }, diff --git a/ts/modules/account-linking.ts b/ts/modules/account-linking.ts index fce2ec8..76e34c5 100644 --- a/ts/modules/account-linking.ts +++ b/ts/modules/account-linking.ts @@ -75,7 +75,13 @@ export class Discord { const link = document.getElementById("discord-invite") as HTMLAnchorElement; link.href = inv.invite; link.target = "_blank"; - link.innerHTML = `${window.discordServerName}`; + if (inv.icon != "") { + link.innerHTML = `${window.discordServerName}`; + } else { + link.innerHTML = ` + ${window.discordServerName} + `; + } }); private _checkVerified = () => {