mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-10 16:13:42 +08:00
优化一些交互逻辑
This commit is contained in:
@@ -1,13 +1,10 @@
|
||||
import React, {useContext, useEffect, useState} from 'react';
|
||||
import {
|
||||
Modal,
|
||||
} from 'semantic-ui-react';
|
||||
import {Link, useNavigate, useSearchParams} from 'react-router-dom';
|
||||
import {UserContext} from '../context/User';
|
||||
import {API, getLogo, isMobile, showError, showInfo, showSuccess, showWarning} from '../helpers';
|
||||
import {onGitHubOAuthClicked} from './utils';
|
||||
import Turnstile from "react-turnstile";
|
||||
import {Layout, Card, Image, Form, Button, Divider} from "@douyinfe/semi-ui";
|
||||
import {Layout, Card, Image, Form, Button, Divider, Modal} from "@douyinfe/semi-ui";
|
||||
import Title from "@douyinfe/semi-ui/lib/es/typography/title";
|
||||
import Text from "@douyinfe/semi-ui/lib/es/typography/text";
|
||||
|
||||
@@ -92,8 +89,7 @@ const LoginForm = () => {
|
||||
localStorage.setItem('user', JSON.stringify(data));
|
||||
showSuccess('登录成功!');
|
||||
if (username === 'root' && password === '123456') {
|
||||
showWarning('请立刻修改默认密码!');
|
||||
Modal.error({title: '您正在使用默认密码!', content: '请立刻修改默认密码!'});
|
||||
Modal.error({title: '您正在使用默认密码!', content: '请立刻修改默认密码!', centered: true});
|
||||
}
|
||||
navigate('/token');
|
||||
} else {
|
||||
|
||||
@@ -80,7 +80,6 @@ const UsersTable = () => {
|
||||
<Popconfirm
|
||||
title="确定?"
|
||||
okType={'warning'}
|
||||
position={'left'}
|
||||
onConfirm={() => {
|
||||
manageUser(record.username, 'promote', record)
|
||||
}}
|
||||
@@ -90,7 +89,6 @@ const UsersTable = () => {
|
||||
<Popconfirm
|
||||
title="确定?"
|
||||
okType={'warning'}
|
||||
position={'left'}
|
||||
onConfirm={() => {
|
||||
manageUser(record.username, 'demote', record)
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user