From ff39564d44ace072e99a58d082dd6cb8c067e1c2 Mon Sep 17 00:00:00 2001 From: hellcat Date: Sat, 7 Nov 2026 19:24:01 +0800 Subject: [PATCH] fix(fuc): remove unsupported daily check-in button --- docs/maintenance/FUC_THEME.md | 2 ++ scripts/theme-fuc/dom.test.mjs | 2 +- theme/Fuc/assets/app.mjs | 2 +- theme/Fuc/assets/native.mjs | 4 +--- theme/Fuc/assets/native/index.html | 5 ----- theme/Fuc/config.json | 2 +- theme/Fuc/dashboard.blade.php | 2 +- 7 files changed, 7 insertions(+), 12 deletions(-) diff --git a/docs/maintenance/FUC_THEME.md b/docs/maintenance/FUC_THEME.md index dd2a88da..4532137f 100644 --- a/docs/maintenance/FUC_THEME.md +++ b/docs/maintenance/FUC_THEME.md @@ -1,5 +1,7 @@ # Fuc:新版 FUC 用户主题适配 +2026-11-07 Fuc 0.12.21:按用户要求移除用户中心置顶公告旁的每日签到按钮,同时删除旧模板按钮与禁用适配。置顶公告内容、XB 业务和其他页面保持;更新主题及首页模板缓存引用。基于正式 `9971b6fab5197e64c31316dcfae86aaa5ce34d6a` 独立发布,保留已上线客服集成,验收与实际切换状态以任务回执为准。 + 2026-11-07 原生标志发布候选 Fuc 0.12.20:用户选择 Cool 主题原生折叠标志,登录/注册/找回密码、侧栏、首页和浏览器图标统一使用旧 FUC `cool1.png` 原始图案。原 PNG 字节嵌入 SVG,首页保留正式「福云」字标。资源引用更新缓存版本。发布范围仅品牌素材及其缓存引用;不包含本地折福试稿或其他未发布 UI/客服修改。回退基线为 `2c92a857e8da54c16c4861b25ea420f560ccc032`;发布验收以任务回执为准。 ## Fuc 0.12.19 compatibility release — 2026-11-07 diff --git a/scripts/theme-fuc/dom.test.mjs b/scripts/theme-fuc/dom.test.mjs index 82415214..581135a0 100644 --- a/scripts/theme-fuc/dom.test.mjs +++ b/scripts/theme-fuc/dom.test.mjs @@ -172,7 +172,7 @@ test('dashboard retains source empty-subscription state and profile does not inv const view=new DOMParser().parseFromString(native.nativeDashboard({},{},[],'QA',richText,[]),'text/html'); assert.equal(view.querySelector('#donut-chart').hidden,true);assert.match(view.body.textContent,/无可用流量/); assert.ok(view.querySelector('[data-action=subscription-unavailable]')); - const checkin=view.querySelector('button[title="本站未开放签到"]');assert.equal(checkin.disabled,true);assert.doesNotMatch(checkin.textContent,/已签到/); + assert.equal(view.querySelector('#checkin,.fa-calendar-check'),null);assert.doesNotMatch(view.body.textContent,/每日签到|已签到/); const profile=new DOMParser().parseFromString(native.nativeSecondary('profile',{sub:{plan:{name:'Long plan is not an account level'}},richText}),'text/html'); assert.equal(profile.querySelector('.card-profile-stats .heading').textContent,'—'); }); diff --git a/theme/Fuc/assets/app.mjs b/theme/Fuc/assets/app.mjs index 87410914..e36325da 100644 --- a/theme/Fuc/assets/app.mjs +++ b/theme/Fuc/assets/app.mjs @@ -7,7 +7,7 @@ import {copyText} from './clipboard.mjs?v=0.12.6'; import {createCaptcha} from './captcha.mjs?v=0.12.6'; import {showPayment,mountCard} from './payments.mjs?v=0.12.14'; import {beginPageProgress,finishPageProgress} from './progress.mjs?v=0.12.6'; -import {nativeReady,prepareNativeMode,nativeMode,fillPurchaseModal,nativeHeader,nativeFooter,nativeDashboard,nativeHome,nativeAuth,nativeSecondary,paintNativeChart,paintNativeHome} from './native.mjs?v=0.12.20'; +import {nativeReady,prepareNativeMode,nativeMode,fillPurchaseModal,nativeHeader,nativeFooter,nativeDashboard,nativeHome,nativeAuth,nativeSecondary,paintNativeChart,paintNativeHome} from './native.mjs?v=0.12.21'; import {escape as e, money, bytes, date, list, groupedList, periods, orderStates, soldOut, safeUrl, createApi, fetchNotices, routeFromHash,canPurchase} from './core.mjs?v=0.12.13'; const settings = window.fucSettings || {}; const root = document.querySelector('#app'); diff --git a/theme/Fuc/assets/native.mjs b/theme/Fuc/assets/native.mjs index beeb57f7..8323d00d 100644 --- a/theme/Fuc/assets/native.mjs +++ b/theme/Fuc/assets/native.mjs @@ -6,7 +6,7 @@ const base = new URL('./native/',import.meta.url).href; const bridgeStyle = 'bridge.css?v=0.12.19'; let templates = {},sourceStyles={}; const styleReady=fetch(base+'styles.json?v=0.12.13').then(r=>r.json()).then(v=>sourceStyles=v); -export const nativeReady = Promise.all(['footer','header','index','home','login','register','forget','reset','plans','wallet','invite','profile','tickets','ticket','servers','notices','knowledge','article','faq','orders','purchase','checkout','walletlog','afflog'].map(async name=>{const version={footer:'0.12.17',header:'0.12.20',home:'0.12.20',login:'0.12.20',register:'0.12.20',forget:'0.12.20',reset:'0.12.20',index:'0.12.13',plans:'0.12.13',checkout:'0.12.13',purchase:'0.12.13'}[name]||'ui-unify-1';const r=await fetch(`${base}${name}.html?v=${version}`);if(!r.ok)throw Error('原版模板加载失败');templates[name]=await r.text();})).then(()=>styleReady); +export const nativeReady = Promise.all(['footer','header','index','home','login','register','forget','reset','plans','wallet','invite','profile','tickets','ticket','servers','notices','knowledge','article','faq','orders','purchase','checkout','walletlog','afflog'].map(async name=>{const version={footer:'0.12.17',header:'0.12.20',home:'0.12.20',login:'0.12.20',register:'0.12.20',forget:'0.12.20',reset:'0.12.20',index:'0.12.21',plans:'0.12.13',checkout:'0.12.13',purchase:'0.12.13'}[name]||'ui-unify-1';const r=await fetch(`${base}${name}.html?v=${version}`);if(!r.ok)throw Error('原版模板加载失败');templates[name]=await r.text();})).then(()=>styleReady); let nativeSwiper=null,swiperLibrary=null; export async function paintNativeHome(){if(!document.querySelector('.native-public .swiper-container'))return;if(!window.Swiper){if(!swiperLibrary)swiperLibrary=new Promise((resolve,reject)=>{const s=document.createElement('script');s.src=base+'assets/cool/swiper.min.js';s.onload=resolve;s.onerror=reject;document.head.append(s);});await swiperLibrary;}const el=document.querySelector('.native-public .swiper-container');if(!el)return;if(nativeSwiper){try{nativeSwiper.destroy(true,true);}catch{}}el.querySelectorAll('.swiper-slide').forEach(n=>{n.style.removeProperty('display');n.style.removeProperty('width');});el.querySelector('.swiper-wrapper')?.removeAttribute('style');nativeSwiper=new window.Swiper(el,{direction:'horizontal',loop:true,autoplay:{delay:5000,disableOnInteraction:true},navigation:{nextEl:'.swiper-button-next',prevEl:'.swiper-button-prev'}});} let currentMode='',currentStyleMode='',styleSequence=0,chartData=null,chartInstance=null,chartLibrary=null; @@ -72,7 +72,6 @@ function sanitize(raw) { doc.querySelectorAll('[href="/user/logout"]').forEach(n=>{n.removeAttribute('href');n.dataset.action='logout';}); doc.querySelectorAll('[data-clipboard-text]').forEach(n=>{n.dataset.client=clientName(n.textContent);n.removeAttribute('data-clipboard-text');n.dataset.action='copy-sub';}); doc.querySelectorAll('.dropdown-item').forEach(n=>{if(n.textContent.includes('一键导入')){n.dataset.action='import';n.dataset.client=clientName(n.textContent);}}); - doc.querySelectorAll('#checkin').forEach(n=>{n.disabled=true;n.title='本站未开放签到';}); return [...doc.head.querySelectorAll('style')].map(n=>n.outerHTML).join('')+doc.body.innerHTML; } function fill(raw,data) {return raw.replace(/__([A-Z_0-9]+)__/g,(_,key)=>data[key] ?? '—');} @@ -125,7 +124,6 @@ export function nativeDashboard(user,sub,notices,brand,richText,traffic=null,nya } if(user.vip?.enabled===true){const vip=user.vip,card=host.querySelector('.card-stats .col');if(card){card.querySelector('span.h3').textContent=vip.name||'普通用户';card.querySelector('h5').textContent=`累计支付:¥ ${(Number(vip.cumulative_cents)/100).toFixed(2)}`;}} host.querySelectorAll('h5').forEach(n=>{if(n.textContent.includes('套餐自动续订'))n.remove();if(n.textContent.trim()==='在线设备'){const value=n.parentElement.querySelector('span.h3');if(value)value.textContent='—';}}); - const checkin=host.querySelector('#checkin,.float-right > button.btn.disabled');if(checkin){checkin.classList.remove('disabled');checkin.disabled=true;checkin.title='本站未开放签到';for(const n of checkin.childNodes)if(n.nodeType===3&&n.textContent.trim())n.textContent=' 每日签到';} const available=!!sub.plan_id&&(sub.expired_at==null||Number(sub.expired_at)>Date.now()/1000); host.querySelectorAll('.btn-sub,.btn-shadowrocket').forEach(n=>{if(!available){n.classList.add('disabled');n.dataset.action='subscription-unavailable';}}); const seriesMarker=host.querySelector('.traffic-info .series-info i');if(seriesMarker)seriesMarker.style.color='#7D72F1'; diff --git a/theme/Fuc/assets/native/index.html b/theme/Fuc/assets/native/index.html index 49201401..b4eef478 100644 --- a/theme/Fuc/assets/native/index.html +++ b/theme/Fuc/assets/native/index.html @@ -104,11 +104,6 @@

置顶公告

- - -

diff --git a/theme/Fuc/config.json b/theme/Fuc/config.json index 765aa630..17af1b69 100644 --- a/theme/Fuc/config.json +++ b/theme/Fuc/config.json @@ -1,7 +1,7 @@ { "name": "Fuc", "description": "直接复用新版FUC原始用户模板、样式、图标及素材,接入XB接口;XB管理员后台保持原样。", - "version": "0.12.20", + "version": "0.12.21", "images": "", "configs": [ { diff --git a/theme/Fuc/dashboard.blade.php b/theme/Fuc/dashboard.blade.php index 73bb939c..4430a423 100644 --- a/theme/Fuc/dashboard.blade.php +++ b/theme/Fuc/dashboard.blade.php @@ -58,7 +58,7 @@ ]; @endphp - +