Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d74e6a47
authored
Sep 12, 2024
by
Finley Ge
Committed by
Archer
Sep 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: chat log get member info
parent
424c745c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
projects/app/src/pages/app/detail/components/Logs/index.tsx
+10
-7
No files found.
projects/app/src/pages/app/detail/components/Logs/index.tsx
View file @
d74e6a47
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
use
Effect
,
use
State
}
from
'react'
;
import
{
import
{
Flex
,
Flex
,
Box
,
Box
,
...
@@ -23,7 +23,6 @@ import MyModal from '@fastgpt/web/components/common/MyModal';
...
@@ -23,7 +23,6 @@ import MyModal from '@fastgpt/web/components/common/MyModal';
import
{
addDays
}
from
'date-fns'
;
import
{
addDays
}
from
'date-fns'
;
import
{
usePagination
}
from
'@fastgpt/web/hooks/usePagination'
;
import
{
usePagination
}
from
'@fastgpt/web/hooks/usePagination'
;
import
DateRangePicker
,
{
DateRangeType
}
from
'@fastgpt/web/components/common/DateRangePicker'
;
import
DateRangePicker
,
{
DateRangeType
}
from
'@fastgpt/web/components/common/DateRangePicker'
;
import
{
useI18n
}
from
'@/web/context/I18n'
;
import
EmptyTip
from
'@fastgpt/web/components/common/EmptyTip'
;
import
EmptyTip
from
'@fastgpt/web/components/common/EmptyTip'
;
import
{
useContextSelector
}
from
'use-context-selector'
;
import
{
useContextSelector
}
from
'use-context-selector'
;
import
{
AppContext
}
from
'../context'
;
import
{
AppContext
}
from
'../context'
;
...
@@ -37,11 +36,15 @@ const DetailLogsModal = dynamic(() => import('./DetailLogsModal'));
...
@@ -37,11 +36,15 @@ const DetailLogsModal = dynamic(() => import('./DetailLogsModal'));
const
Logs
=
()
=>
{
const
Logs
=
()
=>
{
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
const
{
appT
}
=
useI18n
();
const
{
isPc
}
=
useSystem
();
const
{
isPc
}
=
useSystem
();
const
appId
=
useContextSelector
(
AppContext
,
(
v
)
=>
v
.
appId
);
const
appId
=
useContextSelector
(
AppContext
,
(
v
)
=>
v
.
appId
);
const
{
teamMembers
}
=
useUserStore
();
const
{
teamMembers
,
loadAndGetTeamMembers
}
=
useUserStore
();
useEffect
(()
=>
{
if
(
teamMembers
.
length
)
return
;
loadAndGetTeamMembers
(
true
);
},
[]);
const
[
dateRange
,
setDateRange
]
=
useState
<
DateRangeType
>
({
const
[
dateRange
,
setDateRange
]
=
useState
<
DateRangeType
>
({
from
:
addDays
(
new
Date
(),
-
7
),
from
:
addDays
(
new
Date
(),
-
7
),
...
@@ -77,10 +80,10 @@ const Logs = () => {
...
@@ -77,10 +80,10 @@ const Logs = () => {
{
isPc
&&
(
{
isPc
&&
(
<
Box
{
...
cardStyles
}
boxShadow=
{
2
}
px=
{
[
4
,
8
]
}
py=
{
[
4
,
6
]
}
>
<
Box
{
...
cardStyles
}
boxShadow=
{
2
}
px=
{
[
4
,
8
]
}
py=
{
[
4
,
6
]
}
>
<
Box
fontWeight=
{
'bold'
}
fontSize=
{
[
'md'
,
'lg'
]
}
mb=
{
2
}
>
<
Box
fontWeight=
{
'bold'
}
fontSize=
{
[
'md'
,
'lg'
]
}
mb=
{
2
}
>
{
appT
(
'
chat_logs'
)
}
{
t
(
'app:
chat_logs'
)
}
</
Box
>
</
Box
>
<
Box
color=
{
'myGray.500'
}
fontSize=
{
'sm'
}
>
<
Box
color=
{
'myGray.500'
}
fontSize=
{
'sm'
}
>
{
appT
(
'
chat_logs_tips'
)
}
,
{
' '
}
{
t
(
'app:
chat_logs_tips'
)
}
,
{
' '
}
<
Box
<
Box
as=
{
'span'
}
as=
{
'span'
}
mr=
{
2
}
mr=
{
2
}
...
@@ -201,7 +204,7 @@ const Logs = () => {
...
@@ -201,7 +204,7 @@ const Logs = () => {
))
}
))
}
</
Tbody
>
</
Tbody
>
</
Table
>
</
Table
>
{
logs
.
length
===
0
&&
!
isLoading
&&
<
EmptyTip
text=
{
appT
(
'
logs_empty'
)
}
></
EmptyTip
>
}
{
logs
.
length
===
0
&&
!
isLoading
&&
<
EmptyTip
text=
{
t
(
'app:
logs_empty'
)
}
></
EmptyTip
>
}
</
TableContainer
>
</
TableContainer
>
<
HStack
w=
{
'100%'
}
mt=
{
3
}
justifyContent=
{
'flex-end'
}
>
<
HStack
w=
{
'100%'
}
mt=
{
3
}
justifyContent=
{
'flex-end'
}
>
...
...
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