mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 09:20:15 +01:00
Fix: style and translation issues (#1172)
* Update Chinese Translation * Update * Update * Update Anthropic UI
This commit is contained in:
parent
e383ecba85
commit
037ea8cc0b
3 changed files with 34 additions and 27 deletions
|
|
@ -4,6 +4,7 @@ import { useRecoilState } from 'recoil';
|
|||
import { Button } from '~/components';
|
||||
import { cn } from '~/utils/';
|
||||
import store from '~/store';
|
||||
import { useLocalize } from '~/hooks';
|
||||
|
||||
type TPopoverButton = {
|
||||
label: string;
|
||||
|
|
@ -21,6 +22,7 @@ export default function PopoverButtons({
|
|||
buttonClass?: string;
|
||||
iconClass?: string;
|
||||
}) {
|
||||
const localize = useLocalize();
|
||||
const [optionSettings, setOptionSettings] = useRecoilState(store.optionSettings);
|
||||
const [showAgentSettings, setShowAgentSettings] = useRecoilState(store.showAgentSettings);
|
||||
const { showExamples, isCodeChat } = optionSettings;
|
||||
|
|
@ -30,7 +32,7 @@ export default function PopoverButtons({
|
|||
const buttons: { [key: string]: TPopoverButton[] } = {
|
||||
google: [
|
||||
{
|
||||
label: (showExamples ? 'Hide' : 'Show') + ' Examples',
|
||||
label: (showExamples ? localize('com_endpoint_hide') : localize('com_endpoint_show')) + localize('com_endpoint_examples'),
|
||||
buttonClass: isCodeChat ? 'disabled' : '',
|
||||
handler: triggerExamples,
|
||||
icon: <MessagesSquared className={cn('mr-1 w-[14px]', iconClass)} />,
|
||||
|
|
@ -38,7 +40,7 @@ export default function PopoverButtons({
|
|||
],
|
||||
gptPlugins: [
|
||||
{
|
||||
label: `Show ${showAgentSettings ? 'Completion' : 'Agent'} Settings`,
|
||||
label: localize('com_endpoint_show_what_settings', showAgentSettings ? localize('com_endpoint_completion') : localize('com_endpoint_agent')),
|
||||
buttonClass: '',
|
||||
handler: () => setShowAgentSettings((prev) => !prev),
|
||||
icon: <GPTIcon className={cn('mr-1 mt-[2px] w-[14px]', iconClass)} size={14} />,
|
||||
|
|
|
|||
|
|
@ -122,10 +122,12 @@ export default function Settings({ conversation, setOption, models, readonly }:
|
|||
<HoverCard openDelay={300}>
|
||||
<HoverCardTrigger className="grid w-full items-center gap-2">
|
||||
<div className="flex justify-between">
|
||||
{localize('com_endpoint_top_p')}{' '}
|
||||
<small className="opacity-40">
|
||||
({localize('com_endpoint_default_with_num', '0.7')})
|
||||
</small>
|
||||
<Label htmlFor="top-p-int" className="text-left text-sm font-medium">
|
||||
{localize('com_endpoint_top_p')}{' '}
|
||||
<small className="opacity-40">
|
||||
({localize('com_endpoint_default_with_num', '0.7')})
|
||||
</small>
|
||||
</Label>
|
||||
<InputNumber
|
||||
id="top-p-int"
|
||||
disabled={readonly}
|
||||
|
|
@ -201,10 +203,12 @@ export default function Settings({ conversation, setOption, models, readonly }:
|
|||
<HoverCard openDelay={300}>
|
||||
<HoverCardTrigger className="grid w-full items-center gap-2">
|
||||
<div className="flex justify-between">
|
||||
{localize('com_endpoint_max_output_tokens')}{' '}
|
||||
<small className="opacity-40">
|
||||
({localize('com_endpoint_default_with_num', '4000')})
|
||||
</small>
|
||||
<Label htmlFor="max-tokens-int" className="text-left text-sm font-medium">
|
||||
{localize('com_endpoint_max_output_tokens')}{' '}
|
||||
<small className="opacity-40">
|
||||
({localize('com_endpoint_default_with_num', '4000')})
|
||||
</small>
|
||||
</Label>
|
||||
<InputNumber
|
||||
id="max-tokens-int"
|
||||
disabled={readonly}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue