refactor: rename the theme brand and every identifier from AKSRT to Jio
Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.
Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)
Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
(dropped 3 stale entries, added the 17 missing ones)
Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
when it is empty
Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.
Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<n-card class="aksrt-section-card aksrt-ticket-status-panel">
|
||||
<div class="aksrt-section-header">
|
||||
<n-card class="jio-section-card jio-ticket-status-panel">
|
||||
<div class="jio-section-header">
|
||||
<h3>工单状态</h3>
|
||||
<n-button size="small" type="primary" :disabled="saving" @click="openCreate">新增状态</n-button>
|
||||
</div>
|
||||
@@ -24,13 +24,13 @@
|
||||
v-model:show="visible"
|
||||
:title="editing ? '编辑状态' : '新增状态'"
|
||||
preset="card"
|
||||
class="aksrt-status-modal"
|
||||
class="jio-status-modal"
|
||||
style="width: 460px; max-width: 92vw;"
|
||||
:mask-closable="false"
|
||||
>
|
||||
<div class="aksrt-status-preview" aria-live="polite">
|
||||
<span class="aksrt-status-preview__label">预览</span>
|
||||
<span class="aksrt-ticket-badge" :style="{ '--aksrt-ticket-color': previewColor }">
|
||||
<div class="jio-status-preview" aria-live="polite">
|
||||
<span class="jio-status-preview__label">预览</span>
|
||||
<span class="jio-ticket-badge" :style="{ '--jio-ticket-color': previewColor }">
|
||||
{{ form.name.trim() || '状态名称' }}
|
||||
</span>
|
||||
</div>
|
||||
@@ -40,30 +40,30 @@
|
||||
<n-input v-model:value="form.name" placeholder="如:处理中" maxlength="60" show-count />
|
||||
</n-form-item>
|
||||
<n-form-item label="标识" path="status_key">
|
||||
<div class="aksrt-status-key">
|
||||
<div class="jio-status-key">
|
||||
<n-input
|
||||
v-model:value="form.status_key"
|
||||
class="aksrt-status-key__input"
|
||||
class="jio-status-key__input"
|
||||
:placeholder="editing ? '' : '留空则按名称自动生成'"
|
||||
maxlength="24"
|
||||
show-count
|
||||
:input-props="{ autocomplete: 'off', spellcheck: false }"
|
||||
@blur="form.status_key = normalizeKey(form.status_key)"
|
||||
/>
|
||||
<span class="aksrt-ticket-status__hint">
|
||||
<span class="jio-ticket-status__hint">
|
||||
小写字母开头,仅含小写字母、数字与下划线(2–24 位)。修改后,使用该状态的工单会同步改为新标识。
|
||||
</span>
|
||||
</div>
|
||||
</n-form-item>
|
||||
<n-form-item label="状态颜色" path="color">
|
||||
<div class="aksrt-status-color">
|
||||
<div class="aksrt-status-color__swatches" role="radiogroup" aria-label="状态颜色">
|
||||
<div class="jio-status-color">
|
||||
<div class="jio-status-color__swatches" role="radiogroup" aria-label="状态颜色">
|
||||
<button
|
||||
v-for="swatch in SWATCHES"
|
||||
:key="swatch"
|
||||
type="button"
|
||||
role="radio"
|
||||
class="aksrt-status-color__swatch"
|
||||
class="jio-status-color__swatch"
|
||||
:class="{ 'is-active': currentHex === swatch }"
|
||||
:style="{ '--swatch': swatch }"
|
||||
:aria-checked="currentHex === swatch"
|
||||
@@ -72,7 +72,7 @@
|
||||
@click="form.color = swatch"
|
||||
/>
|
||||
<!-- 自定义色:未选中时显示色环,选中后显示当前色并带选中环。 -->
|
||||
<AksColorPicker
|
||||
<JioColorPicker
|
||||
:model-value="previewColor"
|
||||
@update:model-value="setColor"
|
||||
>
|
||||
@@ -81,7 +81,7 @@
|
||||
:ref="setTriggerRef"
|
||||
type="button"
|
||||
role="radio"
|
||||
class="aksrt-status-color__swatch aksrt-status-color__swatch--custom"
|
||||
class="jio-status-color__swatch jio-status-color__swatch--custom"
|
||||
:class="{ 'is-active': isCustomColor }"
|
||||
:style="{ '--swatch': previewColor }"
|
||||
:aria-checked="isCustomColor"
|
||||
@@ -90,25 +90,25 @@
|
||||
@click="onClick"
|
||||
/>
|
||||
</template>
|
||||
</AksColorPicker>
|
||||
</JioColorPicker>
|
||||
</div>
|
||||
<n-input
|
||||
v-model:value="form.color"
|
||||
class="aksrt-status-color__hex"
|
||||
class="jio-status-color__hex"
|
||||
maxlength="7"
|
||||
placeholder="#6b7280"
|
||||
@blur="form.color = toHex(form.color) || form.color.trim()"
|
||||
>
|
||||
<template #prefix>
|
||||
<i class="aksrt-status-color__chip" :style="{ background: previewColor }" />
|
||||
<i class="jio-status-color__chip" :style="{ background: previewColor }" />
|
||||
</template>
|
||||
</n-input>
|
||||
</div>
|
||||
</n-form-item>
|
||||
<n-form-item label="完结状态" path="is_closed" :show-feedback="false">
|
||||
<div class="aksrt-status-closed">
|
||||
<div class="jio-status-closed">
|
||||
<n-switch v-model:value="form.is_closed" />
|
||||
<span class="aksrt-ticket-status__hint">开启后该状态视为终态,工单不可再流转</span>
|
||||
<span class="jio-ticket-status__hint">开启后该状态视为终态,工单不可再流转</span>
|
||||
</div>
|
||||
</n-form-item>
|
||||
</n-form>
|
||||
@@ -126,7 +126,7 @@
|
||||
import { computed, h, onMounted, ref } from 'vue'
|
||||
import { NButton, NSpace, useDialog, useMessage } from 'naive-ui'
|
||||
import api from '@/api'
|
||||
import AksColorPicker from '@/components/form/AksColorPicker.vue'
|
||||
import JioColorPicker from '@/components/form/JioColorPicker.vue'
|
||||
import { toHex } from '@/utils/color.js'
|
||||
|
||||
const message = useMessage()
|
||||
@@ -194,7 +194,7 @@ const currentHex = computed(() => toHex(form.value.color))
|
||||
const previewColor = computed(() => currentHex.value || DEFAULT_COLOR)
|
||||
const isCustomColor = computed(() => currentHex.value !== '' && !SWATCHES.includes(currentHex.value))
|
||||
|
||||
/** AksColorPicker 已归一化为 hex;清空(空串)时保留当前色。 */
|
||||
/** JioColorPicker 已归一化为 hex;清空(空串)时保留当前色。 */
|
||||
function setColor(value) {
|
||||
const hex = toHex(value)
|
||||
if (hex) form.value.color = hex
|
||||
@@ -208,15 +208,15 @@ const columns = computed(() => [
|
||||
minWidth: 160,
|
||||
// 注意:原生元素用 h('span', ...) 时,文本必须作为 children 直接传入;
|
||||
// 写成 () => row.name 的插槽函数对原生元素不生效,单元格会是空的。
|
||||
render: (row) => h('span', { class: 'aksrt-ticket-badge', style: { '--aksrt-ticket-color': row.color } }, row.name),
|
||||
render: (row) => h('span', { class: 'jio-ticket-badge', style: { '--jio-ticket-color': row.color } }, row.name),
|
||||
},
|
||||
{
|
||||
title: '颜色',
|
||||
key: 'color',
|
||||
width: 140,
|
||||
render: (row) => h('span', { class: 'aksrt-ticket-color-cell' }, [
|
||||
h('i', { class: 'aksrt-ticket-color-dot', style: { background: row.color } }),
|
||||
h('span', { class: 'aksrt-ticket-color-value' }, row.color),
|
||||
render: (row) => h('span', { class: 'jio-ticket-color-cell' }, [
|
||||
h('i', { class: 'jio-ticket-color-dot', style: { background: row.color } }),
|
||||
h('span', { class: 'jio-ticket-color-value' }, row.color),
|
||||
]),
|
||||
},
|
||||
{
|
||||
@@ -235,7 +235,7 @@ const columns = computed(() => [
|
||||
title: '标识',
|
||||
key: 'status_key',
|
||||
minWidth: 140,
|
||||
render: (row) => h('span', { class: 'aksrt-ticket-key' }, row.status_key),
|
||||
render: (row) => h('span', { class: 'jio-ticket-key' }, row.status_key),
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@@ -348,13 +348,13 @@ defineExpose({ reload: load })
|
||||
(此前色块 <i> 因此没有尺寸,颜色列只剩色值文本。)
|
||||
-->
|
||||
<style>
|
||||
.aksrt-ticket-status-panel .aksrt-ticket-color-cell {
|
||||
.jio-ticket-status-panel .jio-ticket-color-cell {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.aksrt-ticket-status-panel .aksrt-ticket-color-dot {
|
||||
.jio-ticket-status-panel .jio-ticket-color-dot {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
@@ -363,21 +363,21 @@ defineExpose({ reload: load })
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.aksrt-ticket-status-panel .aksrt-ticket-color-value,
|
||||
.aksrt-ticket-status-panel .aksrt-ticket-key {
|
||||
.jio-ticket-status-panel .jio-ticket-color-value,
|
||||
.jio-ticket-status-panel .jio-ticket-key {
|
||||
font-family: var(--n-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
||||
font-size: 12px;
|
||||
color: var(--aksrt-color-muted);
|
||||
color: var(--jio-color-muted);
|
||||
}
|
||||
|
||||
/* 徽章与前台 assets/css/routes/tickets.css 的 .aksrt-ticket-badge 同构;表格与弹窗预览共用。 */
|
||||
.aksrt-ticket-status-panel .aksrt-ticket-badge,
|
||||
.aksrt-status-modal .aksrt-ticket-badge {
|
||||
/* 徽章与前台 assets/css/routes/tickets.css 的 .jio-ticket-badge 同构;表格与弹窗预览共用。 */
|
||||
.jio-ticket-status-panel .jio-ticket-badge,
|
||||
.jio-status-modal .jio-ticket-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--aksrt-ticket-color, #6b7280) 16%, transparent);
|
||||
color: var(--aksrt-ticket-color, #6b7280);
|
||||
background: color-mix(in srgb, var(--jio-ticket-color, #6b7280) 16%, transparent);
|
||||
color: var(--jio-ticket-color, #6b7280);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
line-height: 1.6;
|
||||
@@ -387,24 +387,24 @@ defineExpose({ reload: load })
|
||||
|
||||
<style scoped>
|
||||
/* —— 弹窗:顶部实时预览 —— */
|
||||
.aksrt-status-preview {
|
||||
.jio-status-preview {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 18px;
|
||||
padding: 14px 16px;
|
||||
border: 1px dashed var(--aksrt-color-border);
|
||||
border: 1px dashed var(--jio-color-border);
|
||||
border-radius: 8px;
|
||||
background: rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.aksrt-status-preview__label {
|
||||
color: var(--aksrt-color-muted);
|
||||
.jio-status-preview__label {
|
||||
color: var(--jio-color-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.aksrt-status-preview .aksrt-ticket-badge {
|
||||
.jio-status-preview .jio-ticket-badge {
|
||||
max-width: 70%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
@@ -412,20 +412,20 @@ defineExpose({ reload: load })
|
||||
}
|
||||
|
||||
/* —— 弹窗:颜色选择(预设色板 + 自定义 + 十六进制输入) —— */
|
||||
.aksrt-status-color {
|
||||
.jio-status-color {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.aksrt-status-color__swatches {
|
||||
.jio-status-color__swatches {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.aksrt-status-color__swatch {
|
||||
.jio-status-color__swatch {
|
||||
position: relative;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
@@ -438,21 +438,21 @@ defineExpose({ reload: load })
|
||||
transition: transform 0.12s ease, box-shadow 0.12s ease;
|
||||
}
|
||||
|
||||
.aksrt-status-color__swatch:hover {
|
||||
.jio-status-color__swatch:hover {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.aksrt-status-color__swatch:focus-visible {
|
||||
outline: 2px solid var(--aksrt-color-primary, #2271b1);
|
||||
.jio-status-color__swatch:focus-visible {
|
||||
outline: 2px solid var(--jio-color-primary, #2271b1);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* 选中态:白色内圈 + 同色外环,深浅主题都清晰。 */
|
||||
.aksrt-status-color__swatch.is-active {
|
||||
.jio-status-color__swatch.is-active {
|
||||
box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--swatch);
|
||||
}
|
||||
|
||||
.aksrt-status-color__swatch.is-active::after {
|
||||
.jio-status-color__swatch.is-active::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
@@ -465,11 +465,11 @@ defineExpose({ reload: load })
|
||||
}
|
||||
|
||||
/* 自定义:未选中时显示色环,提示「更多颜色」。 */
|
||||
.aksrt-status-color__swatch--custom:not(.is-active) {
|
||||
.jio-status-color__swatch--custom:not(.is-active) {
|
||||
background: conic-gradient(#ef4444, #f59e0b, #eab308, #22c55e, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444);
|
||||
}
|
||||
|
||||
.aksrt-status-color__swatch--custom:not(.is-active)::after {
|
||||
.jio-status-color__swatch--custom:not(.is-active)::after {
|
||||
content: '+';
|
||||
position: absolute;
|
||||
inset: 5px;
|
||||
@@ -484,12 +484,12 @@ defineExpose({ reload: load })
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.aksrt-status-color__hex {
|
||||
.jio-status-color__hex {
|
||||
width: 160px;
|
||||
font-family: var(--n-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
||||
}
|
||||
|
||||
.aksrt-status-color__chip {
|
||||
.jio-status-color__chip {
|
||||
display: inline-block;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
@@ -498,26 +498,26 @@ defineExpose({ reload: load })
|
||||
}
|
||||
|
||||
/* —— 弹窗:标识 —— */
|
||||
.aksrt-status-key {
|
||||
.jio-status-key {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.aksrt-status-key__input {
|
||||
.jio-status-key__input {
|
||||
font-family: var(--n-font-family-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
||||
}
|
||||
|
||||
/* —— 弹窗:完结开关 —— */
|
||||
.aksrt-status-closed {
|
||||
.jio-status-closed {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.aksrt-ticket-status__hint {
|
||||
color: var(--aksrt-color-muted);
|
||||
.jio-ticket-status__hint {
|
||||
color: var(--jio-color-muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user