Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: app name can be empty in settings modal (#2761)

Vikey Chen88145efa97eb
diff --git a/web/app/components/app/overview/settings/index.tsx b/web/app/components/app/overview/settings/index.tsx
index 026ba6ae104..df0f3a0062c 100644
--- a/web/app/components/app/overview/settings/index.tsx
+++ b/web/app/components/app/overview/settings/index.tsx
@@ -12,6 +12,7 @@ import { SimpleSelect } from '@/app/components/base/select'
import type { AppDetailResponse } from '@/models/app'
import type { Language } from '@/types/app'
import EmojiPicker from '@/app/components/base/emoji-picker'
+import { useToastContext } from '@/app/components/base/toast'
import { languages } from '@/i18n/language'
@@ -42,6 +43,7 @@ const SettingsModal: FC<ISettingsModalProps> = ({
onClose,
onSave,
}) => {
+ const { notify } = useToastContext()
const [isShowMore, setIsShowMore] = useState(false)
const { icon, icon_background } = appInfo
const { title, description, copyright, privacy_policy, default_language } = appInfo.site
@@ -67,6 +69,10 @@ const SettingsModal: FC<ISettingsModalProps> = ({
}
const onClickSave = async () => {
+ if (!inputInfo.title) {
+ notify({ type: 'error', message: t('app.newApp.nameNotEmpty') })
+ return
+ }
setSaveLoading(true)
const params = {
title: inputInfo.title,