diff --git a/assets/css/frontend/report.css b/assets/css/frontend/report.css index 63a32bf0..552e9185 100644 --- a/assets/css/frontend/report.css +++ b/assets/css/frontend/report.css @@ -66,34 +66,22 @@ .aksrt-report-target { display: flex; - align-items: flex-start; - gap: 12px; - padding: 14px; - margin-bottom: 24px; - border-radius: 8px; - background: var(--modal-surface-3); + align-items: baseline; + margin-bottom: 22px; } -.aksrt-report-target > div { min-width: 0; } - -.aksrt-report-target__icon { - display: grid; +.aksrt-report-target__label { flex: none; - place-items: center; - width: 36px; - height: 36px; - border: 1px solid var(--modal-line); - border-radius: 8px; - background: var(--modal-surface); - color: var(--modal-ink-2); + color: var(--modal-muted); } .aksrt-report-target__name { - display: block; - margin: 2px 0 4px; - font-size: 15px; - font-weight: 600; - overflow-wrap: anywhere; + min-width: 0; + overflow: hidden; + font-size: 14px; + font-weight: 500; + text-overflow: ellipsis; + white-space: nowrap; } .aksrt-report-hint, @@ -104,7 +92,6 @@ } .aksrt-report-form p { margin: 6px 0 0; } -.aksrt-report-target p { margin: 0; } .aksrt-report-count { font-variant-numeric: tabular-nums; } .aksrt-report-reasons { @@ -135,9 +122,10 @@ } .aksrt-report-reason { + position: relative; display: flex; align-items: center; - gap: 9px; + justify-content: center; min-height: 44px; padding: 10px 12px; margin: 0; @@ -145,25 +133,31 @@ border-radius: 8px; background: var(--modal-surface); font-weight: 400; + text-align: center; cursor: pointer; overflow-wrap: anywhere; } .aksrt-report-reason input[type="radio"] { - position: static; - display: block; - flex: none; - width: 16px; - height: 16px; - margin: 0; - opacity: 1; - appearance: auto; - accent-color: var(--modal-primary); + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + border: 0; + clip-path: inset(50%); + white-space: nowrap; } .aksrt-report-reason:has(input:checked) { border-color: var(--modal-primary); - background: color-mix(in srgb, var(--modal-primary) 6%, var(--modal-surface)); + background: color-mix(in srgb, var(--modal-primary) 10%, var(--modal-surface)); +} + +.aksrt-report-reason:has(input:focus-visible) { + outline: 2px solid var(--modal-primary); + outline-offset: 3px; } .aksrt-report-reason input:checked + span { font-weight: 600; } diff --git a/assets/js/report.js b/assets/js/report.js index 3e887155..e27ab4bb 100644 --- a/assets/js/report.js +++ b/assets/js/report.js @@ -11,9 +11,9 @@ var MAX_IMAGES = 3; var sequence = 0; var TARGETS = { - user: { title: '举报用户', label: '用户', icon: 'fa-user' }, - post: { title: '举报文章', label: '文章', icon: 'fa-file-alt' }, - comment: { title: '举报评论', label: '评论', icon: 'fa-comment' }, + user: { title: '举报用户', label: '用户' }, + post: { title: '举报文章', label: '文章' }, + comment: { title: '举报评论', label: '评论' }, }; function escapeHtml(value) { @@ -31,13 +31,11 @@ var target = TARGETS[data.target_type]; var report = config.report || {}; var id = 'aksrt-report-' + (++sequence); - var html = '
已自动关联该' + target.label + ',无需填写链接