feat(attach): 付费附件游客跳登录,积分数独立价签并升级下载交互

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-17 06:04:29 +08:00
parent c44b0efa7d
commit dfc0beafe9
5 changed files with 653 additions and 39 deletions

View File

@@ -404,6 +404,16 @@ body {
border: 1px solid var(--line);
background: var(--panel);
}
.j13-compose-att-paid {
color: var(--gold);
font-weight: 650;
}
.j13-compose-att-paid .j13-compose-field {
color: var(--gold);
font-weight: 700;
font-variant-numeric: tabular-nums;
border-color: color-mix(in srgb, var(--gold) 38%, var(--line-2));
}
.j13-interact-card {
padding: 14px 16px;
border-radius: 14px;
@@ -1708,6 +1718,295 @@ body {
color: var(--danger);
}
/* 帖子附件:积分数独立成列,付费卡用金色语义 */
.j13-att {
margin-top: 2rem;
padding-top: 1.35rem;
border-top: 1px solid var(--line);
}
.j13-att-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.j13-att-title {
display: inline-flex;
align-items: center;
gap: 7px;
margin: 0;
font-size: 15px;
font-weight: 800;
letter-spacing: -0.01em;
color: var(--ink);
}
.j13-att-title svg {
color: var(--accent);
}
.j13-att-list {
display: flex;
flex-direction: column;
gap: 10px;
margin: 0;
padding: 0;
list-style: none;
}
.j13-att-card {
appearance: none;
display: grid;
grid-template-columns: 46px minmax(0, 1fr) auto auto;
align-items: center;
column-gap: 14px;
row-gap: 10px;
width: 100%;
min-width: 0;
padding: 14px 16px;
border-radius: 14px;
text-align: left;
text-decoration: none;
color: inherit;
font: inherit;
cursor: pointer;
border: 1px solid var(--line);
background: var(--panel);
box-shadow: var(--shadow-sm);
transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background 0.15s;
}
a.j13-att-card:hover {
color: inherit;
}
.j13-att-card:hover {
transform: translateY(-1px);
box-shadow: var(--shadow);
border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
}
.j13-att-card:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.j13-att-card.is-paid {
border-color: color-mix(in srgb, var(--gold) 34%, var(--line));
background: color-mix(in srgb, var(--gold-soft) 48%, var(--panel));
}
.j13-att-card.is-paid:hover {
border-color: color-mix(in srgb, var(--gold) 52%, var(--line));
}
.j13-att-card.is-unlocked {
border-color: color-mix(in srgb, var(--ok) 30%, var(--line));
background: color-mix(in srgb, var(--ok-soft) 42%, var(--panel));
}
.j13-att-card.is-unlocked:hover {
border-color: color-mix(in srgb, var(--ok) 46%, var(--line));
}
.j13-att-card.is-busy {
cursor: wait;
}
.j13-att-card:disabled {
opacity: 0.58;
cursor: not-allowed;
transform: none;
box-shadow: var(--shadow-sm);
}
.j13-att-card.is-fresh {
animation: j13-att-unlock 0.7s ease-out;
}
.j13-att-type {
width: 46px;
height: 46px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
font-size: 11px;
font-weight: 800;
letter-spacing: 0.04em;
font-variant-numeric: tabular-nums;
color: var(--ink-2);
background: var(--tint);
}
.j13-att-type[data-kind="image"] {
color: var(--accent);
background: var(--accent-soft);
}
.j13-att-type[data-kind="archive"] {
color: var(--gold);
background: var(--gold-soft);
}
.j13-att-type[data-kind="doc"] {
color: var(--clay);
background: var(--clay-soft);
}
.j13-att-type[data-kind="media"] {
color: var(--ok);
background: var(--ok-soft);
}
.j13-att-main {
min-width: 0;
overflow: hidden;
}
.j13-att-name {
display: block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 14.5px;
font-weight: 700;
line-height: 1.3;
color: var(--ink);
}
.j13-att-meta {
display: block;
margin-top: 3px;
font-size: 12px;
line-height: 1.4;
color: var(--ink-3);
font-variant-numeric: tabular-nums;
}
.j13-att-price {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
min-width: 5.25rem;
padding: 8px 12px 7px;
border-radius: 12px;
line-height: 1;
background: var(--panel);
border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line));
box-shadow: var(--shadow-sm);
}
.j13-att-price-num {
font-size: 28px;
font-weight: 800;
letter-spacing: -0.04em;
font-variant-numeric: tabular-nums;
color: var(--gold);
line-height: 1;
}
.j13-att-price-unit {
display: inline-flex;
align-items: center;
gap: 3px;
margin-top: 5px;
font-size: 11.5px;
font-weight: 650;
color: var(--gold);
}
.j13-att-price.is-unlocked {
border-color: color-mix(in srgb, var(--ok) 42%, var(--line));
}
.j13-att-price.is-unlocked .j13-att-price-unit {
color: var(--ok);
}
.j13-att-price.is-free {
min-width: auto;
padding: 8px 12px;
border-color: var(--line);
}
.j13-att-price.is-free .j13-att-price-unit {
margin-top: 0;
font-size: 13.5px;
font-weight: 700;
color: var(--ink-2);
}
.j13-att-cta {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
height: 34px;
padding: 0 14px;
border-radius: 999px;
font-size: 13px;
font-weight: 600;
line-height: 1;
flex-shrink: 0;
pointer-events: none;
border: 1px solid var(--line-2);
background: var(--panel);
color: var(--ink);
white-space: nowrap;
}
.j13-att-cta.is-primary {
border-color: transparent;
background: var(--accent);
color: var(--accent-on);
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12),
0 2px 8px color-mix(in srgb, var(--accent) 26%, transparent);
}
.j13-att-pay {
display: flex;
flex-direction: column;
gap: 4px;
}
.j13-att-pay-file {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
border-radius: 12px;
border: 1px solid var(--line);
background: var(--panel-2);
}
.j13-att-pay-name {
margin: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 14px;
font-weight: 700;
color: var(--ink);
}
.j13-att-pay-hero {
text-align: center;
padding: 18px 8px 6px;
}
.j13-att-pay-num {
display: block;
font-size: 48px;
font-weight: 800;
letter-spacing: -0.05em;
font-variant-numeric: tabular-nums;
color: var(--gold);
line-height: 1;
}
.j13-att-pay-unit {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 4px;
margin-top: 8px;
font-size: 13px;
font-weight: 650;
color: var(--gold);
}
@keyframes j13-att-unlock {
0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 38%, transparent); }
100% { box-shadow: 0 0 0 12px transparent; }
}
@media (max-width: 560px) {
.j13-att-card {
grid-template-columns: 46px minmax(0, 1fr) auto;
}
.j13-att-cta {
grid-column: 1 / -1;
width: 100%;
height: 40px;
}
}
@media (prefers-reduced-motion: reduce) {
.j13-att-card,
.j13-att-card.is-fresh {
transition: none;
animation: none;
}
.j13-att-card:hover {
transform: none;
}
}
.j13-compose-shell {
background: var(--panel);
border: 1px solid var(--line);
@@ -4440,7 +4739,8 @@ html.j13-reduce-chrome .j13-toast-in,
html.j13-reduce-chrome .j13-heart-pop,
html.j13-reduce-chrome .j13-pulse-dot,
html.j13-reduce-chrome .j13-tip-bubble,
html.j13-reduce-chrome .j13-tip-in {
html.j13-reduce-chrome .j13-tip-in,
html.j13-reduce-chrome .j13-att-card.is-fresh {
animation: none !important;
transition: none !important;
}