mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
chore(web): new lint setup (#30020)
Co-authored-by: yyh <yuanyouhuilyz@gmail.com>
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
'use client'
|
||||
import type { InitValidateStatusResponse } from '@/models/common'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import Toast from '../components/base/toast'
|
||||
import Loading from '../components/base/loading'
|
||||
import Button from '@/app/components/base/button'
|
||||
import { basePath } from '@/utils/var'
|
||||
import { fetchInitValidateStatus, initValidate } from '@/service/common'
|
||||
import type { InitValidateStatusResponse } from '@/models/common'
|
||||
import useDocumentTitle from '@/hooks/use-document-title'
|
||||
import { fetchInitValidateStatus, initValidate } from '@/service/common'
|
||||
import { basePath } from '@/utils/var'
|
||||
import Loading from '../components/base/loading'
|
||||
import Toast from '../components/base/toast'
|
||||
|
||||
const InitPasswordPopup = () => {
|
||||
useDocumentTitle('')
|
||||
@ -53,32 +53,34 @@ const InitPasswordPopup = () => {
|
||||
return (
|
||||
loading
|
||||
? <Loading />
|
||||
: <div>
|
||||
{!validated && (
|
||||
<div className="mx-12 block min-w-28">
|
||||
<div className="mb-4">
|
||||
<label htmlFor="password" className="block text-sm font-medium text-text-secondary">
|
||||
{t('login.adminInitPassword')}
|
||||
: (
|
||||
<div>
|
||||
{!validated && (
|
||||
<div className="mx-12 block min-w-28">
|
||||
<div className="mb-4">
|
||||
<label htmlFor="password" className="block text-sm font-medium text-text-secondary">
|
||||
{t('login.adminInitPassword')}
|
||||
|
||||
</label>
|
||||
<div className="relative mt-1 rounded-md shadow-sm">
|
||||
<input
|
||||
id="password"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={e => setPassword(e.target.value)}
|
||||
className="block w-full appearance-none rounded-md border border-divider-regular px-3 py-2 shadow-sm placeholder:text-text-quaternary focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
|
||||
/>
|
||||
</label>
|
||||
<div className="relative mt-1 rounded-md shadow-sm">
|
||||
<input
|
||||
id="password"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={e => setPassword(e.target.value)}
|
||||
className="block w-full appearance-none rounded-md border border-divider-regular px-3 py-2 shadow-sm placeholder:text-text-quaternary focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-row flex-wrap justify-stretch p-0">
|
||||
<Button variant="primary" onClick={handleValidation} className="min-w-28 basis-full">
|
||||
{t('login.validate')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-row flex-wrap justify-stretch p-0">
|
||||
<Button variant="primary" onClick={handleValidation} className="min-w-28 basis-full">
|
||||
{t('login.validate')}
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import InitPasswordPopup from './InitPasswordPopup'
|
||||
import { cn } from '@/utils/classnames'
|
||||
import InitPasswordPopup from './InitPasswordPopup'
|
||||
|
||||
const Install = () => {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user