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:
kate522andClaude Opus 5 committed 2026-11-01 20:05:04 +08:00
1 parent 5b16bc6e15
commit 35bb96e82f
997 files changed
+28216 -28188

No files matched your search

+38 -38
View File
@@ -1,5 +1,5 @@
/**
* AKSRT Video Player
* Jio Video Player
*
* Lightweight HTML5 video player wrapper with support for:
* - Standard MP4/WebM playback
@@ -9,16 +9,16 @@
* - Keyboard shortcuts
*
* Usage:
* <div class="aksrt-video" data-aksrt-video data-src="video.mp4" data-poster="thumb.jpg"></div>
* <div class="aksrt-video" data-aksrt-video data-src="stream.m3u8" data-type="hls"></div>
* <div class="jio-video" data-jio-video data-src="video.mp4" data-poster="thumb.jpg"></div>
* <div class="jio-video" data-jio-video data-src="stream.m3u8" data-type="hls"></div>
*
* @package AKSRT
* @package Jio
*/
(function () {
'use strict';
var STYLE_ID = 'aksrt-video-player-style';
var STYLE_ID = 'jio-video-player-style';
var HLS_SRC = 'https://cdn.jsdelivr.net/npm/hls.js@1/dist/hls.min.js';
var FLV_SRC = 'https://cdn.jsdelivr.net/npm/flv.js@1/dist/flv.min.js';
@@ -27,16 +27,16 @@
var style = document.createElement('style');
style.id = STYLE_ID;
style.textContent =
'.aksrt-video{position:relative;background:#000;border-radius:12px;overflow:hidden;cursor:pointer;}' +
'.jio-video{position:relative;background:#000;border-radius:12px;overflow:hidden;cursor:pointer;}' +
// 组件容器(文章封面比例盒)有确定高度:视频铺满并居中裁切,对齐单图封面;
// 容器无确定高度时 height:100% 退化为 auto,行为与原 height:auto 一致。
'.aksrt-video video{display:block;width:100%;height:100%;object-fit:cover;}' +
'.aksrt-video__overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.3);transition:opacity 0.3s;pointer-events:none;}' +
'.aksrt-video.is-playing .aksrt-video__overlay{opacity:0;}' +
'.aksrt-video__play{width:60px;height:60px;border-radius:50%;background:rgba(255,255,255,0.9);display:flex;align-items:center;justify-content:center;font-size:24px;color:#1a1a2e;box-shadow:0 4px 20px rgba(0,0,0,0.3);transition:transform 0.2s;}' +
'.aksrt-video:hover .aksrt-video__play{transform:scale(1.1);}' +
'.aksrt-video__badge{position:absolute;top:8px;right:8px;background:rgba(0,0,0,0.6);color:#fff;font-size:11px;padding:2px 8px;border-radius:4px;backdrop-filter:blur(4px);}' +
'.aksrt-video.is-playing .aksrt-video__badge{display:none;}';
'.jio-video video{display:block;width:100%;height:100%;object-fit:cover;}' +
'.jio-video__overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,0.3);transition:opacity 0.3s;pointer-events:none;}' +
'.jio-video.is-playing .jio-video__overlay{opacity:0;}' +
'.jio-video__play{width:60px;height:60px;border-radius:50%;background:rgba(255,255,255,0.9);display:flex;align-items:center;justify-content:center;font-size:24px;color:#1a1a2e;box-shadow:0 4px 20px rgba(0,0,0,0.3);transition:transform 0.2s;}' +
'.jio-video:hover .jio-video__play{transform:scale(1.1);}' +
'.jio-video__badge{position:absolute;top:8px;right:8px;background:rgba(0,0,0,0.6);color:#fff;font-size:11px;padding:2px 8px;border-radius:4px;backdrop-filter:blur(4px);}' +
'.jio-video.is-playing .jio-video__badge{display:none;}';
document.head.appendChild(style);
}
@@ -57,11 +57,11 @@
});
}
function AksrtVideoPlayer(element) {
function JioVideoPlayer(element) {
this.el = typeof element === 'string' ? document.querySelector(element) : element;
if (!this.el || this.el.dataset.aksrtVideoBound) return;
this.el.dataset.aksrtVideoBound = '1';
this.el._aksrtPlayer = this;
if (!this.el || this.el.dataset.jioVideoBound) return;
this.el.dataset.jioVideoBound = '1';
this.el._jioPlayer = this;
this.src = this.el.dataset.src || '';
this.poster = this.el.dataset.poster || '';
@@ -72,7 +72,7 @@
this.init();
}
AksrtVideoPlayer.prototype.init = function () {
JioVideoPlayer.prototype.init = function () {
var self = this;
// Create video element
@@ -83,18 +83,18 @@
if (this.loop) this.video.loop = true;
if (this.muted) this.video.muted = true;
if (this.poster) this.video.poster = this.poster;
// 视频尺寸/裁切全部由注入样式表的 .aksrt-video video 规则决定,
// 视频尺寸/裁切全部由注入样式表的 .jio-video video 规则决定,
// 禁止再加内联样式(内联 cover/contain 会覆盖契约导致信箱式黑边)。
// Play overlay
this.overlay = document.createElement('div');
this.overlay.className = 'aksrt-video__overlay';
this.overlay.innerHTML = '<div class="aksrt-video__play"><i class="fa fas fa-play" style="margin-left:3px;"></i></div>';
this.overlay.className = 'jio-video__overlay';
this.overlay.innerHTML = '<div class="jio-video__play"><i class="fa fas fa-play" style="margin-left:3px;"></i></div>';
// Badge
if (this.type === 'hls') {
var badge = document.createElement('div');
badge.className = 'aksrt-video__badge';
badge.className = 'jio-video__badge';
badge.textContent = 'HLS';
this.el.appendChild(badge);
}
@@ -135,7 +135,7 @@
this.loadSource();
};
AksrtVideoPlayer.prototype.loadSource = function () {
JioVideoPlayer.prototype.loadSource = function () {
var self = this;
if (this.type === 'hls') {
@@ -173,11 +173,11 @@
}
};
AksrtVideoPlayer.prototype.hasSource = function () {
JioVideoPlayer.prototype.hasSource = function () {
return Boolean(this.video.currentSrc || this.video.src || this.hls || this.flvPlayer);
};
AksrtVideoPlayer.prototype.toggle = function () {
JioVideoPlayer.prototype.toggle = function () {
if (!this.hasSource()) return;
if (this.video.paused) {
this.video.play().catch(function () { /* source failed or autoplay blocked */ });
@@ -186,7 +186,7 @@
}
};
AksrtVideoPlayer.prototype.toggleFullscreen = function () {
JioVideoPlayer.prototype.toggleFullscreen = function () {
if (document.fullscreenElement) {
document.exitFullscreen();
} else if (this.el.requestFullscreen) {
@@ -194,12 +194,12 @@
}
};
AksrtVideoPlayer.prototype.destroy = function () {
JioVideoPlayer.prototype.destroy = function () {
if (this.hls) { this.hls.destroy(); this.hls = null; }
if (this.flvPlayer) { this.flvPlayer.destroy(); this.flvPlayer = null; }
this.video.src = '';
this.el.innerHTML = '';
delete this.el.dataset.aksrtVideoBound;
delete this.el.dataset.jioVideoBound;
};
/**
@@ -208,7 +208,7 @@
* @param {string} [type] - 可选类型 (mp4/hls/flv)
* @param {string} [poster] - 可选封面
*/
AksrtVideoPlayer.prototype.switchSource = function (src, type, poster) {
JioVideoPlayer.prototype.switchSource = function (src, type, poster) {
if (!src) return;
// 清理旧播放器
@@ -231,12 +231,12 @@
var switchBtn = e.target.closest('.switch-video');
if (!switchBtn) return;
var container = switchBtn.closest('.aksrt-video') || switchBtn.closest('[data-aksrt-video]');
var container = switchBtn.closest('.jio-video') || switchBtn.closest('[data-jio-video]');
// Single cover: episodes sit in .single-video-footer; player is sibling under .single-video
if (!container) {
var singleVideo = switchBtn.closest('.single-video, .single-head-cover');
if (singleVideo) {
container = singleVideo.querySelector('.aksrt-video, [data-aksrt-video]');
container = singleVideo.querySelector('.jio-video, [data-jio-video]');
}
}
if (!container) return;
@@ -247,12 +247,12 @@
e.preventDefault();
// 检查是否已有播放器实例
if (container._aksrtPlayer) {
container._aksrtPlayer.switchSource(src, switchBtn.dataset.type);
if (container._jioPlayer) {
container._jioPlayer.switchSource(src, switchBtn.dataset.type);
} else {
container.dataset.src = src;
if (switchBtn.dataset.type) container.dataset.type = switchBtn.dataset.type;
new AksrtVideoPlayer(container);
new JioVideoPlayer(container);
}
// 高亮当前集
@@ -268,16 +268,16 @@
// ── Public API ──
window.AksrtVideoPlayer = AksrtVideoPlayer;
window.JioVideoPlayer = JioVideoPlayer;
// ── Auto-init ──
function init() {
injectStyle();
document.querySelectorAll('[data-aksrt-video]').forEach(function (el) {
new AksrtVideoPlayer(el);
document.querySelectorAll('[data-jio-video]').forEach(function (el) {
new JioVideoPlayer(el);
});
}
jQuery(document).off('auto_fun.aksrt-video-player').on('auto_fun.aksrt-video-player', function () { init(document); });
jQuery(document).off('auto_fun.jio-video-player').on('auto_fun.jio-video-player', function () { init(document); });
})();