diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx index 8e3d8f9ec6..571b4fd3a6 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/config-popup.tsx @@ -11,6 +11,8 @@ import ProviderConfigModal from './provider-config-modal' import Indicator from '@/app/components/header/indicator' import Switch from '@/app/components/base/switch' import Tooltip from '@/app/components/base/tooltip' +import Divider from '@/app/components/base/divider' +import cn from '@/utils/classnames' const I18N_PREFIX = 'app.tracing' @@ -77,7 +79,6 @@ const ConfigPopup: FC = ({ className='ml-3' defaultValue={enabled} onChange={onStatusChange} - size='l' disabled={providerAllNotConfigured} /> ) @@ -106,15 +107,15 @@ const ConfigPopup: FC = ({ ) return ( -
+
-
{t(`${I18N_PREFIX}.tracing`)}
+
{t(`${I18N_PREFIX}.tracing`)}
-
+
{t(`${I18N_PREFIX}.${enabled ? 'enabled' : 'disabled'}`)}
{!readOnly && ( @@ -130,19 +131,18 @@ const ConfigPopup: FC = ({ : switchContent} )} -
-
+
{t(`${I18N_PREFIX}.tracingDescription`)}
-
-
+ +
{(providerAllConfigured || providerAllNotConfigured) ? ( <> -
{t(`${I18N_PREFIX}.configProviderTitle.${providerAllConfigured ? 'configured' : 'notConfigured'}`)}
+
{t(`${I18N_PREFIX}.configProviderTitle.${providerAllConfigured ? 'configured' : 'notConfigured'}`)}
{langSmithPanel} {langfusePanel} @@ -151,11 +151,11 @@ const ConfigPopup: FC = ({ ) : ( <> -
{t(`${I18N_PREFIX}.configProviderTitle.configured`)}
+
{t(`${I18N_PREFIX}.configProviderTitle.configured`)}
{langSmithConfig ? langSmithPanel : langfusePanel}
-
{t(`${I18N_PREFIX}.configProviderTitle.moreProvider`)}
+
{t(`${I18N_PREFIX}.configProviderTitle.moreProvider`)}
{!langSmithConfig ? langSmithPanel : langfusePanel}
diff --git a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/field.tsx b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/field.tsx index 917df92451..84c48a6dde 100644 --- a/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/field.tsx +++ b/web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/tracing/field.tsx @@ -4,7 +4,7 @@ import React from 'react' import cn from '@/utils/classnames' import Input from '@/app/components/base/input' -interface Props { +type Props = { className?: string label: string labelClassName?: string @@ -26,7 +26,7 @@ const Field: FC = ({ return (
-
{label}
+
{label}
{isRequired && *}
= ({ ? ( -
-
+
+
-
{t(`${I18N_PREFIX}.title`)}{t(`app.tracing.${type}.title`)}
+
{t(`${I18N_PREFIX}.title`)}{t(`app.tracing.${type}.title`)}
@@ -230,16 +231,16 @@ const ProviderConfigModal: FC = ({ {isEdit && ( <> -
+ )}
-
-
- +
+
+ {t('common.modelProvider.encrypted.front')} = ({ }, [hasConfigured, isChosen, onChoose, readOnly]) return (
- {isChosen &&
{t(`${I18N_PREFIX}.inUse`)}
} + {isChosen &&
{t(`${I18N_PREFIX}.inUse`)}
}
{!readOnly && (
{hasConfigured && ( -
+
{t(`${I18N_PREFIX}.view`)}
)}
- +
{t(`${I18N_PREFIX}.config`)}
)} -
-
+
{t(`${I18N_PREFIX}.${type}.description`)}
diff --git a/web/app/components/base/switch/index.tsx b/web/app/components/base/switch/index.tsx index fd3e5ef4e7..48e5c0cd8c 100644 --- a/web/app/components/base/switch/index.tsx +++ b/web/app/components/base/switch/index.tsx @@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react' import { Switch as OriginalSwitch } from '@headlessui/react' import classNames from '@/utils/classnames' -interface SwitchProps { +type SwitchProps = { onChange?: (value: boolean) => void size?: 'sm' | 'md' | 'lg' | 'l' defaultValue?: boolean diff --git a/web/context/app-context.tsx b/web/context/app-context.tsx index 7addfb83d4..25a313a76b 100644 --- a/web/context/app-context.tsx +++ b/web/context/app-context.tsx @@ -127,7 +127,7 @@ export const AppContextProvider: FC = ({ children }) => setCurrentWorkspace(currentWorkspaceResponse) }, [currentWorkspaceResponse]) - const [theme, setTheme] = useState(Theme.light) + const [theme, setTheme] = useState(Theme.dark) const handleSetTheme = useCallback((theme: Theme) => { setTheme(theme) globalThis.document.documentElement.setAttribute('data-theme', theme)