Files
aaPanel/BTPanel/static/vite/js/useLoop.js
T
Jack ed55fa708d Update to 7.7.0
Since version 7.7.0, we recommend yours update python to 3.12.

[+] Using nginx technology to load static files improves access speed
[+] Refactor homepage, website, FTP, and database using vue3
[+] Table loading changed to skeleton screen
[+] Add Website statistics-v2 professional plug-in
[+] Add Home page - top 5 resource occupancy
[+] Add protection for Files management (requires Tamper-proof for Enterprise 3.7)
[+] Website, FTP, Databases page add program status
[+] Add FTP log analysis (only supports Centos)
[+] Add password-free login to phpMyAdmin
[+] Add Proxy Project in Website (Supported when web service uses Nginx)
[+] Add WP Toolkit (Pro version only)
[+] Redesigned Docker module
[+] Add WP Toolkit Protection
[+] Add WP Toolkit Backup and Restore
[+] Add WP Toolkit Migrated
[+] Add WP Toolkit Clone site (supports new domain and subdomain)
[+] Add WP Toolkit Create site from backup of other panel
[+] Add WP Toolkit support for Cron automatic backup (only save Local disk)
[+] Add WP Toolkit operation log
[+] Add Integrity check for WP Toolkit
[+] Add WP Toolkit plug-in management and themes management

[*] Optimize phpMyAdmin formula access method
[*] Optimize Home page PHP display problem
[*] Optimize jump to the login interface after the login expires
[*] Optimize automatic renewal of SSL at some times
[*] Optimize Let's Encrypt to increase application success rate

[-] Fix Logs Audit cannot be opened
[-] Fix apache URL rewrite issue
[-] Fix phpmyadmin installation problem
[-] Fix the problem that some servers cannot install software
[-] Fix upload file error
[-] Fix left menu hiding problem
[-] Fix aaPanel Mobile QR code display problem
[-] Fix problem that third-party plug-ins are not displayed in the App Store
[-] Fix issue where the menu bar is blank when opening new tabs
[-] Fixed panel not being accessible in some cases
[-] Fix the issue where Curl warning caused the inability to apply for SSL
[-] Fix Quota issues for Website, FTP, Databases
[-] Fix file interface display problem on mobile terminal
2024-07-19 11:25:10 +08:00

2 lines
6.6 KiB
JavaScript

