fix(ui): prevent crashes when editing authentication priority
This commit is contained in:
1 parent
72bd0d5cfd
commit
759630294e
2 files changed
+8
-4
No files matched your search
@@ -588,9 +588,12 @@ export function AuthFileManagementPage() {
|
||||
placeholder={t('authFiles.priority.placeholder')}
|
||||
disabled={busy}
|
||||
aria-invalid={Boolean(priorityEditor.error)}
|
||||
onChange={(event) => setPriorityEditor((current) => current
|
||||
? { ...current, value: event.currentTarget.value, error: '' }
|
||||
: current)}
|
||||
onChange={(event) => {
|
||||
const value = event.currentTarget.value;
|
||||
setPriorityEditor((current) => current
|
||||
? { ...current, value, error: '' }
|
||||
: current);
|
||||
}}
|
||||
/>
|
||||
<small>{t('authFiles.priority.hint')}</small>
|
||||
</label>
|
||||
|
||||
@@ -489,9 +489,10 @@ export function CodexSessionsPanel() {
|
||||
type="checkbox"
|
||||
checked={cleanupSelectedIds.has(candidate.id)}
|
||||
onChange={(event) => {
|
||||
const checked = event.currentTarget.checked;
|
||||
setCleanupSelectedIds((current) => {
|
||||
const next = new Set(current);
|
||||
if (event.currentTarget.checked) next.add(candidate.id);
|
||||
if (checked) next.add(candidate.id);
|
||||
else next.delete(candidate.id);
|
||||
return next;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user