mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
refactor: rename ACCOUNT_SETTING_TAB.PROVIDER to MODEL_PROVIDER
Rename the constant for clarity and consistency with the new sandbox-provider tab naming convention. Update all references across the codebase to use the new constant name.
This commit is contained in:
@ -2,7 +2,7 @@ export const ACCOUNT_SETTING_MODAL_ACTION = 'showSettings'
|
||||
|
||||
export const ACCOUNT_SETTING_TAB = {
|
||||
SANDBOX_PROVIDER: 'sandbox-provider',
|
||||
PROVIDER: 'provider',
|
||||
MODEL_PROVIDER: 'model-provider',
|
||||
MEMBERS: 'members',
|
||||
BILLING: 'billing',
|
||||
DATA_SOURCE: 'data-source',
|
||||
|
||||
@ -77,7 +77,7 @@ export default function AccountSetting({
|
||||
|
||||
const items: GroupItem[] = [
|
||||
{
|
||||
key: ACCOUNT_SETTING_TAB.PROVIDER,
|
||||
key: ACCOUNT_SETTING_TAB.MODEL_PROVIDER,
|
||||
name: t('settings.provider', { ns: 'common' }),
|
||||
icon: <RiBrain2Line className={iconClassName} />,
|
||||
activeIcon: <RiBrain2Fill className={iconClassName} />,
|
||||
@ -234,7 +234,7 @@ export default function AccountSetting({
|
||||
<div className="system-sm-regular mt-1 text-text-tertiary">{activeItem?.description}</div>
|
||||
)}
|
||||
</div>
|
||||
{activeItem?.key === 'provider' && (
|
||||
{activeItem?.key === ACCOUNT_SETTING_TAB.MODEL_PROVIDER && (
|
||||
<div className="flex grow justify-end">
|
||||
<Input
|
||||
showLeftIcon
|
||||
@ -247,7 +247,7 @@ export default function AccountSetting({
|
||||
)}
|
||||
</div>
|
||||
<div className="px-4 pt-2 sm:px-8">
|
||||
{activeMenu === 'provider' && <ModelProviderPage searchText={searchValue} />}
|
||||
{activeMenu === ACCOUNT_SETTING_TAB.MODEL_PROVIDER && <ModelProviderPage searchText={searchValue} />}
|
||||
{activeMenu === 'sandbox-provider' && <SandboxProviderPage />}
|
||||
{activeMenu === 'members' && <MembersPage />}
|
||||
{activeMenu === 'billing' && <BillingPage />}
|
||||
|
||||
@ -134,7 +134,7 @@ const Popup: FC<PopupProps> = ({
|
||||
className="sticky bottom-0 flex cursor-pointer items-center rounded-b-lg border-t border-divider-subtle bg-components-panel-bg px-4 py-2 text-text-accent-light-mode-only"
|
||||
onClick={() => {
|
||||
onHide()
|
||||
setShowAccountSettingModal({ payload: ACCOUNT_SETTING_TAB.PROVIDER })
|
||||
setShowAccountSettingModal({ payload: ACCOUNT_SETTING_TAB.MODEL_PROVIDER })
|
||||
}}
|
||||
>
|
||||
<span className="system-xs-medium">{t('model.settingsLink', { ns: 'common' })}</span>
|
||||
|
||||
Reference in New Issue
Block a user