Skip to content

Commit

Permalink
fix misuse of radio checkbox for boolean value
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Apr 28, 2024
1 parent 4735d20 commit 95a7b8c
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/components/AdminSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,20 @@
<div class="radios">
<NcCheckboxRadioSwitch
:button-variant="true"
:checked.sync="state.use_basic_auth"
:checked="!state.use_basic_auth"
type="radio"
:value="false"
button-variant-grouped="horizontal"
name="auth_method"
@update:checked="onCheckboxChanged($event, 'use_basic_auth')">
@update:checked="onCheckboxChanged(false, 'use_basic_auth')">
{{ t('assistant', 'API key') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch
:button-variant="true"
:checked.sync="state.use_basic_auth"
:checked="state.use_basic_auth"
type="radio"
:value="true"
button-variant-grouped="horizontal"
name="auth_method"
@update:checked="onCheckboxChanged($event, 'use_basic_auth')">
@update:checked="onCheckboxChanged(true, 'use_basic_auth')">
{{ t('assistant', 'Basic Authentication') }}
</NcCheckboxRadioSwitch>
</div>
Expand Down Expand Up @@ -141,22 +139,20 @@
<div class="radios">
<NcCheckboxRadioSwitch
:button-variant="true"
:checked.sync="state.chat_endpoint_enabled"
:checked="state.chat_endpoint_enabled"
type="radio"
:value="true"
button-variant-grouped="horizontal"
name="chat_endpoint"
@update:checked="onCheckboxChanged($event, 'chat_endpoint_enabled', false)">
@update:checked="onCheckboxChanged(true, 'chat_endpoint_enabled', false)">
{{ t('assistant', 'Chat completions') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch
:button-variant="true"
:checked.sync="state.chat_endpoint_enabled"
:checked="!state.chat_endpoint_enabled"
type="radio"
:value="false"
button-variant-grouped="horizontal"
name="chat_endpoint"
@update:checked="onCheckboxChanged($event, 'chat_endpoint_enabled', false)">
@update:checked="onCheckboxChanged(false, 'chat_endpoint_enabled', false)">
{{ t('assistant', 'Completions') }}
</NcCheckboxRadioSwitch>
</div>
Expand Down

0 comments on commit 95a7b8c

Please sign in to comment.