Fix legacy prefix bug

pull/19807/head
qingguo 1 year ago
parent 496300996c
commit 2a97d88ad0

@ -1,8 +1,8 @@
'use client'
import type { FC } from 'react'
import { WEB_PREFIX } from '@/config'
import classNames from '@/utils/classnames'
import useTheme from '@/hooks/use-theme'
import {basePath} from '@/utils/var';
export type LogoStyle = 'default' | 'monochromeWhite'
@ -35,7 +35,7 @@ const DifyLogo: FC<DifyLogoProps> = ({
return (
<img
src={`${WEB_PREFIX}${logoPathMap[themedStyle]}`}
src={`${basePath}${logoPathMap[themedStyle]}`}
className={classNames('block object-contain', logoSizeMap[size], className)}
alt='Dify logo'
/>

@ -12,9 +12,10 @@ import { Theme } from '@/types/app'
import useTheme from '@/hooks/use-theme'
import './style.css'
import { noop } from 'lodash-es'
import { basePath } from '@/utils/var'
// load file from local instead of cdn https://github.com/suren-atoyan/monaco-react/issues/482
loader.config({ paths: { vs: '/vs' } })
loader.config({ paths: { vs: `${basePath}/vs` } })
const CODE_EDITOR_LINE_HEIGHT = 18

@ -16,7 +16,6 @@ import Button from '@/app/components/base/button'
import { fetchInitValidateStatus, fetchSetupStatus, setup } from '@/service/common'
import type { InitValidateStatusResponse, SetupStatusResponse } from '@/models/common'
import { basePath } from '@/utils/var'
const validPassword = /^(?=.*[a-zA-Z])(?=.*\d).{8,}$/
@ -81,12 +80,12 @@ const InstallForm = () => {
fetchSetupStatus().then((res: SetupStatusResponse) => {
if (res.step === 'finished') {
localStorage.setItem('setup_status', 'finished')
router.push(`${basePath}/signin`)
router.push(`/signin`)
}
else {
fetchInitValidateStatus().then((res: InitValidateStatusResponse) => {
if (res.status === 'not_started')
router.push(`${basePath}/init`)
router.push(`/init`)
})
}
setLoading(false)

Loading…
Cancel
Save