引入 husky,并全局重新格式化
This commit is contained in:
@@ -15,7 +15,7 @@ export default function Page(props: PageProps) {
|
||||
)
|
||||
}
|
||||
|
||||
function Page1() {
|
||||
function Page1() {
|
||||
const params = useSearchParams()
|
||||
const success = params.get('success') === 'true'
|
||||
const id = params.get('id') || ''
|
||||
@@ -27,7 +27,7 @@ export default function Page(props: PageProps) {
|
||||
|
||||
useEffect(() => {
|
||||
if (success) {
|
||||
IdentifyCallback({id}).then(resp => {
|
||||
IdentifyCallback({id}).then((resp) => {
|
||||
if (!resp.success) {
|
||||
setResult({
|
||||
status: 'fail',
|
||||
@@ -55,28 +55,34 @@ export default function Page(props: PageProps) {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className={`w-full min-h-screen flex justify-center items-center bg-blue-50`}>
|
||||
<div className="w-full min-h-screen flex justify-center items-center bg-blue-50">
|
||||
<Card className="w-full max-w-xs border-none shadow-none bg-white -translate-y-1/3">
|
||||
<CardContent className="flex flex-col items-center gap-4 py-6">
|
||||
{result.status === 'load' ? (<>
|
||||
<Loader2 className="w-16 h-16 text-primary animate-spin"/>
|
||||
<p className={`text-primary text-xl`}>{result.message}</p>
|
||||
<p className={`text-weak text-sm`}>
|
||||
请保持网络畅通
|
||||
</p>
|
||||
</>) : result.status === 'done' ? (<>
|
||||
<CheckCircle className="w-16 h-16 text-done"/>
|
||||
<p className={`text-done text-xl`}>{result.message}</p>
|
||||
<p className={`text-weak text-sm`}>
|
||||
认证已完成,您现在可以关闭此页面
|
||||
</p>
|
||||
</>) : (<>
|
||||
<AlertCircle className="w-16 h-16 text-fail"/>
|
||||
<p className={`text-fail text-xl`}>{result.message}</p>
|
||||
<p className={`text-weak text-sm`}>
|
||||
认证失败,请重新发起认证
|
||||
</p>
|
||||
</>)}
|
||||
{result.status === 'load' ? (
|
||||
<>
|
||||
<Loader2 className="w-16 h-16 text-primary animate-spin"/>
|
||||
<p className="text-primary text-xl">{result.message}</p>
|
||||
<p className="text-weak text-sm">
|
||||
请保持网络畅通
|
||||
</p>
|
||||
</>
|
||||
) : result.status === 'done' ? (
|
||||
<>
|
||||
<CheckCircle className="w-16 h-16 text-done"/>
|
||||
<p className="text-done text-xl">{result.message}</p>
|
||||
<p className="text-weak text-sm">
|
||||
认证已完成,您现在可以关闭此页面
|
||||
</p>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<AlertCircle className="w-16 h-16 text-fail"/>
|
||||
<p className="text-fail text-xl">{result.message}</p>
|
||||
<p className="text-weak text-sm">
|
||||
认证失败,请重新发起认证
|
||||
</p>
|
||||
</>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
@@ -50,7 +50,7 @@ export async function GET(req: NextRequest) {
|
||||
const body = JSON.stringify(params)
|
||||
return NextResponse.json(body)
|
||||
case 'text':
|
||||
const text = result.data.map(item => {
|
||||
const text = result.data.map((item) => {
|
||||
const list = [item.host, item.port]
|
||||
if (item.username && item.password) {
|
||||
list.push(item.username)
|
||||
|
||||
Reference in New Issue
Block a user