mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-10-02 07:08:28 -05:00
Add configurable Discord link
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
</form>
|
||||
<footer>
|
||||
<p>This website is not affiliated with Nintendo. All product names, logos, and brands are property of their respective owners.</p>
|
||||
<p><a href="https://github.com/AndrioCelos/TableturfBattleApp">GitHub</a></p>
|
||||
<p><a href="https://github.com/AndrioCelos/TableturfBattleApp">GitHub</a><span id="discordSection"> | <a id="discordLink">Discord</a></span></p>
|
||||
</footer>
|
||||
</div>
|
||||
<div id="lobbyPage" hidden>
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
interface Config {
|
||||
apiBaseUrl: string,
|
||||
qrCodeGameUrl: string | null | undefined,
|
||||
qrCodeCorrectionLevel: QRCode.CorrectLevel | keyof typeof QRCode.CorrectLevel | undefined
|
||||
qrCodeCorrectionLevel: QRCode.CorrectLevel | keyof typeof QRCode.CorrectLevel | undefined,
|
||||
discordUrl?: string,
|
||||
discordTitle?: string
|
||||
}
|
||||
|
||||
declare var config: Config;
|
||||
|
||||
@@ -373,6 +373,13 @@ function clearChildren(el: Element) {
|
||||
el.removeChild(el2);
|
||||
}
|
||||
|
||||
if (config.discordUrl) {
|
||||
(document.getElementById('discordLink') as HTMLLinkElement).href = config.discordUrl;
|
||||
if (config.discordTitle)
|
||||
(document.getElementById('discordLink') as HTMLLinkElement).innerText = `Discord – ${config.discordTitle}`;
|
||||
} else
|
||||
document.getElementById('discordSection')!.hidden = true;
|
||||
|
||||
Promise.all([ cardDatabase.loadAsync().then(initCardDatabase), stageDatabase.loadAsync().then(initStageDatabase) ])
|
||||
.then(() => {
|
||||
initialised = true;
|
||||
|
||||
Reference in New Issue
Block a user