fix(admin): fix cpu pinning showing as disabled when thread 0 is configured (#2419)

This commit is contained in:
wuzuantw
2026-07-02 20:24:02 +08:00
committed by GitHub
parent 00a56398fb
commit d4e974b806

View File

@@ -390,7 +390,7 @@ class EditServer extends EditRecord
->label(trans('admin/server.cpu_pin'))->inlineLabel()->inline()
->default(0)
->afterStateUpdated(fn (Set $set) => $set('threads', []))
->formatStateUsing(fn (Get $get) => !empty($get('threads')))
->formatStateUsing(fn (Get $get) => filled($get('threads')))
->live()
->stateCast(new BooleanStateCast(false, true))
->options([