mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 18:30:15 +01:00
fix: bingAI/settings: wrong usage of checkbox
This commit is contained in:
parent
e7c9ae5a7d
commit
ea88e9b981
1 changed files with 11 additions and 10 deletions
|
|
@ -15,8 +15,9 @@ const optionText =
|
|||
'p-0 shadow-none text-right pr-1 h-8 border-transparent focus:ring-[#10a37f] focus:ring-offset-0 focus:ring-opacity-100 hover:bg-gray-800/10 dark:hover:bg-white/10 focus:bg-gray-800/10 dark:focus:bg-white/10 transition-colors';
|
||||
|
||||
function Settings(props) {
|
||||
const [showSystemMessage, setShowSystemMessage] = React.useState(false);
|
||||
// const [showSystemMessage, setShowSystemMessage] = React.useState(false);
|
||||
const { context, setContext, systemMessage, setSystemMessage, jailbreak, setJailbreak } = props;
|
||||
const showSystemMessage = jailbreak;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
@ -46,12 +47,12 @@ function Settings(props) {
|
|||
<div className="flex items-center space-x-3">
|
||||
<Checkbox
|
||||
id="jailbreak"
|
||||
value={jailbreak}
|
||||
checked={jailbreak}
|
||||
className="dark:border-gray-500 dark:bg-gray-700 dark:text-gray-50 focus:ring-opacity-20 dark:focus:ring-opacity-50 dark:focus:ring-offset-0 dark:focus:ring-gray-600"
|
||||
// onCheckedChange={setJailbreak}
|
||||
onCheckedChange={checked => {
|
||||
setJailbreak(checked);
|
||||
setShowSystemMessage(checked);
|
||||
// setShowSystemMessage(checked);
|
||||
}}
|
||||
/>
|
||||
<label
|
||||
|
|
@ -60,13 +61,13 @@ function Settings(props) {
|
|||
>
|
||||
Jailbreak
|
||||
</label>
|
||||
<Label
|
||||
htmlFor="systemMessage"
|
||||
className="text-right text-sm font-medium mr-0 w-full"
|
||||
style={{ opacity: showSystemMessage ? '1' : '0' }}
|
||||
>
|
||||
System Message <small className="opacity-40">(default: Sydney)</small>
|
||||
</Label>
|
||||
<Label
|
||||
htmlFor="systemMessage"
|
||||
className="text-right text-sm font-medium mr-0 w-full"
|
||||
style={{ opacity: showSystemMessage ? '1' : '0' }}
|
||||
>
|
||||
System Message <small className="opacity-40">(default: Sydney)</small>
|
||||
</Label>
|
||||
</div>
|
||||
{showSystemMessage && (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue