diff --git a/web/app/(commonLayout)/layout.tsx b/web/app/(commonLayout)/layout.tsx
index ceeb164315..78c26803a0 100644
--- a/web/app/(commonLayout)/layout.tsx
+++ b/web/app/(commonLayout)/layout.tsx
@@ -8,6 +8,7 @@ import Header from '@/app/components/header'
import { EventEmitterContextProvider } from '@/context/event-emitter'
import { ProviderContextProvider } from '@/context/provider-context'
import { ModalContextProvider } from '@/context/modal-context'
+import LicenseInfo from '@/app/components/system-features-initor/license-info'
const Layout = ({ children }: { children: ReactNode }) => {
return (
@@ -22,6 +23,7 @@ const Layout = ({ children }: { children: ReactNode }) => {
{children}
+
diff --git a/web/app/components/system-features-initor/index.tsx b/web/app/components/system-features-initor/index.tsx
new file mode 100644
index 0000000000..3a0cfeb930
--- /dev/null
+++ b/web/app/components/system-features-initor/index.tsx
@@ -0,0 +1,25 @@
+'use client'
+import {
+ useEffect,
+ useState,
+} from 'react'
+import { useSystemFeaturesStore } from './store'
+import { getSystemFeatures } from '@/service/common'
+
+const SystemFeaturesInitor = ({
+ children,
+}: { children: React.ReactElement }) => {
+ const [init, setInit] = useState(false)
+ const { setSystemFeatures } = useSystemFeaturesStore()
+
+ useEffect(() => {
+ getSystemFeatures().then((res) => {
+ setSystemFeatures(res)
+ }).finally(() => {
+ setInit(true)
+ })
+ }, [])
+ return init ? children : null
+}
+
+export default SystemFeaturesInitor
diff --git a/web/app/components/system-features-initor/license-info/index.tsx b/web/app/components/system-features-initor/license-info/index.tsx
new file mode 100644
index 0000000000..fb74ffc8e0
--- /dev/null
+++ b/web/app/components/system-features-initor/license-info/index.tsx
@@ -0,0 +1,27 @@
+'use client'
+import cn from 'classnames'
+import { useSystemFeaturesStore } from '../store'
+import s from './styles.module.css'
+
+const LicenseInfo = () => {
+ const { systemFeatures } = useSystemFeaturesStore()
+
+ if (!systemFeatures.expired_at) {
+ return (
+
+
+
+ Your organization's Dify Enterprise license has expired.
+
+
+ Please contact your administrator to continue using Dify.
+
+
+
+ )
+ }
+
+ return null
+}
+
+export default LicenseInfo
\ No newline at end of file
diff --git a/web/app/components/system-features-initor/license-info/styles.module.css b/web/app/components/system-features-initor/license-info/styles.module.css
new file mode 100644
index 0000000000..37bed5742f
--- /dev/null
+++ b/web/app/components/system-features-initor/license-info/styles.module.css
@@ -0,0 +1,4 @@
+.bg {
+ background-image: url(../../../signin/assets/background.png);
+ background-size: cover;
+}
\ No newline at end of file
diff --git a/web/app/components/system-features-initor/store.tsx b/web/app/components/system-features-initor/store.tsx
new file mode 100644
index 0000000000..ebf27059de
--- /dev/null
+++ b/web/app/components/system-features-initor/store.tsx
@@ -0,0 +1,18 @@
+import { create } from 'zustand'
+import type { SystemFeatures } from '@/types/feature'
+
+type StateAndAction = {
+ systemFeatures: SystemFeatures
+ setSystemFeatures: (features: SystemFeatures) => void
+}
+
+export const useSystemFeaturesStore = create(set => ({
+ systemFeatures: {
+ sso_enforced_for_signin: false,
+ sso_enforced_for_signin_protocol: '',
+ sso_enforced_for_web: false,
+ sso_enforced_for_web_protocol: '',
+ expired_at: 11,
+ },
+ setSystemFeatures: features => set({ systemFeatures: features }),
+}))
diff --git a/web/app/layout.tsx b/web/app/layout.tsx
index fedf66045a..3b1982637e 100644
--- a/web/app/layout.tsx
+++ b/web/app/layout.tsx
@@ -3,6 +3,7 @@ import I18nServer from './components/i18n-server'
import BrowerInitor from './components/browser-initor'
import SentryInitor from './components/sentry-initor'
import Topbar from './components/base/topbar'
+import SystemFeaturesInitor from './components/system-features-initor'
import { getLocaleOnServer } from '@/i18n/server'
import './styles/globals.css'
import './styles/markdown.scss'
@@ -47,7 +48,9 @@ const LocaleLayout = ({
- {children}
+
+ {children}
+