import{cw as e,aV as t,bs as s,aJ as r,aZ as i,ci as o,bV as a,bO as n,bP as l,bY as p}from"./index.js?v=1721298337096";import{M as u,k as c,r as d,y as v,l as f,a as h,p as m,v as S,x as y,A as b,d as g,L as w,N as x}from"./vue.js?v=1721298337096";function R(e,t){var s;if(null==e)return;const r=function(e){if("number"==typeof e)return{"":e.toString()};const t={};return e.split(/ +/).forEach((e=>{if(""===e)return;const[s,r]=e.split(":");void 0===r?t[""]=s:t[s]=r})),t}(e);if(void 0===t)return r[""];if("string"==typeof t)return null!==(s=r[t])&&void 0!==s?s:r[""];if(Array.isArray(t)){for(let e=t.length-1;e>=0;--e){const s=t[e];if(s in r)return r[s]}return r[""]}{let e,s=-1;return Object.keys(r).forEach((i=>{const o=Number(i);!Number.isNaN(o)&&t>=o&&o>=s&&(s=o,e=r[i])})),e}}const G={xs:0,s:640,m:1024,l:1280,xl:1536,"2xl":1920};const N={};const C=t("n-grid"),E=1,_=f({__GRID_ITEM__:!0,name:"GridItem",alias:["Gi"],props:{span:{type:[Number,String],default:E},offset:{type:[Number,String],default:0},suffix:Boolean,privateOffset:Number,privateSpan:Number,privateColStart:Number,privateShow:{type:Boolean,default:!0}},setup(){const{isSsrRef:e,xGapRef:t,itemStyleRef:r,overflowRef:i,layoutShiftDisabledRef:o}=h(C),a=S();return{overflow:i,itemStyle:r,layoutShiftDisabled:o,mergedXGap:c((()=>s(t.value||0))),deriveStyle:()=>{e.value;const{privateSpan:r=E,privateShow:i=!0,privateColStart:o,privateOffset:n=0}=a.vnode.props,{value:l}=t,p=s(l||0);return{display:i?"":"none",gridColumn:"".concat(null!=o?o:"span ".concat(r)," / span ").concat(r),marginLeft:n?"calc((100% - (".concat(r," - 1) * ").concat(p,") / ").concat(r," * ").concat(n," + ").concat(p," * ").concat(n,")"):""}}}},render(){var e,t;if(this.layoutShiftDisabled){const{span:e,offset:t,mergedXGap:s}=this;return m("div",{style:{gridColumn:"span ".concat(e," / span ").concat(e),marginLeft:t?"calc((100% - (".concat(e," - 1) * ").concat(s,") / ").concat(e," * ").concat(t," + ").concat(s," * ").concat(t,")"):""}},this.$slots)}return m("div",{style:[this.itemStyle,this.deriveStyle()]},null===(t=(e=this.$slots).default)||void 0===t?void 0:t.call(e,{overflow:this.overflow}))}}),D={xs:0,s:640,m:1024,l:1280,xl:1536,xxl:1920},O="__ssr__",B=f({name:"Grid",inheritAttrs:!1,props:{layoutShiftDisabled:Boolean,responsive:{type:[String,Boolean],default:"self"},cols:{type:[Number,String],default:24},itemResponsive:Boolean,collapsed:Boolean,collapsedRows:{type:Number,default:1},itemStyle:[Object,String],xGap:{type:[Number,String],default:0},yGap:{type:[Number,String],default:0}},setup(t){const{mergedClsPrefixRef:a,mergedBreakpointsRef:n}=r(t),l=/^\d+$/,u=d(void 0),f=function(t=G){if(!e)return c((()=>[]));if("function"!=typeof window.matchMedia)return c((()=>[]));const s=d({}),r=Object.keys(t),i=(e,t)=>{e.matches?s.value[t]=!0:s.value[t]=!1};return r.forEach((e=>{const s=t[e];let r,o;void 0===N[s]?(r=window.matchMedia("(min-width: ".concat(s,"px)")),r.addEventListener?r.addEventListener("change",(t=>{o.forEach((s=>{s(t,e)}))})):r.addListener&&r.addListener((t=>{o.forEach((s=>{s(t,e)}))})),o=new Set,N[s]={mql:r,cbs:o}):(r=N[s].mql,o=N[s].cbs),o.add(i),r.matches&&o.forEach((t=>{t(r,e)}))})),v((()=>{r.forEach((e=>{const{cbs:s}=N[t[e]];s.has(i)&&s.delete(i)}))})),c((()=>{const{value:e}=s;return r.filter((t=>e[t]))}))}((null==n?void 0:n.value)||D),h=i((()=>!!t.itemResponsive||(!l.test(t.cols.toString())||(!l.test(t.xGap.toString())||!l.test(t.yGap.toString()))))),m=c((()=>{if(h.value)return"self"===t.responsive?u.value:f.value})),S=i((()=>{var e;return null!==(e=Number(R(t.cols.toString(),m.value)))&&void 0!==e?e:24})),w=i((()=>R(t.xGap.toString(),m.value))),x=i((()=>R(t.yGap.toString(),m.value))),E=e=>{u.value=e.contentRect.width},_=e=>{p(E,e)},B=d(!1),L=c((()=>{if("self"===t.responsive)return _})),T=d(!1),A=d();return y((()=>{const{value:e}=A;e&&e.hasAttribute(O)&&(e.removeAttribute(O),T.value=!0)})),b(C,{layoutShiftDisabledRef:g(t,"layoutShiftDisabled"),isSsrRef:T,itemStyleRef:g(t,"itemStyle"),xGapRef:w,overflowRef:B}),{isSsr:!o,contentEl:A,mergedClsPrefix:a,style:c((()=>t.layoutShiftDisabled?{width:"100%",display:"grid",gridTemplateColumns:"repeat(".concat(t.cols,", minmax(0, 1fr))"),columnGap:s(t.xGap),rowGap:s(t.yGap)}:{width:"100%",display:"grid",gridTemplateColumns:"repeat(".concat(S.value,", minmax(0, 1fr))"),columnGap:s(w.value),rowGap:s(x.value)})),isResponsive:h,responsiveQuery:m,responsiveCols:S,handleResize:L,overflow:B}},render(){if(this.layoutShiftDisabled)return m("div",w({ref:"contentEl",class:"".concat(this.mergedClsPrefix,"-grid"),style:this.style},this.$attrs),this.$slots);const e=()=>{var e,t,s,r,i,o,a;this.overflow=!1;const p=n(l(this)),c=[],{collapsed:d,collapsedRows:v,responsiveCols:f,responsiveQuery:h}=this;p.forEach((e=>{var t,s,r,i,o;if(!0!==(null===(t=null==e?void 0:e.type)||void 0===t?void 0:t.__GRID_ITEM__))return;if(function(e){var t;const s=null===(t=e.dirs)||void 0===t?void 0:t.find((({dir:e})=>e===u));return!(!s||!1!==s.value)}(e)){const t=x(e);return t.props?t.props.privateShow=!1:t.props={privateShow:!1},void c.push({child:t,rawChildSpan:0})}e.dirs=(null===(s=e.dirs)||void 0===s?void 0:s.filter((({dir:e})=>e!==u)))||null,0===(null===(r=e.dirs)||void 0===r?void 0:r.length)&&(e.dirs=null);const a=x(e),n=Number(null!==(o=R(null===(i=a.props)||void 0===i?void 0:i.span,h))&&void 0!==o?o:1);0!==n&&c.push({child:a,rawChildSpan:n})}));let S=0;const y=null===(e=c[c.length-1])||void 0===e?void 0:e.child;if(null==y?void 0:y.props){const e=null===(t=y.props)||void 0===t?void 0:t.suffix;void 0!==e&&!1!==e&&(S=Number(null!==(r=R(null===(s=y.props)||void 0===s?void 0:s.span,h))&&void 0!==r?r:1),y.props.privateSpan=S,y.props.privateColStart=f+1-S,y.props.privateShow=null===(i=y.props.privateShow)||void 0===i||i)}let b=0,g=!1;for(const{child:n,rawChildSpan:l}of c){if(g&&(this.overflow=!0),!g){const e=Number(null!==(a=R(null===(o=n.props)||void 0===o?void 0:o.offset,h))&&void 0!==a?a:0),t=Math.min(l+e,f);if(n.props?(n.props.privateSpan=t,n.props.privateOffset=e):n.props={privateSpan:t,privateOffset:e},d){const e=b%f;t+e>f&&(b+=f-e),t+b+S>v*f?g=!0:b+=t}}g&&(n.props?!0!==n.props.privateShow&&(n.props.privateShow=!1):n.props={privateShow:!1})}return m("div",w({ref:"contentEl",class:"".concat(this.mergedClsPrefix,"-grid"),style:this.style,[O]:this.isSsr||void 0},this.$attrs),c.map((({child:e})=>e)))};return this.isResponsive&&"self"===this.responsive?m(a,{onResize:this.handleResize},{default:e}):e()}});function L(e,t=3){let s=null,r=!1,i=0;const o=()=>{r||(i>=3?a():s=window.setTimeout((async()=>{try{await e(),i=0}catch(t){i++}finally{o()}}),1e3*t))},a=()=>{s&&(clearTimeout(s),s=null)};return v((()=>{r=!0,a()})),{loop:o,clearTimer:a}}export{_,B as a,L as u};