mirror of https://github.com/langgenius/dify.git
Changes before error encountered
Co-authored-by: asukaminato0721 <30024051+asukaminato0721@users.noreply.github.com>
This commit is contained in:
parent
b81cafa6c3
commit
fdce781a11
|
|
@ -10,8 +10,8 @@ import cn from '@/utils/classnames'
|
|||
import GridMask from '@/app/components/base/grid-mask'
|
||||
|
||||
type Props = {
|
||||
show: boolean
|
||||
onHide: () => void
|
||||
readonly show: boolean
|
||||
readonly onHide: () => void
|
||||
}
|
||||
const AnnotationFullModal: FC<Props> = ({
|
||||
show,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import UsageInfo from '../usage-info'
|
|||
import { useProviderContext } from '@/context/provider-context'
|
||||
|
||||
type Props = {
|
||||
className?: string
|
||||
readonly className?: string
|
||||
}
|
||||
|
||||
const Usage: FC<Props> = ({
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import cn from '@/utils/classnames'
|
|||
const LOW = 50
|
||||
const MIDDLE = 80
|
||||
|
||||
const AppsFull: FC<{ loc: string; className?: string; }> = ({
|
||||
const AppsFull: FC<{ readonly loc: string; readonly className?: string }> = ({
|
||||
loc,
|
||||
className,
|
||||
}) => {
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import cn from '@/utils/classnames'
|
|||
import { useProviderContext } from '@/context/provider-context'
|
||||
|
||||
type Props = {
|
||||
onClick?: () => void
|
||||
isDisplayOnly?: boolean
|
||||
readonly onClick?: () => void
|
||||
readonly isDisplayOnly?: boolean
|
||||
}
|
||||
|
||||
const HeaderBillingBtn: FC<Props> = ({
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import { useModalContextSelector } from '@/context/modal-context'
|
|||
import { Enterprise, Professional, Sandbox, Team } from './assets'
|
||||
|
||||
type Props = {
|
||||
loc: string
|
||||
readonly loc: string
|
||||
}
|
||||
|
||||
const PlanComp: FC<Props> = ({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
type CloudProps = {
|
||||
isActive: boolean
|
||||
readonly isActive: boolean
|
||||
}
|
||||
|
||||
const Cloud = ({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
type SelfHostedProps = {
|
||||
isActive: boolean
|
||||
readonly isActive: boolean
|
||||
}
|
||||
|
||||
const SelfHosted = ({
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { useTranslation } from 'react-i18next'
|
|||
import { RiArrowRightUpLine } from '@remixicon/react'
|
||||
|
||||
type FooterProps = {
|
||||
pricingPageURL: string
|
||||
readonly pricingPageURL: string
|
||||
}
|
||||
|
||||
const Footer = ({
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@ import type { PlanRange } from './plan-range-switcher'
|
|||
import PlanRangeSwitcher from './plan-range-switcher'
|
||||
|
||||
type PlanSwitcherProps = {
|
||||
currentCategory: Category
|
||||
currentPlanRange: PlanRange
|
||||
onChangeCategory: (category: Category) => void
|
||||
onChangePlanRange: (value: PlanRange) => void
|
||||
readonly currentCategory: Category
|
||||
readonly currentPlanRange: PlanRange
|
||||
readonly onChangeCategory: (category: Category) => void
|
||||
readonly onChangePlanRange: (value: PlanRange) => void
|
||||
}
|
||||
|
||||
const PlanSwitcher: FC<PlanSwitcherProps> = ({
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ export enum PlanRange {
|
|||
}
|
||||
|
||||
type PlanRangeSwitcherProps = {
|
||||
value: PlanRange
|
||||
onChange: (value: PlanRange) => void
|
||||
readonly value: PlanRange
|
||||
readonly onChange: (value: PlanRange) => void
|
||||
}
|
||||
|
||||
const PlanRangeSwitcher: FC<PlanRangeSwitcherProps> = ({
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { SelectionMod } from '../base/icons/src/public/knowledge'
|
|||
import type { QA } from '@/models/datasets'
|
||||
|
||||
export type ChunkLabelProps = {
|
||||
label: string
|
||||
characterCount: number
|
||||
readonly label: string
|
||||
readonly characterCount: number
|
||||
}
|
||||
|
||||
export const ChunkLabel: FC<ChunkLabelProps> = (props) => {
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import Badge from '@/app/components/base/badge'
|
|||
import { GeneralChunk, ParentChildChunk } from '@/app/components/base/icons/src/vender/knowledge'
|
||||
|
||||
type Props = {
|
||||
isGeneralMode: boolean
|
||||
isQAMode: boolean
|
||||
readonly isGeneralMode: boolean
|
||||
readonly isQAMode: boolean
|
||||
}
|
||||
|
||||
const ChunkingModeLabel: FC<Props> = ({
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@ import cn from '@/utils/classnames'
|
|||
import React, { useCallback, useMemo, useState } from 'react'
|
||||
|
||||
type CredentialIconProps = {
|
||||
avatar_url?: string
|
||||
name: string
|
||||
size?: number
|
||||
className?: string
|
||||
readonly avatar_url?: string
|
||||
readonly name: string
|
||||
readonly size?: number
|
||||
readonly className?: string
|
||||
}
|
||||
|
||||
const ICON_BG_COLORS = [
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ import CopyFeedback from '@/app/components/base/copy-feedback'
|
|||
import SecretKeyButton from '@/app/components/develop/secret-key/secret-key-button'
|
||||
|
||||
type ApiServerProps = {
|
||||
apiBaseUrl: string
|
||||
appId?: string
|
||||
readonly apiBaseUrl: string
|
||||
readonly appId?: string
|
||||
}
|
||||
const ApiServer: FC<ApiServerProps> = ({
|
||||
apiBaseUrl,
|
||||
|
|
|
|||
|
|
@ -3,18 +3,18 @@ import type { PropsWithChildren } from 'react'
|
|||
import classNames from '@/utils/classnames'
|
||||
|
||||
type IChildrenProps = {
|
||||
children: React.ReactNode
|
||||
id?: string
|
||||
tag?: any
|
||||
label?: any
|
||||
anchor: boolean
|
||||
readonly children: React.ReactNode
|
||||
readonly id?: string
|
||||
readonly tag?: any
|
||||
readonly label?: any
|
||||
readonly anchor: boolean
|
||||
}
|
||||
|
||||
type IHeaderingProps = {
|
||||
url: string
|
||||
method: 'PUT' | 'DELETE' | 'GET' | 'POST' | 'PATCH'
|
||||
title: string
|
||||
name: string
|
||||
readonly url: string
|
||||
readonly method: 'PUT' | 'DELETE' | 'GET' | 'POST' | 'PATCH'
|
||||
readonly title: string
|
||||
readonly name: string
|
||||
}
|
||||
|
||||
export const Heading = function H2({
|
||||
|
|
@ -66,7 +66,7 @@ export function Row({ children }: IChildrenProps) {
|
|||
}
|
||||
|
||||
type IColProps = IChildrenProps & {
|
||||
sticky: boolean
|
||||
readonly sticky: boolean
|
||||
}
|
||||
export function Col({ children, sticky = false }: IColProps) {
|
||||
return (
|
||||
|
|
@ -95,8 +95,8 @@ export function Properties({ children }: IChildrenProps) {
|
|||
}
|
||||
|
||||
type IProperty = IChildrenProps & {
|
||||
name: string
|
||||
type: string
|
||||
readonly name: string
|
||||
readonly type: string
|
||||
}
|
||||
export function Property({ name, type, children }: IProperty) {
|
||||
return (
|
||||
|
|
@ -120,8 +120,8 @@ export function Property({ name, type, children }: IProperty) {
|
|||
}
|
||||
|
||||
type ISubProperty = IChildrenProps & {
|
||||
name: string
|
||||
type: string
|
||||
readonly name: string
|
||||
readonly type: string
|
||||
}
|
||||
export function SubProperty({ name, type, children }: ISubProperty) {
|
||||
return (
|
||||
|
|
@ -144,7 +144,7 @@ export function SubProperty({ name, type, children }: ISubProperty) {
|
|||
)
|
||||
}
|
||||
|
||||
export function PropertyInstruction({ children }: PropsWithChildren<{}>) {
|
||||
export function PropertyInstruction({ children }: Readonly<PropsWithChildren<{}>>) {
|
||||
return (
|
||||
<li className="m-0 px-0 py-4 italic first:pt-0">{children}</li>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import Tooltip from '@/app/components/base/tooltip'
|
|||
import CopyFeedback from '@/app/components/base/copy-feedback'
|
||||
|
||||
type IInputCopyProps = {
|
||||
value?: string
|
||||
className?: string
|
||||
children?: React.ReactNode
|
||||
readonly value?: string
|
||||
readonly className?: string
|
||||
readonly children?: React.ReactNode
|
||||
}
|
||||
|
||||
const InputCopy = ({
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import Button from '@/app/components/base/button'
|
|||
import SecretKeyModal from '@/app/components/develop/secret-key/secret-key-modal'
|
||||
|
||||
type ISecretKeyButtonProps = {
|
||||
className?: string
|
||||
appId?: string
|
||||
textCls?: string
|
||||
readonly className?: string
|
||||
readonly appId?: string
|
||||
readonly textCls?: string
|
||||
}
|
||||
|
||||
const SecretKeyButton = ({ className, appId, textCls }: ISecretKeyButtonProps) => {
|
||||
|
|
|
|||
|
|
@ -41,9 +41,9 @@ const valueColorMap = {
|
|||
} as { [key: string]: string }
|
||||
|
||||
type ITagProps = {
|
||||
children: string
|
||||
color?: string
|
||||
variant?: string
|
||||
readonly children: string
|
||||
readonly color?: string
|
||||
readonly variant?: string
|
||||
}
|
||||
|
||||
export function Tag({
|
||||
|
|
|
|||
Loading…
Reference in New Issue