diff --git a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx index a6fb116fa8..e429dc4796 100644 --- a/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx +++ b/web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout.tsx @@ -31,6 +31,7 @@ import { getLocaleOnClient } from '@/i18n' import { useAppContext } from '@/context/app-context' import Tooltip from '@/app/components/base/tooltip' import LinkedAppsPanel from '@/app/components/base/linked-apps-panel' +import useDocumentTitle from '@/hooks/use-document-title' export type IAppDetailLayoutProps = { children: React.ReactNode @@ -186,11 +187,7 @@ const DatasetDetailLayout: FC = (props) => { } return baseNavigation }, [datasetRes?.provider, datasetId, t]) - - useEffect(() => { - if (datasetRes) - document.title = `${datasetRes.name || 'Dataset'} - Dify` - }, [datasetRes]) + useDocumentTitle(`${datasetRes?.name || 'Dataset'}`) const setAppSiderbarExpand = useStore(state => state.setAppSiderbarExpand) diff --git a/web/app/components/app/overview/settings/index.tsx b/web/app/components/app/overview/settings/index.tsx index 1fb054ad75..1615173578 100644 --- a/web/app/components/app/overview/settings/index.tsx +++ b/web/app/components/app/overview/settings/index.tsx @@ -29,6 +29,8 @@ import AppIconPicker from '@/app/components/base/app-icon-picker' import I18n from '@/context/i18n' import cn from '@/utils/classnames' import { useGlobalPublicStore } from '@/context/global-public-context' +import { IS_CE_EDITION } from '@/config' +import { LicenseStatus } from '@/types/feature' export type ISettingsModalProps = { isChat: boolean @@ -178,7 +180,7 @@ const SettingsModal: FC = ({ chat_color_theme: inputInfo.chatColorTheme, chat_color_theme_inverted: inputInfo.chatColorThemeInverted, prompt_public: false, - copyright: isFreePlan + copyright: IS_CE_EDITION ? '' : inputInfo.copyrightSwitchValue ? inputInfo.copyright @@ -381,14 +383,14 @@ const SettingsModal: FC = ({ )} {t(`${prefixSettings}.more.copyrightTooltip`)} } asChild={false} > setInputInfo({ ...inputInfo, copyrightSwitchValue: v })} />