mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-05 01:58:50 +01:00
- Deleted GenericManagePermissionsDialog and GrantAccessDialog components to streamline sharing functionality. - Updated ManagePermissionsDialog to utilize AccessRolesPicker directly. - Introduced UnifiedPeopleSearch for improved people selection experience. - Enhanced PublicSharingToggle with InfoHoverCard for better user guidance. - Adjusted AgentPanel to change error status to warning for duplicate agent versions. - Updated translations to include new keys for search and access management.
30 lines
1,004 B
TypeScript
30 lines
1,004 B
TypeScript
import React from 'react';
|
|
import { useRecoilState } from 'recoil';
|
|
import { Switch, Label, InfoHoverCard, ESide } from '@librechat/client';
|
|
import { useLocalize } from '~/hooks';
|
|
import store from '~/store';
|
|
|
|
export default function DisplayUsernameMessages() {
|
|
const localize = useLocalize();
|
|
const [UsernameDisplay, setUsernameDisplay] = useRecoilState(store.UsernameDisplay);
|
|
|
|
const handleCheckedChange = (checked: boolean) => {
|
|
setUsernameDisplay(checked);
|
|
};
|
|
|
|
return (
|
|
<div className="flex items-center justify-between">
|
|
<div className="flex items-center space-x-2">
|
|
<Label className="font-light">{localize('com_nav_user_name_display')}</Label>
|
|
<InfoHoverCard side={ESide.Bottom} text={localize('com_nav_info_user_name_display')} />
|
|
</div>
|
|
<Switch
|
|
id="UsernameDisplay"
|
|
checked={UsernameDisplay}
|
|
onCheckedChange={handleCheckedChange}
|
|
className="ml-4"
|
|
data-testid="UsernameDisplay"
|
|
/>
|
|
</div>
|
|
);
|
|
}
|