Repository navigation
feat(ui): replace point sources with month point changes card - #29
Merged
Merged
Conversation
The dashboard's "点数来源 Point sources" card showed a static point composition, which users don't find intuitive. Replace it (dashboard and wallet) with a "本月点数变化 Month point changes" card that aggregates the last month's point movements by type (gift/expire/earn/consume/ topup/withdraw) with a net change summary. Signs are colored (positive accent, negative red). Data now comes from D.TRANSACTIONS aggregation instead of the static D.POINT_SOURCES array (removed). No mechanism wording (validity, priority) is shown. Refs: rant 2026-08-17T10:45:27 (仪表盘"点数来源"改为"近 1 月点数变化明细")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the dashboard "点数来源 Point sources" card (and the matching wallet card) with "本月点数变化 Month point changes" — a per-type aggregation of the last month's point movements, with a net-change summary. The data source moves from the static
D.POINT_SOURCESarray to a live aggregation ofD.TRANSACTIONS.Rant reference
Host instruction (rant
2026-08-17T10:45:27, 仪表盘"点数来源"改为"近 1 月点数变化明细"):Changes
ui/index.html: dashboard + wallet card retitled to "本月点数变化 Month point changes", ids renamed (dash-point-sources→dash-month-changes,points-sources→month-changes)ui/js/app.js: newrenderMonthChanges()aggregatesD.TRANSACTIONSby type (赠送 gift / 过期 expire / 收益 earn / 消费 consume / 充值 topup / 提现 withdraw), renders each row with sign and color (positive accent green, negative red) plus a highlighted "本月净变化 Net change" summary row; zero-change types are hidden. RemovedpointSourceItem/renderPointSources()and the now-deadD.POINT_SOURCESmutation inconfirmTopup()ui/js/data.js: removed the staticPOINT_SOURCESarray (no longer the data source)ui/css/style.css: added.pts.neg(red for negatives) and.mini-item.net(accent highlight for the net row)ui/README.md: synced dashboard / wallet card descriptionsVerification
grep -rn "Point sources|POINT_SOURCES|renderPointSources|points-sources|dash-point-sources" ui/→ no functional referencesnode --check ui/js/app.js/ui/js/data.jspasscargo testpasses (1 passed)cargo fmt --checkpasses