Fix demo mode default login

This commit is contained in:
Yang Luo 2023-02-18 23:39:32 +08:00
parent edbd3d4018
commit 4806e76cf6
2 changed files with 8 additions and 0 deletions

View File

@ -688,6 +688,11 @@ class App extends Component {
return null;
}
const language = Setting.getLanguage();
if (language === "en" || language === "zh") {
return null;
}
return (
<Alert type="info" banner showIcon={false} closable message={
<div style={{textAlign: "center"}}>

View File

@ -16,6 +16,7 @@ import React from "react";
import {Button, Checkbox, Col, Form, Input, Result, Row, Spin, Tabs} from "antd";
import {LockOutlined, UserOutlined} from "@ant-design/icons";
import * as UserWebauthnBackend from "../backend/UserWebauthnBackend";
import * as Conf from "../Conf";
import * as AuthBackend from "./AuthBackend";
import * as OrganizationBackend from "../backend/OrganizationBackend";
import * as ApplicationBackend from "../backend/ApplicationBackend";
@ -384,6 +385,8 @@ class LoginPage extends React.Component {
organization: application.organization,
application: application.name,
autoSignin: true,
username: Conf.ShowGithubCorner ? "admin" : "",
password: Conf.ShowGithubCorner ? "123" : "",
}}
onFinish={(values) => {
this.onFinish(values);