pref: copy link (#4147)
This commit is contained in:
parent
1cff21dbae
commit
62baee44fe
@ -58,5 +58,6 @@
|
||||
"user_team_invite_member": "Invite members",
|
||||
"user_team_leave_team": "Leave the team",
|
||||
"user_team_leave_team_failed": "Failure to leave the team",
|
||||
"waiting": "To be accepted"
|
||||
"waiting": "To be accepted",
|
||||
"invitation_copy_link": "[{{systemName}}] {{userName}} invites you to join the {{teamName}} team, link: {{url}}"
|
||||
}
|
||||
|
||||
@ -73,5 +73,6 @@
|
||||
"user_team_invite_member": "邀请成员",
|
||||
"user_team_leave_team": "离开团队",
|
||||
"user_team_leave_team_failed": "离开团队失败",
|
||||
"waiting": "待接受"
|
||||
"waiting": "待接受",
|
||||
"invitation_copy_link": "【{{systemName}}】 {{userName}} 邀请您加入{{teamName}}团队,链接:{{url}}"
|
||||
}
|
||||
|
||||
@ -58,5 +58,6 @@
|
||||
"user_team_invite_member": "邀請成員",
|
||||
"user_team_leave_team": "離開團隊",
|
||||
"user_team_leave_team_failed": "離開團隊失敗",
|
||||
"waiting": "待接受"
|
||||
"waiting": "待接受",
|
||||
"invitation_copy_link": "【{{systemName}}】 {{userName}} 邀請您加入{{teamName}}團隊,連結:{{url}}"
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
import MemberTag from '@/components/support/user/team/Info/MemberTag';
|
||||
import { useSystemStore } from '@/web/common/system/useSystemStore';
|
||||
import { getInvitationLinkList, putUpdateInvitationInfo } from '@/web/support/user/team/api';
|
||||
import { useUserStore } from '@/web/support/user/useUserStore';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@ -56,10 +58,23 @@ const InviteModal = ({
|
||||
|
||||
const isLoading = isLoadingLink;
|
||||
const { copyData } = useCopyData();
|
||||
const { userInfo } = useUserStore();
|
||||
const { feConfigs } = useSystemStore();
|
||||
|
||||
const onCopy = useCallback(
|
||||
(linkId: string) => {
|
||||
copyData(location.origin + `/account/team?invitelinkid=${linkId}`);
|
||||
const url = location.origin + `/account/team?invitelinkid=${linkId}`;
|
||||
const teamName = userInfo?.team.teamName;
|
||||
const systemName = feConfigs.systemTitle;
|
||||
const userName = userInfo?.team.memberName;
|
||||
copyData(
|
||||
t('account_team:invitation_copy_link', {
|
||||
teamName,
|
||||
systemName,
|
||||
userName,
|
||||
url
|
||||
})
|
||||
);
|
||||
},
|
||||
[copyData]
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user