Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change name #3

Open
wants to merge 6 commits into
base: modify-ui
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const AppDetailLayout: FC<IAppDetailLayoutProps> = (props) => {

useEffect(() => {
if (appDetail) {
document.title = `${(appDetail.name || 'App')} - Dify`
document.title = `${(appDetail.name || 'App')} - AiInOne`
const localeMode = localStorage.getItem('app-detail-collapse-or-expand') || 'expand'
const mode = isMobile ? 'collapse' : 'expand'
setAppSiderbarExpand(isMobile ? mode : localeMode)
Expand Down
2 changes: 1 addition & 1 deletion web/app/(commonLayout)/apps/Apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const Apps = () => {
]

useEffect(() => {
document.title = `${t('common.menus.apps')} - Dify`
document.title = `${t('common.menus.apps')} - AiInOne`
if (localStorage.getItem(NEED_REFRESH_APP_LIST_KEY) === '1') {
localStorage.removeItem(NEED_REFRESH_APP_LIST_KEY)
mutate()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import FloatPopoverContainer from '@/app/components/base/float-popover-container
import DatasetDetailContext from '@/context/dataset-detail'
import { DataSourceType } from '@/models/datasets'
import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
import { LanguagesSupported } from '@/i18n/language'
import { useStore } from '@/app/components/app/store'
import { AiText, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'
import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'
Expand Down Expand Up @@ -162,7 +161,7 @@ const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => {
</div>
</div>
<div className='text-xs text-gray-500 mt-2'>{t('common.datasetMenus.emptyTip')}</div>
<a
{/* <a
className='inline-flex items-center text-xs text-primary-600 mt-2 cursor-pointer'
href={
locale === LanguagesSupported[1]
Expand All @@ -173,7 +172,7 @@ const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => {
>
<BookOpenIcon className='mr-1' />
{t('common.datasetMenus.viewDoc')}
</a>
</a> */}
</div>
</FloatPopoverContainer>
)}
Expand Down Expand Up @@ -223,7 +222,7 @@ const DatasetDetailLayout: FC<IAppDetailLayoutProps> = (props) => {

useEffect(() => {
if (datasetRes)
document.title = `${datasetRes.name || 'Dataset'} - Dify`
document.title = `${datasetRes.name || 'Dataset'} - AiInOne`
}, [datasetRes])

const setAppSiderbarExpand = useStore(state => state.setAppSiderbarExpand)
Expand All @@ -241,7 +240,7 @@ const DatasetDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
<div className='grow flex overflow-hidden'>
{!hideSideBar && <AppSideBar
title={datasetRes?.name || '--'}
icon={datasetRes?.icon || 'https://static.dify.ai/images/dataset-default-icon.png'}
icon={datasetRes?.icon || 'https://static.wixstatic.com/media/4741be_2f062f6c8ef74708b64652131fad6f07~mv2.png/v1/fill/w_30,h_34,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/Frame%201597883169.png'}
icon_background={datasetRes?.icon_background || '#F5F5F5'}
desc={datasetRes?.description || '--'}
isExternal={datasetRes?.provider === 'external'}
Expand Down
2 changes: 1 addition & 1 deletion web/app/(commonLayout)/datasets/Datasets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const Datasets = ({

useEffect(() => {
loadingStateRef.current = isLoading
document.title = `${t('dataset.knowledge')} - Dify`
document.title = `${t('dataset.knowledge')} - AiInOne`
}, [isLoading])

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion web/app/(commonLayout)/datasets/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const AppList = async () => {
}

export const metadata = {
title: 'Datasets - Dify',
title: 'Datasets - AiInOne',
}

export default AppList
2 changes: 1 addition & 1 deletion web/app/(commonLayout)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Layout = ({ children }: { children: ReactNode }) => {
}

export const metadata = {
title: 'Dify',
title: 'AiInOne',
}

export default Layout
2 changes: 1 addition & 1 deletion web/app/(commonLayout)/tools/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Layout: FC = () => {

useEffect(() => {
if (typeof window !== 'undefined')
document.title = `${t('tools.title')} - Dify`
document.title = `${t('tools.title')} - AiInOne`
if (isCurrentWorkspaceDatasetOperator)
return router.replace('/datasets')
}, [isCurrentWorkspaceDatasetOperator, router, t])
Expand Down
6 changes: 3 additions & 3 deletions web/app/account/account-page/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ export default function AccountPage() {
<div className='my-1 text-[#D92D20] text-sm leading-5'>
{t('common.account.deleteTip')}
</div>
<div className='mt-3 text-sm leading-5'>
{/* <div className='mt-3 text-sm leading-5'>
<span>{t('common.account.deleteConfirmTip')}</span>
<a
className='text-primary-600 cursor'
Expand All @@ -320,9 +320,9 @@ export default function AccountPage() {
window.location.href = e.currentTarget.href
}}
>
support@dify.ai
support@aiinone.ai
</a>
</div>
</div> */}
<div className='my-2 px-3 py-2 rounded-lg bg-gray-100 text-sm font-medium leading-5 text-gray-800'>{`${t('common.account.delete')}: ${userProfile.email}`}</div>
</>
}
Expand Down
2 changes: 1 addition & 1 deletion web/app/account/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const Layout = ({ children }: { children: ReactNode }) => {
}

export const metadata = {
title: 'Dify',
title: 'AiInOne',
}

export default Layout
5 changes: 2 additions & 3 deletions web/app/activate/activateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useTranslation } from 'react-i18next'
import useSWR from 'swr'
import { useRouter, useSearchParams } from 'next/navigation'
import cn from '@/utils/classnames'
import Button from '@/app/components/base/button'

import { invitationCheck } from '@/service/common'
import Loading from '@/app/components/base/loading'
Expand Down Expand Up @@ -53,11 +52,11 @@ const ActivateForm = () => {
<div className="mb-3 flex justify-center items-center w-20 h-20 p-5 rounded-[20px] border border-gray-100 shadow-lg text-[40px] font-bold">🤷‍♂️</div>
<h2 className="text-[32px] font-bold text-gray-900">{t('login.invalid')}</h2>
</div>
<div className="w-full mx-auto mt-6">
{/* <div className="w-full mx-auto mt-6">
<Button variant='primary' className='w-full !text-sm'>
<a href="https://dify.ai">{t('login.explore')}</a>
</Button>
</div>
</div> */}
</div>
)}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import OperationBtn from '@/app/components/app/configuration/base/operation-btn'
import Panel from '@/app/components/app/configuration/base/feature-panel'
import { MessageClockCircle } from '@/app/components/base/icons/src/vender/solid/general'
import I18n from '@/context/i18n'
import { LanguagesSupported } from '@/i18n/language'

type Props = {
showWarning: boolean
Expand Down Expand Up @@ -42,7 +41,7 @@ const HistoryPanel: FC<Props> = ({
}
noBodySpacing
>
{showWarning && (
{/* {showWarning && (
<div className='flex justify-between py-2 px-3 rounded-b-xl bg-[#FFFAEB] text-xs text-gray-700'>
<div>{t('appDebug.feature.conversationHistory.tip')}
<a href={`${locale === LanguagesSupported[1]
Expand All @@ -53,7 +52,7 @@ const HistoryPanel: FC<Props> = ({
</a>
</div>
</div>
)}
)} */}
</Panel>
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { useMount } from 'ahooks'
import { useTranslation } from 'react-i18next'
import { isEqual } from 'lodash-es'
import { RiCloseLine } from '@remixicon/react'
import { BookOpenIcon } from '@heroicons/react/24/outline'
import { ApiConnectionMod } from '@/app/components/base/icons/src/vender/solid/development'
import cn from '@/utils/classnames'
import IndexMethodRadio from '@/app/components/datasets/settings/index-method-radio'
Expand Down Expand Up @@ -224,10 +223,10 @@ const SettingsModal: FC<SettingsModalProps> = ({
className='resize-none'
placeholder={t('datasetSettings.form.descPlaceholder') || ''}
/>
<a className='mt-2 flex items-center h-[18px] px-3 text-xs text-gray-500' href="https://docs.dify.ai/features/datasets#how-to-write-a-good-dataset-description" target='_blank' rel='noopener noreferrer'>
{/* <a className='mt-2 flex items-center h-[18px] px-3 text-xs text-gray-500' href="https://docs.dify.ai/features/datasets#how-to-write-a-good-dataset-description" target='_blank' rel='noopener noreferrer'>
<BookOpenIcon className='w-3 h-[18px] mr-1' />
{t('datasetSettings.form.descWrite')}
</a>
</a> */}
</div>
</div>
<div className={rowClass}>
Expand Down Expand Up @@ -332,10 +331,10 @@ const SettingsModal: FC<SettingsModalProps> = ({
<div className={cn(labelClass, 'w-auto min-w-[168px]')}>
<div>
<div className='text-text-secondary system-sm-semibold'>{t('datasetSettings.form.retrievalSetting.title')}</div>
<div className='leading-[18px] text-xs font-normal text-gray-500'>
{/* <div className='leading-[18px] text-xs font-normal text-gray-500'>
<a target='_blank' rel='noopener noreferrer' href='https://docs.dify.ai/guides/knowledge-base/create-knowledge-and-upload-documents#id-4-retrieval-settings' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a>
{t('datasetSettings.form.retrievalSetting.description')}
</div>
</div> */}
</div>
</div>
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import React from 'react'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
import I18n from '@/context/i18n'
import { LanguagesSupported } from '@/i18n/language'
type Props = {
onReturnToSimpleMode: () => void
}
Expand All @@ -23,13 +22,13 @@ const AdvancedModeWarning: FC<Props> = ({
<div className='flex justify-between items-center'>
<div className='text-xs leading-[18px] '>
<span className='text-gray-700'>{t('appDebug.promptMode.advancedWarning.description')}</span>
<a
{/* <a
className='font-medium text-[#155EEF]'
href={`https://docs.dify.ai/${locale === LanguagesSupported[1] ? 'v/zh-hans/guides/application-design/prompt-engineering' : 'features/prompt-engineering'}`}
target='_blank' rel='noopener noreferrer'
>
{t('appDebug.promptMode.advancedWarning.learnMore')}
</a>
</a> */}
</div>

<div className='flex items-center space-x-1'>
Expand Down
4 changes: 2 additions & 2 deletions web/app/components/app/overview/apikey-info-panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const APIKeyInfoPanel: FC = () => {
<div className='text-sm font-medium'>{t('appOverview.apiKeyInfo.setAPIBtn')}</div>
<LinkExternal02 className='w-4 h-4' />
</Button>
{!isCloud && (
{/* {!isCloud && (
<a
className='mt-2 flex items-center h-[26px] text-xs font-medium text-[#155EEF] p-1 space-x-1'
href='https://cloud.dify.ai/apps'
Expand All @@ -61,7 +61,7 @@ const APIKeyInfoPanel: FC = () => {
<div>{t('appOverview.apiKeyInfo.tryCloud')}</div>
<LinkExternal02 className='w-3 h-3' />
</a>
)}
)} */}
<div
onClick={() => setIsShow(false)}
className='absolute right-4 top-4 flex items-center justify-center w-8 h-8 cursor-pointer '>
Expand Down
8 changes: 3 additions & 5 deletions web/app/components/app/overview/customize/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
'use client'
import type { FC } from 'react'
import React from 'react'
import { ArrowTopRightOnSquareIcon } from '@heroicons/react/24/outline'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
import type { AppMode } from '@/types/app'
import I18n from '@/context/i18n'
import Button from '@/app/components/base/button'
import Modal from '@/app/components/base/modal'
import Tag from '@/app/components/base/tag'
import { LanguagesSupported } from '@/i18n/language'

type IShareLinkProps = {
isShow: boolean
Expand Down Expand Up @@ -87,7 +85,7 @@ const CustomizeModal: FC<IShareLinkProps> = ({
<div className='text-gray-500 text-xs mt-1 mb-2'>{t(`${prefixCustomize}.way1.step3Tip`)}</div>
<pre className='overflow-x-scroll box-border py-3 px-4 bg-gray-100 text-xs font-medium rounded-lg select-text'>
NEXT_PUBLIC_APP_ID={`'${appId}'`} <br />
NEXT_PUBLIC_APP_KEY={'\'<Web API Key From Dify>\''} <br />
NEXT_PUBLIC_APP_KEY={'\'<Web API Key From AiInOne>\''} <br />
NEXT_PUBLIC_API_URL={`'${api_base_url}'`}
</pre>
</div>
Expand All @@ -97,7 +95,7 @@ const CustomizeModal: FC<IShareLinkProps> = ({
<div className='w-full mt-4 px-6 py-5 border-gray-200 rounded-lg border-[0.5px]'>
<Tag bordered={true} hideBg={true} className='text-primary-600 border-primary-600 uppercase'>{t(`${prefixCustomize}.way`)} 2</Tag>
<p className='mt-2 text-base font-medium text-gray-800'>{t(`${prefixCustomize}.way2.name`)}</p>
<Button
{/* <Button
className='mt-2'
onClick={() =>
window.open(
Expand All @@ -111,7 +109,7 @@ const CustomizeModal: FC<IShareLinkProps> = ({
>
<span className='text-sm text-gray-800'>{t(`${prefixCustomize}.way2.operation`)}</span>
<ArrowTopRightOnSquareIcon className='w-4 h-4 ml-1 text-gray-800 shrink-0' />
</Button>
</Button> */}
</div>
</Modal>
}
Expand Down
2 changes: 1 addition & 1 deletion web/app/components/app/overview/embedded/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const Embedded = ({ siteInfo, isShow, onClose, appBaseUrl, accessToken, classNam
<div className={cn('gap-2 py-3 justify-center items-center inline-flex w-full rounded-lg',
'bg-primary-600 hover:bg-primary-600/75 hover:shadow-md cursor-pointer text-white hover:shadow-sm flex-shrink-0')}>
<div className={`w-4 h-4 relative ${style.pluginInstallIcon}`}></div>
<div className="text-white text-sm font-medium font-['Inter'] leading-tight" onClick={navigateToChromeUrl}>{t(`${prefixEmbedded}.chromePlugin`)}</div>
{/* <div className="text-white text-sm font-medium font-['Inter'] leading-tight" onClick={navigateToChromeUrl}>{t(`${prefixEmbedded}.chromePlugin`)}</div> */}
</div>
</div>
)}
Expand Down
7 changes: 3 additions & 4 deletions web/app/components/app/overview/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
import type { FC } from 'react'
import React, { useEffect, useState } from 'react'
import { ChevronRightIcon } from '@heroicons/react/20/solid'
import Link from 'next/link'
import { Trans, useTranslation } from 'react-i18next'
import { useTranslation } from 'react-i18next'
import { useContextSelector } from 'use-context-selector'
import s from './style.module.css'
import Modal from '@/app/components/base/modal'
Expand Down Expand Up @@ -297,12 +296,12 @@ const SettingsModal: FC<ISettingsModalProps> = ({
placeholder={t(`${prefixSettings}.more.copyRightPlaceholder`) as string}
/>
<div className={`mt-8 font-medium ${s.settingTitle} text-gray-900`}>{t(`${prefixSettings}.more.privacyPolicy`)}</div>
<p className={`mt-1 ${s.settingsTip} text-gray-500`}>
{/* <p className={`mt-1 ${s.settingsTip} text-gray-500`}>
<Trans
i18nKey={`${prefixSettings}.more.privacyPolicyTip`}
components={{ privacyPolicyLink: <Link href={'https://docs.dify.ai/user-agreement/privacy-policy'} target='_blank' rel='noopener noreferrer' className='text-primary-600' /> }}
/>
</p>
</p> */}
<Input
className='mt-2 h-10'
value={inputInfo.privacyPolicy}
Expand Down
2 changes: 1 addition & 1 deletion web/app/components/base/chat/chat-with-history/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ChatWithHistory: FC<ChatWithHistoryProps> = ({
if (customConfig)
document.title = `${site.title}`
else
document.title = `${site.title} - Powered by Dify`
document.title = `${site.title} - Powered by AiInOne`
}
}, [site, customConfig, themeBuilder])

Expand Down
2 changes: 1 addition & 1 deletion web/app/components/base/chat/embedded-chatbot/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Chatbot = () => {
if (customConfig)
document.title = `${site.title}`
else
document.title = `${site.title} - Powered by Dify`
document.title = `${site.title} - Powered by AiInOne`
}
}, [site, customConfig, themeBuilder])

Expand Down
5 changes: 2 additions & 3 deletions web/app/components/base/features/new-feature-panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import AnnotationReply from '@/app/components/base/features/new-feature-panel/an
import type { PromptVariable } from '@/models/debug'
import type { InputVar } from '@/app/components/workflow/types'
import I18n from '@/context/i18n'
import { LanguagesSupported } from '@/i18n/language'

type Props = {
show: boolean
Expand Down Expand Up @@ -78,11 +77,11 @@ const NewFeaturePanel = ({
</div>
<div className='p-1 text-text-primary system-xs-medium'>
<span>{isChatMode ? t('workflow.common.fileUploadTip') : t('workflow.common.ImageUploadLegacyTip')}</span>
<a
{/* <a
className='text-text-accent'
href={`https://docs.dify.ai/${locale === LanguagesSupported[1] ? 'v/zh-hans/' : ''}guides/workflow/bulletin`}
target='_blank' rel='noopener noreferrer'
>{t('workflow.common.featuresDocLink')}</a>
>{t('workflow.common.featuresDocLink')}</a> */}
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions web/app/components/billing/pricing/plan-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from 'react'
import { useTranslation } from 'react-i18next'
import { useContext } from 'use-context-selector'
import { Plan } from '../type'
import { ALL_PLANS, NUM_INFINITE, contactSalesUrl, contractSales, unAvailable } from '../config'
import { ALL_PLANS, NUM_INFINITE, contractSales, unAvailable } from '../config'
import Toast from '../../base/toast'
import Tooltip from '../../base/tooltip'
import { PlanRange } from './select-plan-range'
Expand Down Expand Up @@ -188,7 +188,7 @@ const PlanItem: FC<Props> = ({
return

if (isEnterprisePlan) {
window.location.href = contactSalesUrl
// window.location.href = contactSalesUrl
return
}
// Only workspace manager can buy plan
Expand Down
Loading