feat(ticket): redesign user-center ticket center UI/UX
- Status stat cards double as quick filters; debounced search with stale-response guard - Card list with status stripe, windowed pagination, skeleton/empty/error states - Detail dialog as chat timeline with in-place refresh, quote preview, Ctrl+Enter send - Create form with department chips, inline validation, multi-image upload, success notice - Split shared helpers into ticket-center-core.js and enqueue it before the panel script - Drop dead data-aksrt-ticket-config and legacy colorful modal header Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
af4fb87e6d
commit
3bd15feccb
7 files changed
+1819
-621
No files matched your search
+819
-100
@@ -1,177 +1,896 @@
|
||||
/* User center ticket (工单) center */
|
||||
.aksrt-tickets-page {
|
||||
/* User center ticket (工单) center
|
||||
*
|
||||
* 结构:面板(统计筛选卡 / 搜索栏 / 工单卡片 / 分页) + 两个运行时弹窗
|
||||
* (详情对话时间线、新建表单)。颜色一律走主题 token,状态色由行内
|
||||
* --aksrt-ticket-color 驱动,深色主题无需额外覆盖。
|
||||
*/
|
||||
|
||||
.aksrt-tickets-page,
|
||||
.aksrt-ticket-modal {
|
||||
--tickets-ink: var(--color-ink, #1d2738);
|
||||
--tickets-ink-2: var(--color-ink-2, #4e5358);
|
||||
--tickets-muted: var(--color-ink-3, #758096);
|
||||
--tickets-line: color-mix(in srgb, var(--color-line, #e1e6ef) 88%, transparent);
|
||||
padding: 0;
|
||||
--tickets-line: color-mix(in srgb, var(--color-ink, #1d2738) 10%, transparent);
|
||||
--tickets-soft: color-mix(in srgb, var(--color-ink, #1d2738) 4%, transparent);
|
||||
--tickets-primary: var(--color-primary, #3b82f6);
|
||||
--tickets-danger: var(--color-error, #ef4444);
|
||||
--tickets-radius: 12px;
|
||||
color: var(--tickets-ink);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 头部
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.uc-tickets-panel__head {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: 20px;
|
||||
align-items: end;
|
||||
padding: 4px 0 22px;
|
||||
border-bottom: 1px solid var(--tickets-line);
|
||||
padding: 4px 0 20px;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__eyebrow {
|
||||
margin: 0 0 7px;
|
||||
color: var(--color-primary, #3b82f6);
|
||||
color: var(--tickets-primary);
|
||||
font-size: 11px;
|
||||
font-weight: 750;
|
||||
font-weight: 700;
|
||||
letter-spacing: .14em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.uc-tickets-panel__title { display: flex; align-items: center; gap: 9px; font-size: 21px; }
|
||||
.uc-tickets-panel__title-icon { color: var(--color-primary, #3b82f6); font-size: 17px; }
|
||||
.uc-tickets-panel__title-icon { color: var(--tickets-primary); font-size: 17px; }
|
||||
.uc-tickets-panel__title-wrap > p:last-child { margin-bottom: 0; }
|
||||
.aksrt-tickets-page__create .fa { font-size: 12px; }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 统计卡(兼作状态快捷筛选)
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-tickets-page__stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
|
||||
margin: 18px 0;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 14px;
|
||||
background: var(--surface-1, #fff);
|
||||
overflow: hidden;
|
||||
grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
|
||||
gap: 10px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.aksrt-tickets-page__stat { display: grid; gap: 5px; padding: 12px 15px; border-right: 1px solid var(--tickets-line); }
|
||||
.aksrt-tickets-page__stat:last-child { border-right: 0; }
|
||||
.aksrt-tickets-page__stat span { color: var(--tickets-muted); font-size: 12px; }
|
||||
.aksrt-tickets-page__stat strong { font-size: 19px; font-variant-numeric: tabular-nums; }
|
||||
|
||||
.aksrt-tickets-page__stat {
|
||||
--aksrt-ticket-color: var(--tickets-primary);
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
padding: 12px 14px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: var(--tickets-radius);
|
||||
background: var(--surface-1, #fff);
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__stat:hover {
|
||||
border-color: color-mix(in srgb, var(--aksrt-ticket-color) 45%, transparent);
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__stat:focus-visible {
|
||||
outline: 2px solid var(--aksrt-ticket-color);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__stat.is-active {
|
||||
border-color: var(--aksrt-ticket-color);
|
||||
background: color-mix(in srgb, var(--aksrt-ticket-color) 7%, var(--surface-1, #fff));
|
||||
box-shadow: 0 0 0 1px var(--aksrt-ticket-color) inset;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__stat span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
overflow: hidden;
|
||||
color: var(--tickets-muted);
|
||||
font-size: 12px;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__stat strong {
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
line-height: 1.1;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__stat.is-active strong { color: var(--aksrt-ticket-color); }
|
||||
|
||||
.aksrt-tickets-page__stat-dot {
|
||||
flex: 0 0 auto;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--aksrt-ticket-color);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 搜索 / 筛选
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-tickets-page__search {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__search-box {
|
||||
position: relative;
|
||||
display: block;
|
||||
flex: 1 1 220px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__search-box > .fa {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 12px;
|
||||
color: var(--tickets-muted);
|
||||
font-size: 13px;
|
||||
transform: translateY(-50%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__search input,
|
||||
.aksrt-tickets-page__search select {
|
||||
padding: 7px 11px;
|
||||
height: 36px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 9px;
|
||||
background: var(--surface-1, #fff);
|
||||
color: inherit;
|
||||
font-size: 13px;
|
||||
transition: border-color .15s ease, box-shadow .15s ease;
|
||||
}
|
||||
.aksrt-tickets-page__search input { flex: 1 1 190px; }
|
||||
|
||||
.aksrt-tickets-page__list { display: grid; gap: 12px; }
|
||||
.aksrt-tickets-page__search input { width: 100%; padding-left: 34px; }
|
||||
.aksrt-tickets-page__search select { flex: 0 0 auto; max-width: 160px; cursor: pointer; }
|
||||
|
||||
.aksrt-tickets-page__search input:focus,
|
||||
.aksrt-tickets-page__search select:focus {
|
||||
border-color: var(--tickets-primary);
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--tickets-primary) 16%, transparent);
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__reset {
|
||||
padding: 0 4px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--tickets-primary);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__reset:hover { text-decoration: underline; }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 工单卡片
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-tickets-page__list {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
transition: opacity .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__list.is-busy { opacity: .55; pointer-events: none; }
|
||||
.aksrt-tickets-page__list > .post_ajax_loader.is-loading { display: grid; gap: 10px; }
|
||||
|
||||
.aksrt-tickets-page__card {
|
||||
--aksrt-ticket-color: #6b7280;
|
||||
position: relative;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
padding: 15px 17px;
|
||||
padding: 14px 44px 14px 18px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 13px;
|
||||
border-radius: var(--tickets-radius);
|
||||
background: var(--surface-1, #fff);
|
||||
overflow: hidden;
|
||||
transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
|
||||
}
|
||||
.aksrt-tickets-page__card-head { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
|
||||
.aksrt-tickets-page__card-num { color: var(--tickets-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
|
||||
.aksrt-tickets-page__card-title { margin: 0; font-size: 15px; line-height: 1.5; }
|
||||
.aksrt-tickets-page__card-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--tickets-muted); font-size: 12px; }
|
||||
.aksrt-tickets-page__card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
|
||||
/* 左侧状态色条:一眼区分工单状态。 */
|
||||
.aksrt-tickets-page__card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 3px;
|
||||
background: var(--aksrt-ticket-color);
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__card:not(.is-placeholder):hover {
|
||||
border-color: color-mix(in srgb, var(--aksrt-ticket-color) 40%, transparent);
|
||||
box-shadow: 0 6px 18px rgb(15 23 42 / 6%);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__card:focus-within {
|
||||
border-color: var(--tickets-primary);
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--tickets-primary) 16%, transparent);
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__card.is-closed .aksrt-tickets-page__card-title { color: var(--tickets-muted); }
|
||||
|
||||
.aksrt-tickets-page__card.is-placeholder { padding-right: 18px; }
|
||||
.aksrt-tickets-page__card.is-placeholder::before { background: var(--tickets-line); }
|
||||
|
||||
.aksrt-tickets-page__card-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
|
||||
|
||||
.aksrt-tickets-page__card-num {
|
||||
color: var(--tickets-muted);
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__card-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; }
|
||||
|
||||
/* 标题按钮的 ::after 铺满整卡:整张卡可点,键盘只聚焦一次。 */
|
||||
.aksrt-tickets-page__card-title button {
|
||||
display: -webkit-box;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
font: inherit;
|
||||
text-align: left;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__card-title button::after { content: ''; position: absolute; inset: 0; }
|
||||
.aksrt-tickets-page__card-title button:focus-visible { outline: none; }
|
||||
|
||||
.aksrt-tickets-page__card-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px 16px;
|
||||
color: var(--tickets-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__card-meta span { display: inline-flex; align-items: center; gap: 5px; }
|
||||
.aksrt-tickets-page__card-meta .fa { font-size: 11px; opacity: .75; }
|
||||
|
||||
.aksrt-tickets-page__card-arrow {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 18px;
|
||||
color: var(--tickets-muted);
|
||||
font-size: 12px;
|
||||
transform: translateY(-50%);
|
||||
transition: transform .15s ease, color .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__card:hover .aksrt-tickets-page__card-arrow {
|
||||
color: var(--aksrt-ticket-color);
|
||||
transform: translate(3px, -50%);
|
||||
}
|
||||
|
||||
/* 状态徽章:前台列表 / 详情 / 后台 SPA 预览同构。 */
|
||||
.aksrt-ticket-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 11px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 2px 10px;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--aksrt-ticket-color, #6b7280) 13%, transparent);
|
||||
color: var(--aksrt-ticket-color, #6b7280);
|
||||
font-size: 12px;
|
||||
font-weight: 650;
|
||||
line-height: 1.6;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__empty { display: grid; gap: 7px; justify-items: center; padding: 46px 16px; text-align: center; }
|
||||
.aksrt-tickets-page__empty > i { color: var(--tickets-muted); font-size: 30px; }
|
||||
.aksrt-tickets-page__empty h3 { margin: 0; font-size: 16px; }
|
||||
.aksrt-tickets-page__empty p { margin: 0; color: var(--tickets-muted); font-size: 13px; }
|
||||
.aksrt-ticket-badge::before {
|
||||
content: '';
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: currentColor;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 空态 / 错误态
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-tickets-page__empty {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
justify-items: center;
|
||||
padding: 44px 16px;
|
||||
border: 1px dashed var(--tickets-line);
|
||||
border-radius: var(--tickets-radius);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.aksrt-ticket-modal .aksrt-tickets-page__empty { border: 0; padding: 28px 8px; }
|
||||
|
||||
.aksrt-tickets-page__empty-icon {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
margin-bottom: 4px;
|
||||
border-radius: 50%;
|
||||
background: color-mix(in srgb, var(--tickets-primary) 10%, transparent);
|
||||
color: var(--tickets-primary);
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__empty h3 { margin: 0; font-size: 15px; }
|
||||
.aksrt-tickets-page__empty p { margin: 0 0 6px; color: var(--tickets-muted); font-size: 13px; }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 分页
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-tickets-page__pagination {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
|
||||
.aksrt-tickets-page__page-chip {
|
||||
min-width: 32px;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 8px;
|
||||
background: var(--surface-1, #fff);
|
||||
color: inherit;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.aksrt-tickets-page__page-chip.is-active {
|
||||
border-color: transparent;
|
||||
background: var(--color-primary, #3b82f6);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 详情 / 新建弹窗 */
|
||||
.aksrt-ticket-detail { display: grid; gap: 12px; text-align: left; }
|
||||
.aksrt-ticket-detail__head { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
|
||||
.aksrt-ticket-detail__type { color: var(--tickets-muted); font-size: 12px; }
|
||||
.aksrt-ticket-detail__title { margin: 0; font-size: 15px; line-height: 1.5; }
|
||||
.aksrt-ticket-detail__order { margin: 0; color: var(--tickets-muted); font-size: 12px; }
|
||||
.aksrt-ticket-detail__content,
|
||||
.aksrt-ticket-detail__reply-body { color: var(--tickets-ink); font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
|
||||
|
||||
.aksrt-ticket-detail__replies { display: grid; gap: 9px; }
|
||||
.aksrt-ticket-detail__reply { display: grid; gap: 5px; padding: 10px 12px; border-left: 3px solid var(--tickets-line); border-radius: 4px; background: var(--surface-2, #f6f7f9); }
|
||||
.aksrt-ticket-detail__reply.is-admin { border-left-color: var(--color-primary, #3b82f6); }
|
||||
.aksrt-ticket-detail__reply-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; font-size: 12px; }
|
||||
.aksrt-ticket-detail__reply-head time { color: var(--tickets-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
|
||||
|
||||
.aksrt-ticket-quote {
|
||||
margin: 0;
|
||||
padding: 6px 10px;
|
||||
border-left: 3px solid var(--tickets-line);
|
||||
background: var(--surface-1, #fff);
|
||||
color: var(--tickets-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
.aksrt-ticket-detail__closed { margin: 0; color: var(--tickets-muted); font-size: 12px; }
|
||||
|
||||
.aksrt-ticket-attachments { display: flex; flex-wrap: wrap; gap: 7px; }
|
||||
.aksrt-ticket-attachment { display: block; width: 68px; height: 68px; border: 1px solid var(--tickets-line); border-radius: 8px; overflow: hidden; }
|
||||
.aksrt-ticket-attachment img { width: 100%; height: 100%; object-fit: cover; }
|
||||
|
||||
.aksrt-ticket-reply-form,
|
||||
.aksrt-ticket-create-form { display: grid; gap: 11px; text-align: left; }
|
||||
.aksrt-ticket-reply-form textarea,
|
||||
.aksrt-ticket-create-form textarea,
|
||||
.aksrt-ticket-create-form input,
|
||||
.aksrt-ticket-create-form select {
|
||||
width: 100%;
|
||||
padding: 8px 11px;
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
min-width: 34px;
|
||||
height: 34px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 9px;
|
||||
background: var(--surface-1, #fff);
|
||||
color: inherit;
|
||||
font-size: 13px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
cursor: pointer;
|
||||
transition: border-color .15s ease, color .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__page-chip:hover:not(:disabled):not(.is-active) {
|
||||
border-color: var(--tickets-primary);
|
||||
color: var(--tickets-primary);
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__page-chip.is-active {
|
||||
border-color: transparent;
|
||||
background: var(--tickets-primary);
|
||||
color: var(--color-on-primary, #fff);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.aksrt-tickets-page__page-chip:disabled { opacity: .4; cursor: not-allowed; }
|
||||
.aksrt-tickets-page__page-chip.is-step .fa { font-size: 11px; }
|
||||
.aksrt-tickets-page__page-gap { padding: 0 2px; color: var(--tickets-muted); }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 弹窗壳
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-ticket-detail-modal:not(.aksrt-modal-runtime--bottom) .aksrt-modal-runtime__dialog {
|
||||
width: min(620px, calc(100vw - 32px));
|
||||
}
|
||||
|
||||
.aksrt-ticket-create-modal:not(.aksrt-modal-runtime--bottom) .aksrt-modal-runtime__dialog {
|
||||
width: min(540px, calc(100vw - 32px));
|
||||
}
|
||||
|
||||
.aksrt-ticket-modal .aksrt-modal-runtime__title { font-size: 16px; font-weight: 700; }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 详情:概要 + 对话时间线
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-ticket-detail { display: grid; gap: 16px; text-align: left; }
|
||||
|
||||
.aksrt-ticket-detail__summary {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
padding: 14px 16px;
|
||||
border-radius: 10px;
|
||||
background: var(--tickets-soft);
|
||||
}
|
||||
|
||||
.aksrt-ticket-detail__head { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
|
||||
.aksrt-ticket-detail__title { margin: 0; font-size: 16px; font-weight: 650; line-height: 1.5; word-break: break-word; }
|
||||
|
||||
.aksrt-ticket-detail__facts {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
|
||||
gap: 8px 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.aksrt-ticket-detail__facts > div { min-width: 0; }
|
||||
.aksrt-ticket-detail__facts dt { margin: 0 0 2px; color: var(--tickets-muted); font-size: 11px; }
|
||||
.aksrt-ticket-detail__facts dd { margin: 0; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
|
||||
.aksrt-ticket-thread { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
|
||||
|
||||
/* 用户消息靠右(主色气泡),客服消息靠左(中性气泡)。 */
|
||||
.aksrt-ticket-msg { display: flex; gap: 10px; align-items: flex-start; }
|
||||
.aksrt-ticket-msg.is-user { flex-direction: row-reverse; }
|
||||
|
||||
.aksrt-ticket-msg__avatar {
|
||||
display: inline-grid;
|
||||
flex: 0 0 32px;
|
||||
place-items: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background: color-mix(in srgb, var(--tickets-primary) 14%, transparent);
|
||||
color: var(--tickets-primary);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.aksrt-ticket-msg.is-admin .aksrt-ticket-msg__avatar {
|
||||
background: color-mix(in srgb, var(--color-success, #10b981) 15%, transparent);
|
||||
color: var(--color-success, #10b981);
|
||||
}
|
||||
|
||||
.aksrt-ticket-msg__main { display: grid; gap: 5px; max-width: min(82%, 460px); min-width: 0; }
|
||||
.aksrt-ticket-msg.is-user .aksrt-ticket-msg__main { justify-items: end; }
|
||||
|
||||
.aksrt-ticket-msg__head {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.aksrt-ticket-msg.is-user .aksrt-ticket-msg__head { flex-direction: row-reverse; }
|
||||
.aksrt-ticket-msg__head time { color: var(--tickets-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
|
||||
|
||||
.aksrt-ticket-msg__tag {
|
||||
padding: 0 6px;
|
||||
border-radius: 4px;
|
||||
background: var(--tickets-soft);
|
||||
color: var(--tickets-muted);
|
||||
font-size: 11px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.aksrt-ticket-msg__bubble {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
max-width: 100%;
|
||||
padding: 10px 13px;
|
||||
border-radius: 4px 12px 12px 12px;
|
||||
background: var(--tickets-soft);
|
||||
border: 1px solid var(--tickets-line);
|
||||
}
|
||||
|
||||
.aksrt-ticket-msg.is-user .aksrt-ticket-msg__bubble {
|
||||
border-color: color-mix(in srgb, var(--tickets-primary) 22%, transparent);
|
||||
border-radius: 12px 4px 12px 12px;
|
||||
background: color-mix(in srgb, var(--tickets-primary) 9%, var(--surface-1, #fff));
|
||||
}
|
||||
|
||||
.aksrt-ticket-msg__body {
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.aksrt-ticket-msg__quote {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--tickets-muted);
|
||||
font-size: 12px;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
transition: opacity .15s ease, color .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-ticket-msg:hover .aksrt-ticket-msg__quote,
|
||||
.aksrt-ticket-msg__quote:focus-visible { opacity: 1; }
|
||||
.aksrt-ticket-msg__quote:hover { color: var(--tickets-primary); }
|
||||
|
||||
@media (hover: none) {
|
||||
.aksrt-ticket-msg__quote { opacity: 1; }
|
||||
}
|
||||
|
||||
.aksrt-ticket-quote {
|
||||
display: grid;
|
||||
gap: 2px;
|
||||
margin: 0;
|
||||
padding: 6px 10px;
|
||||
border-left: 3px solid color-mix(in srgb, var(--tickets-ink) 18%, transparent);
|
||||
border-radius: 0 6px 6px 0;
|
||||
background: color-mix(in srgb, var(--tickets-ink) 4%, transparent);
|
||||
color: var(--tickets-muted);
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.aksrt-ticket-quote strong { color: var(--tickets-ink-2); font-weight: 600; }
|
||||
.aksrt-ticket-quote span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
||||
.aksrt-ticket-quote.is-deleted span { font-style: italic; }
|
||||
|
||||
.aksrt-ticket-attachments { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
|
||||
.aksrt-ticket-attachment {
|
||||
display: block;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.aksrt-ticket-attachment img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s ease; }
|
||||
.aksrt-ticket-attachment:hover img { transform: scale(1.05); }
|
||||
|
||||
.aksrt-ticket-detail__closed {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
padding: 12px;
|
||||
border-radius: 10px;
|
||||
background: var(--tickets-soft);
|
||||
color: var(--tickets-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 回复框(吸底)
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-ticket-composer {
|
||||
position: sticky;
|
||||
bottom: -16px;
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
margin: 0 -18px -16px;
|
||||
padding: 14px 18px 16px;
|
||||
border-top: 1px solid var(--tickets-line);
|
||||
background: var(--surface-1, #fff);
|
||||
}
|
||||
|
||||
.aksrt-ticket-composer__quote {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
padding: 7px 10px;
|
||||
border-radius: 8px;
|
||||
background: color-mix(in srgb, var(--tickets-primary) 8%, transparent);
|
||||
color: var(--tickets-ink-2);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.aksrt-ticket-composer__quote[hidden] { display: none; }
|
||||
.aksrt-ticket-composer__quote > .fa { color: var(--tickets-primary); }
|
||||
.aksrt-ticket-composer__quote > span { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
||||
|
||||
.aksrt-ticket-composer__quote button {
|
||||
flex: 0 0 auto;
|
||||
padding: 2px 4px;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--tickets-muted);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.aksrt-ticket-composer__bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
|
||||
.aksrt-ticket-composer__tools { display: flex; flex: 1 1 auto; gap: 4px; }
|
||||
|
||||
.aksrt-ticket-tool {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
height: 32px;
|
||||
padding: 0 10px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: var(--tickets-muted);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition: background-color .15s ease, color .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-ticket-tool:hover:not(:disabled) { background: var(--tickets-soft); color: var(--tickets-ink); }
|
||||
.aksrt-ticket-tool.is-danger:hover:not(:disabled) { color: var(--tickets-danger); }
|
||||
|
||||
.aksrt-ticket-tool.is-confirming {
|
||||
background: color-mix(in srgb, var(--tickets-danger) 12%, transparent);
|
||||
color: var(--tickets-danger);
|
||||
}
|
||||
|
||||
.aksrt-ticket-tool:disabled { opacity: .6; cursor: default; }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 表单(新建 / 回复共用)
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-ticket-form { display: grid; gap: 16px; text-align: left; }
|
||||
|
||||
.aksrt-ticket-field {
|
||||
position: relative;
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.aksrt-ticket-field > label,
|
||||
.aksrt-ticket-field > legend,
|
||||
.aksrt-ticket-field__label {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
color: var(--tickets-ink-2);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.aksrt-ticket-field em { color: var(--tickets-danger); font-style: normal; }
|
||||
|
||||
.aksrt-ticket-field__optional {
|
||||
color: var(--tickets-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.aksrt-ticket-field input[type="text"],
|
||||
.aksrt-ticket-field select,
|
||||
.aksrt-ticket-field textarea {
|
||||
width: 100%;
|
||||
padding: 9px 12px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 9px;
|
||||
background: var(--surface-1, #fff);
|
||||
color: inherit;
|
||||
font-family: inherit;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
transition: border-color .15s ease, box-shadow .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-ticket-field textarea { min-height: 84px; resize: vertical; }
|
||||
.aksrt-ticket-form .aksrt-ticket-field textarea { min-height: 120px; padding-bottom: 24px; }
|
||||
|
||||
.aksrt-ticket-field input[type="text"]:focus,
|
||||
.aksrt-ticket-field select:focus,
|
||||
.aksrt-ticket-field textarea:focus {
|
||||
border-color: var(--tickets-primary);
|
||||
outline: none;
|
||||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--tickets-primary) 16%, transparent);
|
||||
}
|
||||
|
||||
.aksrt-ticket-field [aria-invalid="true"],
|
||||
.aksrt-ticket-field[aria-invalid="true"] .aksrt-ticket-type span {
|
||||
border-color: var(--tickets-danger) !important;
|
||||
}
|
||||
|
||||
.aksrt-ticket-field__error {
|
||||
margin: 0;
|
||||
color: var(--tickets-danger);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.aksrt-ticket-field__hint { margin: 0; color: var(--tickets-muted); font-size: 12px; }
|
||||
|
||||
.aksrt-ticket-counter {
|
||||
color: var(--tickets-muted);
|
||||
font-size: 11px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.aksrt-ticket-counter.is-near { color: var(--color-warning, #f59e0b); }
|
||||
|
||||
/* 新建表单内计数器贴在输入框右下角;回复框的计数器在工具栏里。 */
|
||||
.aksrt-ticket-form .aksrt-ticket-field > .aksrt-ticket-counter {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 7px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.aksrt-ticket-form .aksrt-ticket-field:has(.aksrt-ticket-field__error) > .aksrt-ticket-counter { bottom: 27px; }
|
||||
.aksrt-ticket-form .aksrt-ticket-field input[type="text"] { padding-right: 72px; }
|
||||
|
||||
/* 部门:单选卡片(替代下拉,选项一目了然)。 */
|
||||
.aksrt-ticket-types__list { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.aksrt-ticket-type { position: relative; margin: 0; cursor: pointer; }
|
||||
|
||||
.aksrt-ticket-type input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.aksrt-ticket-type span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 34px;
|
||||
padding: 0 14px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 999px;
|
||||
background: var(--surface-1, #fff);
|
||||
font-size: 13px;
|
||||
transition: border-color .15s ease, background-color .15s ease, color .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-ticket-type:hover span { border-color: color-mix(in srgb, var(--tickets-primary) 45%, transparent); }
|
||||
|
||||
.aksrt-ticket-type input:checked + span {
|
||||
border-color: var(--tickets-primary);
|
||||
background: color-mix(in srgb, var(--tickets-primary) 10%, transparent);
|
||||
color: var(--tickets-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.aksrt-ticket-type input:focus-visible + span {
|
||||
outline: 2px solid var(--tickets-primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.aksrt-ticket-form__actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: flex-end;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.aksrt-ticket-form__actions > button { min-width: 96px; }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 图片上传
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-ticket-uploader { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.aksrt-ticket-images { display: contents; }
|
||||
|
||||
.aksrt-ticket-image {
|
||||
position: relative;
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
border: 1px solid var(--tickets-line);
|
||||
border-radius: 9px;
|
||||
overflow: hidden;
|
||||
background: var(--tickets-soft);
|
||||
}
|
||||
.aksrt-ticket-reply-form__actions { display: flex; flex-wrap: wrap; gap: 7px; }
|
||||
|
||||
.aksrt-ticket-field { display: grid; gap: 5px; }
|
||||
.aksrt-ticket-field > span { color: var(--tickets-muted); font-size: 12px; }
|
||||
.aksrt-ticket-images { display: flex; flex-wrap: wrap; gap: 7px; }
|
||||
.aksrt-ticket-image { position: relative; width: 66px; height: 66px; border: 1px solid var(--tickets-line); border-radius: 8px; overflow: hidden; }
|
||||
.aksrt-ticket-image img { width: 100%; height: 100%; object-fit: cover; }
|
||||
|
||||
.aksrt-ticket-image.is-add {
|
||||
display: inline-grid;
|
||||
place-content: center;
|
||||
gap: 2px;
|
||||
padding: 0;
|
||||
border-style: dashed;
|
||||
background: transparent;
|
||||
color: var(--tickets-muted);
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: border-color .15s ease, color .15s ease;
|
||||
}
|
||||
|
||||
.aksrt-ticket-image.is-add .fa { font-size: 15px; }
|
||||
.aksrt-ticket-image.is-add:hover:not(:disabled) { border-color: var(--tickets-primary); color: var(--tickets-primary); }
|
||||
.aksrt-ticket-image.is-add:disabled { opacity: .45; cursor: not-allowed; }
|
||||
|
||||
.aksrt-ticket-image.is-uploading { display: grid; place-items: center; }
|
||||
|
||||
.aksrt-ticket-image__spinner {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 2px solid var(--tickets-line);
|
||||
border-top-color: var(--tickets-primary);
|
||||
border-radius: 50%;
|
||||
animation: aksrt-ticket-spin .8s linear infinite;
|
||||
}
|
||||
|
||||
.aksrt-ticket-image__remove {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
top: 3px;
|
||||
right: 3px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
background: rgb(0 0 0 / 55%);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
font-size: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@keyframes aksrt-ticket-spin { to { transform: rotate(360deg); } }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 提交成功
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
.aksrt-ticket-done { display: grid; gap: 8px; justify-items: center; padding: 12px 4px 4px; text-align: center; }
|
||||
|
||||
.aksrt-ticket-done__icon {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin-bottom: 4px;
|
||||
border-radius: 50%;
|
||||
background: color-mix(in srgb, var(--color-success, #10b981) 14%, transparent);
|
||||
color: var(--color-success, #10b981);
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.aksrt-ticket-done h4 { margin: 0; font-size: 17px; }
|
||||
.aksrt-ticket-done > p { margin: 0; color: var(--tickets-muted); font-size: 13px; }
|
||||
|
||||
.aksrt-ticket-done__notice {
|
||||
width: 100%;
|
||||
margin-top: 6px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 10px;
|
||||
background: var(--tickets-soft);
|
||||
color: var(--tickets-ink-2);
|
||||
font-size: 13px;
|
||||
line-height: 1.7;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.aksrt-ticket-done__notice > :last-child { margin-bottom: 0; }
|
||||
.aksrt-ticket-done .aksrt-ticket-form__actions { justify-content: center; width: 100%; margin-top: 10px; }
|
||||
|
||||
/* 按钮忙碌态(发送 / 提交 / 催单中)。 */
|
||||
.aksrt-ticket-modal .is-busy { opacity: .7; cursor: progress; }
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 窄屏
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.uc-tickets-panel__head { grid-template-columns: 1fr; align-items: start; gap: 14px; }
|
||||
.aksrt-tickets-page__create { justify-self: start; }
|
||||
.aksrt-tickets-page__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
|
||||
.aksrt-tickets-page__stat { padding: 10px 12px; }
|
||||
.aksrt-tickets-page__stat strong { font-size: 17px; }
|
||||
.aksrt-tickets-page__search select { flex: 1 1 calc(50% - 4px); max-width: none; }
|
||||
.aksrt-tickets-page__card { padding-right: 36px; }
|
||||
.aksrt-tickets-page__card-arrow { right: 14px; }
|
||||
.aksrt-ticket-msg__main { max-width: calc(100% - 42px); }
|
||||
.aksrt-ticket-composer__tools .aksrt-ticket-tool span { display: none; }
|
||||
.aksrt-ticket-tool.is-confirming span { display: inline; }
|
||||
.aksrt-ticket-form__actions > button { flex: 1 1 0; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.aksrt-tickets-page *,
|
||||
.aksrt-ticket-modal * { transition: none !important; animation-duration: .01ms !important; }
|
||||
}
|
||||
Reference in new issue
Block a user