diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f149970..92e0f87 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -20,7 +20,7 @@ concurrency: jobs: build: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index bf2c33a..4395070 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -11,7 +11,7 @@ concurrency: jobs: test: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout diff --git a/frontend/src/app.css b/frontend/src/app.css index 0288f53..ac0be84 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -286,6 +286,20 @@ body { margin-top: 2px; } +.bbs-member-select-item .ant-form-item-label > label { + width: 100%; +} + +.bbs-member-select-label { + flex: 1; + width: 100%; +} + +.bbs-member-select-label .ant-btn { + padding-inline: 0; + height: auto; +} + .bbs-member-check-group { display: flex; flex-direction: column; diff --git a/frontend/src/pages/ItemAddPage.tsx b/frontend/src/pages/ItemAddPage.tsx index 944765a..97109a1 100644 --- a/frontend/src/pages/ItemAddPage.tsx +++ b/frontend/src/pages/ItemAddPage.tsx @@ -111,6 +111,17 @@ export function ItemAddPage() { }, [watchPartyId]); const headCount = selectedUsers.length; + const allMemberIds = useMemo(() => members.map((m) => m.id), [members]); + const allSelected = allMemberIds.length > 0 && allMemberIds.every((id) => selectedUsers.includes(id)); + + const toggleSelectAllUsers = () => { + const next = allSelected ? [] : allMemberIds; + const hadError = form.getFieldError('users').length > 0; + form.setFieldsValue({users: next}); + if (next.length > 0 || hadError) { + void form.validateFields(['users']).catch(() => undefined); + } + }; const preview = useMemo(() => { if (splitMode === 'custom') return null; const raw = Number(amountInput); @@ -285,7 +296,26 @@ export function ItemAddPage() { + 记入谁名下(可多选) + + + } rules={[{required: true, type: 'array', min: 1, message: '请至少选择一名成员'}]} >