diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx
index 3a5fd4c..74cc0f8 100644
--- a/src/components/Navbar.tsx
+++ b/src/components/Navbar.tsx
@@ -104,6 +104,17 @@ export default function Navbar() {
+ {isVip().level==100?
+
+
+
+
+
开发者模式已开启
+
管理员:{isVip().name}
+
+
+
:''
+ }
{/*
{getMsg()[0]}
diff --git a/src/pages/admin/userlist.tsx b/src/pages/admin/userlist.tsx
index 8a9813f..7ed7227 100644
--- a/src/pages/admin/userlist.tsx
+++ b/src/pages/admin/userlist.tsx
@@ -2,6 +2,7 @@
import axios from "axios";
import dayjs from "dayjs";
import { useEffect, useState } from "react"
+import isVip from "../../utils/isVip";
export default function Userlist() {
const api = import.meta.env.VITE_API
@@ -37,69 +38,84 @@ export default function Userlist() {
});
}
+ function shield(str: string) {
+ const prefix = (str as string).slice(0, 2);
+ const suffix = (str as string).slice(-2);
+ const middleMasked = Math.max(str.length - 4, 0);
+ // const middleMasked = '*'.repeat(middleMasked);
+
+ return prefix + '*'.repeat(middleMasked) + suffix;
+ }
+
return (
-
+
{/* {api} */}
-
- {/* { setInputKey(v.target.value) }}> */}
- { setInputKey(v.target.value) }} className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg outline-none focus:ring-blue-500 focus:ring focus:border-blue-500 block w-full p-2.5">
-
-
-
-
-
-
- {list.filter((v)=>{return v[2] - new Date().getTime() >= 0}).length}
-
-
-
-
-
-
-
-
-
Banned
+
+
+
+
+ {list.filter((v)=>{return v[2] - new Date().getTime() >= 0}).length}
+
+
+
+
+
+ {list.filter((v)=>{return v[2] - new Date().getTime() < 0}).length}
+
+
+
-
0
-
-
-
- {list.map((v, key)=>(
-
-
#{v[0]}
-
- {v[2] - new Date().getTime() >= 0 &&
-
-
-
Available
+
+ {list.map((v, key)=>(
+
+
#{v[0]}
+
+ {v[2] - new Date().getTime() >= 0 &&
+
+ }
+ {v[2] - new Date().getTime() < 0 &&
+
+ }
+
{shield(v[1])}
- }
- {v[2] - new Date().getTime() < 0 &&
-
- }
-
{v[1]}
-
-
Expiry Date{dayjs(v[2]).format('YYYY-MM-DD HH:mm:ss')}
-
Level{v[3]}
- {/*
*/}
+
Expiry Date{dayjs(v[2]).format('YYYY-MM-DD HH:mm:ss')}
+
Level{v[3]}
+ {/*
*/}
+
+ ))}
- ))}
-
+ >:'NotFound'
+ }
)
}