Jelajahi Sumber

修复ESLint错误: 删除注释代码和未使用的变量

zlwu 1 tahun lalu
induk
melakukan
e891c17c60

+ 0 - 36
web/app/components/apps/footer.tsx

@@ -1,44 +1,8 @@
 import React from 'react'
-import Link from 'next/link'
-import { RiDiscordFill, RiGithubFill } from '@remixicon/react'
-import { useTranslation } from 'react-i18next'
-
-type CustomLinkProps = {
-  href: string
-  children: React.ReactNode
-}
-
-const CustomLink = React.memo(({
-  href,
-  children,
-}: CustomLinkProps) => {
-  return (
-    <Link
-      className='flex h-8 w-8 cursor-pointer items-center justify-center transition-opacity duration-200 ease-in-out hover:opacity-80'
-      target='_blank'
-      rel='noopener noreferrer'
-      href={href}
-    >
-      {children}
-    </Link>
-  )
-})
 
 const Footer = () => {
-  const { t } = useTranslation()
-
   return (
     <footer className='relative shrink-0 grow-0 px-12 py-2'>
-      <h3 className='text-gradient text-xl font-semibold leading-tight'>{t('app.join')}</h3>
-      <p className='system-sm-regular mt-1 text-text-tertiary'>{t('app.communityIntro')}</p>
-      <div className='mt-3 flex items-center gap-2'>
-        <CustomLink href='https://github.com/langgenius/dify'>
-          <RiGithubFill className='h-5 w-5 text-text-tertiary' />
-        </CustomLink>
-        <CustomLink href='https://discord.gg/FngNHpbcY7'>
-          <RiDiscordFill className='h-5 w-5 text-text-tertiary' />
-        </CustomLink>
-      </div>
     </footer>
   )
 }

+ 3 - 9
web/app/signin/_header.tsx

@@ -1,11 +1,5 @@
 'use client'
 import React from 'react'
-import { useContext } from 'use-context-selector'
-import LocaleSigninSelect from '@/app/components/base/select/locale-signin'
-import Divider from '@/app/components/base/divider'
-import { languages } from '@/i18n-config/language'
-import type { Locale } from '@/i18n-config'
-import I18n from '@/context/i18n'
 import dynamic from 'next/dynamic'
 import { useGlobalPublicStore } from '@/context/global-public-context'
 
