mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-22 23:39:34 +02:00
Added registered date to the panel
This commit is contained in:
parent
d52104d1d4
commit
84561dbb98
@ -42,7 +42,7 @@ export default class AdminUiHandler extends FormModalUiHandler {
|
|||||||
case AdminMode.SEARCH:
|
case AdminMode.SEARCH:
|
||||||
return ["Username"];
|
return ["Username"];
|
||||||
case AdminMode.ADMIN:
|
case AdminMode.ADMIN:
|
||||||
return ["Username", "Discord ID", "Google ID", "Last played"];
|
return ["Username", "Discord ID", "Google ID", "Last played", "Registered"];
|
||||||
default:
|
default:
|
||||||
return [""];
|
return [""];
|
||||||
}
|
}
|
||||||
@ -79,7 +79,7 @@ export default class AdminUiHandler extends FormModalUiHandler {
|
|||||||
show(args: any[]): boolean {
|
show(args: any[]): boolean {
|
||||||
this.config = args[0] as ModalConfig;
|
this.config = args[0] as ModalConfig;
|
||||||
this.adminMode = args[1] as AdminMode;
|
this.adminMode = args[1] as AdminMode;
|
||||||
this.adminResult = args[2] ?? { username: "", discordId: "", googleId: "", lastLoggedIn: "" };
|
this.adminResult = args[2] ?? { username: "", discordId: "", googleId: "", lastLoggedIn: "", registered: "" };
|
||||||
const isMessageError = args[3];
|
const isMessageError = args[3];
|
||||||
|
|
||||||
const fields = this.getFields();
|
const fields = this.getFields();
|
||||||
@ -154,7 +154,7 @@ export default class AdminUiHandler extends FormModalUiHandler {
|
|||||||
this.inputs[0].setText(adminResult.username);
|
this.inputs[0].setText(adminResult.username);
|
||||||
break;
|
break;
|
||||||
case AdminMode.ADMIN:
|
case AdminMode.ADMIN:
|
||||||
const lockedFields: string[] = ["username", "lastLoggedIn"];
|
const lockedFields: string[] = ["username", "lastLoggedIn", "registered"];
|
||||||
Object.keys(adminResult).forEach((aR, i) => {
|
Object.keys(adminResult).forEach((aR, i) => {
|
||||||
this.inputs[i].setText(adminResult[aR]);
|
this.inputs[i].setText(adminResult[aR]);
|
||||||
if (aR === "discordId" || aR === "googleId") {
|
if (aR === "discordId" || aR === "googleId") {
|
||||||
@ -226,7 +226,8 @@ export default class AdminUiHandler extends FormModalUiHandler {
|
|||||||
username: this.inputs[0]?.node ? this.inputs[0].text : "",
|
username: this.inputs[0]?.node ? this.inputs[0].text : "",
|
||||||
discordId: this.inputs[1]?.node ? this.inputs[1]?.text : "",
|
discordId: this.inputs[1]?.node ? this.inputs[1]?.text : "",
|
||||||
googleId: this.inputs[2]?.node ? this.inputs[2]?.text : "",
|
googleId: this.inputs[2]?.node ? this.inputs[2]?.text : "",
|
||||||
lastLoggedIn: this.inputs[3]?.node ? this.inputs[3]?.text : ""
|
lastLoggedIn: this.inputs[3]?.node ? this.inputs[3]?.text : "",
|
||||||
|
registered: this.inputs[4]?.node ? this.inputs[4]?.text : ""
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -339,4 +340,5 @@ export interface AdminSearchInfo {
|
|||||||
discordId: string;
|
discordId: string;
|
||||||
googleId: string;
|
googleId: string;
|
||||||
lastLoggedIn: string;
|
lastLoggedIn: string;
|
||||||
|
registered: string;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user