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>
181 lines
4.3 KiB
Vue
181 lines
4.3 KiB
Vue
<template>
|
|
<div class="jio-field-group" :class="{ 'is-collapsible': collapsible, 'is-collapsed': collapsible && collapsed }">
|
|
<div
|
|
v-if="title"
|
|
class="jio-field-group__header"
|
|
:class="{ 'is-clickable': collapsible }"
|
|
@click="collapsible ? toggleCollapse() : undefined"
|
|
>
|
|
<div class="jio-field-group__header-left">
|
|
<FaIcon v-if="icon" :icon="icon" :size="16" class="jio-field-group__icon" />
|
|
<div>
|
|
<h3 class="jio-field-group__title">{{ title }}</h3>
|
|
<p v-if="description" class="jio-field-group__desc">{{ description }}</p>
|
|
</div>
|
|
</div>
|
|
<div class="jio-field-group__header-right">
|
|
<div v-if="$slots.actions" class="jio-field-group__actions" @click.stop>
|
|
<slot name="actions" />
|
|
</div>
|
|
<button
|
|
v-if="collapsible"
|
|
type="button"
|
|
class="jio-field-group__collapse-btn"
|
|
:aria-expanded="(!collapsed).toString()"
|
|
:title="collapsed ? '展开配置' : '收起配置'"
|
|
@click.stop="toggleCollapse"
|
|
>
|
|
<FaIcon
|
|
:icon="collapsed ? 'fa fas fa-chevron-right' : 'fa fas fa-chevron-down'"
|
|
:size="12"
|
|
/>
|
|
<span>{{ collapsed ? '展开' : '收起' }}</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<transition name="jio-collapse">
|
|
<div v-show="!collapsed" class="jio-field-group__body">
|
|
<slot />
|
|
</div>
|
|
</transition>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
/**
|
|
* JioFieldGroup — card-style container for grouping related form fields.
|
|
* Supports collapsible sections, icon headers, and description text.
|
|
*
|
|
* defaultCollapsed only seeds the initial state; afterwards the user toggles freely.
|
|
*/
|
|
import { ref } from 'vue'
|
|
import FaIcon from './FaIcon.vue'
|
|
|
|
const props = defineProps({
|
|
title: { type: String, default: '' },
|
|
description: { type: String, default: '' },
|
|
icon: { type: String, default: '' },
|
|
collapsible: { type: Boolean, default: false },
|
|
defaultCollapsed: { type: Boolean, default: false },
|
|
})
|
|
|
|
const collapsed = ref(!!props.defaultCollapsed)
|
|
|
|
function toggleCollapse() {
|
|
if (!props.collapsible) return
|
|
collapsed.value = !collapsed.value
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.jio-field-group {
|
|
margin-bottom: 20px;
|
|
border: 1px solid var(--jio-color-border);
|
|
border-radius: 12px;
|
|
background: var(--jio-color-surface);
|
|
box-shadow: var(--jio-shadow-card);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.jio-field-group__header {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
padding: 18px 20px 0;
|
|
gap: 12px;
|
|
}
|
|
|
|
.jio-field-group__header.is-clickable {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.jio-field-group__header.is-clickable:hover .jio-field-group__title {
|
|
color: var(--jio-color-primary);
|
|
}
|
|
|
|
.jio-field-group.is-collapsed .jio-field-group__header {
|
|
padding-bottom: 18px;
|
|
}
|
|
|
|
.jio-field-group__header-left {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
min-width: 0;
|
|
}
|
|
|
|
.jio-field-group__header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.jio-field-group__icon {
|
|
color: var(--jio-color-primary);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.jio-field-group__title {
|
|
margin: 0;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: var(--jio-color-text);
|
|
transition: color 0.15s;
|
|
}
|
|
|
|
.jio-field-group__desc {
|
|
margin: 4px 0 0;
|
|
font-size: 12px;
|
|
color: var(--jio-color-muted);
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.jio-field-group__actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.jio-field-group__collapse-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
border: 1px solid var(--jio-color-border);
|
|
background: var(--jio-color-canvas);
|
|
color: var(--jio-color-text-secondary);
|
|
border-radius: 999px;
|
|
padding: 4px 10px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
|
}
|
|
|
|
.jio-field-group__collapse-btn:hover {
|
|
color: var(--jio-color-primary);
|
|
border-color: var(--jio-color-primary);
|
|
background: var(--jio-color-primary-soft);
|
|
}
|
|
|
|
.jio-field-group__body {
|
|
padding: 16px 20px 20px;
|
|
}
|
|
|
|
/* Collapse transition */
|
|
.jio-collapse-enter-active,
|
|
.jio-collapse-leave-active {
|
|
transition: all 0.2s ease;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.jio-collapse-enter-from,
|
|
.jio-collapse-leave-to {
|
|
opacity: 0;
|
|
max-height: 0;
|
|
padding-top: 0;
|
|
padding-bottom: 0;
|
|
}
|
|
</style>
|