🚀 feat: Add Option to Disable Shared Links (#2986)

* feat: add option to disable shared links

* chore: update languages

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
Yuichi Oneda 2024-06-15 08:12:03 -07:00 committed by GitHub
parent 04502e9525
commit 8d8b17e7ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 618 additions and 467 deletions

View file

@ -8,7 +8,13 @@ import useLocalize from '~/hooks/useLocalize';
import ExportButton from './ExportButton';
import store from '~/store';
export default function ExportAndShareMenu({ className = '' }: { className?: string }) {
export default function ExportAndShareMenu({
isSharedButtonEnabled,
className = '',
}: {
isSharedButtonEnabled: boolean;
className?: string;
}) {
const localize = useLocalize();
const conversation = useRecoilValue(store.conversationByIndex(0));
@ -41,13 +47,15 @@ export default function ExportAndShareMenu({ className = '' }: { className?: str
{conversation && conversation.conversationId && (
<>
<ExportButton conversation={conversation} setPopoverActive={setIsPopoverActive} />
<ShareButton
conversationId={conversation.conversationId}
title={conversation.title ?? ''}
appendLabel={true}
className="mb-[3.5px]"
setPopoverActive={setIsPopoverActive}
/>
{isSharedButtonEnabled && (
<ShareButton
conversationId={conversation.conversationId}
title={conversation.title ?? ''}
appendLabel={true}
className="mb-[3.5px]"
setPopoverActive={setIsPopoverActive}
/>
)}
</>
)}
</DropDownMenu>