v-fixed38: 首页右上角新增TVBOX接口一键复制按钮;开源地址改指自建Gitea
- 首页右上角四件套:vfixed38角标 + 通知铃铛 + TVBOX接口(复制配置地址,剪贴板不可用时弹窗指引) + 开源地址 - 开源地址(首页锚点+菜单版本按钮)统一改为 https://gitea.88531.cn/jinghui/katelyatv,不再跳上游GitHub - 补丁幂等兼容新旧锚点;CHANGELOG/README 双写;compose/.env 对齐 fixed38
This commit is contained in:
1 parent
79e05c951b
commit
2dd7b5f05f
4 files changed
+27
-10
No files matched your search
@@ -2,6 +2,12 @@
|
||||
|
||||
格式参考本机发版惯例:按日期分条,`🐛修复` / `✨新功能`。
|
||||
|
||||
## 2026-10-30 → v-fixed38
|
||||
|
||||
- ✨ **首页右上角新增「📺 TVBOX接口」按钮**:一键复制配置地址(`https://tv.88531.cn/api/tvbox`),浏览器不支持剪贴板时自动弹窗展示地址并附影视仓/TVBox「设置 → 配置地址」粘贴指引;与版本角标/铃铛/开源地址同排,仅首页显示
|
||||
- ✨ **开源地址改指自建 Gitea**:首页「⭐ 开源地址」及用户菜单版本按钮均改为 `https://gitea.88531.cn/jinghui/katelyatv`,不再跳上游 GitHub
|
||||
- 🐛 补丁幂等逻辑同时兼容新旧两种开源地址锚点,重放安全;已过 `node --check` 与浏览器冒烟(首页四件套显示 / 点击弹窗 / live 页隐藏全绿)
|
||||
|
||||
## 2026-10-30 → v-fixed37
|
||||
|
||||
- 🐛 **TVBOX 公告兼容性**:`/api/tvbox` 在 `notice` 外新增 `warning` 字段(同文本),覆盖 TVBox 原版系壳的启动弹窗字段;影视仓系读 `notice`。配置缓存的客户端需重新保存接口地址或清缓存才会弹新公告
|
||||
|
||||
@@ -53,7 +53,7 @@ git clone https://gitea.88531.cn/jinghui/katelyatv.git && cd katelyatv
|
||||
docker pull gitea.88531.cn/jinghui/katelyatv:latest
|
||||
# 国内慢可换腾讯云镜像(东京):
|
||||
# docker pull jpccr.ccs.tencentyun.com/jinghui/katelyatv:latest
|
||||
docker tag gitea.88531.cn/jinghui/katelyatv:latest katelyatv:fixed37 # 对齐 compose 的 image 名
|
||||
docker tag gitea.88531.cn/jinghui/katelyatv:latest katelyatv:fixed38 # 对齐 compose 的 image 名
|
||||
|
||||
cp .env.example .env
|
||||
vi .env # 至少填:PASSWORD(站点密码)、NEXTAUTH_SECRET(随机串)
|
||||
@@ -85,6 +85,9 @@ docker restart katelyatv
|
||||
|
||||
## 📝 更新日志(最近)
|
||||
|
||||
- **2026-10-30 v-fixed38**:首页右上角新增「📺 TVBOX接口」一键复制配置地址;⭐ 开源地址与菜单版本按钮改指自建 Gitea(`https://gitea.88531.cn/jinghui/katelyatv`)
|
||||
- **2026-10-30 v-fixed37**:TVBOX 公告兼容 —— 配置同时下发 `notice` + `warning` 双字段;版本角标改由环境变量注入
|
||||
- **2026-10-30 v-fixed36**:首页右上角统一信息区(版本角标 + 🔔通知铃铛 + ⭐开源地址,仅首页显示);直播页只保留 TVBOX 接入入口
|
||||
- **2026-10-30 v-fixed35**:授权/公告/版本推送系统 —— 授权中心统计安装与在线人数、公告弹窗 + TVBOX notice 推送、新版提示;右上角显示当前版本号 `vfixed35`;新增每 IP 限流防恶意刷流量(接口 240/分、直播 30/分)
|
||||
- **2026-10-29 v-fixed34**:新增访问日志与使用统计 —— 外网访问者真实 IP/UA 全记录,`./usage-stats.sh [24h|all]` 一键查看独立 IP 数、按天分布、直播观看人数
|
||||
- **2026-10-29 v-fixed33**:桌面导航与直播页右上角新增「⭐ 开源地址」入口;镜像发布至 `gitea.88531.cn/jinghui/katelyatv` 公共仓库(免登录 `docker pull`)
|
||||
@@ -134,16 +137,16 @@ docker/katelyatv/
|
||||
| `filter-page-chunk.js` | 筛选页加载更多去重 |
|
||||
| `live-inject.js` + `inject_live.py` | 港澳台直播全套(解码、反代、播放页、EPG、TVBOX 直播源) |
|
||||
| `patch_access_log.js` | 访问日志注入([ACCESS] IP/UA/路径,供 `usage-stats.sh` 统计使用人数) |
|
||||
| `patch_license.js` | 授权系统:CardAuth 装机/心跳/公告/版本推送、`/api/license-config` 路由、首页右上角三件套(版本角标+🔔通知铃铛+⭐开源地址,仅首页显示;直播页移除开源按钮)、每 IP 限流 429;运行时组件见 `license-hub.js` |
|
||||
| `patch_license.js` | 授权系统:CardAuth 装机/心跳/公告/版本推送、`/api/license-config` 路由、首页右上角四件套(版本角标+🔔通知铃铛+📺TVBOX接口一键复制配置地址+⭐开源地址指向自建Gitea,仅首页显示;直播页移除开源按钮)、每 IP 限流 429;运行时组件见 `license-hub.js` |
|
||||
|
||||
补丁固化在本地镜像(compose 引用,当前 `katelyatv:fixed37`)。上游大版本升级后重放补丁:
|
||||
补丁固化在本地镜像(compose 引用,当前 `katelyatv:fixed38`)。上游大版本升级后重放补丁:
|
||||
|
||||
```bash
|
||||
bash patches/apply.sh # 重放补丁
|
||||
python3 patches/inject_live.py # 重放直播注入(幂等)
|
||||
docker cp license-hub.js katelyatv:/app/license-hub.js
|
||||
node patches/patch_license.js # 重放授权/角标/限流(幂等)
|
||||
docker commit katelyatv katelyatv:fixed37 # 固化新镜像
|
||||
docker commit katelyatv katelyatv:fixed38 # 固化新镜像
|
||||
docker compose -f docker-compose.redis.yml up -d
|
||||
```
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ version: '3.8'
|
||||
services:
|
||||
# KatelyaTV 应用服务
|
||||
katelyatv:
|
||||
image: katelyatv:fixed37
|
||||
image: katelyatv:fixed38
|
||||
container_name: katelyatv
|
||||
ports:
|
||||
- "3030:3000"
|
||||
@@ -36,7 +36,7 @@ services:
|
||||
HUB_PROJECT_ID: ${HUB_PROJECT_ID:-11}
|
||||
HUB_DISABLED: ${HUB_DISABLED:-0}
|
||||
# 当前版本号(右上角角标 + 授权中心自检上报)
|
||||
SITE_VERSION: ${SITE_VERSION:-fixed37}
|
||||
SITE_VERSION: ${SITE_VERSION:-fixed38}
|
||||
depends_on:
|
||||
- katelyatv-redis
|
||||
volumes:
|
||||
|
||||
@@ -110,11 +110,16 @@ function writeChecked(p, s) {
|
||||
for (const f of FS.readdirSync(dir)) {
|
||||
if (!f.endsWith(".js")) continue;
|
||||
const p = dir + "/" + f;
|
||||
if (FS.readFileSync(p, "utf8").includes('href:"https://github.com/katelya77/KatelyaTV"')) { target = p; break; }
|
||||
const c = FS.readFileSync(p, "utf8");
|
||||
if (c.includes('gitea.88531.cn/jinghui/katelyatv') || c.includes('href:"https://github.com/katelya77/KatelyaTV"') || c.includes('window.open("https://github.com/katelya77/KatelyaTV"')) { target = p; break; }
|
||||
}
|
||||
if (!target) { failures.push("chunk with 开源地址 anchor not found"); return; }
|
||||
let s = FS.readFileSync(target, "utf8");
|
||||
|
||||
// 3x) 用户菜单里的版本小按钮原本 window.open 上游 GitHub —— 换成用户自己的 Gitea
|
||||
const ghDrop = 'window.open("https://github.com/katelya77/KatelyaTV","_blank")';
|
||||
if (s.includes(ghDrop)) { s = s.split(ghDrop).join('window.open("https://gitea.88531.cn/jinghui/katelyatv","_blank")'); log("chunk: menu repo button -> gitea"); }
|
||||
|
||||
const comp = [
|
||||
'function HubNotice(){',
|
||||
'let ov=null,dead=!1;',
|
||||
@@ -128,6 +133,8 @@ function writeChecked(p, s) {
|
||||
// 3a) 剥离旧注入(v36 门控三件套 / v34-35 裸徽章+锚点 / 组件定义)——幂等重打
|
||||
const anchorI = "let I=()=>{let e=(0,x.useRouter)()";
|
||||
const anchorOpen = '(0,a.jsx)("a",{href:"https://github.com/katelya77/KatelyaTV"';
|
||||
const anchorOpenG = '(0,a.jsx)("a",{href:"https://gitea.88531.cn/jinghui/katelyatv"';
|
||||
const findAnchor = (from) => { let a = s.indexOf(anchorOpen, from), b = s.indexOf(anchorOpenG, from); return a < 0 ? b : (b < 0 ? a : Math.min(a, b)); };
|
||||
const gateOpen = '"'+String.fromCharCode(47)+'"===(e.activePath||"/")&&(0,a.jsxs)("span",{className:"hidden md:flex items-center gap-1.5"';
|
||||
const gateEnd = 'children:"'+String.fromCharCode(11088)+' 开源地址"})]})';
|
||||
let gi = s.indexOf(gateOpen);
|
||||
@@ -142,11 +149,11 @@ function writeChecked(p, s) {
|
||||
}
|
||||
const bs = s.indexOf('(0,a.jsx)("span",{className:"hidden lg:inline-flex');
|
||||
if (bs >= 0) {
|
||||
const ao = s.indexOf(anchorOpen, bs);
|
||||
const ao = findAnchor(bs);
|
||||
if (ao < 0) { failures.push("legacy badge strip: anchor missing"); return; }
|
||||
s = s.slice(0, bs) + s.slice(ao);
|
||||
const aend = 'children:"⭐ 开源地址"})';
|
||||
const ae = s.indexOf(anchorOpen);
|
||||
const ae = findAnchor(0);
|
||||
if (ae >= 0) {
|
||||
const ee = s.indexOf(aend, ae);
|
||||
if (ee < 0) { failures.push("legacy anchor strip end missing"); return; }
|
||||
@@ -168,7 +175,8 @@ function writeChecked(p, s) {
|
||||
const oi = s.indexOf("var _=");
|
||||
const ci = oi >= 0 ? s.lastIndexOf(combo, oi) : -1;
|
||||
if (ci < 0) { failures.push("nav combo anchor missing"); return; }
|
||||
const gated = '"/"===(e.activePath||"/")&&(0,a.jsxs)("span",{className:"hidden md:flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"hidden lg:inline-flex items-center select-none rounded-lg px-2 py-1.5 text-xs font-bold tracking-wide text-purple-600 dark:text-purple-400 bg-purple-500/10 border border-purple-500/20",title:"米视TV 当前版本",children:"v' + VERSION + '"}),(0,a.jsx)(HubBell,{}),(0,a.jsx)(HubNotice,{}),(0,a.jsx)("a",{href:"https://github.com/katelya77/KatelyaTV",target:"_blank",rel:"noopener",className:"hidden lg:flex items-center rounded-lg px-3 py-2 text-sm font-medium text-gray-700 hover:bg-purple-100/30 hover:text-purple-600 dark:text-gray-300 dark:hover:bg-purple-500/10 transition-colors duration-200",children:"⭐ 开源地址"})]}),';
|
||||
const tvboxBtn = '(0,a.jsx)("button",{onClick:(ev)=>{const u=location.origin+"/api/tvbox";const bt=ev.currentTarget;const t0=bt.textContent;const ok=()=>{bt.textContent="✓ 已复制";setTimeout(()=>{bt.textContent=t0},1600)};const tip="影视仓/TVBox「设置 → 配置地址」粘贴保存即可";try{if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(u).then(ok).catch(()=>mvModal("📺 TVBOX 接入","配置地址: "+u+" —— "+tip,u));return}}catch(x){}mvModal("📺 TVBOX 接入","配置地址: "+u+" —— "+tip,u)},title:"TVBOX接口 · 点击复制配置地址",className:"hidden md:flex items-center rounded-lg px-3 py-2 text-sm font-medium text-gray-700 hover:bg-purple-100/30 hover:text-purple-600 dark:text-gray-300 dark:hover:bg-purple-500/10 transition-colors duration-200",children:"📺 TVBOX接口"}),';
|
||||
const gated = '"/"===(e.activePath||"/")&&(0,a.jsxs)("span",{className:"hidden md:flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"hidden lg:inline-flex items-center select-none rounded-lg px-2 py-1.5 text-xs font-bold tracking-wide text-purple-600 dark:text-purple-400 bg-purple-500/10 border border-purple-500/20",title:"米视TV 当前版本",children:"v' + VERSION + '"}),(0,a.jsx)(HubBell,{}),(0,a.jsx)(HubNotice,{}),' + tvboxBtn + '(0,a.jsx)("a",{href:"https://gitea.88531.cn/jinghui/katelyatv",target:"_blank",rel:"noopener",className:"hidden lg:flex items-center rounded-lg px-3 py-2 text-sm font-medium text-gray-700 hover:bg-purple-100/30 hover:text-purple-600 dark:text-gray-300 dark:hover:bg-purple-500/10 transition-colors duration-200",children:"⭐ 开源地址"})]}),';;
|
||||
s = s.slice(0, ci) + gated + s.slice(ci);
|
||||
log("chunk: injected gated trio (home only)");
|
||||
writeChecked(target, s);
|
||||
|
||||
Reference in new issue
Block a user