fix(report): align the report modal with the reference theme 1:1

- read preset reasons from the real source (ban_preset_reason via
  UserRuntime::ban_settings); the previous injection read a
  nonexistent report.categories key, so backend reasons never showed
- rebuild the modal on the reference markup contract: edit-header
  warning header, reason chips toggling the reference .active class
  (focus color), other-reason textarea, violation link, description,
  but-average modal-buts footer
- add image evidence upload gated by user_report_img_s: new
  /report/upload-image route reusing the comment upload handler with
  its own permission, preview/remove UI, up to 3 images appended to
  the report content
- render the backend report notice (user_report_desc, sanitized HTML)
  inside the modal
- widen the dialog to the reference 600px desktop geometry and share
  the form-upload preview styles with the order review modal
- extend the report contract test accordingly
This commit is contained in:
kate522 committed 2026-09-20 14:20:09 +08:00
1 parent 913958820c
commit 7a80297a56
7 files changed
+329 -91

No files matched your search

+45 -10
View File
@@ -272,6 +272,41 @@ body.aksrt-modal-runtime-open {
transition: opacity 0.15s ease;
}
/* ---- 举报弹窗(参考主题报告弹窗几何 1:1)----
宽度对齐参考主题 Bootstrap 默认模态(>=768px 600px),圆角/底色走
--main-radius / --main-bg-color;移动端仍由 --bottom 底部抽屉接管。 */
.aksrt-report-modal:not(.aksrt-modal-runtime--bottom) .aksrt-modal-runtime__dialog {
width: min(600px, calc(100vw - 32px));
border-radius: var(--main-radius, 8px);
background: var(--main-bg-color, #fff);
}
/* edit-header:参考主题弹窗头(关闭钮靠右,红色警示徽标 + 标题居左)。 */
.aksrt-report-modal .edit-header {
position: relative;
padding-right: 32px;
}
.aksrt-report-modal .edit-header .close {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
float: none;
font-size: 20px;
line-height: 1;
cursor: pointer;
background: none;
border: 0;
padding: 2px 6px;
}
/* 原因徽章行:与参考主题一致,徽章可换行且间距走 mr6/mb6 工具类。 */
.aksrt-report-modal .form-but-radio .badg {
cursor: pointer;
user-select: none;
}
/* ---- order review modal content ---- */
.order-comment-from .shop-score-box {
display: flex;
@@ -336,14 +371,14 @@ body.aksrt-modal-runtime-open {
color: var(--color-ink, #111);
}
.order-comment-from .form-upload .preview {
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.order-comment-from .form-upload .preview .add,
.order-comment-from .form-upload .preview .preview-item {
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add,
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .preview-item {
width: 80px;
height: 80px;
border-radius: 10px;
@@ -354,8 +389,8 @@ body.aksrt-modal-runtime-open {
cursor: pointer;
}
.order-comment-from .form-upload .preview .add::before,
.order-comment-from .form-upload .preview .add::after {
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::before,
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::after {
content: "";
position: absolute;
left: 50%;
@@ -364,24 +399,24 @@ body.aksrt-modal-runtime-open {
transform: translate(-50%, -50%);
}
.order-comment-from .form-upload .preview .add::before {
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::before {
width: 22px;
height: 2px;
}
.order-comment-from .form-upload .preview .add::after {
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .add::after {
width: 2px;
height: 22px;
}
.order-comment-from .form-upload .preview .preview-item img {
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .preview-item img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.order-comment-from .form-upload .preview .preview-item .remove {
:is(.order-comment-from, .aksrt-report-modal) .form-upload .preview .preview-item .remove {
position: absolute;
top: 2px;
right: 2px;
@@ -396,7 +431,7 @@ body.aksrt-modal-runtime-open {
cursor: pointer;
}
.order-comment-from .form-upload .hide {
:is(.order-comment-from, .aksrt-report-modal) .form-upload .hide {
display: none !important;
}