@@ -20,7 +14,6 @@ const ThemeSelector = dynamic(() => import('@/app/components/base/theme-selector
 })
 
 const Header = () => {
-  const { locale, setLocaleOnClient } = useContext(I18n)
   const systemFeatures = useGlobalPublicStore(s => s.systemFeatures)
 
   return (
@@ -33,14 +26,15 @@ const Header = () => {
         />
         : <DifyLogo size='large' />}
       <div className='flex items-center gap-1'>
-        <LocaleSigninSelect
+        {/* zlwu */}
+        {/* <LocaleSigninSelect
           value={locale}
           items={languages.filter(item => item.supported)}
           onChange={(value) => {
             setLocaleOnClient(value as Locale)
           }}
         />
-        <Divider type='vertical' className='mx-0 ml-2 h-4' />
+        <Divider type='vertical' className='mx-0 ml-2 h-4' /> */}
         <ThemeSelector />
       </div>
     </div>

+ 2 - 1
web/app/signin/components/mail-and-password-auth.tsx

@@ -3,6 +3,7 @@ import { useState } from 'react'
 import { useTranslation } from 'react-i18next'
 import { useRouter, useSearchParams } from 'next/navigation'
 import { useContext } from 'use-context-selector'
+import { RiEyeLine, RiEyeOffLine } from '@remixicon/react'
 import Button from '@/app/components/base/button'
 import Toast from '@/app/components/base/toast'
 import { emailRegex } from '@/config'
@@ -155,7 +156,7 @@ export default function MailAndPasswordAuth({ isInvite, isEmailSetup, allowRegis
             variant='ghost'
             onClick={() => setShowPassword(!showPassword)}
           >
-            {showPassword ? '👀' : '😝'}
+            {showPassword ? <RiEyeOffLine className="h-4 w-4" /> : <RiEyeLine className="h-4 w-4" />}
           </Button>
         </div>
       </div>

+ 2 - 1
web/app/signin/layout.tsx

@@ -18,7 +18,8 @@ export default function SignInLayout({ children }: any) {
           </div>
         </div>
         {systemFeatures.branding.enabled === false && <div className='system-xs-regular px-8 py-6 text-text-tertiary'>
-          © {new Date().getFullYear()} LangGenius, Inc. All rights reserved.
+          {/* zlwu */}
+          © {new Date().getFullYear()} 安庆职业技术学院, Inc. All rights reserved.
         </div>}
       </div>
     </div>

+ 2 - 12
web/app/signin/normal-form.tsx

@@ -1,6 +1,5 @@
 import React, { useCallback, useEffect, useState } from 'react'
 import { useTranslation } from 'react-i18next'
-import Link from 'next/link'
 import { useRouter, useSearchParams } from 'next/navigation'
 import { RiContractLine, RiDoorLockLine, RiErrorWarningFill } from '@remixicon/react'
 import Loading from '../components/base/loading'
@@ -12,7 +11,6 @@ import cn from '@/utils/classnames'
 import { invitationCheck } from '@/service/common'
 import { LicenseStatus } from '@/types/feature'
 import Toast from '@/app/components/base/toast'
-import { IS_CE_EDITION } from '@/config'
 import { useGlobalPublicStore } from '@/context/global-public-context'
 
 const NormalForm = () => {
@@ -181,7 +179,7 @@ const NormalForm = () => {
             </div>
           </>}
           {!systemFeatures.branding.enabled && <>
-            <div className="system-xs-regular mt-2 block w-full text-text-tertiary">
+            {/* <div className="system-xs-regular mt-2 block w-full text-text-tertiary">
               {t('login.tosDesc')}
               &nbsp;
               <Link
@@ -195,15 +193,7 @@ const NormalForm = () => {
                 target='_blank' rel='noopener noreferrer'
                 href='https://dify.ai/privacy'
               >{t('login.pp')}</Link>
-            </div>
-            {IS_CE_EDITION && <div className="w-hull system-xs-regular mt-2 block text-text-tertiary">
-              {t('login.goToInit')}
-              &nbsp;
-              <Link
-                className='system-xs-medium text-text-secondary hover:underline'
-                href='/install'
-              >{t('login.setAdminAccount')}</Link>
-            </div>}
+            </div> */}
           </>}
 
         </div>

+ 2 - 1
web/hooks/use-document-title.ts

@@ -15,7 +15,8 @@ export default function useDocumentTitle(title: string) {
       favicon = systemFeatures.branding.favicon
     }
     else {
-      titleStr = `${prefix}Dify`
+      // zlwu
+      titleStr = `${prefix}AI智能体平台`
       favicon = `${basePath}/favicon.ico`
     }
   }

+ 6 - 6
web/i18n/zh-Hans/login.ts

@@ -1,8 +1,8 @@
 const translation = {
-  pageTitle: '嗨,近来可好',
-  welcome: '👋 欢迎来到 Dify, 登录以继续',
-  email: '邮箱',
-  emailPlaceholder: '输入邮箱地址',
+  pageTitle: 'AI智能体平台',
+  welcome: '',
+  email: '账号',
+  emailPlaceholder: '输入账号',
   password: '密码',
   passwordPlaceholder: '输入密码',
   name: '用户名',
@@ -55,8 +55,8 @@ const translation = {
   confirmPasswordPlaceholder: '确认您的新密码',
   passwordChangedTip: '您的密码已成功更改',
   error: {
-    emailEmpty: '邮箱不能为空',
-    emailInValid: '请输入有效的邮箱地址',
+    emailEmpty: '账号不能为空',
+    emailInValid: '请输入有效的账号',
     nameEmpty: '用户名不能为空',
     passwordEmpty: '密码不能为空',
     passwordInvalid: '密码必须包含字母和数字,且长度不小于 8 位',

TEMPAT SAMPAH
web/public/favicon.ico


TEMPAT SAMPAH
web/public/favicon.ico-bak


File diff ditekan karena terlalu besar
+ 3 - 0
web/public/logo/logo-anqing.svg


+ 12 - 0
web/public/logo/logo-bak.svg

@@ -0,0 +1,12 @@
+<svg width="48" height="22" viewBox="0 0 48 22" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="White=False">
+<g id="if">
+<path d="M21.2002 3.73454C22.5633 3.73454 23.0666 2.89917 23.0666 1.86812C23.0666 0.837081 22.5623 0.00170898 21.2002 0.00170898C19.838 0.00170898 19.3337 0.837081 19.3337 1.86812C19.3337 2.89917 19.838 3.73454 21.2002 3.73454Z" fill="#0033FF"/>
+<path d="M27.7336 4.13435V5.33473H24.6668V8.00171H27.7336V14.6687H22.6668V5.33567H15.9998V8.00265H19.7336V14.6696H15.3337V17.3366H35.3337V14.6696H30.6668V8.00265H35.3337V5.33567H30.6668V2.66869H35.3337V0.00170898H31.8671C29.5877 0.00170898 27.7336 1.8559 27.7336 4.13529V4.13435Z" fill="#0033FF"/>
+</g>
+<g id="Dy">
+<path d="M5.66698 0.000940576H0V17.334H5.66698C12.667 17.334 14.667 13.334 14.667 8.66698C14.667 4 12.667 0 5.66698 0V0.000940576ZM5.73377 14.6679H3.20038V2.66792H5.73377C9.75823 2.66792 11.4666 4.64346 11.4666 8.66792C11.4666 12.6924 9.75823 14.6679 5.73377 14.6679Z" fill="black"/>
+<path d="M44.8335 5.3349L42.1665 14.0019L39.4995 5.3349H36.333L40.2013 16.5466C40.604 17.714 39.9229 18.6679 38.6886 18.6679H37.333V21.3349H39.3255C41.063 21.3349 42.6265 20.2361 43.2145 18.6011L48 5.3349H44.8335Z" fill="black"/>
+</g>
+</g>
+</svg>

File diff ditekan karena terlalu besar
+ 3 - 11
web/public/logo/logo.svg


Beberapa file tidak ditampilkan karena terlalu banyak file yang berubah dalam diff ini