MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / handleCheckboxChange

Function handleCheckboxChange

web/src/components/settings/SystemSetting.js:462–473  ·  view source on GitHub ↗
(optionKey, event)

Source from the content-addressed store, hash-verified

460 };
461
462 const handleCheckboxChange = async (optionKey, event) => {
463 const value = event.target.checked;
464
465 if (optionKey === 'PasswordLoginEnabled' && !value) {
466 setShowPasswordLoginConfirmModal(true);
467 } else {
468 await updateOptions([{ key: optionKey, value }]);
469 }
470 if (optionKey === 'LinuxDOOAuthEnabled') {
471 setLinuxDOOAuthEnabled(value);
472 }
473 };
474
475 const handlePasswordLoginConfirm = async () => {
476 await updateOptions([{ key: 'PasswordLoginEnabled', value: false }]);

Callers 1

SystemSetting.jsFile · 0.85

Calls 1

updateOptionsFunction · 0.85

Tested by

no test coverage detected