Skip to content

Fix payment settings checkboxes; add expiry date & daily points to server console panel#1

Draft
Copilot wants to merge 7 commits into
1.0-developfrom
copilot/add-idc-integration-and-features
Draft

Fix payment settings checkboxes; add expiry date & daily points to server console panel#1
Copilot wants to merge 7 commits into
1.0-developfrom
copilot/add-idc-integration-and-features

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 8, 2026

AdminLTE's box-widget JS intercepted click events inside nested collapsible boxes, making the payment-method enable checkboxes unresponsive. The server console status panel was also missing the expiry date and daily points cost that are already available from the API transformer.

Payment settings – checkbox fix

Replaced the three nested box box-info/warning/success + data-widget="collapse" structures with callout dividers separated by <hr>. Callouts are purely decorative (no JS), so no widget code can intercept checkbox clicks.

Server console – new stat blocks (ServerDetailsBlock.tsx)

Added two conditional StatBlock entries appended after the existing seven:

Block Source field Shown when Colour
到期时间 server.expiresAt non-null grey → yellow (< 7 days) → red (expired)
每日积分 server.pointsPerDay non-null grey, {n} 积分/天

The stat_block CSS (lg:col-span-6) already stacks each block to a full row in the narrow side panel on large screens, so no layout changes were needed.

// Colour-coded expiry block
{expiryInfo && (
    <StatBlock
        icon={faCalendarAlt}
        title={'到期时间'}
        color={expiryInfo.isExpired ? 'bg-red-500' : expiryInfo.isExpiringSoon ? 'bg-yellow-500' : undefined}
    >
        <span className={expiryInfo.isExpired ? 'text-red-400' : expiryInfo.isExpiringSoon ? 'text-yellow-400' : ''}>
            {expiryInfo.isExpired && <span className={'mr-1'}>已到期</span>}
            {expiryInfo.label}
        </span>
    </StatBlock>
)}

Both fields (expires_at, points_per_day) are already emitted by ServerTransformer and mapped in rawDataToServerObject; no backend changes required.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…and payments

Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add IDC integration with expiration and payment features Add IDC integration: server expiry display, points system, redemption codes, store, and payment support Mar 8, 2026
Copilot finished work on behalf of vlssu March 8, 2026 01:56
…ction

Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Copilot AI changed the title Add IDC integration: server expiry display, points system, redemption codes, store, and payment support IDC store: admin management pages, top-nav store button, resource-based daily points system Mar 8, 2026
Copilot finished work on behalf of vlssu March 8, 2026 02:44
…, server packages

Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Copilot AI changed the title IDC store: admin management pages, top-nav store button, resource-based daily points system IDC Store: location-based server packages, payment gateway settings, order/ticket management Mar 8, 2026
Copilot finished work on behalf of vlssu March 8, 2026 03:19
…nue-payment button

Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Copilot AI changed the title IDC Store: location-based server packages, payment gateway settings, order/ticket management IDC store: fix points page crash, per-node daily rates, payment settings styling, resume pending payment Mar 8, 2026
Copilot finished work on behalf of vlssu March 8, 2026 03:48
Copilot AI and others added 2 commits March 8, 2026 04:28
Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Co-authored-by: vlssu <43847794+vlssu@users.noreply.github.com>
Copilot AI changed the title IDC store: fix points page crash, per-node daily rates, payment settings styling, resume pending payment Fix payment settings checkboxes; add expiry date & daily points to server console panel Mar 8, 2026
Copilot finished work on behalf of vlssu March 8, 2026 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants