mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-18 01:15:54 +08:00
### What problem does this PR solve? Feat: Modify the prompt text for deleting team members #2834 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
55692e4da6
commit
8872aed512
@ -77,6 +77,7 @@ export function useDynamicSVGImport(
|
||||
}
|
||||
|
||||
interface IProps {
|
||||
title?: string;
|
||||
onOk?: (...args: any[]) => any;
|
||||
onCancel?: (...args: any[]) => any;
|
||||
}
|
||||
@ -86,10 +87,10 @@ export const useShowDeleteConfirm = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const showDeleteConfirm = useCallback(
|
||||
({ onOk, onCancel }: IProps): Promise<number> => {
|
||||
({ title, onOk, onCancel }: IProps): Promise<number> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
modal.confirm({
|
||||
title: t('common.deleteModalTitle'),
|
||||
title: title ?? t('common.deleteModalTitle'),
|
||||
icon: <ExclamationCircleFilled />,
|
||||
// content: 'Some descriptions',
|
||||
okText: t('common.ok'),
|
||||
|
@ -2,7 +2,7 @@ export default {
|
||||
translation: {
|
||||
common: {
|
||||
delete: 'Delete',
|
||||
deleteModalTitle: 'Are you sure delete this item?',
|
||||
deleteModalTitle: 'Are you sure to delete this item?',
|
||||
ok: 'Yes',
|
||||
cancel: 'No',
|
||||
total: 'Total',
|
||||
@ -598,6 +598,7 @@ The above is the content you need to summarize.`,
|
||||
refuse: 'Decline',
|
||||
teamMembers: 'Team Members',
|
||||
joinedTeams: 'Joined Teams',
|
||||
sureDelete: 'Are you sure to remove this member?',
|
||||
},
|
||||
message: {
|
||||
registered: 'Registered!',
|
||||
|
@ -565,6 +565,7 @@ export default {
|
||||
refuse: '拒絕',
|
||||
teamMembers: '團隊成員',
|
||||
joinedTeams: '加入的團隊',
|
||||
sureDelete: '您確定刪除該成員嗎?',
|
||||
},
|
||||
message: {
|
||||
registered: '註冊成功',
|
||||
|
@ -585,6 +585,7 @@ export default {
|
||||
refuse: '拒绝',
|
||||
teamMembers: '团队成员',
|
||||
joinedTeams: '加入的团队',
|
||||
sureDelete: '您确定要删除该成员吗?',
|
||||
},
|
||||
message: {
|
||||
registered: '注册成功',
|
||||
|
@ -6,6 +6,7 @@ import {
|
||||
useFetchUserInfo,
|
||||
} from '@/hooks/user-setting-hooks';
|
||||
import { useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const useAddUser = () => {
|
||||
const { addTenantUser } = useAddTenantUser();
|
||||
@ -36,9 +37,11 @@ export const useAddUser = () => {
|
||||
export const useHandleDeleteUser = () => {
|
||||
const { deleteTenantUser, loading } = useDeleteTenantUser();
|
||||
const showDeleteConfirm = useShowDeleteConfirm();
|
||||
const { t } = useTranslation();
|
||||
|
||||
const handleDeleteTenantUser = (userId: string) => () => {
|
||||
showDeleteConfirm({
|
||||
title: t('setting.sureDelete'),
|
||||
onOk: async () => {
|
||||
const code = await deleteTenantUser({ userId });
|
||||
if (code === 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user