mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
Merge pull request #171 from git-bruh/main
fix: replace various anchor tags with buttons to prevent text selection on repeated clicks
This commit is contained in:
commit
5fbefa15ce
4 changed files with 8 additions and 8 deletions
|
|
@ -25,13 +25,13 @@ export default function ClearConvos() {
|
||||||
return (
|
return (
|
||||||
<Dialog>
|
<Dialog>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<a
|
<button
|
||||||
className="flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10"
|
className="flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10"
|
||||||
// onClick={clickHandler}
|
// onClick={clickHandler}
|
||||||
>
|
>
|
||||||
<TrashIcon />
|
<TrashIcon />
|
||||||
Clear conversations
|
Clear conversations
|
||||||
</a>
|
</button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
<DialogTemplate
|
<DialogTemplate
|
||||||
title="Clear conversations"
|
title="Clear conversations"
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@ export default function DarkMode() {
|
||||||
const mode = theme === 'dark' ? 'Light mode' : 'Dark mode';
|
const mode = theme === 'dark' ? 'Light mode' : 'Dark mode';
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a
|
<button
|
||||||
className="flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10"
|
className="flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10"
|
||||||
onClick={clickHandler}
|
onClick={clickHandler}
|
||||||
>
|
>
|
||||||
{theme === 'dark' ? <LightModeIcon /> : <DarkModeIcon />}
|
{theme === 'dark' ? <LightModeIcon /> : <DarkModeIcon />}
|
||||||
{mode}
|
{mode}
|
||||||
</a>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export default function ExportConversation() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<a
|
<button
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex items-center gap-3 rounded-md py-3 px-3 text-sm transition-colors duration-200 hover:bg-gray-500/10',
|
'flex items-center gap-3 rounded-md py-3 px-3 text-sm transition-colors duration-200 hover:bg-gray-500/10',
|
||||||
exportable ? 'cursor-pointer text-white' : 'cursor-not-allowed text-gray-400'
|
exportable ? 'cursor-pointer text-white' : 'cursor-not-allowed text-gray-400'
|
||||||
|
|
@ -32,7 +32,7 @@ export default function ExportConversation() {
|
||||||
>
|
>
|
||||||
<Download size={16} />
|
<Download size={16} />
|
||||||
Export conversation
|
Export conversation
|
||||||
</a>
|
</button>
|
||||||
|
|
||||||
<ExportModel
|
<ExportModel
|
||||||
open={open}
|
open={open}
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,13 @@ export default function Logout() {
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<a
|
<button
|
||||||
className="flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10"
|
className="flex cursor-pointer items-center gap-3 rounded-md py-3 px-3 text-sm text-white transition-colors duration-200 hover:bg-gray-500/10"
|
||||||
onClick={clickHandler}
|
onClick={clickHandler}
|
||||||
>
|
>
|
||||||
<LogOutIcon />
|
<LogOutIcon />
|
||||||
{user?.display || user?.username || 'USER'}
|
{user?.display || user?.username || 'USER'}
|
||||||
<small>Log out</small>
|
<small>Log out</small>
|
||||||
</a>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue