mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
fix: clear all console warnings (#192)
Signed-off-by: sh1luo <690898835@qq.com>
This commit is contained in:
@ -49,7 +49,7 @@ import SelectLanguageBox from './SelectLanguageBox';
|
||||
import i18next from 'i18next';
|
||||
import PromptPage from "./auth/PromptPage";
|
||||
|
||||
const { Header, Footer, Content } = Layout;
|
||||
const { Header, Footer } = Layout;
|
||||
|
||||
class App extends Component {
|
||||
constructor(props) {
|
||||
|
@ -19,7 +19,6 @@ import * as LddpBackend from "./backend/LdapBackend";
|
||||
import * as OrganizationBackend from "./backend/OrganizationBackend";
|
||||
import * as Setting from "./Setting";
|
||||
import i18next from "i18next";
|
||||
import i18n from "i18next";
|
||||
|
||||
const {Option} = Select;
|
||||
|
||||
|
@ -13,12 +13,11 @@
|
||||
// limitations under the License.
|
||||
|
||||
import React from "react";
|
||||
import {Button, Card, Col, Input, InputNumber, Row, Select, Switch} from 'antd';
|
||||
import {Button, Card, Col, Input, InputNumber, Row, Select} from 'antd';
|
||||
import {LinkOutlined} from "@ant-design/icons";
|
||||
import * as ProviderBackend from "./backend/ProviderBackend";
|
||||
import * as Setting from "./Setting";
|
||||
import i18next from "i18next";
|
||||
import {getLabel} from "./Setting";
|
||||
|
||||
const { Option } = Select;
|
||||
const { TextArea } = Input;
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
import React from "react";
|
||||
import {Link} from "react-router-dom";
|
||||
import {Col, Row, Table} from 'antd';
|
||||
import {Table} from 'antd';
|
||||
import * as Setting from "./Setting";
|
||||
import * as RecordBackend from "./backend/RecordBackend";
|
||||
import i18next from "i18next";
|
||||
|
@ -26,7 +26,6 @@ import ResetModal from "./ResetModal";
|
||||
import AffiliationSelect from "./common/AffiliationSelect";
|
||||
import OAuthWidget from "./common/OAuthWidget";
|
||||
|
||||
import {Controlled as CodeMirror} from 'react-codemirror2'
|
||||
import "codemirror/lib/codemirror.css"
|
||||
require('codemirror/theme/material-darker.css');
|
||||
require("codemirror/mode/javascript/javascript");
|
||||
|
@ -266,7 +266,7 @@ class UserListPage extends React.Component {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Table scroll={{x: 'max-content'}} columns={columns} scroll={{x: 1300}} dataSource={users} rowKey="name" size="middle" bordered pagination={{pageSize: 100}}
|
||||
<Table scroll={{x: 'max-content'}} columns={columns} dataSource={users} rowKey="name" size="middle" bordered pagination={{pageSize: 100}}
|
||||
title={() => (
|
||||
<div>
|
||||
{i18next.t("general:Users")}
|
||||
|
@ -16,7 +16,7 @@ import {createButton} from "react-social-login-buttons";
|
||||
import {StaticBaseUrl} from "../Setting";
|
||||
|
||||
function Icon({ width = 24, height = 24, color }) {
|
||||
return <img src={`${StaticBaseUrl}/buttons/dingtalk.svg`} />;
|
||||
return <img src={`${StaticBaseUrl}/buttons/dingtalk.svg`} alt="Sign in with DingTalk"/>;
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -16,7 +16,7 @@ import {createButton} from "react-social-login-buttons";
|
||||
import {StaticBaseUrl} from "../Setting";
|
||||
|
||||
function Icon({ width = 24, height = 24, color }) {
|
||||
return <img src={`${StaticBaseUrl}/buttons/facebook.svg`} />;
|
||||
return <img src={`${StaticBaseUrl}/buttons/facebook.svg`} alt="Sign in with Facebook"/>;
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -111,6 +111,8 @@ class ForgetPage extends React.Component {
|
||||
case "phone":
|
||||
this.setState({isFixed: true, fixedContent: res.data.phone, verifyType: "phone"});
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
if (this.state.isFixed) {
|
||||
forms.step2.setFieldsValue({email: this.state.fixedContent})
|
||||
@ -139,6 +141,8 @@ class ForgetPage extends React.Component {
|
||||
}
|
||||
})
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ import {createButton} from "react-social-login-buttons";
|
||||
import {StaticBaseUrl} from "../Setting";
|
||||
|
||||
function Icon({ width = 24, height = 24, color }) {
|
||||
return <img src={`${StaticBaseUrl}/buttons/github.svg`} />;
|
||||
return <img src={`${StaticBaseUrl}/buttons/github.svg`} alt="Sign in with GitHub"/>;
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -16,7 +16,7 @@ import {createButton} from "react-social-login-buttons";
|
||||
import {StaticBaseUrl} from "../Setting";
|
||||
|
||||
function Icon({ width = 24, height = 24, color }) {
|
||||
return <img src={`${StaticBaseUrl}/buttons/gitee.svg`} />;
|
||||
return <img src={`${StaticBaseUrl}/buttons/gitee.svg`} alt="Sign in with Gitee"/>;
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -16,7 +16,7 @@ import {createButton} from "react-social-login-buttons";
|
||||
import {StaticBaseUrl} from "../Setting";
|
||||
|
||||
function Icon({ width = 24, height = 24, color }) {
|
||||
return <img src={`${StaticBaseUrl}/buttons/google.svg`} />;
|
||||
return <img src={`${StaticBaseUrl}/buttons/google.svg`} alt="Sign in with Google"/>;
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -16,7 +16,7 @@ import {createButton} from "react-social-login-buttons";
|
||||
import {StaticBaseUrl} from "../Setting";
|
||||
|
||||
function Icon({ width = 24, height = 24, color }) {
|
||||
return <img src={`${StaticBaseUrl}/buttons/wechat.svg`} />;
|
||||
return <img src={`${StaticBaseUrl}/buttons/wechat.svg`} alt="Sign in with Wechat"/>;
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -16,7 +16,7 @@ import {createButton} from "react-social-login-buttons";
|
||||
import {StaticBaseUrl} from "../Setting";
|
||||
|
||||
function Icon({ width = 24, height = 24, color }) {
|
||||
return <img src={`${StaticBaseUrl}/buttons/weibo.svg`} />;
|
||||
return <img src={`${StaticBaseUrl}/buttons/weibo.svg`} alt="Sign in with Weibo"/>;
|
||||
}
|
||||
|
||||
const config = {
|
||||
|
@ -28,14 +28,14 @@ export const CountDownInput = (props) => {
|
||||
const [key, setKey] = React.useState("");
|
||||
const [captchaImg, setCaptchaImg] = React.useState("");
|
||||
const [checkType, setCheckType] = React.useState("");
|
||||
const [coolDown, setCoolDown] = React.useState(false);
|
||||
// const [coolDown, setCoolDown] = React.useState(false);
|
||||
const [checkId, setCheckId] = React.useState("");
|
||||
const [buttonDisabled, setButtonDisabled] = React.useState(false);
|
||||
|
||||
const countDown = (leftTime) => {
|
||||
if (leftTime === 0) {
|
||||
setButtonDisabled(false);
|
||||
setCoolDown(false);
|
||||
// setCoolDown(false);
|
||||
setButtonText(defaultButtonText);
|
||||
return;
|
||||
}
|
||||
@ -48,7 +48,7 @@ export const CountDownInput = (props) => {
|
||||
onButtonClick(checkType, checkId, key, ...onButtonClickArgs).then(res => {
|
||||
setKey("");
|
||||
if (res) {
|
||||
setCoolDown(true);
|
||||
// setCoolDown(true);
|
||||
setButtonDisabled(true)
|
||||
countDown(coolDownTime);
|
||||
}
|
||||
@ -107,6 +107,8 @@ export const CountDownInput = (props) => {
|
||||
return <VerifiedOutlined />;
|
||||
case "AuditOutlined":
|
||||
return <AuditOutlined />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user