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>
110 lines
4.1 KiB
Vue
110 lines
4.1 KiB
Vue
<template>
|
|
<div class="float-btn-panel">
|
|
<div class="jio-sortable__head" v-bind="headAttrs">
|
|
<JioSortHandle @click.stop />
|
|
<div class="jio-sortable__main">
|
|
<div class="jio-sortable__title-row">
|
|
<span class="jio-sortable__title">{{ meta.title }}</span>
|
|
<template v-if="modelValue.type !== 'more'">
|
|
<n-tag v-if="modelValue.pc_s" size="small" type="info" :bordered="false">PC</n-tag>
|
|
<n-tag v-if="modelValue.m_s" size="small" type="warning" :bordered="false">移动</n-tag>
|
|
<n-tag v-if="!modelValue.pc_s && !modelValue.m_s" size="small" :bordered="false">未显示</n-tag>
|
|
</template>
|
|
<n-tag v-else size="small" :bordered="false">{{ modelValue.buttons.length }} 个</n-tag>
|
|
</div>
|
|
<span v-if="meta.warn" class="jio-sortable__desc float-btn-panel__warn">
|
|
<i class="fa fas fa-info-circle" aria-hidden="true" /> {{ meta.warn }}
|
|
</span>
|
|
</div>
|
|
<i
|
|
class="fa fas jio-sortable__toggle"
|
|
:class="expanded ? 'fa-chevron-down' : 'fa-chevron-right'"
|
|
aria-hidden="true"
|
|
/>
|
|
</div>
|
|
|
|
<div v-show="expanded" class="jio-sortable__body">
|
|
<div class="float-btn-panel__subtitle">{{ meta.panel }}</div>
|
|
|
|
<FloatMoreButtonsEditor
|
|
v-if="modelValue.type === 'more'"
|
|
:model-value="modelValue.buttons"
|
|
@update:model-value="patch({ buttons: $event })"
|
|
/>
|
|
|
|
<template v-else>
|
|
<FloatBtnCommonFields :model-value="modelValue" @update:model-value="emit('update:modelValue', $event)" />
|
|
|
|
<n-form label-placement="left" label-width="110" class="jio-form float-btn-panel__extra">
|
|
<n-form-item v-if="modelValue.type === 'qrcode'" label="一句话简介">
|
|
<n-input :value="modelValue.desc" @update:value="patch({ desc: $event })" />
|
|
</n-form-item>
|
|
|
|
<n-form-item v-if="modelValue.type === 'add'" label="按钮图标">
|
|
<FaIconPicker v-model="addIcon" placeholder="选择图标" />
|
|
</n-form-item>
|
|
|
|
<n-form-item v-if="modelValue.type === 'service_qq'" label="QQ号码">
|
|
<n-input :value="modelValue.qq" placeholder="仅填写数字" @update:value="patch({ qq: $event })" />
|
|
</n-form-item>
|
|
|
|
<n-form-item v-if="modelValue.type === 'service_wechat'" label="微信二维码">
|
|
<JioMediaField
|
|
:model-value="modelValue.wechat_img"
|
|
placeholder="选择二维码图片"
|
|
@update:model-value="patch({ wechat_img: $event })"
|
|
/>
|
|
</n-form-item>
|
|
</n-form>
|
|
</template>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup>
|
|
/** 悬浮按钮排序列表中的单个卡片;外层 .jio-sortable__item 由 FloatingButtonsSettings 提供。 */
|
|
import { computed, ref } from 'vue'
|
|
import FaIconPicker from '@/components/form/FaIconPicker.vue'
|
|
import JioMediaField from '@/components/form/JioMediaField.vue'
|
|
import JioSortHandle from '@/components/form/JioSortHandle.vue'
|
|
import { collapseHeadAttrs } from '@/components/form/useCollapsibleItems.js'
|
|
import FloatBtnCommonFields from './FloatBtnCommonFields.vue'
|
|
import FloatMoreButtonsEditor from './FloatMoreButtonsEditor.vue'
|
|
import { FLOAT_BTN_META } from './floating-defaults.js'
|
|
|
|
const props = defineProps({
|
|
modelValue: { type: Object, required: true },
|
|
})
|
|
const emit = defineEmits(['update:modelValue'])
|
|
|
|
const expanded = ref(false)
|
|
const headAttrs = computed(() => collapseHeadAttrs(expanded.value, () => { expanded.value = !expanded.value }))
|
|
const meta = computed(() => FLOAT_BTN_META[props.modelValue.type] || { title: props.modelValue.type, panel: '' })
|
|
|
|
const addIcon = computed({
|
|
get: () => props.modelValue.icon || '',
|
|
set: (value) => patch({ icon: value || '' }),
|
|
})
|
|
|
|
function patch(partial) {
|
|
emit('update:modelValue', { ...props.modelValue, ...partial })
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.float-btn-panel__warn {
|
|
color: var(--jio-color-warning, #D97706);
|
|
}
|
|
|
|
.float-btn-panel__subtitle {
|
|
margin-bottom: 12px;
|
|
color: var(--jio-color-text);
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.float-btn-panel__extra {
|
|
margin-top: 12px;
|
|
}
|
|
</style>
|