fix(fuc): remove unsupported daily check-in button

This commit is contained in:
hellcat committed 2026-11-07 19:25:36 +08:00
1 parent 9971b6fab5
commit ff39564d44
7 files changed
+7 -12

No files matched your search

+2
View File
@@ -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
+1 -1
View File
@@ -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,'—');
});
+1 -1
View File
@@ -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');
+1 -3
View File
@@ -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';
-5
View File
@@ -104,11 +104,6 @@
<div class="card-header">
<h4 class="text-bold-500">置顶公告</h4>
<span class="float-right">
<button type="button" class="btn btn-primary disabled btn-sm waves-effect waves-light float-right">
<i class="far fa-calendar-check fa-lg icon-ver"></i> 已签到
</button>
</span>
</div>
<hr>
<div class="card-content">
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "Fuc",
"description": "直接复用新版FUC原始用户模板、样式、图标及素材,接入XB接口;XB管理员后台保持原样。",
"version": "0.12.20",
"version": "0.12.21",
"images": "",
"configs": [
{
+1 -1
View File
@@ -58,7 +58,7 @@
];
@endphp
<script>window.fucSettings = @json($fucSettings);</script>
<script type="module" src="/theme/{{ $theme }}/assets/app.mjs?v=0.12.20"></script>
<script type="module" src="/theme/{{ $theme }}/assets/app.mjs?v=0.12.21"></script>
<script type="module" src="/theme/{{ $theme }}/assets/chatwoot.mjs?v=6"></script>
</body>