diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index ce04d0d4f..978993458 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -20,6 +20,11 @@ interface State { loginLoading: boolean; registerLoading: boolean; enable_nsfw: boolean; + mathQuestion: { + a: number; + b: number; + answer: number; + }; } export class Login extends Component { @@ -40,6 +45,11 @@ export class Login extends Component { loginLoading: false, registerLoading: false, enable_nsfw: undefined, + mathQuestion: { + a: Math.floor(Math.random() * 10) + 1, + b: Math.floor(Math.random() * 10) + 1, + answer: undefined, + }, }; constructor(props: any, context: any) { @@ -215,6 +225,23 @@ export class Login extends Component { /> +
+ + +
+ +
+
{this.state.enable_nsfw && (
@@ -235,7 +262,11 @@ export class Login extends Component { )}
-