💋 Sync 2026-10-04 04:16:09

This commit is contained in:
github-actions[bot] committed 2026-10-04 04:16:09 +08:00
1 parent f6b2df73ec
commit f62992fd80
745 files changed
+212416 -1173

No files matched your search

@@ -0,0 +1 @@
'use strict';'require baseclass';'require ui';return baseclass.extend({__init__(){ui.menu.load().then(L.bind(this.render,this))},render(e){let t=e,s='';if(this.renderModeMenu(t),L.env.dispatchpath.length>=3){for(let a=0;a<3&&t;a++)t=t.children[L.env.dispatchpath[a]],s=s+(s?'/':'')+L.env.dispatchpath[a];t&&this.renderTabMenu(t,s)}this.bindSettings(),this.initSidebarState(),this.loadLuxeSettings(),this.initNavbarSlider(),this.setActiveIcon(),this.initIdleTimer(),window.addEventListener('resize',L.bind(this.initSidebarState,this));const a=document.querySelector('.main > .loading');a&&(a.style.opacity='0',a.style.visibility='hidden',a.style.pointerEvents='none'),this.initTypingEffect()},initIdleTimer(){const e=document.getElementById('floating-navbar');if(!e)return;let t;const s=()=>{e.classList.remove('navbar-hidden'),clearTimeout(t),'1'===document.body.getAttribute('data-autohide')&&(t=setTimeout(()=>e.classList.add('navbar-hidden'),3e3))};['touchstart','mousemove','scroll','click','keydown'].forEach(e=>document.addEventListener(e,s,{passive:!0})),s()},bindSettings(){const e=document.querySelector('.showSide'),t=document.querySelector('.darkMask'),s=document.getElementById('settings-toggle'),a=document.getElementById('luxe-settings-menu'),n=document.getElementById('mode-selection-container'),r=['normal','neo','neox','glaze','onyx'];e&&e.addEventListener('click',ui.createHandlerFn(this,'handleSidebarToggle')),t&&t.addEventListener('click',ui.createHandlerFn(this,'handleSidebarToggle')),s&&a&&(s.addEventListener('click',e=>{a.style.display='none'===a.style.display?'block':'none',e.stopPropagation()}),document.querySelectorAll('.style-card').forEach(e=>{e.addEventListener('click',e=>{document.querySelectorAll('.style-card').forEach(e=>e.classList.remove('active')),e.currentTarget.classList.add('active'),n&&(n.style.display=r.includes(e.currentTarget.getAttribute('data-style'))?'block':'none'),this.autoSave(),e.stopPropagation()})}),document.querySelectorAll('.mode-card, .icon-card').forEach(e=>{e.addEventListener('click',e=>{const t=e.currentTarget.classList.contains('mode-card')?'.mode-card':'.icon-card';document.querySelectorAll(t).forEach(e=>e.classList.remove('active')),e.currentTarget.classList.add('active'),this.autoSave(),e.stopPropagation()})}),['set-floating','set-slider-navbar','set-autohide-navbar','set-hostname'].forEach(e=>{const t=document.getElementById(e);t&&t.addEventListener('change',()=>this.autoSave())}),a.addEventListener('click',e=>e.stopPropagation()),document.addEventListener('click',()=>{'block'===a.style.display&&(a.style.display='none')}))},initTypingEffect(){const e=document.querySelector(".brand");if(e&&!e.hasAttribute("data-typed")){e.setAttribute("data-typed","true");const t=e.textContent.trim(),s=`Hello...! ${t}`;e.textContent="",e.classList.add("typing");let a=0;const n=()=>{a<s.length&&(e.textContent+=s.charAt(a),a++,requestAnimationFrame(()=>setTimeout(n,90)))};setTimeout(n,400)}},setActiveIcon(){const e=window.location.pathname,t=document.querySelectorAll('#iconWrapper a');t&&t.forEach(t=>{const s=t.getAttribute('href');s&&e.includes(s)&&t.classList.add('active')})},initNavbarSlider(){const e=document.getElementById('prevArrow'),t=document.getElementById('nextArrow'),s=document.getElementById('iconWrapper');e&&t&&s&&!e.hasAttribute('data-bound')&&(e.setAttribute('data-bound','true'),e.addEventListener('click',()=>s.scrollBy({left:-120,behavior:'smooth'})),t.addEventListener('click',()=>s.scrollBy({left:120,behavior:'smooth'})))},loadLuxeSettings(){const e=document.body,t=document.getElementById('floating-navbar'),s=localStorage.getItem('luxe-theme')||'normal',a=localStorage.getItem('luxe-mode')||'normal',n=localStorage.getItem('luxe-floating')||'0',r=localStorage.getItem('luxe-slider'),i=localStorage.getItem('luxe-icon')||'5',l=localStorage.getItem('luxe-autohide')||'0',hv=localStorage.getItem('luxe-hostname')||'0';document.querySelectorAll('.style-card').forEach(e=>e.classList.remove('active'));const c=document.querySelector(`.style-card[data-style="${s}"]`);c&&c.classList.add('active'),e.setAttribute('data-theme',s);document.querySelectorAll('.mode-card').forEach(e=>e.classList.remove('active'));const o=document.querySelector(`.mode-card[data-mode="${a}"]`);o&&o.classList.add('active'),'normal'!==a?e.setAttribute('data-force-scheme',a):e.removeAttribute('data-force-scheme');document.querySelectorAll('.icon-card').forEach(e=>e.classList.remove('active'));const d=document.querySelector(`.icon-card[data-icon="${i}"]`);d&&d.classList.add('active');const m=document.getElementById('set-floating');'1'===n?(m&&(m.checked=!0),e.setAttribute('data-enable-navbar','1'),e.setAttribute('data-navbar-enabled','1')):(m&&(m.checked=!1),e.setAttribute('data-enable-navbar','0'),e.setAttribute('data-navbar-enabled','0'));if('1'===r){const s=document.getElementById('set-slider-navbar');s&&(s.checked=!0),e.setAttribute('data-slider','true'),t&&t.classList.add('nav-slider-active')}else{const s=docLine truncated