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; }
|
||||
}
|
||||
@@ -0,0 +1,351 @@
|
||||
/**
|
||||
* AKSRT Ticket Center Core — 工单中心共享层(REST、提示、行内校验、弹窗、图片上传)。
|
||||
*
|
||||
* 由 ticket-center.js(列表 / 详情 / 新建)消费,挂到 window.AksrtTicketCore。
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
var API_ROOT = (function () {
|
||||
var d = window.aksrtData || {};
|
||||
var raw = d.apiUrl || d.restUrl || d.rest_url || '/index.php?rest_route=/aksrt/v1';
|
||||
return String(raw).replace(/\/$/, '');
|
||||
})();
|
||||
var NONCE = (window.aksrtData && window.aksrtData.restNonce) || '';
|
||||
var IMAGE_ACCEPT = 'image/gif,image/jpeg,image/png,image/webp';
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 基础工具
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
function settings() {
|
||||
var d = window.aksrtData && window.aksrtData.ticket;
|
||||
return d && typeof d === 'object' ? d : {};
|
||||
}
|
||||
|
||||
function attachmentEnabled() {
|
||||
return !!settings().attachmentEnabled;
|
||||
}
|
||||
|
||||
function attachmentMax() {
|
||||
return parseInt(settings().attachmentMax, 10) || 5;
|
||||
}
|
||||
|
||||
function escapeHtml(value) {
|
||||
return String(value === null || value === undefined ? '' : value)
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''');
|
||||
}
|
||||
|
||||
// notyf 以 HTML 拼接消息,服务端文案一律先转义。
|
||||
function notyf(text, type, timeout, id) {
|
||||
var safe = escapeHtml(text);
|
||||
if (typeof window.notyf === 'function') return window.notyf(safe, type, timeout, id);
|
||||
if (typeof window.toast === 'function') return window.toast(safe, type);
|
||||
}
|
||||
|
||||
function request(path, options) {
|
||||
var opts = options || {};
|
||||
return fetch(API_ROOT + path, {
|
||||
method: opts.method || 'GET',
|
||||
headers: Object.assign({ 'X-WP-Nonce': NONCE }, opts.body ? { 'Content-Type': 'application/json' } : {}),
|
||||
body: opts.body ? JSON.stringify(opts.body) : undefined,
|
||||
credentials: 'same-origin',
|
||||
}).then(function (res) { return res.json(); });
|
||||
}
|
||||
|
||||
// REST 成功返回 {success:true},WP_Error 返回 {code,message};非成功一律转为 reject。
|
||||
function expectSuccess(result) {
|
||||
if (result && result.success) return result;
|
||||
return Promise.reject(result || {});
|
||||
}
|
||||
|
||||
// 提交前的人机验证:场景未启用时无挂载点,run 直接 resolve {};
|
||||
// 用户中途取消验证时 run resolve null,此时 reject {cancelled:true} 中止提交。
|
||||
function runCaptcha(scene) {
|
||||
if (!window.AKSRTCaptcha || typeof window.AKSRTCaptcha.run !== 'function') {
|
||||
return Promise.resolve({});
|
||||
}
|
||||
return window.AKSRTCaptcha.run(scene).then(function (payload) {
|
||||
return payload === null ? Promise.reject({ cancelled: true }) : (payload || {});
|
||||
}, function () {
|
||||
return Promise.reject({ message: '人机验证未通过' });
|
||||
});
|
||||
}
|
||||
|
||||
function failMessage(error, fallback) {
|
||||
return (error && error.message) || fallback || '网络错误,请重试';
|
||||
}
|
||||
|
||||
function shortTime(value) {
|
||||
var m = /^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2})/.exec(String(value || ''));
|
||||
if (!m) return String(value || '');
|
||||
var sameYear = m[1] === String(new Date().getFullYear());
|
||||
return (sameYear ? '' : m[1] + '-') + m[2] + '-' + m[3] + ' ' + m[4] + ':' + m[5];
|
||||
}
|
||||
|
||||
function timeTag(value) {
|
||||
if (!value) return '';
|
||||
return '<time datetime="' + escapeHtml(String(value).replace(' ', 'T')) + '" title="' + escapeHtml(value) + '">'
|
||||
+ escapeHtml(shortTime(value)) + '</time>';
|
||||
}
|
||||
|
||||
function icon(name) {
|
||||
return '<i class="fa fas ' + name + '" aria-hidden="true"></i>';
|
||||
}
|
||||
|
||||
function statusBadge(ticket) {
|
||||
return '<span class="aksrt-ticket-badge" style="--aksrt-ticket-color:' + escapeHtml(ticket.status_color || '#6b7280') + '">'
|
||||
+ escapeHtml(ticket.status_label || ticket.status) + '</span>';
|
||||
}
|
||||
|
||||
function emptyHtml(iconName, title, text, action) {
|
||||
return '<div class="aksrt-tickets-page__empty">'
|
||||
+ '<span class="aksrt-tickets-page__empty-icon">' + icon(iconName) + '</span>'
|
||||
+ '<h3>' + escapeHtml(title) + '</h3>'
|
||||
+ '<p>' + escapeHtml(text) + '</p>'
|
||||
+ (action || '') + '</div>';
|
||||
}
|
||||
|
||||
function setBusy(button, busy, text) {
|
||||
if (!button) return;
|
||||
if (busy) {
|
||||
if (button.dataset.label === undefined) button.dataset.label = button.innerHTML;
|
||||
button.disabled = true;
|
||||
button.classList.add('is-busy');
|
||||
if (text) button.textContent = text;
|
||||
return;
|
||||
}
|
||||
button.disabled = false;
|
||||
button.classList.remove('is-busy');
|
||||
if (button.dataset.label !== undefined) {
|
||||
button.innerHTML = button.dataset.label;
|
||||
delete button.dataset.label;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 表单校验(行内错误,替代 toast)
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
function markInvalid(field, text) {
|
||||
if (!field) return;
|
||||
field.setAttribute('aria-invalid', 'true');
|
||||
var holder = field.closest('.aksrt-ticket-field') || field.parentNode;
|
||||
var error = holder.querySelector('.aksrt-ticket-field__error');
|
||||
if (!error) {
|
||||
error = document.createElement('p');
|
||||
error.className = 'aksrt-ticket-field__error';
|
||||
error.id = 'aksrt-ticket-err-' + Math.random().toString(36).slice(2, 8);
|
||||
error.setAttribute('role', 'alert');
|
||||
holder.appendChild(error);
|
||||
}
|
||||
error.textContent = text;
|
||||
field.setAttribute('aria-describedby', error.id);
|
||||
var focusTarget = field.matches('fieldset') ? field.querySelector('input') : field;
|
||||
if (focusTarget) focusTarget.focus();
|
||||
}
|
||||
|
||||
function clearInvalid(field) {
|
||||
if (!field || field.getAttribute('aria-invalid') !== 'true') return;
|
||||
field.removeAttribute('aria-invalid');
|
||||
field.removeAttribute('aria-describedby');
|
||||
var holder = field.closest('.aksrt-ticket-field') || field.parentNode;
|
||||
var error = holder && holder.querySelector('.aksrt-ticket-field__error');
|
||||
if (error) error.remove();
|
||||
}
|
||||
|
||||
function updateCounter(shell, field) {
|
||||
if (!field || !field.name || !field.maxLength || field.maxLength < 0) return;
|
||||
var counter = shell.querySelector('[data-aksrt-ticket-counter="' + field.name + '"]');
|
||||
if (!counter) return;
|
||||
var length = field.value.length;
|
||||
counter.textContent = length + ' / ' + field.maxLength;
|
||||
counter.classList.toggle('is-near', length >= field.maxLength * 0.9);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------ *
|
||||
* 弹窗 / 图片上传(详情与新建共用)
|
||||
* ------------------------------------------------------------------ */
|
||||
|
||||
function openModal(options) {
|
||||
if (!window.AksrtModalRuntime || typeof window.AksrtModalRuntime.open !== 'function') {
|
||||
notyf('工单组件加载失败,请刷新页面后重试', 'danger');
|
||||
return null;
|
||||
}
|
||||
return window.AksrtModalRuntime.open(Object.assign({ mobileBottom: true }, options));
|
||||
}
|
||||
|
||||
|
||||
function alive(shell) {
|
||||
return !!shell && document.contains(shell);
|
||||
}
|
||||
|
||||
function setModalContent(shell, html) {
|
||||
var content = shell.querySelector('.aksrt-modal-runtime__content');
|
||||
if (content) content.innerHTML = html;
|
||||
shell.setAttribute('data-aksrt-modal-state', 'ready');
|
||||
}
|
||||
|
||||
function modalError(shell, text) {
|
||||
setModalContent(shell, emptyHtml('fa-exclamation-circle', '加载失败', text,
|
||||
'<button type="button" class="btn-outline" data-aksrt-modal-close>关闭</button>'));
|
||||
}
|
||||
|
||||
function imageHolder(root) {
|
||||
return root ? root.querySelector('[data-aksrt-ticket-images]') : null;
|
||||
}
|
||||
|
||||
function collectAttachments(root) {
|
||||
var out = [];
|
||||
var holder = imageHolder(root);
|
||||
if (!holder) return out;
|
||||
holder.querySelectorAll('[data-aksrt-ticket-image]').forEach(function (node) {
|
||||
var url = node.getAttribute('data-aksrt-ticket-image');
|
||||
if (url && out.length < attachmentMax()) out.push(url);
|
||||
});
|
||||
return out;
|
||||
}
|
||||
|
||||
function isUploading(root) {
|
||||
var holder = imageHolder(root);
|
||||
return !!(holder && holder.querySelector('.is-uploading'));
|
||||
}
|
||||
|
||||
function syncUploader(root) {
|
||||
var holder = imageHolder(root);
|
||||
if (!holder) return;
|
||||
var full = holder.children.length >= attachmentMax();
|
||||
root.querySelectorAll('[data-aksrt-ticket-upload]').forEach(function (button) {
|
||||
button.disabled = full;
|
||||
});
|
||||
var count = root.querySelector('[data-aksrt-ticket-image-count]');
|
||||
if (count) count.textContent = holder.children.length + ' / ' + attachmentMax();
|
||||
}
|
||||
|
||||
function uploadFiles(root, files) {
|
||||
var holder = imageHolder(root);
|
||||
if (!holder) return;
|
||||
var free = attachmentMax() - holder.children.length;
|
||||
if (free <= 0) {
|
||||
notyf('最多上传 ' + attachmentMax() + ' 张图片', 'danger');
|
||||
return;
|
||||
}
|
||||
if (files.length > free) notyf('最多还能添加 ' + free + ' 张,多余的图片已忽略', 'danger');
|
||||
files.slice(0, free).forEach(function (file) { uploadOne(root, holder, file); });
|
||||
syncUploader(root);
|
||||
}
|
||||
|
||||
function uploadOne(root, holder, file) {
|
||||
var tile = document.createElement('div');
|
||||
tile.className = 'aksrt-ticket-image is-uploading';
|
||||
tile.innerHTML = '<span class="aksrt-ticket-image__spinner" aria-hidden="true"></span><span class="screen-reader-text">正在上传</span>';
|
||||
holder.appendChild(tile);
|
||||
|
||||
var body = new FormData();
|
||||
body.append('image', file);
|
||||
fetch(API_ROOT + '/ticket/upload-attachment', {
|
||||
method: 'POST',
|
||||
headers: { 'X-WP-Nonce': NONCE },
|
||||
body: body,
|
||||
credentials: 'same-origin',
|
||||
}).then(function (res) { return res.json(); }).then(function (result) {
|
||||
var url = result && (result.url || (result.data && result.data.url));
|
||||
if (!url) return Promise.reject(result);
|
||||
tile.classList.remove('is-uploading');
|
||||
tile.setAttribute('data-aksrt-ticket-image', url);
|
||||
tile.innerHTML = '<img src="' + escapeHtml(url) + '" alt="">'
|
||||
+ '<button type="button" class="aksrt-ticket-image__remove" data-aksrt-ticket-image-remove aria-label="移除图片">'
|
||||
+ icon('fa-times') + '</button>';
|
||||
}).catch(function (error) {
|
||||
tile.remove();
|
||||
notyf(failMessage(error, '图片上传失败'), 'danger');
|
||||
}).then(function () { syncUploader(root); });
|
||||
}
|
||||
|
||||
/**
|
||||
* 两类弹窗共用的事件:图片选择 / 移除、字数统计、输入时清除行内错误。
|
||||
* 业务点击交给 onClick;返回的 ctx 跨内容重绘保留(监听挂在 shell 上)。
|
||||
*/
|
||||
function bindShell(shell, onClick) {
|
||||
var ctx = { uploadRoot: null };
|
||||
var input = document.createElement('input');
|
||||
input.type = 'file';
|
||||
input.accept = IMAGE_ACCEPT;
|
||||
input.multiple = true;
|
||||
input.hidden = true;
|
||||
shell.appendChild(input);
|
||||
input.addEventListener('change', function () {
|
||||
var files = Array.prototype.slice.call(input.files || []);
|
||||
input.value = '';
|
||||
if (files.length && ctx.uploadRoot) uploadFiles(ctx.uploadRoot, files);
|
||||
});
|
||||
|
||||
shell.addEventListener('click', function (event) {
|
||||
var remove = event.target.closest('[data-aksrt-ticket-image-remove]');
|
||||
if (remove) {
|
||||
var root = remove.closest('form');
|
||||
remove.closest('.aksrt-ticket-image').remove();
|
||||
syncUploader(root);
|
||||
return;
|
||||
}
|
||||
var upload = event.target.closest('[data-aksrt-ticket-upload]');
|
||||
if (upload) {
|
||||
ctx.uploadRoot = upload.closest('form');
|
||||
input.click();
|
||||
return;
|
||||
}
|
||||
if (onClick) onClick(event, ctx);
|
||||
});
|
||||
shell.addEventListener('input', function (event) {
|
||||
clearInvalid(event.target);
|
||||
updateCounter(shell, event.target);
|
||||
});
|
||||
shell.addEventListener('change', function (event) {
|
||||
clearInvalid(event.target.closest('fieldset') || event.target);
|
||||
});
|
||||
return ctx;
|
||||
}
|
||||
|
||||
function uploaderHtml() {
|
||||
if (!attachmentEnabled()) return '';
|
||||
return '<div class="aksrt-ticket-uploader">'
|
||||
+ '<div class="aksrt-ticket-images" data-aksrt-ticket-images></div>'
|
||||
+ '<button type="button" class="aksrt-ticket-image is-add" data-aksrt-ticket-upload aria-label="添加图片">'
|
||||
+ icon('fa-plus') + '<span data-aksrt-ticket-image-count>0 / ' + attachmentMax() + '</span></button>'
|
||||
+ '</div>';
|
||||
}
|
||||
|
||||
window.AksrtTicketCore = {
|
||||
settings: settings,
|
||||
attachmentEnabled: attachmentEnabled,
|
||||
attachmentMax: attachmentMax,
|
||||
escapeHtml: escapeHtml,
|
||||
notyf: notyf,
|
||||
request: request,
|
||||
expectSuccess: expectSuccess,
|
||||
runCaptcha: runCaptcha,
|
||||
failMessage: failMessage,
|
||||
timeTag: timeTag,
|
||||
icon: icon,
|
||||
statusBadge: statusBadge,
|
||||
emptyHtml: emptyHtml,
|
||||
setBusy: setBusy,
|
||||
markInvalid: markInvalid,
|
||||
openModal: openModal,
|
||||
alive: alive,
|
||||
setModalContent: setModalContent,
|
||||
modalError: modalError,
|
||||
collectAttachments: collectAttachments,
|
||||
isUploading: isUploading,
|
||||
bindShell: bindShell,
|
||||
uploaderHtml: uploaderHtml,
|
||||
};
|
||||
})();
|
||||
+594
-491
File diff suppressed because it is too large.
Load diff
@@ -2,8 +2,8 @@
|
||||
/**
|
||||
* User center ticket (工单) panel.
|
||||
*
|
||||
* 数据全部来自 /aksrt/v1/tickets* REST;本文件只输出容器与挂载点,
|
||||
* 交互在 assets/js/ticket-center.js。
|
||||
* 数据全部来自 /aksrt/v1/tickets* REST;本文件只输出容器、筛选控件与首屏骨架,
|
||||
* 交互在 assets/js/ticket-center.js(附件 / 公告 / 催单配置取自 aksrtData.ticket)。
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
@@ -30,9 +30,6 @@ $statuses = class_exists('\AKSRT\Ticket\TicketStatusService')
|
||||
$types = class_exists('\AKSRT\Ticket\TicketTypeService')
|
||||
? \AKSRT\Ticket\TicketTypeService::public_list()
|
||||
: [];
|
||||
$attachment_max = class_exists('\AKSRT\Ticket\TicketSettings')
|
||||
? \AKSRT\Ticket\TicketSettings::attachment_max()
|
||||
: 5;
|
||||
?>
|
||||
<div class="aksrt-tickets-page uc-tickets-panel" data-aksrt-ticket-center>
|
||||
<header class="uc-tickets-panel__head">
|
||||
@@ -42,24 +39,37 @@ $attachment_max = class_exists('\AKSRT\Ticket\TicketSettings')
|
||||
<i class="fa fas fa-headset uc-tickets-panel__title-icon" aria-hidden="true"></i>
|
||||
<?php esc_html_e('工单中心', 'aksrt'); ?>
|
||||
</div>
|
||||
<p class="muted-2-color em09 mt3"><?php esc_html_e('提交问题工单,跟踪处理进度并与管理员沟通。', 'aksrt'); ?></p>
|
||||
<p class="muted-2-color em09 mt3"><?php esc_html_e('提交问题工单,跟踪处理进度并与客服沟通。', 'aksrt'); ?></p>
|
||||
</div>
|
||||
<button class="btn-primary" type="button" data-aksrt-ticket-create><?php esc_html_e('提交工单', 'aksrt'); ?></button>
|
||||
<button class="btn-primary aksrt-tickets-page__create" type="button" data-aksrt-ticket-create>
|
||||
<i class="fa fas fa-plus" aria-hidden="true"></i><?php esc_html_e('提交工单', 'aksrt'); ?>
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<div class="aksrt-tickets-page__stats" data-aksrt-ticket-stats>
|
||||
<?php // 统计卡同时是状态快捷筛选:点击按该状态过滤,再次点击取消。 ?>
|
||||
<div class="aksrt-tickets-page__stats" data-aksrt-ticket-stats role="group" aria-label="<?php esc_attr_e('按状态筛选', 'aksrt'); ?>">
|
||||
<button type="button" class="aksrt-tickets-page__stat is-active" data-aksrt-ticket-stat="" aria-pressed="true">
|
||||
<span><?php esc_html_e('全部', 'aksrt'); ?></span><strong>0</strong>
|
||||
</button>
|
||||
<?php foreach ($statuses as $status) : ?>
|
||||
<div class="aksrt-tickets-page__stat" data-aksrt-ticket-stat="<?php echo esc_attr((string) $status['status_key']); ?>">
|
||||
<span><?php echo esc_html((string) $status['name']); ?></span><strong>0</strong>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
class="aksrt-tickets-page__stat"
|
||||
data-aksrt-ticket-stat="<?php echo esc_attr((string) $status['status_key']); ?>"
|
||||
style="--aksrt-ticket-color: <?php echo esc_attr((string) $status['color']); ?>"
|
||||
aria-pressed="false"
|
||||
>
|
||||
<span><i class="aksrt-tickets-page__stat-dot" aria-hidden="true"></i><?php echo esc_html((string) $status['name']); ?></span><strong>0</strong>
|
||||
</button>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<form class="aksrt-tickets-page__search" data-aksrt-tickets-search>
|
||||
<label class="screen-reader-text" for="aksrt-ticket-keywords"><?php esc_html_e('按工单号或标题查找', 'aksrt'); ?></label>
|
||||
<i class="fa fas fa-search" aria-hidden="true"></i>
|
||||
<input id="aksrt-ticket-keywords" maxlength="60" placeholder="<?php esc_attr_e('输入工单号或标题查找', 'aksrt'); ?>">
|
||||
<button class="btn-primary" type="submit"><?php esc_html_e('查找', 'aksrt'); ?></button>
|
||||
<form class="aksrt-tickets-page__search" data-aksrt-tickets-search role="search">
|
||||
<label class="aksrt-tickets-page__search-box">
|
||||
<span class="screen-reader-text"><?php esc_html_e('按工单号或标题查找', 'aksrt'); ?></span>
|
||||
<i class="fa fas fa-search" aria-hidden="true"></i>
|
||||
<input type="search" maxlength="60" autocomplete="off" placeholder="<?php esc_attr_e('搜索工单号或标题', 'aksrt'); ?>">
|
||||
</label>
|
||||
<select data-aksrt-ticket-filter="status" aria-label="<?php esc_attr_e('工单状态', 'aksrt'); ?>">
|
||||
<option value=""><?php esc_html_e('全部状态', 'aksrt'); ?></option>
|
||||
<?php foreach ($statuses as $status) : ?>
|
||||
@@ -74,17 +84,23 @@ $attachment_max = class_exists('\AKSRT\Ticket\TicketSettings')
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
<?php endif; ?>
|
||||
<button class="aksrt-tickets-page__reset" type="button" data-aksrt-ticket-reset hidden><?php esc_html_e('清除筛选', 'aksrt'); ?></button>
|
||||
</form>
|
||||
|
||||
<div class="aksrt-tickets-page__list" data-aksrt-ticket-list>
|
||||
<div class="aksrt-tickets-page__empty">
|
||||
<i class="fa fas fa-headset" aria-hidden="true"></i>
|
||||
<h3><?php esc_html_e('还没有工单', 'aksrt'); ?></h3>
|
||||
<p><?php esc_html_e('遇到问题时提交工单,我们会尽快处理。', 'aksrt'); ?></p>
|
||||
<div class="aksrt-tickets-page__list" data-aksrt-ticket-list aria-live="polite" aria-busy="true">
|
||||
<?php // 首屏骨架:沿用全站 .post_ajax_loader + .is-loading 契约,JS 拿到数据后整体替换。 ?>
|
||||
<div class="post_ajax_loader is-loading" aria-hidden="true">
|
||||
<?php for ($i = 0; $i < 3; $i++) : ?>
|
||||
<div class="aksrt-tickets-page__card is-placeholder">
|
||||
<div class="placeholder s1"></div>
|
||||
<div class="placeholder k1"></div>
|
||||
<div class="placeholder k3" style="width: 42%;"></div>
|
||||
</div>
|
||||
<?php endfor; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="aksrt-tickets-page__pagination" data-aksrt-ticket-pagination hidden></nav>
|
||||
<nav class="aksrt-tickets-page__pagination" data-aksrt-ticket-pagination aria-label="<?php esc_attr_e('工单分页', 'aksrt'); ?>" hidden></nav>
|
||||
|
||||
<?php
|
||||
// 人机验证挂载点(提交工单 / 回复):场景未启用时 aksrt_render_captcha 无输出,
|
||||
@@ -94,7 +110,4 @@ $attachment_max = class_exists('\AKSRT\Ticket\TicketSettings')
|
||||
aksrt_render_captcha('ticket_reply');
|
||||
}
|
||||
?>
|
||||
<span class="hidden" data-aksrt-ticket-config="<?php echo esc_attr(wp_json_encode([
|
||||
'attachmentMax' => $attachment_max,
|
||||
])); ?>"></span>
|
||||
</div>
|
||||
@@ -424,12 +424,23 @@ trait ScriptsPart1b {
|
||||
(string) filemtime($tickets_css)
|
||||
);
|
||||
}
|
||||
// 共享工具层(请求 / 弹窗 / 上传 / 行内校验)先于面板脚本加载。
|
||||
$ticket_core_js = get_template_directory() . '/assets/js/ticket-center-core.js';
|
||||
if (file_exists($ticket_core_js)) {
|
||||
wp_register_script(
|
||||
'aksrt-ticket-center-core',
|
||||
$base_uri . '/assets/js/ticket-center-core.js',
|
||||
['loader_js'],
|
||||
(string) filemtime($ticket_core_js),
|
||||
true
|
||||
);
|
||||
}
|
||||
$ticket_center_js = get_template_directory() . '/assets/js/ticket-center.js';
|
||||
if (file_exists($ticket_center_js)) {
|
||||
wp_enqueue_script(
|
||||
'aksrt-ticket-center',
|
||||
$base_uri . '/assets/js/ticket-center.js',
|
||||
['loader_js'],
|
||||
['loader_js', 'aksrt-ticket-center-core'],
|
||||
(string) filemtime($ticket_center_js),
|
||||
true
|
||||
);
|
||||
|
||||
@@ -67,6 +67,7 @@ test('the ticket panel mounts both captcha scenes', () => {
|
||||
const js = read('assets/js/ticket-center.js');
|
||||
assert.match(js, /runCaptcha\('ticket_create'\)/);
|
||||
assert.match(js, /runCaptcha\('ticket_reply'\)/);
|
||||
// 取消验证时中止提交,不静默放行。
|
||||
assert.match(js, /return payload === null \? Promise\.reject\(\{ cancelled: true \}\)/);
|
||||
// 取消验证时中止提交,不静默放行(runCaptcha 实现位于共享工具层)。
|
||||
const core = read('assets/js/ticket-center-core.js');
|
||||
assert.match(core, /return payload === null \? Promise\.reject\(\{ cancelled: true \}\)/);
|
||||
});
|
||||
@@ -119,7 +119,8 @@ test('SPA deep-links the native ticket page instead of hosting it', () => {
|
||||
|
||||
test('frontend hooks match the renderer and the JS module', () => {
|
||||
const renderer = read('inc/helpers/user-center-renderers/profile-tickets.php');
|
||||
const js = read('assets/js/ticket-center.js');
|
||||
// 面板脚本 + 共享工具层(请求 / 弹窗 / 上传)共同构成前端模块。
|
||||
const js = read('assets/js/ticket-center.js') + '\n' + read('assets/js/ticket-center-core.js');
|
||||
|
||||
for (const hook of [
|
||||
'data-aksrt-ticket-center',
|
||||
@@ -130,7 +131,6 @@ test('frontend hooks match the renderer and the JS module', () => {
|
||||
'data-aksrt-ticket-pagination',
|
||||
'data-aksrt-tickets-search',
|
||||
'data-aksrt-ticket-filter=',
|
||||
'data-aksrt-ticket-config',
|
||||
]) {
|
||||
assert.ok(renderer.includes(hook), `renderer missing ${hook}`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user