Files
wordpress-theme-aksrt/assets/css/routes/user-center/revenue.css
T
kate522andClaude Fable 5 7761435a81 refactor(revenue): drop standalone QR block and align promotion card with reference
The 推广收益 detail card no longer renders the QR code as its own row. The
card becomes a fixed-label info list: 推广链接 [Url][复制链接][推广海报] /
佣金比例 / 累计佣金 / 返佣详解, mirroring the reference theme's 推广中心 card.

- profile-revenue.php: QR row removed; poster button moved into the link row and
  gated server-side on the poster switch; copy label now 复制链接; 推广人数 row
  dropped; 返佣详解 heading reads the existing pay_rebate_text_details_title;
  dead $vip_ratios, aksrt-revenue-page class and data-min-amount removed
- new affiliate-poster-modal.php: poster previews in a modal before download
  (reuses .uc-modal + single-render guard), since the QR now only exists inside
  the poster
- credits.js: renderAffiliateQr and its call deleted, along with the dead
  [data-affiliate-payers] lookup and the inline ch-width hack; initAffiliatePoster
  builds the poster into the modal stage and reveals 保存海报
- PaymentRuntime: expose affiliate details_title
- user-center.js: remove never-defined AKSRTRevenueCenterInit guards (2 sites)
- CSS: revenue-earnings.css pruned to live rules plus the new link-row grid and
  poster stage styles; routes/user-center/revenue.css pruned to its only
  definitions; dead leaves routes/revenue.css and routes/commerce.css deleted and
  dequeued from the user-center part list
- tests: referral-qr-contract test 2 rewritten for the QR-free card, link row and
  poster modal; post-visual-contract leaf list updated with regression guards

qrcode.min.js stays enqueued — buildPosterCanvas still draws the QR inside the
poster. Net -833 lines.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-27 21:42:57 +08:00

269 lines
4.6 KiB
CSS

/**
* User Center - commission and revenue rewards.
*
* Structural base for the 推广收益 tab (unprefixed selectors). Layout
* overrides for the current card design live in revenue-earnings.css.
*/
.uc-content #panel-revenue.dashboard-panel {
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
box-shadow: none;
}
.uc-reward-area {
display: grid;
gap: 16px;
padding: 4px 0 0;
}
.uc-reward-area__heading {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
}
.uc-reward-area__heading h3,
.uc-reward-list-heading h4 {
margin: 0;
color: var(--color-ink);
font-size: 16px;
}
.uc-reward-area__heading > span,
.uc-reward-list-heading p {
margin: 0;
color: var(--color-ink-4);
font-size: 12px;
}
.uc-reward-tabs {
display: flex;
flex-wrap: wrap;
gap: 4px;
overflow: hidden;
border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
}
.uc-reward-tabs a {
position: relative;
flex: 0 0 auto;
padding: 10px 16px;
color: var(--color-ink-3);
font-size: 14px;
text-decoration: none;
}
.uc-reward-tabs a::after {
position: absolute;
right: 12px;
bottom: -1px;
left: 12px;
height: 2px;
background: transparent;
content: "";
}
.uc-reward-tabs a:hover,
.uc-reward-tabs a.is-active {
color: var(--color-primary);
}
.uc-reward-tabs a.is-active {
font-weight: 700;
}
.uc-reward-tabs a.is-active::after {
background: var(--color-primary);
}
.uc-reward-pane {
display: grid;
gap: 16px;
}
.uc-reward-pane--detail {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.uc-reward-status,
.uc-reward-copy-feedback {
margin: 0;
color: var(--color-ink-4);
font-size: 12px;
}
.uc-reward-status.is-error,
.uc-reward-copy-feedback.is-error {
color: var(--color-error, #dc2626);
}
.uc-reward-richtext {
color: var(--color-ink-3);
font-size: 13px;
line-height: 1.75;
}
.uc-reward-richtext p {
margin: 0 0 8px;
}
.uc-reward-richtext p:last-child {
margin-bottom: 0;
}
.uc-reward-list-heading {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.uc-reward-list-heading > div {
display: grid;
gap: 5px;
}
.uc-reward-list-heading > strong {
color: var(--color-ink-4);
font-size: 12px;
font-weight: 500;
}
.uc-commission-list {
display: grid;
gap: 0;
border-top: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
}
.uc-commission-row {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
padding: 13px 0;
border-bottom: 1px solid var(--color-line-soft, rgba(15, 23, 42, .08));
}
.uc-commission-row__icon {
display: grid;
flex: 0 0 34px;
width: 34px;
height: 34px;
place-items: center;
border-radius: 8px;
color: #c95a31;
background: rgba(201, 90, 49, .12);
}
.uc-commission-row__main {
display: grid;
flex: 1 1 auto;
min-width: 0;
gap: 3px;
}
.uc-commission-row__main strong {
overflow: hidden;
color: var(--color-ink);
font-size: 13px;
text-overflow: ellipsis;
white-space: nowrap;
}
.uc-commission-row__main span,
.uc-commission-row__main time {
overflow: hidden;
color: var(--color-ink-4);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.uc-commission-row__value {
display: grid;
justify-items: end;
gap: 4px;
flex: 0 0 auto;
}
.uc-commission-row__value strong {
color: #16816c;
font-size: 14px;
font-variant-numeric: tabular-nums;
}
.uc-commission-row__value span {
padding: 2px 7px;
border-radius: 999px;
color: var(--color-ink-4);
background: var(--surface-1);
font-size: 11px;
}
.uc-commission-row__value span.is-settled {
color: #16816c;
background: rgba(22, 129, 108, .1);
}
.uc-commission-row__value span.is-pending {
color: #a86d28;
background: rgba(168, 109, 40, .12);
}
.uc-reward-pagination {
display: flex;
justify-content: center;
gap: 6px;
padding-top: 4px;
}
.uc-reward-pagination a {
display: grid;
width: 30px;
height: 30px;
place-items: center;
border-radius: 6px;
color: var(--color-ink-3);
background: var(--surface-2);
font-size: 12px;
text-decoration: none;
}
.uc-reward-pagination a.is-active,
.uc-reward-pagination a:hover {
color: #fff;
background: var(--color-primary);
}
.uc-reward-empty {
margin: 0;
padding: 30px 12px;
color: var(--color-ink-4);
font-size: 13px;
text-align: center;
}
@media (max-width: 720px) {
.uc-reward-pane--detail {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.uc-reward-area {
padding: 4px 0 0;
}
.uc-commission-row {
align-items: flex-start;
}
.uc-commission-row__value {
text-align: right;
}
}