From 29cddc449fde183ecfcdea0185e9a4eef6787a51 Mon Sep 17 00:00:00 2001 From: yessenia Date: Fri, 24 Oct 2025 13:28:46 +0800 Subject: [PATCH] fix(trigger): add clickOutsideNotClose prop --- web/app/components/base/image-gallery/index.tsx | 9 +++++---- .../subscription-list/create/common-modal.tsx | 1 + .../subscription-list/create/oauth-client.tsx | 1 + web/service/use-plugins.ts | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/web/app/components/base/image-gallery/index.tsx b/web/app/components/base/image-gallery/index.tsx index 8a5c60de27..fdb9711292 100644 --- a/web/app/components/base/image-gallery/index.tsx +++ b/web/app/components/base/image-gallery/index.tsx @@ -1,9 +1,9 @@ 'use client' +import ImagePreview from '@/app/components/base/image-uploader/image-preview' +import cn from '@/utils/classnames' import type { FC } from 'react' import React, { useState } from 'react' import s from './style.module.css' -import cn from '@/utils/classnames' -import ImagePreview from '@/app/components/base/image-uploader/image-preview' type Props = { srcs: string[] @@ -36,7 +36,6 @@ const ImageGallery: FC = ({ const imgStyle = getWidthStyle(imgNum) return (
- {/* TODO: support preview */} {srcs.map((src, index) => ( !src ? null : = ({ imagePreviewUrl && ( setImagePreviewUrl('')} title={''} /> + onCancel={() => setImagePreviewUrl('')} + title={''} + /> ) }
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 b4d2b9ab31..9eb7b90f88 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 @@ -372,6 +372,7 @@ export const CommonCreateModal = ({ onClose, createType, builder }: Props) => { bottomSlot={currentStep === ApiKeyStep.Verify ? : null} size={createType === SupportedCreationMethods.MANUAL ? 'md' : 'sm'} containerClassName='min-h-[360px]' + clickOutsideNotClose > {createType === SupportedCreationMethods.APIKEY && } {currentStep === ApiKeyStep.Verify && ( diff --git a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx index 490652f1c0..ef182a70aa 100644 --- a/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx +++ b/web/app/components/plugins/plugin-detail-panel/subscription-list/create/oauth-client.tsx @@ -183,6 +183,7 @@ export const OAuthClientSettingsModal = ({ oauthConfig, onClose, showOAuthCreate cancelButtonText={t('plugin.auth.saveOnly')} extraButtonText={t('common.operation.cancel')} showExtraButton + clickOutsideNotClose extraButtonVariant='secondary' onExtraButtonClick={onClose} onClose={onClose} diff --git a/web/service/use-plugins.ts b/web/service/use-plugins.ts index 05badfc220..6ba85d3f74 100644 --- a/web/service/use-plugins.ts +++ b/web/service/use-plugins.ts @@ -701,7 +701,7 @@ export const usePluginReadme = ({ plugin_unique_identifier, language }: { plugin export const usePluginReadmeAsset = ({ file_name, plugin_unique_identifier }: { file_name?: string, plugin_unique_identifier?: string }) => { return useQuery({ queryKey: ['pluginReadmeAsset', plugin_unique_identifier, file_name], - queryFn: () => get('/workspaces/current/plugin/asset', { params: { plugin_unique_identifier, file_name } }), + queryFn: () => get('/workspaces/current/plugin/asset', { params: { plugin_unique_identifier, file_name } }, { silent: true }), enabled: !!plugin_unique_identifier && !!file_name && /(^\.\/_assets|^_assets)/.test(file_name), }) }