diff --git a/back/api/system.ts b/back/api/system.ts
index 2bea5493..a324a3e1 100644
--- a/back/api/system.ts
+++ b/back/api/system.ts
@@ -47,8 +47,7 @@ export default (app: Router) => {
if (
Object.keys(authInfo).length === 2 &&
authInfo.username === 'admin' &&
- authInfo.password === 'admin' &&
- envCount === 0
+ authInfo.password === 'admin'
) {
isInitialized = false;
}
diff --git a/back/loaders/express.ts b/back/loaders/express.ts
index 0bf5bbb6..4c1ca5a1 100644
--- a/back/loaders/express.ts
+++ b/back/loaders/express.ts
@@ -109,8 +109,7 @@ export default ({ app }: { app: Application }) => {
if (
Object.keys(authInfo).length === 2 &&
authInfo.username === 'admin' &&
- authInfo.password === 'admin' &&
- envCount === 0
+ authInfo.password === 'admin'
) {
isInitialized = false;
}
diff --git a/src/pages/initialization/index.tsx b/src/pages/initialization/index.tsx
index c45824a4..715c40f9 100644
--- a/src/pages/initialization/index.tsx
+++ b/src/pages/initialization/index.tsx
@@ -100,53 +100,6 @@ const Initialization = () => {
),
},
- {
- title: '通知设置',
- content: (
-
-
-
- {fields.map((x) => (
-
-
-
- ))}
-
-
-
- ),
- },
{
title: '账户设置',
content: (
@@ -202,6 +155,53 @@ const Initialization = () => {
),
},
+ {
+ title: '通知设置',
+ content: (
+
+
+
+ {fields.map((x) => (
+
+
+
+ ))}
+
+
+
+ ),
+ },
{
title: '完成安装',
content: (
diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx
index 4c350621..95357f2c 100644
--- a/src/pages/login/index.tsx
+++ b/src/pages/login/index.tsx
@@ -105,6 +105,10 @@ const Login = () => {
password: values.password,
});
setTwoFactor(true);
+ } else if (code === 100) {
+ setTimeout(() => {
+ location.reload();
+ }, 1000);
}
};
diff --git a/src/pages/setting/index.tsx b/src/pages/setting/index.tsx
index 40440d10..1a8d275a 100644
--- a/src/pages/setting/index.tsx
+++ b/src/pages/setting/index.tsx
@@ -33,6 +33,7 @@ import { SharedContext } from '@/layouts';
import './index.less';
const { Text } = Typography;
+const isDemoEnv = window.__ENV__DeployEnv === 'demo';
const Setting = () => {
const {
@@ -275,11 +276,17 @@ const Setting = () => {
tabPosition="top"
onChange={tabChange}
items={[
- {
- key: 'security',
- label: '安全设置',
- children: ,
- },
+ ...(!isDemoEnv
+ ? [
+ {
+ key: 'security',
+ label: '安全设置',
+ children: (
+
+ ),
+ },
+ ]
+ : []),
{
key: 'app',
label: '应用设置',