diff --git a/css/base.css b/css/base.css
index c4889b6..d40e6f9 100644
--- a/css/base.css
+++ b/css/base.css
@@ -30,12 +30,12 @@
}
}
-@media screen and (max-width: 750px) {
+@media screen and (max-width: 1000px) {
:root {
font-size: 0.9rem;
}
.table-responsive table {
- min-width: 660px;
+ min-width: 800px;
}
}
@@ -428,6 +428,7 @@ p.top {
.table-responsive {
overflow-x: auto;
+ font-size: 0.9rem;
}
#notification-box {
@@ -506,3 +507,8 @@ img.img-circle {
padding-top: 0.1rem;
padding-bottom: 0.1rem;
}
+
+.table-inline {
+ display: flex !important;
+ align-items: center;
+}
diff --git a/ts/modules/accounts.ts b/ts/modules/accounts.ts
index d969777..c685465 100644
--- a/ts/modules/accounts.ts
+++ b/ts/modules/accounts.ts
@@ -102,7 +102,9 @@ class user implements User {
this._notifyEmail = s;
if (window.telegramEnabled && this._telegramUsername != "") {
const email = this._telegram.getElementsByClassName("accounts-contact-email")[0] as HTMLInputElement;
- email.checked = s;
+ if (email) {
+ email.checked = s;
+ }
}
if (window.discordEnabled && this._discordUsername != "") {
const email = this._discord.getElementsByClassName("accounts-contact-email")[0] as HTMLInputElement;
@@ -120,52 +122,50 @@ class user implements User {
} else {
let innerHTML = `
@${u}
-
-
-
-
- `;
- this._discord.innerHTML = innerHTML;
- // Javascript is necessary as including the button inside the dropdown would make it too wide to display next to the username.
- const button = this._telegram.querySelector("i");
- const dropdown = this._telegram.querySelector("div.dropdown") as HTMLDivElement;
- const checks = this._telegram.querySelectorAll("input") as NodeListOf
;
- for (let i = 0; i < checks.length; i++) {
- checks[i].onclick = () => this._setNotifyMethod("telegram");
+ `;
}
-
- button.onclick = () => {
- dropdown.classList.add("selected");
- document.addEventListener("click", outerClickListener);
- };
- const outerClickListener = (event: Event) => {
- if (!(event.target instanceof HTMLElement && (this._telegram.contains(event.target) || button.contains(event.target)))) {
- dropdown.classList.remove("selected");
- document.removeEventListener("click", outerClickListener);
+ this._telegram.innerHTML = innerHTML;
+ if (!window.discordEnabled || this._discordUsername == "") {
+ // Javascript is necessary as including the button inside the dropdown would make it too wide to display next to the username.
+ const button = this._telegram.querySelector("i");
+ const dropdown = this._telegram.querySelector("div.dropdown") as HTMLDivElement;
+ const checks = this._telegram.querySelectorAll("input") as NodeListOf;
+ for (let i = 0; i < checks.length; i++) {
+ checks[i].onclick = () => this._setNotifyMethod("telegram");
}
- };
+
+ button.onclick = () => {
+ dropdown.classList.add("selected");
+ document.addEventListener("click", outerClickListener);
+ };
+ const outerClickListener = (event: Event) => {
+ if (!(event.target instanceof HTMLElement && (this._telegram.contains(event.target) || button.contains(event.target)))) {
+ dropdown.classList.remove("selected");
+ document.removeEventListener("click", outerClickListener);
+ }
+ };
+ }
}
}
@@ -174,7 +174,9 @@ class user implements User {
if (!window.telegramEnabled || !this._telegramUsername) return;
this._notifyTelegram = s;
const telegram = this._telegram.getElementsByClassName("accounts-contact-telegram")[0] as HTMLInputElement;
- telegram.checked = s;
+ if (telegram) {
+ telegram.checked = s;
+ }
if (window.discordEnabled && this._discordUsername != "") {
const telegram = this._discord.getElementsByClassName("accounts-contact-telegram")[0] as HTMLInputElement;
telegram.checked = s;
@@ -227,30 +229,32 @@ class user implements User {
(this._discord.querySelector("span") as HTMLSpanElement).onclick = this._addDiscord;
} else {
let innerHTML = `
- ${u}
-
-
-
-
-
${window.lang.strings("contactThrough")}
-
-
+
@@ -323,8 +327,8 @@ class user implements User {
this._row = document.createElement("tr") as HTMLTableRowElement;
let innerHTML = `
|
-
|
-
|
+
|
+
|
`;
if (window.telegramEnabled) {
innerHTML += `