refactor(download): open generated links directly without the popup

The success modal added a second click between the download button and
the file: request -> "下载链接已生成" popup -> 立即下载. Drop it and open
the generated relay link right away, keeping the previous new-tab
behaviour; a missing link still surfaces the error view.

- Replace renderSuccess with startDownload (anchor + target=_blank)
- Remove the popup-only CSS: alert, code-row, copy button, chips, meta
  and the download action skin; error, cashier and scan-pay views keep
  their styles
This commit is contained in:
2026-09-24 18:56:36 +08:00
parent d49fd9f6a4
commit bc97c4ddc3
2 changed files with 16 additions and 168 deletions
-95
View File
@@ -192,20 +192,6 @@
line-height: 1.65;
}
.aksrt-dl-modal__alert {
margin: 0 0 14px;
padding: 11px 13px;
font-size: 13px;
line-height: 1.6;
border-radius: var(--radius, 8px);
}
.aksrt-dl-modal__alert--warn {
color: var(--color-warning-text, #ad6800);
background: var(--color-warning-bg, #fffbe6);
border: 1px solid #fde68a;
}
/* 提取码卡片 */
.aksrt-dl-modal__code-card {
padding: 13px 15px;
@@ -223,14 +209,6 @@
letter-spacing: 0.08em;
}
.aksrt-dl-modal__code-row {
display: flex;
gap: 10px;
align-items: center;
justify-content: space-between;
min-width: 0;
}
.aksrt-dl-modal__code {
display: block;
min-width: 0;
@@ -250,64 +228,6 @@
white-space: normal;
}
.aksrt-dl-modal__copy {
appearance: none;
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
height: 30px;
padding: 0 14px;
color: var(--focus-color, #f04494);
font-family: inherit;
font-size: 12px;
font-weight: 700;
line-height: 1;
background: var(--focus-color-opacity1, rgba(240, 68, 148, 0.1));
border: 0;
border-radius: 999px;
cursor: pointer;
}
.aksrt-dl-modal__copy:hover {
background: var(--focus-color-opacity3, rgba(240, 68, 148, 0.3));
}
.aksrt-dl-modal__copy:focus-visible {
outline: 2px solid var(--focus-color, #f04494);
outline-offset: 1px;
}
.aksrt-dl-modal__copy.is-done {
color: var(--color-success, #10b981);
background: var(--aksrt-green-soft, rgba(16, 185, 129, 0.12));
}
/* 信息 chips 行 */
.aksrt-dl-modal__meta {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin: 0 0 16px;
}
.aksrt-dl-modal__chip {
display: inline-flex;
gap: 6px;
align-items: center;
padding: 5px 11px;
color: var(--muted-color, #777);
font-size: 12px;
font-weight: 600;
background: var(--surface-2, rgba(0, 0, 0, 0.04));
border-radius: 999px;
}
.aksrt-dl-modal__chip i {
color: var(--focus-color, #f04494);
font-size: 12px;
}
/* 操作按钮 */
.aksrt-dl-modal__actions {
display: flex;
@@ -352,16 +272,6 @@
outline-offset: 2px;
}
.aksrt-dl-modal__download {
min-height: 48px;
font-size: 15px;
box-shadow: 0 10px 20px -8px rgba(var(--color-primary-rgb, 240, 68, 148), 0.55);
}
.aksrt-dl-modal__download:hover {
box-shadow: 0 12px 24px -8px rgba(var(--color-primary-rgb, 240, 68, 148), 0.65);
}
/* ============================================================
* 收银台(参考实现契约结构)
* ============================================================ */
@@ -845,11 +755,6 @@ body.aksrt-dl-modal-open {
.aksrt-dl-modal__code {
font-size: 18px;
}
.aksrt-dl-modal__chip {
padding: 4px 10px;
font-size: 11.5px;
}
}
@media (prefers-reduced-motion: reduce) {