mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-15 04:26:02 +08:00
fix: show copyright in webapp
This commit is contained in:
parent
7da45ba589
commit
54634f26d2
@ -31,6 +31,7 @@ import { getLocaleOnClient } from '@/i18n'
|
|||||||
import { useAppContext } from '@/context/app-context'
|
import { useAppContext } from '@/context/app-context'
|
||||||
import Tooltip from '@/app/components/base/tooltip'
|
import Tooltip from '@/app/components/base/tooltip'
|
||||||
import LinkedAppsPanel from '@/app/components/base/linked-apps-panel'
|
import LinkedAppsPanel from '@/app/components/base/linked-apps-panel'
|
||||||
|
import useDocumentTitle from '@/hooks/use-document-title'
|
||||||
|
|
||||||
export type IAppDetailLayoutProps = {
|
export type IAppDetailLayoutProps = {
|
||||||
children: React.ReactNode
|
children: React.ReactNode
|
||||||
@ -186,11 +187,7 @@ const DatasetDetailLayout: FC<IAppDetailLayoutProps> = (props) => {
|
|||||||
}
|
}
|
||||||
return baseNavigation
|
return baseNavigation
|
||||||
}, [datasetRes?.provider, datasetId, t])
|
}, [datasetRes?.provider, datasetId, t])
|
||||||
|
useDocumentTitle(`${datasetRes?.name || 'Dataset'}`)
|
||||||
useEffect(() => {
|
|
||||||
if (datasetRes)
|
|
||||||
document.title = `${datasetRes.name || 'Dataset'} - Dify`
|
|
||||||
}, [datasetRes])
|
|
||||||
|
|
||||||
const setAppSiderbarExpand = useStore(state => state.setAppSiderbarExpand)
|
const setAppSiderbarExpand = useStore(state => state.setAppSiderbarExpand)
|
||||||
|
|
||||||
|
@ -29,6 +29,8 @@ import AppIconPicker from '@/app/components/base/app-icon-picker'
|
|||||||
import I18n from '@/context/i18n'
|
import I18n from '@/context/i18n'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
import { useGlobalPublicStore } from '@/context/global-public-context'
|
import { useGlobalPublicStore } from '@/context/global-public-context'
|
||||||
|
import { IS_CE_EDITION } from '@/config'
|
||||||
|
import { LicenseStatus } from '@/types/feature'
|
||||||
|
|
||||||
export type ISettingsModalProps = {
|
export type ISettingsModalProps = {
|
||||||
isChat: boolean
|
isChat: boolean
|
||||||
@ -178,7 +180,7 @@ const SettingsModal: FC<ISettingsModalProps> = ({
|
|||||||
chat_color_theme: inputInfo.chatColorTheme,
|
chat_color_theme: inputInfo.chatColorTheme,
|
||||||
chat_color_theme_inverted: inputInfo.chatColorThemeInverted,
|
chat_color_theme_inverted: inputInfo.chatColorThemeInverted,
|
||||||
prompt_public: false,
|
prompt_public: false,
|
||||||
copyright: isFreePlan
|
copyright: IS_CE_EDITION
|
||||||
? ''
|
? ''
|
||||||
: inputInfo.copyrightSwitchValue
|
: inputInfo.copyrightSwitchValue
|
||||||
? inputInfo.copyright
|
? inputInfo.copyright
|
||||||
@ -381,14 +383,14 @@ const SettingsModal: FC<ISettingsModalProps> = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
disabled={!isFreePlan}
|
disabled={systemFeatures.license.status !== LicenseStatus.NONE}
|
||||||
popupContent={
|
popupContent={
|
||||||
<div className='w-[260px]'>{t(`${prefixSettings}.more.copyrightTooltip`)}</div>
|
<div className='w-[260px]'>{t(`${prefixSettings}.more.copyrightTooltip`)}</div>
|
||||||
}
|
}
|
||||||
asChild={false}
|
asChild={false}
|
||||||
>
|
>
|
||||||
<Switch
|
<Switch
|
||||||
disabled={isFreePlan}
|
disabled={IS_CE_EDITION}
|
||||||
defaultValue={inputInfo.copyrightSwitchValue}
|
defaultValue={inputInfo.copyrightSwitchValue}
|
||||||
onChange={v => setInputInfo({ ...inputInfo, copyrightSwitchValue: v })}
|
onChange={v => setInputInfo({ ...inputInfo, copyrightSwitchValue: v })}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user