diff --git a/eslint-suppressions.json b/eslint-suppressions.json index 79ae57e414..fcaa479bc1 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -608,17 +608,6 @@ "count": 1 } }, - "web/app/components/apps/app-card.tsx": { - "no-restricted-imports": { - "count": 1 - }, - "react/set-state-in-effect": { - "count": 1 - }, - "ts/no-explicit-any": { - "count": 2 - } - }, "web/app/components/apps/new-app-card.tsx": { "react-hooks-extra/no-direct-set-state-in-use-effect": { "count": 1 diff --git a/web/app/account/(commonLayout)/account-page/index.tsx b/web/app/account/(commonLayout)/account-page/index.tsx index 75d4e5afa8..2a4ae86f84 100644 --- a/web/app/account/(commonLayout)/account-page/index.tsx +++ b/web/app/account/(commonLayout)/account-page/index.tsx @@ -223,116 +223,107 @@ export default function AccountPage() { )} {!IS_CE_EDITION && } - { - editNameModalVisible && ( - !open && setEditNameModalVisible(false)}> - -
{t('account.editName', { ns: 'common' })}
-
{t('account.name', { ns: 'common' })}
- setEditName(e.target.value)} - /> -
- - -
-
-
- ) - } - { - editPasswordModalVisible && ( - !open && (setEditPasswordModalVisible(false), resetPasswordForm())}> - -
{userProfile.is_password_set ? t('account.resetPassword', { ns: 'common' }) : t('account.setPassword', { ns: 'common' })}
- {userProfile.is_password_set && ( - <> -
{t('account.currentPassword', { ns: 'common' })}
-
- setCurrentPassword(e.target.value)} - /> - -
- -
-
- - )} -
- {userProfile.is_password_set ? t('account.newPassword', { ns: 'common' }) : t('account.password', { ns: 'common' })} -
+ !open && setEditNameModalVisible(false)}> + +
{t('account.editName', { ns: 'common' })}
+
{t('account.name', { ns: 'common' })}
+ setEditName(e.target.value)} + /> +
+ + +
+
+
+ !open && (setEditPasswordModalVisible(false), resetPasswordForm())}> + +
{userProfile.is_password_set ? t('account.resetPassword', { ns: 'common' }) : t('account.setPassword', { ns: 'common' })}
+ {userProfile.is_password_set && ( + <> +
{t('account.currentPassword', { ns: 'common' })}
setPassword(e.target.value)} + type={showCurrentPassword ? 'text' : 'password'} + value={currentPassword} + onChange={e => setCurrentPassword(e.target.value)} />
-
{t('account.confirmPassword', { ns: 'common' })}
-
- setConfirmPassword(e.target.value)} - /> -
- -
-
-
- - -
-
-
- ) - } + + )} +
+ {userProfile.is_password_set ? t('account.newPassword', { ns: 'common' }) : t('account.password', { ns: 'common' })} +
+
+ setPassword(e.target.value)} + /> +
+ +
+
+
{t('account.confirmPassword', { ns: 'common' })}
+
+ setConfirmPassword(e.target.value)} + /> +
+ +
+
+
+ + +
+
+
{ showDeleteAccountModal && ( ) } - {showUpdateEmail && ( - setShowUpdateEmail(false)} - email={userProfile.email} - /> - )} + setShowUpdateEmail(false)} + email={userProfile.email} + /> ) } diff --git a/web/app/components/app/configuration/dataset-config/context-var/var-picker.tsx b/web/app/components/app/configuration/dataset-config/context-var/var-picker.tsx index 9bac1c7a41..0938d0aea4 100644 --- a/web/app/components/app/configuration/dataset-config/context-var/var-picker.tsx +++ b/web/app/components/app/configuration/dataset-config/context-var/var-picker.tsx @@ -83,7 +83,6 @@ const VarPicker: FC = ({ placement="bottom-end" sideOffset={8} popupClassName="border-none bg-transparent p-0 shadow-none backdrop-blur-none" - positionerProps={{ style: { zIndex: 1000 } }} > {options.length > 0 ? ( diff --git a/web/app/components/app/configuration/debug/chat-user-input.tsx b/web/app/components/app/configuration/debug/chat-user-input.tsx index 2eff7ac3ca..5d6b6cdf89 100644 --- a/web/app/components/app/configuration/debug/chat-user-input.tsx +++ b/web/app/components/app/configuration/debug/chat-user-input.tsx @@ -113,7 +113,7 @@ const ChatUserInput = ({ {String(inputs[key] || t('placeholder.select', { ns: 'common' }))} - + {(options || []).map(option => ( {option} diff --git a/web/app/components/app/configuration/prompt-value-panel/index.tsx b/web/app/components/app/configuration/prompt-value-panel/index.tsx index c2a438b5e9..bfcc13c23c 100644 --- a/web/app/components/app/configuration/prompt-value-panel/index.tsx +++ b/web/app/components/app/configuration/prompt-value-panel/index.tsx @@ -167,7 +167,7 @@ const PromptValuePanel: FC = ({ {String(inputs[key] || t('placeholder.select', { ns: 'common' }))} - + {(options || []).map(option => ( {option} diff --git a/web/app/components/app/overview/settings/index.tsx b/web/app/components/app/overview/settings/index.tsx index 398a7e8746..ae772d0750 100644 --- a/web/app/components/app/overview/settings/index.tsx +++ b/web/app/components/app/overview/settings/index.tsx @@ -317,7 +317,7 @@ const SettingsModal: FC = ({ {selectedLanguage?.name ?? t('placeholder.select', { ns: 'common' })} - + {languageOptions.map(item => ( {item.name} diff --git a/web/app/components/apps/app-card.tsx b/web/app/components/apps/app-card.tsx index 80aab3ce4d..458c7578c7 100644 --- a/web/app/components/apps/app-card.tsx +++ b/web/app/components/apps/app-card.tsx @@ -24,15 +24,19 @@ import { DropdownMenuTrigger, } from '@langgenius/dify-ui/dropdown-menu' import { toast } from '@langgenius/dify-ui/toast' +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from '@langgenius/dify-ui/tooltip' import { useSuspenseQuery } from '@tanstack/react-query' import * as React from 'react' -import { useCallback, useEffect, useId, useMemo, useState } from 'react' +import { useCallback, useId, useMemo, useState } from 'react' import { Trans, useTranslation } from 'react-i18next' import { AppTypeIcon } from '@/app/components/app/type-selector' import AppIcon from '@/app/components/base/app-icon' import Input from '@/app/components/base/input' import TagSelector from '@/app/components/base/tag-management/selector' -import Tooltip from '@/app/components/base/tooltip' import { UserAvatarList } from '@/app/components/base/user-avatar-list' import { NEED_REFRESH_APP_LIST_KEY } from '@/config' import { useAppContext } from '@/context/app-context' @@ -229,8 +233,9 @@ const AppCard = ({ app, onlineUsers = [], onRefresh }: AppCardProps) => { setShowConfirmDelete(false) setConfirmDeleteInput('') } - catch (e: any) { - toast.error(`${t('appDeleteFailed', { ns: 'app' })}${'message' in e ? `: ${e.message}` : ''}`) + catch (e) { + const message = e instanceof Error ? e.message : '' + toast.error(`${t('appDeleteFailed', { ns: 'app' })}${message ? `: ${message}` : ''}`) } }, [app.id, mutateDeleteApp, onPlanInfoChanged, t]) @@ -313,8 +318,8 @@ const AppCard = ({ app, onlineUsers = [], onRefresh }: AppCardProps) => { if (onRefresh) onRefresh() } - catch (e: any) { - toast.error(e.message || t('editFailed', { ns: 'app' })) + catch (e) { + toast.error(e instanceof Error ? e.message : t('editFailed', { ns: 'app' })) } }, [app.id, onRefresh, t]) @@ -391,10 +396,18 @@ const AppCard = ({ app, onlineUsers = [], onRefresh }: AppCardProps) => { const shouldShowAccessControlOption = systemFeatures.webapp_auth.enabled && isCurrentWorkspaceEditor const operationsMenuWidthClassName = shouldShowSwitchOption ? 'w-[256px]' : 'w-[216px]' - const [tags, setTags] = useState(app.tags) - useEffect(() => { - setTags(app.tags) - }, [app.tags]) + const appTagsKey = useMemo(() => app.tags.map(tag => tag.id).join(','), [app.tags]) + const [tagState, setTagState] = useState<{ key: string, tags: Tag[] }>(() => ({ + key: appTagsKey, + tags: app.tags, + })) + const tags = tagState.key === appTagsKey ? tagState.tags : app.tags + const handleTagsUpdate = useCallback((nextTags: Tag[]) => { + setTagState({ + key: appTagsKey, + tags: nextTags, + }) + }, [appTagsKey]) const EditTimeText = useMemo(() => { const timeText = formatTime({ @@ -454,23 +467,39 @@ const AppCard = ({ app, onlineUsers = [], onRefresh }: AppCardProps) => { )}
{app.access_mode === AccessMode.PUBLIC && ( - - + + } + /> + {t('accessItemsDescription.anyone', { ns: 'app' })} )} {app.access_mode === AccessMode.SPECIFIC_GROUPS_MEMBERS && ( - - + + } + /> + {t('accessItemsDescription.specific', { ns: 'app' })} )} {app.access_mode === AccessMode.ORGANIZATION && ( - - + + } + /> + {t('accessItemsDescription.organization', { ns: 'app' })} )} {app.access_mode === AccessMode.EXTERNAL_MEMBERS && ( - - + + } + /> + {t('accessItemsDescription.external', { ns: 'app' })} )}
@@ -501,7 +530,7 @@ const AppCard = ({ app, onlineUsers = [], onRefresh }: AppCardProps) => { targetID={app.id} value={tags.map(tag => tag.id)} selectedTags={tags} - onCacheUpdate={setTags} + onCacheUpdate={handleTagsUpdate} onChange={onRefresh} /> @@ -532,42 +561,40 @@ const AppCard = ({ app, onlineUsers = [], onRefresh }: AppCardProps) => { - {isOperationsMenuOpen && ( - - {systemFeatures.webapp_auth.enabled - ? ( - - ) - : ( - - )} - - )} + + {systemFeatures.webapp_auth.enabled + ? ( + + ) + : ( + + )} + diff --git a/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/content.spec.tsx b/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/content.spec.tsx index 126ee77ae5..8d3c7002d7 100644 --- a/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/content.spec.tsx +++ b/web/app/components/base/chat/chat-with-history/inputs-form/__tests__/content.spec.tsx @@ -248,7 +248,7 @@ describe('InputsFormContent', () => { expect(mockSetCurrentConversationInputs).toHaveBeenCalledWith(expect.objectContaining({ sel: 'A' })) }) - it('renders select dropdown above the settings dialog layer', async () => { + it('renders select dropdown on the shared dify-ui overlay layer', async () => { const user = userEvent.setup() const context = createMockContext({ inputsForms: [{ variable: 'sel', type: InputVarType.select, label: 'Sel', options: ['A', 'B'], default: 'B' }], @@ -258,7 +258,7 @@ describe('InputsFormContent', () => { renderWithContext(, context) await user.click(screen.getByText('B')) - expect(screen.getByText('A').closest('.z-\\[60\\]')).not.toBeNull() + expect(screen.getByText('A').closest('.z-1002')).not.toBeNull() }) it('handles select input with existing value (value not in options -> shows placeholder)', () => { diff --git a/web/app/components/base/chat/chat-with-history/inputs-form/content.tsx b/web/app/components/base/chat/chat-with-history/inputs-form/content.tsx index 380b914492..4e9f827aa8 100644 --- a/web/app/components/base/chat/chat-with-history/inputs-form/content.tsx +++ b/web/app/components/base/chat/chat-with-history/inputs-form/content.tsx @@ -92,7 +92,7 @@ const InputsFormContent = ({ showTip }: Props) => { {String(inputsFormValue?.[form.variable] ?? form.default ?? form.label)} - + {form.options.map((option: string) => ( {option} diff --git a/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsx b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsx index 40a62cf451..47c273d163 100644 --- a/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsx +++ b/web/app/components/base/chat/embedded-chatbot/inputs-form/__tests__/content.spec.tsx @@ -200,7 +200,7 @@ describe('InputsFormContent', () => { expect(mockContextValue.handleNewConversationInputsChange).toHaveBeenCalled() }) - it('should render select dropdown above the settings dialog layer', async () => { + it('should render select dropdown on the shared dify-ui overlay layer', async () => { render() const selectTrigger = screen.getAllByText(/Select Label/i).find(el => el.tagName === 'SPAN') if (!selectTrigger) @@ -208,7 +208,7 @@ describe('InputsFormContent', () => { await user.click(selectTrigger) - expect(screen.getByText('Option 1').closest('.z-\\[60\\]')).not.toBeNull() + expect(screen.getByText('Option 1').closest('.z-1002')).not.toBeNull() }) it('should handle single file upload change', async () => { diff --git a/web/app/components/base/chat/embedded-chatbot/inputs-form/content.tsx b/web/app/components/base/chat/embedded-chatbot/inputs-form/content.tsx index a6d49c4e61..0b6e3ec466 100644 --- a/web/app/components/base/chat/embedded-chatbot/inputs-form/content.tsx +++ b/web/app/components/base/chat/embedded-chatbot/inputs-form/content.tsx @@ -92,7 +92,7 @@ const InputsFormContent = ({ showTip }: Props) => { {String(inputsFormValue?.[form.variable] ?? form.default ?? form.label)} - + {form.options.map((option: string) => ( {option} diff --git a/web/app/components/base/features/new-feature-panel/moderation/form-generation.tsx b/web/app/components/base/features/new-feature-panel/moderation/form-generation.tsx index 0392aa2b55..d78b11a12c 100644 --- a/web/app/components/base/features/new-feature-panel/moderation/form-generation.tsx +++ b/web/app/components/base/features/new-feature-panel/moderation/form-generation.tsx @@ -69,7 +69,7 @@ const FormGeneration: FC = ({ {selectedOption?.name ?? form.placeholder} - + {selectOptions.map(option => ( {option.name} diff --git a/web/app/components/base/form/components/base/base-field.tsx b/web/app/components/base/form/components/base/base-field.tsx index a256bccd8b..c425eee574 100644 --- a/web/app/components/base/form/components/base/base-field.tsx +++ b/web/app/components/base/form/components/base/base-field.tsx @@ -267,7 +267,7 @@ const BaseField = ({ : translatedPlaceholder} - + {memorizedOptions.map(option => ( {option.label} @@ -293,7 +293,7 @@ const BaseField = ({ {nextValue => getSingleSelectLabel(nextValue, memorizedOptions, translatedPlaceholder)} - + {memorizedOptions.map(option => ( {option.label} @@ -332,7 +332,7 @@ const BaseField = ({ : dynamicPlaceholder} - + {dynamicNoticeTitle && (
getSingleSelectLabel(nextValue, dynamicOptions, dynamicPlaceholder)} - + {dynamicNoticeTitle && (
getDisplayLabel(nextValue, options, placeholderText)} - + {popupProps?.title && (
= ({ {selectedOption?.name ?? `${t('metadata.placeholder.select', { ns: 'datasetDocuments' })}${label}`} - + {selectOptions.map(option => ( {option.name} diff --git a/web/app/components/header/account-setting/language-page/index.tsx b/web/app/components/header/account-setting/language-page/index.tsx index 1197fbd283..5708a2c547 100644 --- a/web/app/components/header/account-setting/language-page/index.tsx +++ b/web/app/components/header/account-setting/language-page/index.tsx @@ -85,7 +85,7 @@ export default function LanguagePage() { {selectedLanguage?.name ?? t('placeholder.select', { ns: 'common' })} - + {languageOptions.map(item => ( {item.name} @@ -111,7 +111,7 @@ export default function LanguagePage() { {selectedTimezone?.name ?? t('placeholder.select', { ns: 'common' })} - + {timezones.map(item => ( {item.name} diff --git a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/member-selector.tsx b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/member-selector.tsx index 4dc41a307b..6dc0f56a0a 100644 --- a/web/app/components/header/account-setting/members-page/transfer-ownership-modal/member-selector.tsx +++ b/web/app/components/header/account-setting/members-page/transfer-ownership-modal/member-selector.tsx @@ -76,7 +76,6 @@ const MemberSelector: FC = ({ placement="bottom" sideOffset={4} popupClassName="border-none bg-transparent p-0 shadow-none backdrop-blur-none" - positionerProps={{ style: { zIndex: 1002 } }} >
diff --git a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx index fc2b3899e5..385bd84f90 100644 --- a/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx +++ b/web/app/components/header/account-setting/model-provider-page/model-modal/Form.tsx @@ -302,7 +302,7 @@ function Form< {selectedOption?.name ?? placeholder?.[language] ?? placeholder?.en_US} - + {filteredOptions.map(option => ( {option.name} @@ -494,7 +494,6 @@ function Form< {infotipContent}
= ({ )}
- + {versions.map(item => ( {item.name} @@ -141,7 +141,7 @@ const SelectPackage: React.FC = ({ {selectedPackageOption?.name ?? t(`${i18nPrefix}.selectPackagePlaceholder`, { ns: 'plugin' }) ?? ''} - + {packages.map(item => ( {item.name} diff --git a/web/app/components/plugins/plugin-detail-panel/app-selector/app-inputs-form.tsx b/web/app/components/plugins/plugin-detail-panel/app-selector/app-inputs-form.tsx index c91db9dd84..777882b14a 100644 --- a/web/app/components/plugins/plugin-detail-panel/app-selector/app-inputs-form.tsx +++ b/web/app/components/plugins/plugin-detail-panel/app-selector/app-inputs-form.tsx @@ -70,7 +70,7 @@ const AppInputsForm = ({ {selectedOption?.name ?? label} - + {selectOptions.map(option => ( {option.name} diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/index.spec.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/index.spec.tsx index 490fdf10ad..34325109eb 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/index.spec.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/__tests__/index.spec.tsx @@ -80,19 +80,30 @@ vi.mock('@/hooks/use-oauth', () => ({ })) vi.mock('../common-modal', () => ({ - CommonCreateModal: ({ createType, onClose, builder }: { + CommonCreateModal: ({ open, createType, onClose, builder }: { + open?: boolean createType: SupportedCreationMethods onClose: () => void builder?: TriggerSubscriptionBuilder - }) => ( -
- -
- ), + }) => { + if (open === false) + return null + + return ( +
+ +
+ ) + }, })) vi.mock('../oauth-client', () => ({ diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx index 502cf73d54..f15a933f18 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/common-modal.tsx @@ -23,12 +23,39 @@ import { } from './hooks/use-common-modal-state' type Props = { + open?: boolean onClose: () => void createType: SupportedCreationMethods builder?: TriggerSubscriptionBuilder } -export const CommonCreateModal = ({ onClose, createType, builder }: Props) => { +export const CommonCreateModal = ({ open = true, onClose, createType, builder }: Props) => { + return ( + !nextOpen && onClose()} + disablePointerDismissal + > + + + + + ) +} + +function CommonCreateModalContent({ onClose, createType, builder }: Omit) { const { t } = useTranslation() const { @@ -59,89 +86,77 @@ export const CommonCreateModal = ({ onClose, createType, builder }: Props) => { const modalSize = createType === SupportedCreationMethods.MANUAL ? 'md' : 'sm' return ( - - +
+ + {t(MODAL_TITLE_KEY_MAP[createType], { ns: 'pluginTrigger' })} + + +
+ +
+ {isApiKeyType && } + + {isVerifyStep && ( + )} - > -
-
- - {t(MODAL_TITLE_KEY_MAP[createType], { ns: 'pluginTrigger' })} - - -
-
- {isApiKeyType && } + {isConfigurationStep && ( + + )} +
- {isVerifyStep && ( - - )} - - {isConfigurationStep && ( - - )} -
- -
-
- - -
-
- - {isVerifyStep && ( -
- -
- )} +
+
+ +
- -
+
+ + {isVerifyStep && ( +
+ +
+ )} +
) } diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx index be970b6cec..ca1194e6ed 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/index.tsx @@ -4,7 +4,6 @@ import { cn } from '@langgenius/dify-ui/cn' import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectTrigger } from '@langgenius/dify-ui/select' import { toast } from '@langgenius/dify-ui/toast' import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' -import { RiAddLine, RiEqualizer2Line } from '@remixicon/react' import { useBoolean } from 'ahooks' import { useCallback, useMemo, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -40,6 +39,7 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU const { subscriptions } = useSubscriptionList() const subscriptionCount = subscriptions?.length || 0 const [selectedCreateInfo, setSelectedCreateInfo] = useState<{ type: SupportedCreationMethods, builder?: TriggerSubscriptionBuilder } | null>(null) + const [isCreateModalOpen, setIsCreateModalOpen] = useState(false) const detail = usePluginStore(state => state.detail) const [isMenuOpen, setIsMenuOpen] = useState(false) @@ -89,8 +89,11 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU - + + )} /> @@ -126,12 +129,21 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU show: supportedMethods.includes(SupportedCreationMethods.MANUAL), }, ] - }, [t, oauthConfig, supportedMethods, methodType, onClickClientSettings]) + }, [t, oauthConfig, supportedMethods, onClickClientSettings]) const visibleOptions = useMemo(() => { return allOptions.filter(option => option.show) }, [allOptions]) const shouldAllowSelect = methodType === DEFAULT_METHOD || (methodType === SupportedCreationMethods.OAUTH && supportedMethods.length === 1) + const showCreateModal = useCallback((createInfo: { type: SupportedCreationMethods, builder?: TriggerSubscriptionBuilder }) => { + setSelectedCreateInfo(createInfo) + setIsCreateModalOpen(true) + }, []) + + const hideCreateModal = useCallback(() => { + setIsCreateModalOpen(false) + }, []) + const onChooseCreateType = async (type: SupportedCreationMethods) => { if (type === SupportedCreationMethods.OAUTH) { if (oauthConfig?.configured) { @@ -140,7 +152,10 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU openOAuthPopup(response.authorization_url, (callbackData) => { if (callbackData) { toast.success(t('modal.oauth.authorization.authSuccess', { ns: 'pluginTrigger' })) - setSelectedCreateInfo({ type: SupportedCreationMethods.OAUTH, builder: response.subscription_builder }) + showCreateModal({ + type: SupportedCreationMethods.OAUTH, + builder: response.subscription_builder, + }) } }) }, @@ -154,7 +169,9 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU } } else { - setSelectedCreateInfo({ type }) + showCreateModal({ + type, + }) } } @@ -202,7 +219,7 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU onClick={onClickCreate} >
- + {buttonTextMap[methodType!]} {methodType === SupportedCreationMethods.OAUTH && oauthConfig?.custom_enabled && oauthConfig?.custom_configured && ( - +
)} /> @@ -238,6 +255,7 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU disabled={!(supportedMethods?.length === 1 || subscriptionCount >= MAX_COUNT)} render={( = MAX_COUNT ? ActionButtonState.Disabled : ActionButtonState.Default} > - + )} /> @@ -255,7 +273,7 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU
)} - + {visibleOptions.map(option => (
@@ -268,23 +286,33 @@ export const CreateSubscriptionButton = ({ buttonType = CreateButtonType.FULL_BU ))} - {selectedCreateInfo && ( - setSelectedCreateInfo(null)} - /> - )} - {isShowClientSettingsModal && ( - { - hideClientSettingsModal() - refetchOAuthConfig() - }} - showOAuthCreateModal={builder => setSelectedCreateInfo({ type: SupportedCreationMethods.OAUTH, builder })} - /> - )} + {selectedCreateInfo + ? ( + + ) + : null} + {isShowClientSettingsModal + ? ( + { + hideClientSettingsModal() + refetchOAuthConfig() + }} + showOAuthCreateModal={(builder) => { + showCreateModal({ + type: SupportedCreationMethods.OAUTH, + builder, + }) + }} + /> + ) + : null} ) } diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx index 21f1d4898b..c29ca0a54c 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/selector-entry.tsx @@ -110,7 +110,6 @@ export const SubscriptionSelectorEntry = ({ selectedId, onSelect }: { placement="bottom-start" sideOffset={4} popupClassName="border-none bg-transparent p-0 shadow-none backdrop-blur-none" - positionerProps={{ style: { zIndex: 11 } }} >
= ({ {selectedOption?.name ?? placeholder?.[language] ?? placeholder?.en_US} - + {pickerProps.selectItems.map(item => ( {item.name} @@ -278,7 +278,6 @@ const ReasoningConfigForm: React.FC = ({ )} {showVariableSelector && ( = ({ placement="top" sideOffset={0} popupClassName="border-none bg-transparent p-0 shadow-none backdrop-blur-none" - positionerProps={{ style: { zIndex: 1000 } }} >
diff --git a/web/app/components/share/text-generation/run-once/index.tsx b/web/app/components/share/text-generation/run-once/index.tsx index 499403223e..96b223e61b 100644 --- a/web/app/components/share/text-generation/run-once/index.tsx +++ b/web/app/components/share/text-generation/run-once/index.tsx @@ -138,7 +138,7 @@ const RunOnce: FC = ({ {String(inputs[item.key] || item.default || t('placeholder.select', { ns: 'common' }))} - + {(item.options || []).map(option => ( {option} diff --git a/web/app/components/tools/labels/selector.tsx b/web/app/components/tools/labels/selector.tsx index 67539715a7..b4dff0c0f2 100644 --- a/web/app/components/tools/labels/selector.tsx +++ b/web/app/components/tools/labels/selector.tsx @@ -80,7 +80,6 @@ const LabelSelector: FC = ({ placement="bottom-start" sideOffset={4} popupClassName="border-none bg-transparent p-0 shadow-none backdrop-blur-none" - positionerProps={{ style: { zIndex: 1040 } }} >
diff --git a/web/app/components/tools/workflow-tool/method-selector.tsx b/web/app/components/tools/workflow-tool/method-selector.tsx index 6310f07f3c..07c630dacf 100644 --- a/web/app/components/tools/workflow-tool/method-selector.tsx +++ b/web/app/components/tools/workflow-tool/method-selector.tsx @@ -51,7 +51,6 @@ const MethodSelector: FC = ({
diff --git a/web/app/components/workflow/comment/thread.tsx b/web/app/components/workflow/comment/thread.tsx index 071cc48462..8eaf542604 100644 --- a/web/app/components/workflow/comment/thread.tsx +++ b/web/app/components/workflow/comment/thread.tsx @@ -545,7 +545,7 @@ export const CommentThread: FC = memo(({