From 9a7245e1df4b9648e761f183396f12fbd828b589 Mon Sep 17 00:00:00 2001 From: Asuka Minato Date: Sat, 27 Sep 2025 11:54:25 +0900 Subject: [PATCH] rm assigned but unused (#25639) --- .../config/automatic/version-selector.tsx | 5 -- web/app/components/develop/code.tsx | 11 --- web/app/components/explore/sidebar/index.tsx | 12 --- .../members-page/operation/index.tsx | 4 +- .../variable/var-reference-vars.tsx | 76 ------------------- .../components/mail-and-password-auth.tsx | 2 - 6 files changed, 2 insertions(+), 108 deletions(-) diff --git a/web/app/components/app/configuration/config/automatic/version-selector.tsx b/web/app/components/app/configuration/config/automatic/version-selector.tsx index b5de8b3126..c3d3e1d91c 100644 --- a/web/app/components/app/configuration/config/automatic/version-selector.tsx +++ b/web/app/components/app/configuration/config/automatic/version-selector.tsx @@ -5,11 +5,6 @@ import cn from '@/utils/classnames' import { RiArrowDownSLine, RiCheckLine } from '@remixicon/react' import { useTranslation } from 'react-i18next' -type Option = { - label: string - value: number -} - type VersionSelectorProps = { versionLen: number; value: number; diff --git a/web/app/components/develop/code.tsx b/web/app/components/develop/code.tsx index ee67921031..eadc87a5ca 100644 --- a/web/app/components/develop/code.tsx +++ b/web/app/components/develop/code.tsx @@ -13,17 +13,6 @@ import classNames from '@/utils/classnames' import { writeTextToClipboard } from '@/utils/clipboard' import type { PropsWithChildren, ReactElement, ReactNode } from 'react' -const languageNames = { - js: 'JavaScript', - ts: 'TypeScript', - javascript: 'JavaScript', - typescript: 'TypeScript', - php: 'PHP', - python: 'Python', - ruby: 'Ruby', - go: 'Go', -} as { [key: string]: string } - type IChildrenProps = { children: React.ReactNode [key: string]: any diff --git a/web/app/components/explore/sidebar/index.tsx b/web/app/components/explore/sidebar/index.tsx index c5866c31d4..2173f0fcb7 100644 --- a/web/app/components/explore/sidebar/index.tsx +++ b/web/app/components/explore/sidebar/index.tsx @@ -26,18 +26,6 @@ const DiscoveryIcon = () => ( ) -const SelectedChatIcon = () => ( - - - -) - -const ChatIcon = () => ( - - - -) - export type IExploreSideBarProps = { controlUpdateInstalledApps: number } diff --git a/web/app/components/header/account-setting/members-page/operation/index.tsx b/web/app/components/header/account-setting/members-page/operation/index.tsx index 46f842dd4b..b06ec63228 100644 --- a/web/app/components/header/account-setting/members-page/operation/index.tsx +++ b/web/app/components/header/account-setting/members-page/operation/index.tsx @@ -33,13 +33,13 @@ const Operation = ({ const roleList = useMemo(() => { if (operatorRole === 'owner') { return [ - ...['admin', 'editor', 'normal'], + 'admin', 'editor', 'normal', ...(datasetOperatorEnabled ? ['dataset_operator'] : []), ] } if (operatorRole === 'admin') { return [ - ...['editor', 'normal'], + 'editor', 'normal', ...(datasetOperatorEnabled ? ['dataset_operator'] : []), ] } diff --git a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx index 614d01a11e..067dbf8652 100644 --- a/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx +++ b/web/app/components/workflow/nodes/_base/components/variable/var-reference-vars.tsx @@ -24,18 +24,6 @@ import ManageInputField from './manage-input-field' import { VariableIconWithColor } from '@/app/components/workflow/nodes/_base/components/variable/variable-label' import { Variable02 } from '@/app/components/base/icons/src/vender/solid/development' -type ObjectChildrenProps = { - nodeId: string - title: string - data: Var[] - objPath: string[] - onChange: (value: ValueSelector, item: Var) => void - onHovering?: (value: boolean) => void - itemWidth?: number - isSupportFileVar?: boolean - preferSchemaType?: boolean -} - type ItemProps = { nodeId: string title: string @@ -54,8 +42,6 @@ type ItemProps = { preferSchemaType?: boolean } -const objVarTypes = [VarType.object, VarType.file] - const Item: FC = ({ nodeId, title, @@ -240,68 +226,6 @@ const Item: FC = ({ ) } -const ObjectChildren: FC = ({ - title, - nodeId, - objPath, - data, - onChange, - onHovering, - itemWidth, - isSupportFileVar, - preferSchemaType, -}) => { - const currObjPath = objPath - const itemRef = useRef(null) - const [isItemHovering, setIsItemHovering] = useState(false) - useHover(itemRef, { - onChange: (hovering) => { - if (hovering) { - setIsItemHovering(true) - } - else { - setTimeout(() => { - setIsItemHovering(false) - }, 100) - } - }, - }) - const [isChildrenHovering, setIsChildrenHovering] = useState(false) - const isHovering = isItemHovering || isChildrenHovering - useEffect(() => { - onHovering && onHovering(isHovering) - }, [isHovering]) - useEffect(() => { - onHovering && onHovering(isItemHovering) - }, [isItemHovering]) - // absolute top-[-2px] - return ( -
-
{title}.{currObjPath.join('.')}
- { - (data && data.length > 0) - && data.map((v, i) => ( - - )) - } -
- ) -} - type Props = { hideSearch?: boolean searchBoxClassName?: string diff --git a/web/app/signin/components/mail-and-password-auth.tsx b/web/app/signin/components/mail-and-password-auth.tsx index cccbd3a6ee..aaadc0b197 100644 --- a/web/app/signin/components/mail-and-password-auth.tsx +++ b/web/app/signin/components/mail-and-password-auth.tsx @@ -19,8 +19,6 @@ type MailAndPasswordAuthProps = { allowRegistration: boolean } -const passwordRegex = /^(?=.*[a-zA-Z])(?=.*\d).{8,}$/ - export default function MailAndPasswordAuth({ isInvite, isEmailSetup, allowRegistration }: MailAndPasswordAuthProps) { const { t } = useTranslation() const { locale } = useContext(I18NContext)