Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
8ae1eb0e
Unverified
Commit
8ae1eb0e
authored
Aug 07, 2023
by
Matri
Committed by
GitHub
Aug 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lint: frontend linting issues (#744)
parent
2ba89d0d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
58 deletions
+60
-58
index.tsx
web/app/components/app/chat/copy-btn/index.tsx
+14
-15
index.tsx
web/app/components/app/text-generate/saved-items/index.tsx
+46
-43
No files found.
web/app/components/app/chat/copy-btn/index.tsx
View file @
8ae1eb0e
'use client'
import
React
from
'react'
import
Tooltip
from
'@/app/components/base/tooltip'
import
{
t
}
from
'i18next'
import
s
from
'./style.module.css'
import
copy
from
'copy-to-clipboard'
import
s
from
'./style.module.css'
import
Tooltip
from
'@/app/components/base/tooltip'
type
ICopyBtnProps
=
{
value
:
string
...
...
@@ -25,9 +24,9 @@ const CopyBtn = ({
className=
'z-10'
>
<
div
className=
{
`box-border p-0.5 flex items-center justify-center rounded-md bg-white cursor-pointer`
}
className=
{
'box-border p-0.5 flex items-center justify-center rounded-md bg-white cursor-pointer'
}
style=
{
{
boxShadow
:
'0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06)'
boxShadow
:
'0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06)'
,
}
}
onClick=
{
()
=>
{
copy
(
value
)
...
...
web/app/components/app/text-generate/saved-items/index.tsx
View file @
8ae1eb0e
'use client'
import
React
,
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
{
useTranslation
}
from
'react-i18next'
import
cn
from
'classnames'
import
copy
from
'copy-to-clipboard'
import
NoData
from
'./no-data'
import
type
{
SavedMessage
}
from
'@/models/debug'
import
{
Markdown
}
from
'@/app/components/base/markdown'
import
{
SimpleBtn
,
copyIcon
}
from
'@/app/components/app/text-generate/item'
import
copy
from
'copy-to-clipboard'
import
Toast
from
'@/app/components/base/toast'
import
NoData
from
'./no-data'
export
interface
ISavedItemsProps
{
export
type
ISavedItemsProps
=
{
className
?:
string
list
:
SavedMessage
[]
,
list
:
SavedMessage
[]
onRemove
:
(
id
:
string
)
=>
void
onStartCreateContent
:
()
=>
void
}
...
...
@@ -26,23 +27,25 @@ const SavedItems: FC<ISavedItemsProps> = ({
className
,
list
,
onRemove
,
onStartCreateContent
onStartCreateContent
,
})
=>
{
const
{
t
}
=
useTranslation
()
return
(
<
div
className=
{
cn
(
className
,
'space-y-3'
)
}
>
{
list
.
length
===
0
?
(
{
list
.
length
===
0
?
(
<
div
className=
'px-6'
>
<
NoData
onStartCreateContent=
{
onStartCreateContent
}
/>
</
div
>
)
:
(<>
)
:
(<>
{
list
.
map
(({
id
,
answer
})
=>
(
<
div
key=
{
id
}
className=
'p-4 rounded-xl bg-gray-50'
style=
{
{
boxShadow
:
'0px 1px 2px rgba(16, 24, 40, 0.05)'
boxShadow
:
'0px 1px 2px rgba(16, 24, 40, 0.05)'
,
}
}
>
<
Markdown
content=
{
answer
}
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment