From 2a97d88ad05e38aea4caf6cce39d7b030bf211e8 Mon Sep 17 00:00:00 2001 From: qingguo Date: Fri, 16 May 2025 15:12:44 +0800 Subject: [PATCH] Fix legacy prefix bug --- web/app/components/base/logo/dify-logo.tsx | 4 ++-- .../nodes/_base/components/editor/code-editor/index.tsx | 3 ++- web/app/install/installForm.tsx | 5 ++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/web/app/components/base/logo/dify-logo.tsx b/web/app/components/base/logo/dify-logo.tsx index ce59ba7900..973f1fcc5d 100644 --- a/web/app/components/base/logo/dify-logo.tsx +++ b/web/app/components/base/logo/dify-logo.tsx @@ -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 = ({ return ( Dify logo diff --git a/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx b/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx index a185f16e2e..1e195c5d40 100644 --- a/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx +++ b/web/app/components/workflow/nodes/_base/components/editor/code-editor/index.tsx @@ -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 diff --git a/web/app/install/installForm.tsx b/web/app/install/installForm.tsx index 99f2ec6b77..b0ae436005 100644 --- a/web/app/install/installForm.tsx +++ b/web/app/install/installForm.tsx @@ -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)