mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-13 03:49:02 +08:00
Feat: Add Top bar while routing different different pages (#2298)
This commit is contained in:
parent
c0a4fd145c
commit
0a4dfaeaf9
16
web/app/components/base/topbar/index.tsx
Normal file
16
web/app/components/base/topbar/index.tsx
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { AppProgressBar as ProgressBar } from 'next-nprogress-bar'
|
||||||
|
|
||||||
|
const Topbar = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ProgressBar
|
||||||
|
height='2px'
|
||||||
|
color="#1C64F2FF"
|
||||||
|
options={{ showSpinner: false }}
|
||||||
|
shallowRouting />
|
||||||
|
</>)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Topbar
|
@ -2,8 +2,8 @@ import type { Viewport } from 'next'
|
|||||||
import I18nServer from './components/i18n-server'
|
import I18nServer from './components/i18n-server'
|
||||||
import BrowerInitor from './components/browser-initor'
|
import BrowerInitor from './components/browser-initor'
|
||||||
import SentryInitor from './components/sentry-initor'
|
import SentryInitor from './components/sentry-initor'
|
||||||
|
import Topbar from './components/base/topbar'
|
||||||
import { getLocaleOnServer } from '@/i18n/server'
|
import { getLocaleOnServer } from '@/i18n/server'
|
||||||
|
|
||||||
import './styles/globals.css'
|
import './styles/globals.css'
|
||||||
import './styles/markdown.scss'
|
import './styles/markdown.scss'
|
||||||
|
|
||||||
@ -43,6 +43,7 @@ const LocaleLayout = ({
|
|||||||
data-public-maintenance-notice={process.env.NEXT_PUBLIC_MAINTENANCE_NOTICE}
|
data-public-maintenance-notice={process.env.NEXT_PUBLIC_MAINTENANCE_NOTICE}
|
||||||
data-public-site-about={process.env.NEXT_PUBLIC_SITE_ABOUT}
|
data-public-site-about={process.env.NEXT_PUBLIC_SITE_ABOUT}
|
||||||
>
|
>
|
||||||
|
<Topbar/>
|
||||||
<BrowerInitor>
|
<BrowerInitor>
|
||||||
<SentryInitor>
|
<SentryInitor>
|
||||||
{/* @ts-expect-error Async Server Component */}
|
{/* @ts-expect-error Async Server Component */}
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
"mermaid": "10.4.0",
|
"mermaid": "10.4.0",
|
||||||
"negotiator": "^0.6.3",
|
"negotiator": "^0.6.3",
|
||||||
"next": "^14.0.4",
|
"next": "^14.0.4",
|
||||||
|
"next-nprogress-bar": "^2.1.2",
|
||||||
"qrcode.react": "^3.1.0",
|
"qrcode.react": "^3.1.0",
|
||||||
"qs": "^6.11.1",
|
"qs": "^6.11.1",
|
||||||
"rc-textarea": "^1.5.2",
|
"rc-textarea": "^1.5.2",
|
||||||
|
1467
web/yarn.lock
1467
web/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user