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
Unverified
Commit
3e133976
authored
Feb 18, 2025
by
Finley Ge
Committed by
GitHub
Feb 18, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: refresh memberlist when switching account (#3814)
parent
b14674cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
projects/app/src/pageComponents/account/TeamSelector.tsx
+3
-0
projects/app/src/pages/account/info/index.tsx
+2
-2
projects/app/src/pages/account/team/index.tsx
+5
-2
No files found.
projects/app/src/pageComponents/account/TeamSelector.tsx
View file @
3e133976
...
...
@@ -13,9 +13,11 @@ import { useRouter } from 'next/router';
const
TeamSelector
=
({
showManage
,
afterSwitchTeam
,
...
props
}:
ButtonProps
&
{
showManage
?:
boolean
;
afterSwitchTeam
?:
()
=>
void
;
})
=>
{
const
{
t
}
=
useTranslation
();
const
router
=
useRouter
();
...
...
@@ -36,6 +38,7 @@ const TeamSelector = ({
{
onFinally
:
()
=>
{
setLoading
(
false
);
afterSwitchTeam
?.();
},
errorToast
:
t
(
'common:user.team.Switch Team Failed'
)
}
...
...
projects/app/src/pages/account/info/index.tsx
View file @
3e133976
...
...
@@ -110,7 +110,7 @@ const MyInfo = ({ onOpenContact }: { onOpenContact: () => void }) => {
const
theme
=
useTheme
();
const
{
feConfigs
}
=
useSystemStore
();
const
{
t
}
=
useTranslation
();
const
{
userInfo
,
updateUserInfo
,
teamPlanStatus
}
=
useUserStore
();
const
{
userInfo
,
updateUserInfo
,
teamPlanStatus
,
initUserInfo
}
=
useUserStore
();
const
{
reset
}
=
useForm
<
UserUpdateParams
>
({
defaultValues
:
userInfo
as
UserType
});
...
...
@@ -284,7 +284,7 @@ const MyInfo = ({ onOpenContact }: { onOpenContact: () => void }) => {
<
Flex
mt=
{
6
}
alignItems=
{
'center'
}
>
<
Box
{
...
labelStyles
}
>
{
t
(
'account_info:user_team_team_name'
)
}
:
</
Box
>
<
Flex
flex=
{
'1 0 0'
}
w=
{
0
}
align=
{
'center'
}
>
<
TeamSelector
height=
{
'28px'
}
w=
{
'100%'
}
showManage
/>
<
TeamSelector
height=
{
'28px'
}
w=
{
'100%'
}
showManage
afterSwitchTeam=
{
initUserInfo
}
/>
</
Flex
>
</
Flex
>
)
}
...
...
projects/app/src/pages/account/team/index.tsx
View file @
3e133976
...
...
@@ -35,7 +35,10 @@ const Team = () => {
const
{
t
}
=
useTranslation
();
const
{
userInfo
}
=
useUserStore
();
const
{
setEditTeamData
,
isLoading
,
teamSize
}
=
useContextSelector
(
TeamContext
,
(
v
)
=>
v
);
const
{
setEditTeamData
,
isLoading
,
teamSize
,
refetchMembers
}
=
useContextSelector
(
TeamContext
,
(
v
)
=>
v
);
const
Tabs
=
useMemo
(
()
=>
(
...
...
@@ -85,7 +88,7 @@ const Team = () => {
</
Box
>
</
Flex
>
<
Flex
align=
{
'center'
}
ml=
{
6
}
>
<
TeamSelector
height=
{
'28px'
}
/>
<
TeamSelector
height=
{
'28px'
}
afterSwitchTeam=
{
refetchMembers
}
/>
</
Flex
>
{
userInfo
?.
team
?.
role
===
TeamMemberRoleEnum
.
owner
&&
(
<
Flex
align=
{
'center'
}
justify=
{
'center'
}
ml=
{
2
}
p=
{
'0.44rem'
}
>
...
...
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