summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2021-08-19 12:14:37 -0400
committergumi <git@gumi.ca>2021-08-19 12:21:16 -0400
commit802fb4adaf2e4ffd76b08dc23e29e4c8f4bed543 (patch)
treeeed99a377249bdac523c275614925078e6e02167 /src/views
parentc3d48e0be54364cf14df4eb1c3ed49d74ae8ab6d (diff)
downloadwebsite-802fb4adaf2e4ffd76b08dc23e29e4c8f4bed543.tar.gz
website-802fb4adaf2e4ffd76b08dc23e29e4c8f4bed543.tar.bz2
website-802fb4adaf2e4ffd76b08dc23e29e4c8f4bed543.tar.xz
website-802fb4adaf2e4ffd76b08dc23e29e4c8f4bed543.zip
fix some typescript warnings
Diffstat (limited to 'src/views')
-rw-r--r--src/views/AccountRecovery.vue16
-rw-r--r--src/views/Registration.vue14
2 files changed, 15 insertions, 15 deletions
diff --git a/src/views/AccountRecovery.vue b/src/views/AccountRecovery.vue
index 2eaf0d3..d0ca097 100644
--- a/src/views/AccountRecovery.vue
+++ b/src/views/AccountRecovery.vue
@@ -179,7 +179,7 @@ export default class Recovery extends Vue {
emailToken = "";
recaptcha_key = process.env.VUE_APP_RECAPTCHA;
- async mounted () {
+ async mounted (): Promise<void> {
let token: string = document.location.hash.slice(1) as string;
if (Reflect.has(this.$route.params, "emailToken")) {
@@ -221,7 +221,7 @@ export default class Recovery extends Vue {
}
}
- async start () {
+ async start (): Promise<void> {
this.step = -4;
try {
@@ -239,16 +239,16 @@ export default class Recovery extends Vue {
}
}
- async checkEmail () {
+ async checkEmail (): Promise<void> {
this.step = reCAPTCHA.isReady ? 2 : -1;
// XXX: any actual checks needed here?
}
- private sleep (milliseconds: number) {
+ private sleep (milliseconds: number): Promise<number> {
return new Promise(resolve => setTimeout(resolve, milliseconds));
}
- async confirm () {
+ async confirm (): Promise<void> {
reCAPTCHA.instance.execute();
let token = "";
@@ -323,7 +323,7 @@ export default class Recovery extends Vue {
}
}
- async checkUser () {
+ async checkUser (): Promise<void> {
// TODO: check if the token is valid for this username
this.step = reCAPTCHA.isReady ? 5 : -1;
await this.$nextTick();
@@ -347,7 +347,7 @@ export default class Recovery extends Vue {
return hexCodes.join("");
}
- async checkPassword () {
+ async checkPassword (): Promise<void> {
const fullHash = await this.sha1(this.user.pwd);
const hashPrefix = fullHash.substring(0, 5);
const hashSuffix = fullHash.substring(5);
@@ -382,7 +382,7 @@ export default class Recovery extends Vue {
}
}
- async confirm2 () {
+ async confirm2 (): Promise<void> {
reCAPTCHA.instance.execute();
let token = "";
diff --git a/src/views/Registration.vue b/src/views/Registration.vue
index 782b072..e170f47 100644
--- a/src/views/Registration.vue
+++ b/src/views/Registration.vue
@@ -162,7 +162,7 @@ export default class Registration extends Vue {
specialEvent = process.env.VUE_APP_EVENT?.trim() ?? ""; // special in-game events
- async mounted () {
+ async mounted (): Promise<void> {
// already loaded (user returned to this page)
if (reCAPTCHA.isReady) {
await this.$nextTick();
@@ -174,7 +174,7 @@ export default class Registration extends Vue {
}
}
- async start () {
+ async start (): Promise<void> {
this.step = -3;
try {
@@ -187,13 +187,13 @@ export default class Registration extends Vue {
}
}
- async checkEmail () {
+ async checkEmail (): Promise<void> {
this.step = 2;
await this.$nextTick();
(this.$refs._user as HTMLInputElement).focus();
}
- async checkUser () {
+ async checkUser (): Promise<void> {
// TODO: check here whether the username is taken
this.step = 3;
await this.$nextTick();
@@ -217,7 +217,7 @@ export default class Registration extends Vue {
return hexCodes.join("");
}
- async checkPassword () {
+ async checkPassword (): Promise<void> {
const fullHash = await this.sha1(this.user.pwd);
const hashPrefix = fullHash.substring(0, 5);
const hashSuffix = fullHash.substring(5);
@@ -252,11 +252,11 @@ export default class Registration extends Vue {
}
}
- sleep (milliseconds: number) {
+ sleep (milliseconds: number): Promise<number> {
return new Promise(resolve => setTimeout(resolve, milliseconds));
}
- async create () {
+ async create (): Promise<void> {
reCAPTCHA.instance.execute();
let token = "";