diff --git a/luci-app-istorerouter/Makefile b/luci-app-istorerouter/Makefile new file mode 100755 index 00000000..9011b422 --- /dev/null +++ b/luci-app-istorerouter/Makefile @@ -0,0 +1,23 @@ +# +# Copyright (C) 2008-2014 The LuCI Team +# +# This is free software, licensed under the Apache License, Version 2.0 . +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=iStoreRouter +PKG_VERSION:=0.6.7 +LUCI_DEPENDS:=+luci-app-quickstart +luci-app-store +luci-lib-taskd +LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.15) +LUCI_MINIFY_CSS:=0 +LUCI_MINIFY_JS:=0 + +define Package/luci-app-istorerouter/conffiles +/etc/config/istorerouter +/www/luci-static/istorerouter/image/bg.gif +endef + +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.0779cf20.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.0779cf20.js new file mode 100644 index 00000000..4c569767 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.0779cf20.js @@ -0,0 +1,6 @@ +var p=(y,d,a)=>new Promise((i,n)=>{var s=o=>{try{c(a.next(o))}catch(e){n(e)}},f=o=>{try{c(a.throw(o))}catch(e){n(e)}},c=o=>o.done?i(o.value):Promise.resolve(o.value).then(s,f);c((a=a.apply(y,d)).next())});import{_ as w,d as x,r as b,x as E,P as F,o as _,c as m,f as r,h as g,F as k,e as L,t as h,g as B,w as D,Q as G,s as T,i as v,T as S}from"./index.js";const I=r("div",{class:"label-name"},[r("span",null,"\u9009\u62E9\u8F6F\u4EF6\u6E90 ")],-1),C={class:"label-value"},V={class:"label-flex"},N=["value"],M={class:"label-btns"},P=["disabled"],j={key:0,class:"label-msg"},q=x({__name:"index",setup(y){return p(this,null,function*(){let d,a;const i=b(!1),n=b(""),s=E({softsourceListIfo:[],softSource:{},currSoftSource:{}}),f=()=>p(this,null,function*(){var o,e,u;try{const t=yield v.Guide.SoftSourceList.GET();if((o=t==null?void 0:t.data)!=null&&o.result){const l=(e=t==null?void 0:t.data)==null?void 0:e.result;s.softsourceListIfo=l.softSourceList||[]}}catch(t){console.log(t)}try{const t=yield v.Guide.GetSoftSource.GET();if((u=t==null?void 0:t.data)!=null&&u.result){const l=t.data.result;s.softSource=l.softSource,s.currSoftSource=l.softSource}}catch(t){console.log(t)}});[d,a]=F(()=>f()),yield d,a();const c=()=>p(this,null,function*(){const o=S.Loading("\u6B63\u5728\u5207\u6362\u4E2D...");i.value=!0;try{const e=yield v.Guide.SoftSource.POST({softSourceIdentity:s.softSource.identity});if(e!=null&&e.data){const{result:u,error:t,success:l}=e.data;t&&S.Warning(t),(e.data.success||0)==0&&(S.Success("\u5207\u6362\u6210\u529F"),yield f())}}catch(e){S.Error(`${e}`)}finally{i.value=!1,o.Close()}});return(o,e)=>(_(),m("form",{class:"form-container",onSubmit:B(c,["prevent"])},[I,r("div",C,[g(` `),(_(!0),m(k,null,L(s.softsourceListIfo,u=>(_(),m("label",V,[D(r("input",{type:"radio",value:u.identity,"onUpdate:modelValue":e[0]||(e[0]=t=>s.softSource.identity=t)},null,8,N),[[G,s.softSource.identity,void 0,{trim:!0}]]),T(" "+h(u.name),1)]))),256))]),r("div",M,[r("button",{class:"sumbit",disabled:i.value},"\u4FDD\u5B58",8,P)]),n.value?(_(),m("div",j,[r("span",null,h(n.value),1)])):g("v-if",!0)],32))})}});var Q=w(q,[]);export{Q as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.1c430a75.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.1c430a75.js new file mode 100644 index 00000000..e34f24d4 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.1c430a75.js @@ -0,0 +1,7 @@ +var He=Object.defineProperty,Ye=Object.defineProperties;var Ze=Object.getOwnPropertyDescriptors;var be=Object.getOwnPropertySymbols;var eu=Object.prototype.hasOwnProperty,uu=Object.prototype.propertyIsEnumerable;var De=(e,r,i)=>r in e?He(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,q=(e,r)=>{for(var i in r||(r={}))eu.call(r,i)&&De(e,i,r[i]);if(be)for(var i of be(r))uu.call(r,i)&&De(e,i,r[i]);return e},P=(e,r)=>Ye(e,Ze(r));var b=(e,r,i)=>new Promise((o,A)=>{var E=d=>{try{w(i.next(d))}catch(_){A(_)}},S=d=>{try{w(i.throw(d))}catch(_){A(_)}},w=d=>d.done?o(d.value):Promise.resolve(d.value).then(E,S);w((i=i.apply(e,r)).next())});import{d as H,$ as ce,L as le,a as C,E as ye,o as n,c as l,f as t,s as tu,t as F,u as W,F as U,G as ie,h as k,T as y,i as Ce,O as Q,_ as Y,p as Se,q as Ie,J as au,U as su,r as B,X as nu,A as J,B as lu,a0 as Ae,a1 as ou,a2 as iu,w as j,j as K,W as N,e as M,y as we,v as ru,g as cu,a3 as pu}from"./index.js";const xe=e=>(Se("data-v-a3d8ec3c"),e=e(),Ie(),e),du={class:"app-item"},vu={class:"app-card"},fu={class:"app-item_icon"},Fu=["src"],_u={class:"app-item_info"},Eu={class:"app-title"},ku={class:"app-as"},hu={style:{"font-weight":"600"}},mu=xe(()=>t("span",{style:{margin:"0 10px"}},"|",-1)),Bu={style:{"font-weight":"600"}},gu=["title"],bu={key:0,class:"app-btn"},Du={key:1,class:"app-btn"},yu=xe(()=>t("div",null,null,-1)),Cu=H({__name:"app",props:{app:{type:Object,required:!0}},emits:["install-app","upgrade-app","remove-app"],setup(e,{emit:r}){const{$gettext:i}=Q,o=ce(),A=le.numberFormat,E=e,S=r,w=C(()=>o.appsExpand[E.app.name]||{downloadCount:0,isStar:null,name:E.app.name,starCount:0}),d=()=>{E.app.openApp&&E.app.openApp()},_=()=>{D(),S("install-app",E.app)},g=()=>{S("remove-app",E.app)},T=()=>{D(),S("upgrade-app",E.app)},I=()=>{y.Message("\u60A8\u5DF2\u70B9\u8D5E\u8FC7\u4E86")},L=()=>b(this,null,function*(){var f;try{const p=yield Ce.ApiStore.star.POST({appId:E.app.name,deviceId:le.getDeviceId()});((f=p==null?void 0:p.data)==null?void 0:f.success)==0&&o.appsExpand[E.app.name]&&(o.appsExpand[E.app.name].isStar=!0)}catch(p){y.Error(`${p}`)}}),D=()=>b(this,null,function*(){var f;try{(f=(yield Ce.ApiStore.download.POST({appId:E.app.name,deviceId:le.getDeviceId()})).data)==null||f.success}catch(p){y.Error(`${p}`)}}),c=f=>{switch(Q.defaultLanguage){case"zh-cn":case"zh-CN":case"zh-tw":return f.title}return f.title_en||f.title},h=f=>{switch(Q.defaultLanguage){case"zh-cn":case"zh-CN":case"zh-tw":return f.description}return f.description_en||f.description};return(f,p)=>{const O=ye("icon-star-off"),R=ye("icon-star-on");return n(),l("div",du,[t("div",vu,[t("div",fu,[t("img",{src:e.app.getIcon(),alt:""},null,8,Fu)]),t("div",_u,[t("div",Eu,[tu(F(c(e.app))+" ",1),t("em",null,F(e.app.version),1)]),t("div",ku,[t("span",hu,F(W(A)(w.value.downloadCount))+" "+F(W(i)("\u6B21\u4E0B\u8F7D")),1),mu,t("span",Bu,F(W(A)(w.value.starCount))+" "+F(W(i)("\u6B21\u70B9\u8D5E")),1),w.value.isStar!=null?(n(),l(U,{key:0},[w.value.isStar?(n(),l("a",{key:0,class:"star-btn",onClick:p[0]||(p[0]=v=>I())},[ie(O)])):(n(),l("a",{key:1,class:"star-btn",onClick:p[1]||(p[1]=v=>L())},[ie(R)]))],64)):k("v-if",!0)]),t("div",{class:"app-desc",title:e.app.description},F(h(e.app)),9,gu),k(`
+ \u4F5C\u8005: {{ app.author }} +
+
+ \u66F4\u65B0\u65E5\u671F:{{ app.getFormatDate() }} +
`)])]),e.app.isInstall()?(n(),l("div",bu,[e.app.isUpdate()?(n(),l("button",{key:0,class:"update",onClick:p[2]||(p[2]=v=>T())},F(W(i)("\u66F4\u65B0")),1)):k("v-if",!0),t("button",{class:"del",onClick:p[3]||(p[3]=v=>g())},F(W(i)("\u5378\u8F7D")),1),t("button",{onClick:p[4]||(p[4]=v=>d()),class:"open"},F(W(i)("\u6253\u5F00")),1)])):(n(),l("div",Du,[yu,t("button",{class:"install",onClick:p[5]||(p[5]=v=>_())},F(W(i)("\u5B89\u88C5")),1)]))])}}});var oe=Y(Cu,[["__scopeId","data-v-a3d8ec3c"]]);const Au=H({__name:"index",emits:["change"],setup(e,{emit:r}){const i=r,o=d=>{},A=d=>{d===null&&console.log("dragleave")},E=d=>{d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="link")},S=d=>{d.preventDefault(),w(d)},w=d=>{var g;const _=(g=d==null?void 0:d.dataTransfer)==null?void 0:g.files;if(_&&_.length>0){const T=[];for(let I=0;I<_.length;I++){const L=_.item(I);L&&T.push(L)}i("change",T);return}};return(d,_)=>(n(),l("div",{onDrop:S,onDragenter:o,onDragleave:A,onDragover:E},[au(d.$slots,"default")],32))}});var wu=Y(Au,[]);const re="istore",$u=new Set(["install","quick-install","upgrade","remove","upload","update"]);function Su(e,r){return{action:e,title:r,phase:"running",message:qu(e),log:"",detailsOpen:!1}}function Iu(e,r){const i=Ou(r),o=r.code!==0||Boolean(r.stderr);return!o&&Tu(e.action)?P(q({},e),{phase:"running",message:Te(e.action),log:i,detailsOpen:!1,taskId:re}):P(q({},e),{phase:o?"failed":"success",message:o?X(e.action):Oe(e.action),log:i,detailsOpen:o})}function xu(e,r){if(r.running)return P(q({},e),{phase:"running",message:Te(e.action),detailsOpen:e.detailsOpen,taskId:e.taskId||re});const o=(typeof r.exit_code=="number"?r.exit_code:0)!==0;return P(q({},e),{phase:o?"failed":"success",message:o?X(e.action):Oe(e.action),detailsOpen:o||e.detailsOpen,taskId:e.taskId||re})}function $e(e,r){const i=`${r||""}`.trim();return P(q({},e),{phase:"failed",message:i?`${X(e.action)}\uFF1A${Pu(i)}`:X(e.action),log:i,detailsOpen:!0})}function Tu(e){return $u.has(e)}function Ou(e){return[e.stdout,e.stderr].filter(Boolean).join(` +`).trim()}function qu(e){return e==="quick-install"?"\u6B63\u5728\u5FEB\u901F\u8BBE\u7F6E\u5E94\u7528...":e==="install"?"\u6B63\u5728\u5B89\u88C5\u5E94\u7528...":e==="upgrade"?"\u6B63\u5728\u5347\u7EA7\u5E94\u7528...":e==="remove"?"\u6B63\u5728\u5378\u8F7D\u5E94\u7528...":e==="upload"?"\u6B63\u5728\u5B89\u88C5\u4E0A\u4F20\u7684\u8F6F\u4EF6\u5305...":e==="backup"?"\u6B63\u5728\u521B\u5EFA\u8F6F\u4EF6\u5907\u4EFD...":e==="restore"?"\u6B63\u5728\u6062\u590D\u8F6F\u4EF6\u5907\u4EFD...":"\u6B63\u5728\u5237\u65B0\u8F6F\u4EF6\u6E90..."}function Te(e){return e==="quick-install"?"\u5FEB\u901F\u8BBE\u7F6E\u4EFB\u52A1\u5DF2\u63D0\u4EA4\uFF0C\u6B63\u5728\u5B89\u88C5\u5E94\u7528...":e==="install"?"\u5B89\u88C5\u4EFB\u52A1\u5DF2\u63D0\u4EA4\uFF0C\u6B63\u5728\u5B89\u88C5\u5E94\u7528...":e==="upgrade"?"\u5347\u7EA7\u4EFB\u52A1\u5DF2\u63D0\u4EA4\uFF0C\u6B63\u5728\u5347\u7EA7\u5E94\u7528...":e==="remove"?"\u5378\u8F7D\u4EFB\u52A1\u5DF2\u63D0\u4EA4\uFF0C\u6B63\u5728\u5378\u8F7D\u5E94\u7528...":e==="upload"?"\u5B89\u88C5\u5305\u5DF2\u4E0A\u4F20\uFF0C\u6B63\u5728\u5B89\u88C5...":"\u8F6F\u4EF6\u6E90\u5237\u65B0\u4EFB\u52A1\u5DF2\u63D0\u4EA4\uFF0C\u6B63\u5728\u66F4\u65B0..."}function Oe(e){return e==="quick-install"?"\u5E94\u7528\u5FEB\u901F\u8BBE\u7F6E\u5B8C\u6210":e==="install"?"\u5E94\u7528\u5B89\u88C5\u5B8C\u6210":e==="upgrade"?"\u5E94\u7528\u5347\u7EA7\u5B8C\u6210":e==="remove"?"\u5E94\u7528\u5378\u8F7D\u5B8C\u6210":e==="upload"?"\u79BB\u7EBF\u5B89\u88C5\u5B8C\u6210":e==="backup"?"\u8F6F\u4EF6\u5907\u4EFD\u5DF2\u521B\u5EFA":e==="restore"?"\u8F6F\u4EF6\u5907\u4EFD\u5DF2\u6062\u590D":"\u8F6F\u4EF6\u6E90\u5237\u65B0\u5B8C\u6210"}function X(e){return e==="quick-install"?"\u5E94\u7528\u5FEB\u901F\u8BBE\u7F6E\u5931\u8D25":e==="install"?"\u5E94\u7528\u5B89\u88C5\u5931\u8D25":e==="upgrade"?"\u5E94\u7528\u5347\u7EA7\u5931\u8D25":e==="remove"?"\u5E94\u7528\u5378\u8F7D\u5931\u8D25":e==="upload"?"\u79BB\u7EBF\u5B89\u88C5\u5931\u8D25":e==="backup"?"\u8F6F\u4EF6\u5907\u4EFD\u5931\u8D25":e==="restore"?"\u8F6F\u4EF6\u5907\u4EFD\u6062\u590D\u5931\u8D25":"\u8F6F\u4EF6\u6E90\u5237\u65B0\u5931\u8D25"}function Pu(e){return e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim().slice(0,160)}const x=e=>(Se("data-v-281acc62"),e=e(),Ie(),e),Uu={key:0,class:"software-toolbar"},Lu={key:1,class:"filter"},Vu=x(()=>t("span",null,"\u6807\u7B7E\uFF1A",-1)),Wu=["onClick"],Mu={key:2,class:"filter"},Ru=x(()=>t("span",null,"\u6392\u5E8F\uFF1A",-1)),zu=["onClick"],ju={key:3},Nu={class:"section-list"},Gu={key:4},Ju={class:"section-list"},Ku={key:5},Qu={class:"section-list"},Xu={key:6,class:"empty-section"},Hu={key:7,class:"upload-section"},Yu={class:"upload-card"},Zu=x(()=>t("div",{class:"upload-title"},"\u79BB\u7EBF\u5B89\u88C5",-1)),et=["disabled"],ut={key:8,class:"backup-section"},tt={class:"backup-toolbar"},at=["value"],st=["disabled"],nt=["disabled"],lt={key:0,class:"backup-list"},ot={class:"backup-file"},it=["onClick","disabled"],rt={key:1,class:"backup-empty"},ct={key:9,class:"install-mask"},pt={class:"install-title"},dt={class:"install-methods"},vt=x(()=>t("span",null,"\u5FEB\u901F\u8BBE\u7F6E",-1)),ft=x(()=>t("em",null,"\u63A8\u8350",-1)),Ft=[vt,ft],_t=x(()=>t("span",null,"\u4EC5\u5B89\u88C5",-1)),Et=x(()=>t("em",null,"\u624B\u52A8\u914D\u7F6E",-1)),kt=[_t,Et],ht={class:"install-field"},mt=x(()=>t("span",null,"\u5B89\u88C5\u4F4D\u7F6E",-1)),Bt=["value"],gt=x(()=>t("option",{value:"-"},"\u81EA\u5B9A\u4E49",-1)),bt={key:0,class:"install-field"},Dt=x(()=>t("span",null,"\u81EA\u5B9A\u4E49\u8DEF\u5F84",-1)),yt={class:"install-check"},Ct=x(()=>t("span",null,"\u5B89\u88C5\u540E\u542F\u52A8",-1)),At={class:"install-actions"},wt=["disabled"],$t={key:10,class:"store-task-mask"},St={class:"store-task-dialog"},It={class:"store-task-title"},xt={class:"store-task-body"},Tt={class:"task-message"},Ot={key:0,class:"task-detail-actions"},qt=["disabled"],Pt=["disabled"],Ut={key:0,class:"task-log"},Lt=H({__name:"appStore",setup(e){const{$gettext:r}=Q,i=su(),o=B("all"),A=B(""),E=B(null),S=B(""),w=B(),d=B(!1),_=B(null),g=B(""),T=B(""),I=B(!0),L=B(!1),D=B("install-only"),c=B(null),h=B(""),f=B(!1),p=B(null),O=B(!1),R=B(""),v=ce(),pe=C(()=>v.localApps||[]),de=C(()=>v.remoteApps||[]),Z=C(()=>v.installPaths||[]),ve=C(()=>{const u=[...v.installPathOptions||[]],a=g.value;return a&&a!=="-"&&!u.some(s=>s.value===a)&&u.unshift({value:a,label:a,sizeBytes:0}),u}),fe=C(()=>v.backupFiles||[]),Fe=C(()=>o.value==="all"||o.value==="installed"||o.value==="upgradable"),_e=C(()=>{const u=[...Z.value];return h.value&&!u.includes(h.value)&&u.unshift(h.value),u}),qe=C(()=>Ae(pe.value,de.value,v.appsExpand,{tab:o.value})),z=C(()=>Ae(pe.value,de.value,v.appsExpand,{tab:o.value,keyword:S.value,tag:o.value==="all"?A.value:"",sort:o.value==="all"?ou(E.value):"default"}).apps),Ee=C(()=>_.value?iu(_.value):!1),ee=C(()=>g.value==="-"?T.value.trim():g.value.trim()),Pe=C(()=>!L.value&&(D.value==="install-only"||Boolean(ee.value))),Ue=C(()=>o.value==="installed"?"\u6682\u65E0\u5DF2\u5B89\u88C5\u5E94\u7528":o.value==="upgradable"?"\u5F53\u524D\u6CA1\u6709\u53EF\u5347\u7EA7\u5E94\u7528":"\u6682\u65E0\u53EF\u5B89\u88C5\u5E94\u7528"),Le=u=>u.endsWith("/installed")?"installed":u.endsWith("/upgradable")?"upgradable":u.endsWith("/upload")?"upload":u.endsWith("/backup")?"backup":"all",Ve=u=>{u&&u.length>0&&ge(u[0])},We=()=>{var u;(u=w.value)==null||u.click()},Me=u=>{const a=u.target.files;a&&a[0]&&ge(a[0]),u.target&&(u.target.value="")},ke=u=>{A.value=u},he=u=>{E.value=u},ue=u=>b(this,null,function*(){_.value=u,D.value=pu(u),g.value="",T.value="",I.value=!0,yield v.getInstallPaths(),g.value=D.value==="quick-setup"&&Z.value[0]||""}),me=()=>{_.value=null,g.value="",T.value="",I.value=!0,L.value=!1,D.value="install-only"},Re=()=>b(this,null,function*(){if(!_.value)return;if(D.value==="quick-setup"&&!ee.value){y.Warning("\u8BF7\u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E");return}const u=_.value,a=D.value,s=ee.value,m=I.value;L.value=!0,me();try{yield G(a==="quick-setup"?"quick-install":"install",u.title||u.name,()=>v.runStoreAction("install",u.name,a==="quick-setup"?{install:{autoconf:!0,path:s,enable:m},deferReload:!0}:{deferReload:!0}))}finally{L.value=!1}}),te=u=>b(this,null,function*(){yield G("upgrade",`\u5347\u7EA7\uFF1A${u.title||u.name}`,()=>v.runStoreAction("upgrade",u.name,{deferReload:!0}))}),ae=u=>b(this,null,function*(){!confirm(`\u786E\u8BA4\u5378\u8F7D ${u.title||u.name}\uFF1F`)||(yield G("remove",`\u5378\u8F7D\uFF1A${u.title||u.name}`,()=>v.runStoreAction("remove",u.name,{deferReload:!0})))}),ze=()=>b(this,null,function*(){f.value=!0;try{const[u]=yield Promise.all([v.getBackupState(h.value),v.getInstallPaths()]),a=u.path||h.value||Z.value[0]||"",s=a&&a!==h.value;h.value=a,s&&(yield v.getBackupFiles(a))}catch(u){y.Error(`${u}`)}finally{f.value=!1}}),Be=()=>b(this,null,function*(){if(!h.value){y.Warning("\u8BF7\u8F93\u5165\u5907\u4EFD\u76EE\u5F55");return}f.value=!0;try{yield v.getBackupFiles(h.value)}catch(u){y.Error(`${u}`)}finally{f.value=!1}}),je=()=>b(this,null,function*(){if(!h.value){y.Warning("\u8BF7\u8F93\u5165\u5907\u4EFD\u76EE\u5F55");return}f.value=!0;try{yield G("backup","\u521B\u5EFA\u8F6F\u4EF6\u5907\u4EFD",()=>v.runBackupAction("backup",h.value))}catch(u){y.Error(`${u}`)}finally{f.value=!1}}),Ne=u=>b(this,null,function*(){const a=`${h.value.replace(/\/$/,"")}/${u}`;if(!!confirm(`\u786E\u8BA4\u6062\u590D\u5907\u4EFD ${u}\uFF1F`)){f.value=!0;try{yield G("restore",`\u6062\u590D\u8F6F\u4EF6\u5907\u4EFD\uFF1A${u}`,()=>v.runBackupAction("restore",a))}catch(s){y.Error(`${s}`)}finally{f.value=!1}}}),ge=u=>{if(!Ge(u)){y.Warning("\u4EC5\u652F\u6301 .ipk / .apk / .run \u5B89\u88C5\u5305");return}Je(u)},Ge=u=>{const a=u.name.toLowerCase();return a.endsWith(".run")||a.endsWith(".ipk")||a.endsWith(".apk")},Je=u=>b(this,null,function*(){d.value=!0;try{yield G("upload",`\u79BB\u7EBF\u5B89\u88C5\uFF1A${u.name}`,()=>v.runStoreAction("upload",u.name,{file:u,deferReload:!0}))}finally{d.value=!1}}),G=(u,a,s)=>b(this,null,function*(){const m=Su(u,a);R.value="",O.value=!1,c.value=m;try{const $=yield s(),V=Iu(m,$);return c.value=V,V.phase==="running"&&V.taskId?se(V):V.phase==="success"?yield v.reloadApp():y.Error(V.message),$}catch($){const V=$e(m,$);c.value=V,y.Error(V.message)}}),se=(u,a=0)=>{p.value&&window.clearTimeout(p.value),p.value=window.setTimeout(()=>b(this,null,function*(){try{const s=yield v.getStoreTaskStatus(u.taskId||"istore"),m=c.value;if(!m||m.action!==u.action||m.title!==u.title)return;const $=xu(m,s);if(c.value=$,$.phase==="running"){se($,0);return}p.value&&(window.clearTimeout(p.value),p.value=null),$.phase==="success"?yield v.reloadApp():(y.Error($.message),c.value=P(q({},$),{detailsOpen:!0}),yield ne($.taskId||"istore"))}catch(s){if(!c.value||c.value.action!==u.action||c.value.title!==u.title)return;if(a<2){se(u,a+1);return}const m=$e(u,s);c.value=m,y.Error(m.message)}}),a?1500:1e3)},ne=u=>b(this,null,function*(){O.value=!0,R.value="";try{const a=yield v.getStoreTaskLog(u),s=c.value;s&&s.taskId===u&&(c.value=P(q({},s),{log:a.trim()||s.log||"",detailsOpen:!0}))}catch(a){R.value=`\u65E5\u5FD7\u8BFB\u53D6\u5931\u8D25\uFF1A${a}`}finally{O.value=!1}}),Ke=()=>{if(!c.value)return;const u=!c.value.detailsOpen;c.value=P(q({},c.value),{detailsOpen:u}),u&&c.value.taskId&&ne(c.value.taskId)},Qe=()=>{const u=c.value,a=u==null?void 0:u.taskId;!a||(c.value=P(q({},u),{detailsOpen:!0}),ne(a))},Xe=()=>{p.value&&(window.clearTimeout(p.value),p.value=null),O.value=!1,R.value="",c.value=null};return nu(()=>i.path,u=>{const a=Le(u);a!==o.value&&(o.value=a,S.value="",a==="backup"&&ze())},{immediate:!0}),(u,a)=>(n(),J(wu,{onChange:Ve},{default:lu(()=>[Fe.value?(n(),l("div",Uu,[j(t("input",{class:"search",type:"text","onUpdate:modelValue":a[0]||(a[0]=s=>S.value=s),placeholder:"\u641C\u7D22\u5E94\u7528"},null,512),[[K,S.value,void 0,{trim:!0}]])])):k("v-if",!0),o.value==="all"?(n(),l("div",Lu,[t("span",null,[Vu,t("span",{onClick:a[1]||(a[1]=s=>ke("")),class:N(`default tag ${A.value===""&&"active"}`)},"\u9ED8\u8BA4",2)]),t("div",null,[(n(!0),l(U,null,M(qe.value.tags,s=>(n(),l("span",{onClick:m=>ke(s),class:N(`tag ${A.value===s&&"active"}`)},F(W(r)(s)),11,Wu))),256))])])):k("v-if",!0),o.value==="all"?(n(),l("div",Mu,[t("span",null,[Ru,t("span",{onClick:a[2]||(a[2]=s=>he(null)),class:N(`default tag ${E.value===null&&"active"}`)},"\u9ED8\u8BA4",2)]),t("div",null,[(n(),l(U,null,M(["\u6309\u4E0B\u8F7D\u91CF","\u6309\u8BC4\u5206","\u6700\u8FD1\u66F4\u65B0"],(s,m)=>t("span",{onClick:$=>he(m),class:N(`tag ${E.value===m&&"active"}`)},F(s),11,zu)),64))])])):k("v-if",!0),z.value.length>0&&o.value==="installed"?(n(),l("section",ju,[t("div",Nu,[(n(!0),l(U,null,M(z.value,s=>(n(),J(oe,{app:s,onInstallApp:ue,onUpgradeApp:te,onRemoveApp:ae},null,8,["app"]))),256))])])):k("v-if",!0),z.value.length>0&&o.value==="upgradable"?(n(),l("section",Gu,[t("div",Ju,[(n(!0),l(U,null,M(z.value,s=>(n(),J(oe,{app:s,onInstallApp:ue,onUpgradeApp:te,onRemoveApp:ae},null,8,["app"]))),256))])])):k("v-if",!0),z.value.length>0&&o.value==="all"?(n(),l("section",Ku,[t("div",Qu,[(n(!0),l(U,null,M(z.value,s=>(n(),J(oe,{app:s,onInstallApp:ue,onUpgradeApp:te,onRemoveApp:ae},null,8,["app"]))),256))])])):k("v-if",!0),z.value.length===0&&Fe.value?(n(),l("section",Xu,[t("span",null,F(Ue.value),1)])):k("v-if",!0),o.value==="upload"?(n(),l("section",Hu,[t("div",Yu,[Zu,t("button",{class:"upload-btn",onClick:We,disabled:d.value},"\u9009\u62E9\u5B89\u88C5\u5305",8,et),t("input",{ref_key:"uploadInput",ref:w,class:"upload-input",type:"file",accept:".ipk,.apk,.run",onChange:Me},null,544)])])):k("v-if",!0),o.value==="backup"?(n(),l("section",ut,[t("div",tt,[_e.value.length>0?j((n(),l("select",{key:0,"onUpdate:modelValue":a[3]||(a[3]=s=>h.value=s),class:"backup-path",onChange:Be},[(n(!0),l(U,null,M(_e.value,s=>(n(),l("option",{value:s},F(s),9,at))),256))],544)),[[we,h.value]]):j((n(),l("input",{key:1,"onUpdate:modelValue":a[4]||(a[4]=s=>h.value=s),class:"backup-path",placeholder:"/mnt/data"},null,512)),[[K,h.value,void 0,{trim:!0}]]),t("button",{onClick:Be,disabled:f.value},"\u5237\u65B0",8,st),t("button",{class:"primary",onClick:je,disabled:f.value},"\u521B\u5EFA\u5907\u4EFD",8,nt)]),fe.value.length>0?(n(),l("div",lt,[(n(!0),l(U,null,M(fe.value,s=>(n(),l("div",ot,[t("span",null,F(s),1),t("button",{onClick:m=>Ne(s),disabled:f.value},"\u6062\u590D",8,it)]))),256))])):(n(),l("div",rt,"\u6682\u65E0\u5907\u4EFD"))])):k("v-if",!0),_.value?(n(),l("div",ct,[t("form",{class:"install-dialog",onSubmit:cu(Re,["prevent"])},[t("div",pt,"\u5B89\u88C5\uFF1A"+F(_.value.title||_.value.name),1),t("div",dt,[Ee.value?(n(),l("button",{key:0,type:"button","data-install-method":"quick-setup",class:N(D.value==="quick-setup"&&"active"),onClick:a[5]||(a[5]=s=>D.value="quick-setup")},[...Ft],2)):k("v-if",!0),t("button",{type:"button","data-install-method":"install-only",class:N(D.value==="install-only"&&"active"),onClick:a[6]||(a[6]=s=>D.value="install-only")},[...kt],2)]),Ee.value&&D.value==="quick-setup"?(n(),l(U,{key:0},[t("label",ht,[mt,ve.value.length>0?j((n(),l("select",{key:0,"onUpdate:modelValue":a[7]||(a[7]=s=>g.value=s)},[(n(!0),l(U,null,M(ve.value,s=>(n(),l("option",{value:s.value},F(s.label),9,Bt))),256)),gt],512)),[[we,g.value]]):j((n(),l("input",{key:1,"onUpdate:modelValue":a[8]||(a[8]=s=>g.value=s),placeholder:"/mnt/data"},null,512)),[[K,g.value,void 0,{trim:!0}]])]),g.value==="-"?(n(),l("label",bt,[Dt,j(t("input",{"onUpdate:modelValue":a[9]||(a[9]=s=>T.value=s),placeholder:"/mnt/data"},null,512),[[K,T.value,void 0,{trim:!0}]])])):k("v-if",!0),t("label",yt,[j(t("input",{type:"checkbox","onUpdate:modelValue":a[10]||(a[10]=s=>I.value=s)},null,512),[[ru,I.value]]),Ct])],64)):k("v-if",!0),t("div",At,[t("button",{type:"button",class:"cancel",onClick:me},"\u53D6\u6D88"),t("button",{class:"submit",disabled:!Pe.value},F(D.value==="quick-setup"?"\u5F00\u59CB\u5FEB\u901F\u8BBE\u7F6E":"\u5F00\u59CB\u5B89\u88C5"),9,wt)])],32)])):k("v-if",!0),c.value?(n(),l("div",$t,[t("div",St,[t("div",It,[t("span",null,F(c.value.title),1),t("button",{type:"button",onClick:Xe},"\u5173\u95ED")]),t("div",xt,[t("span",{class:N(`task-status ${c.value.phase}`)},null,2),t("div",null,[t("div",Tt,F(c.value.message),1),c.value.log||c.value.taskId?(n(),l("div",Ot,[t("button",{type:"button",class:"task-detail-btn",onClick:Ke,disabled:O.value},F(c.value.detailsOpen?"\u6536\u8D77\u8BE6\u7EC6\u65E5\u5FD7":"\u67E5\u770B\u8BE6\u7EC6\u65E5\u5FD7"),9,qt),c.value.detailsOpen&&c.value.taskId?(n(),l("button",{key:0,type:"button",class:"task-detail-btn muted",onClick:Qe,disabled:O.value},F(O.value?"\u8BFB\u53D6\u4E2D":"\u5237\u65B0"),9,Pt)):k("v-if",!0)])):k("v-if",!0)])]),c.value.detailsOpen?(n(),l("pre",Ut,F(c.value.log||R.value||(O.value?"\u6B63\u5728\u8BFB\u53D6\u65E5\u5FD7...":"\u6682\u65E0\u65E5\u5FD7\u8F93\u51FA")),1)):k("v-if",!0)])])):k("v-if",!0)]),_:1}))}});var Vt=Y(Lt,[["__scopeId","data-v-281acc62"]]);const Wt={class:"app-store-page"},Mt=H({__name:"index",setup(e){const r=ce();return(()=>b(this,null,function*(){yield r.getApp()}))(),(o,A)=>(n(),l("div",Wt,[ie(Vt)]))}});var jt=Y(Mt,[["__scopeId","data-v-32baa294"]]);export{jt as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.22ce9eb9.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.22ce9eb9.js new file mode 100644 index 00000000..c8de7ba3 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.22ce9eb9.js @@ -0,0 +1 @@ +var p=(D,c,d)=>new Promise((l,e)=>{var u=o=>{try{r(d.next(o))}catch(a){e(a)}},i=o=>{try{r(d.throw(o))}catch(a){e(a)}},r=o=>o.done?l(o.value):Promise.resolve(o.value).then(u,i);r((d=d.apply(D,c)).next())});import{_ as x,d as y,r as h,x as F,P,o as m,c as _,f as n,w as v,y as k,F as N,j as g,h as I,t as S,g as B,i as w,T as E}from"./index.js";const C=n("div",{class:"label-name"},[n("span",null,"DNS\u9009\u9879")],-1),A={class:"label-value"},T=n("option",{value:"auto"},"\u4F7F\u7528\u8FD0\u8425\u5546\u63D0\u4F9B\u7684DNS",-1),V=n("option",{value:"manual"},"\u81EA\u5B9A\u4E49DNS",-1),G=[T,V],M=n("div",{class:"label-name"},[n("span",null,"DNS\u670D\u52A1\u5668\u5730\u5740")],-1),U={class:"label-value"},j=n("div",{class:"label-name"}," \u5907\u7528DNS\u670D\u52A1\u5668\u5730\u5740 ",-1),q={class:"label-value"},L={class:"label-btns"},O=["disabled"],z={key:1,class:"label-msg"},H=y({__name:"index",setup(D){return p(this,null,function*(){let c,d;const l=h(""),e=F({interfaceName:"",dnsProto:"auto",manualDnsIp:[]}),u=F({dns1:"",dns2:""}),i=h(!1),r=()=>p(this,null,function*(){i.value=!0;try{const a=yield w.Guide.DnsConfig.GET();if(a!=null&&a.data){const{result:t}=a.data;if(t){e.dnsProto=t.dnsProto,e.manualDnsIp=t.manualDnsIp||[];for(let s=0;sr()),yield c,d();const o=()=>p(this,null,function*(){let a={};switch(e.dnsProto){case"auto":break;case"manual":a.manualDnsIp=[],e.manualDnsIp!=null&&e.manualDnsIp.length>0?a.manualDnsIp=e.manualDnsIp:(a.manualDnsIp.push(u.dns1),u.dns2&&a.manualDnsIp.push(u.dns2));break}a.dnsProto=e.dnsProto,a.interfaceName=e.interfaceName;const t=E.Loading("\u914D\u7F6E\u4E2D...");try{const s=yield w.Guide.DnsConfig.POST(a);if(s!=null&&s.data){const{success:f,error:b}=s==null?void 0:s.data;b&&(l.value=b),(f==null||f==0)&&(l.value="\u914D\u7F6E\u6210\u529F")}}catch(s){l.value=s}t.Close()});return(a,t)=>(m(),_("form",{class:"form-container",onSubmit:B(o,["prevent"])},[C,n("div",A,[v(n("select",{"onUpdate:modelValue":t[0]||(t[0]=s=>e.dnsProto=s)},[...G],512),[[k,e.dnsProto]])]),e.dnsProto=="manual"?(m(),_(N,{key:0},[M,n("div",U,[v(n("input",{type:"text",placeholder:"\u8BF7\u8F93\u5165 dns \u5730\u5740","onUpdate:modelValue":t[1]||(t[1]=s=>u.dns1=s),required:""},null,512),[[g,u.dns1,void 0,{trim:!0}]])]),j,n("div",q,[v(n("input",{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5907\u7528 dns \u5730\u5740","onUpdate:modelValue":t[2]||(t[2]=s=>u.dns2=s)},null,512),[[g,u.dns2,void 0,{trim:!0}]])])],64)):I("v-if",!0),n("div",L,[n("button",{class:"sumbit",disabled:i.value},"\u4FDD\u5B58",8,O)]),l.value?(m(),_("div",z,[n("span",null,S(l.value),1)])):I("v-if",!0)],32))})}});var Q=x(H,[]);export{Q as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.32940e8d.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.32940e8d.js new file mode 100644 index 00000000..1af76c75 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.32940e8d.js @@ -0,0 +1 @@ +var U=Object.defineProperty;var B=Object.getOwnPropertySymbols;var H=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable;var O=(c,u,a)=>u in c?U(c,u,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[u]=a,L=(c,u)=>{for(var a in u||(u={}))H.call(u,a)&&O(c,a,u[a]);if(B)for(var a of B(u))Q.call(u,a)&&O(c,a,u[a]);return c};var D=(c,u,a)=>new Promise((d,l)=>{var P=w=>{try{x(a.next(w))}catch(I){l(I)}},m=w=>{try{x(a.throw(w))}catch(I){l(I)}},x=w=>w.done?d(w.value):Promise.resolve(w.value).then(P,m);x((a=a.apply(c,u)).next())});import{_ as W,d as J,r as S,x as K,P as X,o as k,c as C,f as p,w as g,j as R,F as z,Q as j,s as T,h as V,t as Y,g as Z,i as N,T as $}from"./index.js";var ee=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},G={exports:{}};(function(c){(function(u){const a="(0?\\d+|0x[a-f0-9]+)",d={fourOctet:new RegExp(`^${a}\\.${a}\\.${a}\\.${a}$`,"i"),threeOctet:new RegExp(`^${a}\\.${a}\\.${a}$`,"i"),twoOctet:new RegExp(`^${a}\\.${a}$`,"i"),longValue:new RegExp(`^${a}$`,"i")},l=new RegExp("^0[0-7]+$","i"),P=new RegExp("^0x[a-f0-9]+$","i"),m="%[0-9a-z]{1,}",x="(?:[0-9a-f]+::?)+",w={zoneIndex:new RegExp(m,"i"),native:new RegExp(`^(::)?(${x})?([0-9a-f]+)?(::)?(${m})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${a}\\.${a}\\.${a}\\.${a}(${m})?)$`,"i"),transitional:new RegExp(`^((?:${x})|(?:::)(?:${x})?)${a}\\.${a}\\.${a}\\.${a}(${m})?$`,"i")};function I(e,t){if(e.indexOf("::")!==e.lastIndexOf("::"))return null;let r=0,n=-1,o=(e.match(w.zoneIndex)||[])[0],s,h;for(o&&(o=o.substring(1),e=e.replace(/%.+$/,""));(n=e.indexOf(":",n+1))>=0;)r++;if(e.substr(0,2)==="::"&&r--,e.substr(-2,2)==="::"&&r--,r>t)return null;for(h=t-r,s=":";h--;)s+="0:";return e=e.replace("::",s),e[0]===":"&&(e=e.slice(1)),e[e.length-1]===":"&&(e=e.slice(0,-1)),t=function(){const A=e.split(":"),_=[];for(let M=0;M0;){if(s=r-n,s<0&&(s=0),e[o]>>s!==t[o]>>s)return!1;n-=r,o+=1}return!0}function v(e){if(P.test(e))return parseInt(e,16);if(e[0]==="0"&&!isNaN(parseInt(e[1],10))){if(l.test(e))return parseInt(e,8);throw new Error(`ipaddr: cannot parse ${e} as octal`)}return parseInt(e,10)}function b(e,t){for(;e.length=0;o-=1)if(s=this.octets[o],s in n){if(h=n[s],r&&h!==0)return null;h!==8&&(r=!0),t+=h}else return null;return 32-t},e.prototype.range=function(){return i.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return i.IPv6.parse(`::ffff:${this.toString()}`)},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(".")},e}(),i.IPv4.broadcastAddressFromCIDR=function(e){try{const t=this.parseCIDR(e),r=t[0].toByteArray(),n=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[];let s=0;for(;s<4;)o.push(parseInt(r[s],10)|parseInt(n[s],10)^255),s++;return new this(o)}catch(t){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},i.IPv4.isIPv4=function(e){return this.parser(e)!==null},i.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch(t){return!1}},i.IPv4.isValidCIDR=function(e){try{return this.parseCIDR(e),!0}catch(t){return!1}},i.IPv4.isValidFourPartDecimal=function(e){return!!(i.IPv4.isValid(e)&&e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},i.IPv4.networkAddressFromCIDR=function(e){let t,r,n,o,s;try{for(t=this.parseCIDR(e),n=t[0].toByteArray(),s=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[],r=0;r<4;)o.push(parseInt(n[r],10)&parseInt(s[r],10)),r++;return new this(o)}catch(h){throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},i.IPv4.parse=function(e){const t=this.parser(e);if(t===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(t)},i.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){const r=parseInt(t[2]);if(r>=0&&r<=32){const n=[this.parse(t[1]),r];return Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},i.IPv4.parser=function(e){let t,r,n;if(t=e.match(d.fourOctet))return function(){const o=t.slice(1,6),s=[];for(let h=0;h4294967295||n<0)throw new Error("ipaddr: address outside defined range");return function(){const o=[];let s;for(s=0;s<=24;s+=8)o.push(n>>s&255);return o}().reverse()}else return(t=e.match(d.twoOctet))?function(){const o=t.slice(1,4),s=[];if(n=v(o[1]),n>16777215||n<0)throw new Error("ipaddr: address outside defined range");return s.push(v(o[0])),s.push(n>>16&255),s.push(n>>8&255),s.push(n&255),s}():(t=e.match(d.threeOctet))?function(){const o=t.slice(1,5),s=[];if(n=v(o[2]),n>65535||n<0)throw new Error("ipaddr: address outside defined range");return s.push(v(o[0])),s.push(v(o[1])),s.push(n>>8&255),s.push(n&255),s}():null},i.IPv4.subnetMaskFromPrefixLength=function(e){if(e=parseInt(e),e<0||e>32)throw new Error("ipaddr: invalid IPv4 prefix length");const t=[0,0,0,0];let r=0;const n=Math.floor(e/8);for(;r=0;h-=1)if(o=this.parts[h],o in n){if(s=n[o],r&&s!==0)return null;s!==16&&(r=!0),t+=s}else return null;return 128-t},e.prototype.range=function(){return i.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let t;const r=[],n=this.parts;for(let o=0;o>8),r.push(t&255);return r},e.prototype.toFixedLengthString=function(){const t=function(){const n=[];for(let o=0;o>8,r&255,n>>8,n&255])},e.prototype.toNormalizedString=function(){const t=function(){const n=[];for(let o=0;oo&&(n=s.index,o=s[0].length);return o<0?r:`${r.substring(0,n)}::${r.substring(n+o)}`},e.prototype.toString=function(){return this.toRFC5952String()},e}(),i.IPv6.broadcastAddressFromCIDR=function(e){try{const t=this.parseCIDR(e),r=t[0].toByteArray(),n=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[];let s=0;for(;s<16;)o.push(parseInt(r[s],10)|parseInt(n[s],10)^255),s++;return new this(o)}catch(t){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${t})`)}},i.IPv6.isIPv6=function(e){return this.parser(e)!==null},i.IPv6.isValid=function(e){if(typeof e=="string"&&e.indexOf(":")===-1)return!1;try{const t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch(t){return!1}},i.IPv6.isValidCIDR=function(e){if(typeof e=="string"&&e.indexOf(":")===-1)return!1;try{return this.parseCIDR(e),!0}catch(t){return!1}},i.IPv6.networkAddressFromCIDR=function(e){let t,r,n,o,s;try{for(t=this.parseCIDR(e),n=t[0].toByteArray(),s=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),o=[],r=0;r<16;)o.push(parseInt(n[r],10)&parseInt(s[r],10)),r++;return new this(o)}catch(h){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${h})`)}},i.IPv6.parse=function(e){const t=this.parser(e);if(t.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(t.parts,t.zoneId)},i.IPv6.parseCIDR=function(e){let t,r,n;if((r=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(r[2]),t>=0&&t<=128))return n=[this.parse(r[1]),t],Object.defineProperty(n,"toString",{value:function(){return this.join("/")}}),n;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},i.IPv6.parser=function(e){let t,r,n,o,s,h;if(n=e.match(w.deprecatedTransitional))return this.parser(`::ffff:${n[1]}`);if(w.native.test(e))return I(e,8);if((n=e.match(w.transitional))&&(h=n[6]||"",t=n[1],n[1].endsWith("::")||(t=t.slice(0,-1)),t=I(t+h,6),t.parts)){for(s=[parseInt(n[2]),parseInt(n[3]),parseInt(n[4]),parseInt(n[5])],r=0;r128)throw new Error("ipaddr: invalid IPv6 prefix length");const t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let r=0;const n=Math.floor(e/8);for(;rF.isValid(c),y=c=>{const u=F.IPv4.parse(c).toByteArray();return u[0]<<24|u[1]<<16|u[2]<<8|u[3]},q=c=>F.fromByteArray([c>>24&255,c>>16&255,c>>8&255,c&255]).toString(),ne=c=>{if(!F.IPv4.isIPv4(c))return!1;let u=0,a=y(c);for(let d=31;d>=0&&(a&1<{let l=y(c)&y(u),P=y(a),m=y(d),w=~y(u);return Pl+1&&m{let a=y(u),d=y(c)&a,l=~a,P;return l>=105?(P=d|l-5,d=d|100):l>=3?(P=d|l-1,d=d|2):(d=d|1,P=d),[q(d),q(P)]};var E={isValidMask:ne,isValidIP:te,isValidMaskRange:re,calcMaskRange:se};const oe=p("div",{class:"label-name"},[p("span",null,"\u5185\u7F51\u5730\u5740")],-1),ie={class:"label-value"},ae=p("div",{class:"label-name"},[p("span",null,"\u5B50\u7F51\u63A9\u7801")],-1),ue={class:"label-value"},le=p("div",{class:"label-name"},[p("span",null,"DHCP\u670D\u52A1")],-1),de={class:"label-value"},ce={class:"label-flex"},pe=p("div",{class:"label-name"},[p("span",null,"IP\u6C60\u8D77\u59CB\u5730\u5740")],-1),fe={class:"label-value"},he=p("div",{class:"label-name"},[p("span",null,"IP\u6C60\u7ED3\u675F\u5730\u5740")],-1),Ie={class:"label-value"},ve={class:"label-btns"},we=["disabled"],Pe={key:2,class:"label-msg"},me=J({__name:"index",setup(c){return D(this,null,function*(){let u,a;const d=S(""),l=K({lanIp:"",netMask:"255.255.255.0",enableDhcp:!1,dhcpStart:"",dhcpEnd:""}),P=S(!1),m=S(!1),x=()=>D(this,null,function*(){P.value=!0;const I=yield N.Guide.GetLan.GET();if(I.data){const{result:f}=I.data;f&&(l.lanIp=f.lanIp,l.netMask=f.netMask,m.value=f.enableDhcp||!1,l.dhcpStart=f.dhcpStart,l.dhcpEnd=f.dhcpEnd,f.lanIp,location.hostname)}P.value=!1});[u,a]=X(()=>x()),yield u,a();const w=()=>D(this,null,function*(){const I=L({},l);if(!E.isValidIP(I.lanIp)){$.Error("IPv4\u5730\u5740\u683C\u5F0F\u9519\u8BEF");return}if(!E.isValidMask(I.netMask)){$.Error("IPv4\u5B50\u7F51\u63A9\u7801\u683C\u5F0F\u9519\u8BEF");return}if(I.enableDhcp&&!E.isValidIP(I.dhcpStart)||!E.isValidIP(I.dhcpEnd)||!E.isValidMaskRange(I.lanIp,I.netMask,I.dhcpStart,I.dhcpEnd)){$.Error("DHCP\u7684IP\u6C60\u683C\u5F0F\u9519\u8BEF\u6216\u8D85\u51FA\u5B50\u7F51\u8303\u56F4");return}const f=$.Loading("\u6B63\u5728\u914D\u7F6E,\u8BF7\u7A0D\u7B49\u2026");let v=!1;try{const b=yield N.Guide.LanIp.POST(I);if(b.data){const{result:i,success:e,error:t}=b.data;if(t){d.value=t;return}(e||0)==0&&(v=!0)}}catch(b){d.value=b}finally{f.Close()}v&&(d.value=`\u66F4\u65B0\u6210\u529F,\u8BF7\u8FDB\u5165 ${I.lanIp} \u8DEF\u7531\u5668\u5730\u5740`)});return(I,f)=>(k(),C("form",{class:"form-container",onSubmit:Z(w,["prevent"])},[oe,p("div",ie,[g(p("input",{type:"text",placeholder:"192.168.100.1","onUpdate:modelValue":f[0]||(f[0]=v=>l.lanIp=v),required:""},null,512),[[R,l.lanIp,void 0,{trim:!0}]])]),ae,p("div",ue,[g(p("input",{type:"text",placeholder:"255.255.255.0","onUpdate:modelValue":f[1]||(f[1]=v=>l.netMask=v),required:""},null,512),[[R,l.netMask,void 0,{trim:!0}]])]),m.value?(k(),C(z,{key:0},[le,p("div",de,[p("div",ce,[p("label",null,[g(p("input",{type:"radio",value:!1,"onUpdate:modelValue":f[2]||(f[2]=v=>l.enableDhcp=v)},null,512),[[j,l.enableDhcp]]),T("\u4FDD\u6301DHCP")]),p("label",null,[g(p("input",{type:"radio",value:!0,"onUpdate:modelValue":f[3]||(f[3]=v=>l.enableDhcp=v)},null,512),[[j,l.enableDhcp]]),T("\u4FEE\u6539DHCP")])])])],64)):V("v-if",!0),l.enableDhcp?(k(),C(z,{key:1},[pe,p("div",fe,[g(p("input",{type:"text",placeholder:"192.168.100.100","onUpdate:modelValue":f[4]||(f[4]=v=>l.dhcpStart=v),required:""},null,512),[[R,l.dhcpStart,void 0,{trim:!0}]])]),he,p("div",Ie,[g(p("input",{type:"text",placeholder:"192.168.100.100","onUpdate:modelValue":f[5]||(f[5]=v=>l.dhcpEnd=v),required:""},null,512),[[R,l.dhcpEnd,void 0,{trim:!0}]])])],64)):V("v-if",!0),p("div",ve,[p("button",{class:"sumbit",disabled:P.value},"\u4FDD\u5B58",8,we)]),d.value?(k(),C("div",Pe,[p("span",null,Y(d.value),1)])):V("v-if",!0)],32))})}});var be=W(me,[]);export{be as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.35e51c75.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.35e51c75.js new file mode 100644 index 00000000..d04900f4 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.35e51c75.js @@ -0,0 +1 @@ +import{_ as o,d as r,E as e,o as u,A as i,B as c,Y as t,G as l}from"./index.js";const p=r({__name:"index",setup(_){const a=[{name:"disk",title:"\u6211\u7684\u78C1\u76D8",path:"/router/disk"},{name:"disk-raid",title:"\u78C1\u76D8\u9635\u5217",fn:()=>{t({full:!1,title:"\u78C1\u76D8\u9635\u5217",src:"/cgi-bin/luci/admin/nas/raid"})}},{name:"disk-smart",title:"S.M.A.R.T",fn:()=>{t({full:!1,title:"S.M.A.R.T",src:"/cgi-bin/luci/admin/nas/smart"})}}];return(d,m)=>{const s=e("router-loading"),n=e("layout-page");return u(),i(n,{menus:a},{default:c(()=>[l(s)]),_:1})}}});var k=o(p,[]);export{k as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.38ed27cd.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.38ed27cd.js new file mode 100644 index 00000000..73f105e9 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.38ed27cd.js @@ -0,0 +1 @@ +var F=(P,f,c)=>new Promise((l,t)=>{var h=d=>{try{i(c.next(d))}catch(D){t(D)}},o=d=>{try{i(c.throw(d))}catch(D){t(D)}},i=d=>d.done?l(d.value):Promise.resolve(d.value).then(h,o);i((c=c.apply(P,f)).next())});import{_ as S,d as C,r as B,x as A,P as V,o as v,c as m,f as e,w as r,y as M,F as b,j as _,h as I,e as U,t as T,g as q,i as w,T as G}from"./index.js";const L=e("div",{class:"label-info"}," \u8BF7\u786E\u4FDD\u60A8\u5DF2\u5C06\u8DEF\u7531 WAN \u53E3\u8FDE\u63A5\u5230\u4E0A\u7EA7\u8DEF\u7531\u5C40\u57DF\u7F51\uFF08 LAN \uFF09\u63A5\u53E3 ",-1),W=e("div",{class:"label-name"},[e("span",null,"WAN \u63A5\u53E3\u914D\u7F6E\u65B9\u5F0F")],-1),j={class:"label-value"},H=e("option",{value:"dhcp"},"\u81EA\u52A8\u83B7\u53D6 IP \u5730\u5740\uFF08DHCP\uFF09",-1),O=e("option",{value:"static"},"\u9759\u6001 IP \u5730\u5740",-1),z=[H,O],J=e("div",{class:"label-name"},[e("span",null,"IP\u5730\u5740")],-1),K={class:"label-value"},Q=e("div",{class:"label-name"},[e("span",null,"\u5B50\u7F51\u63A9\u7801")],-1),R={class:"label-value"},X=e("div",{class:"label-name"},[e("span",null,"\u7F51\u5173\u5730\u5740")],-1),Y={class:"label-value"},Z=e("div",{class:"label-name"},[e("span",null,"DNS \u914D\u7F6E\u65B9\u5F0F")],-1),$={class:"label-value"},tt=e("option",{value:"auto"},"\u81EA\u52A8\u83B7\u53D6\uFF08DHCP\uFF09",-1),et=e("option",{value:"manual"},"\u624B\u52A8\u914D\u7F6E",-1),at=[tt,et],st=e("div",{class:"label-name"},[e("span",null,"DNS\u670D\u52A1\u5668")],-1),ut={class:"label-value"},nt=["onUpdate:modelValue"],lt=e("div",{class:"label-name"},[e("span",null,"DNS\u670D\u52A1\u5668")],-1),ot={class:"label-value"},it=e("div",{class:"label-name"}," \u5907\u7528DNS\u670D\u52A1\u5668 ",-1),dt={class:"label-value"},rt={class:"label-btns"},ct=["disabled"],pt={key:2,class:"label-msg"},vt=C({__name:"index",setup(P){return F(this,null,function*(){let f,c;const l=B(""),t=A({wanProto:"dhcp",dnsProto:"auto",staticIp:"",subnetMask:"",manualDnsIp:[],gateway:""}),h=A({staticIP:""}),o=A({dnsAddr1:"",dnsAddr2:""}),i=B(!1),d=()=>F(this,null,function*(){i.value=!0;try{const u=yield Promise.all([w.Guide.ClientModel.GET(),w.Network.Status.GET()]);if(u[0]){const s=u[0],{result:a,error:n}=s.data;if(a){const{wanProto:p,dnsProto:y,staticIp:k,subnetMask:g,gateway:E,manualDnsIp:x}=a;p&&(t.wanProto=p),y&&(t.dnsProto=y),k&&(t.staticIp=k),g&&(t.subnetMask=g),E&&(t.gateway=E),x&&(t.manualDnsIp=x||[])}n&&(l.value=n)}if(u[1]){const s=u[1],{result:a,error:n}=s.data;a&&a.ipv4addr&&(h.staticIP=a.ipv4addr),n&&(l.value=n)}}catch(u){l.value=u}i.value=!1});[f,c]=V(()=>d()),yield f,c();const D=u=>{u.target.value=="static"&&((t.staticIp==null||t.staticIp=="")&&(t.staticIp=h.staticIP),(t.subnetMask==null||t.subnetMask=="")&&(t.subnetMask="255.255.255.0"))},N=()=>F(this,null,function*(){const u={};switch(t.wanProto){case"dhcp":break;case"static":u.staticIp=t.staticIp,u.subnetMask=t.subnetMask,u.gateway=t.gateway;break}switch(t.dnsProto){case"auto":break;case"manual":u.manualDnsIp=[],t.manualDnsIp!=null&&t.manualDnsIp.length>0?u.manualDnsIp=t.manualDnsIp:(u.manualDnsIp.push(o.dnsAddr1),o.dnsAddr2&&u.manualDnsIp.push(o.dnsAddr2));break}u.dnsProto=t.dnsProto,u.wanProto=t.wanProto,i.value=!0;const s=G.Loading("\u4FDD\u5B58\u4E2D...");try{const a=yield w.Guide.ClientModel.POST(u);if(a!=null&&a.data){const{success:n,error:p}=a==null?void 0:a.data;p&&(l.value=p),(n==null||n==0)&&(l.value="\u914D\u7F6E\u5B8C\u6210")}}catch(a){l.value=a}i.value=!1,s.Close()});return(u,s)=>(v(),m("form",{class:"form-container",onSubmit:q(N,["prevent"])},[L,W,e("div",j,[r(e("select",{"onUpdate:modelValue":s[0]||(s[0]=a=>t.wanProto=a),onInput:D},[...z],544),[[M,t.wanProto]])]),t.wanProto=="static"?(v(),m(b,{key:0},[J,e("div",K,[r(e("input",{type:"text",placeholder:"ip\u5730\u5740","onUpdate:modelValue":s[1]||(s[1]=a=>t.staticIp=a),required:""},null,512),[[_,t.staticIp,void 0,{trim:!0}]])]),Q,e("div",R,[r(e("input",{type:"text",placeholder:"\u5B50\u7F51\u63A9\u7801\u5730\u5740","onUpdate:modelValue":s[2]||(s[2]=a=>t.subnetMask=a),required:""},null,512),[[_,t.subnetMask,void 0,{trim:!0}]])]),X,e("div",Y,[r(e("input",{type:"text",placeholder:"\u7F51\u5173\u5730\u5740","onUpdate:modelValue":s[3]||(s[3]=a=>t.gateway=a),required:""},null,512),[[_,t.gateway,void 0,{trim:!0}]])])],64)):I("v-if",!0),Z,e("div",$,[r(e("select",{"onUpdate:modelValue":s[4]||(s[4]=a=>t.dnsProto=a)},[...at],512),[[M,t.dnsProto]])]),t.dnsProto=="manual"?(v(),m(b,{key:1},[t.manualDnsIp!=null&&t.manualDnsIp.length>0?(v(!0),m(b,{key:0},U(t.manualDnsIp,(a,n)=>(v(),m(b,null,[st,e("div",ut,[r(e("input",{type:"text",placeholder:"DNS\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":p=>t.manualDnsIp[n]=p},null,8,nt),[[_,t.manualDnsIp[n],void 0,{trim:!0}]])])],64))),256)):(v(),m(b,{key:1},[lt,e("div",ot,[r(e("input",{type:"text",placeholder:"\u4E3BDNS\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":s[5]||(s[5]=a=>o.dnsAddr1=a),required:""},null,512),[[_,o.dnsAddr1,void 0,{trim:!0}]])]),it,e("div",dt,[r(e("input",{type:"text",placeholder:"\u5907\u7528DNS\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":s[6]||(s[6]=a=>o.dnsAddr2=a)},null,512),[[_,o.dnsAddr2,void 0,{trim:!0}]])])],64))],64)):I("v-if",!0),e("div",rt,[e("button",{class:"sumbit",disabled:i.value},"\u4FDD\u5B58",8,ct)]),l.value?(v(),m("div",pt,[e("span",null,T(l.value),1)])):I("v-if",!0)],32))})}});var Dt=S(vt,[]);export{Dt as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.3e98a44f.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.3e98a44f.js new file mode 100644 index 00000000..d6149443 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.3e98a44f.js @@ -0,0 +1,3 @@ +var be=Object.defineProperty,ye=Object.defineProperties;var Be=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var _e=(o,t,u)=>t in o?be(o,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):o[t]=u,pe=(o,t)=>{for(var u in t||(t={}))Ce.call(t,u)&&_e(o,u,t[u]);if(de)for(var u of de(t))$e.call(t,u)&&_e(o,u,t[u]);return o},ve=(o,t)=>ye(o,Be(t));var E=(o,t,u)=>new Promise((f,i)=>{var D=c=>{try{d(u.next(c))}catch(s){i(s)}},h=c=>{try{d(u.throw(c))}catch(s){i(s)}},d=c=>c.done?f(c.value):Promise.resolve(c.value).then(D,h);d((u=u.apply(o,t)).next())});import{_ as S,o as _,c as v,r as w,a as V,b as ge,d as N,F as k,e as Y,f as e,w as y,v as Ie,g as M,h as b,i as g,t as A,j as I,k as Ae,T as $,l as R,m as Se,n as xe,u as m,p as Z,q as ee,s as J,x as U,y as K,z as j,A as H,B as Q,C as Fe,D as Pe,E as fe,G as z,S as Ne}from"./index.js";import{d as We}from"./chunk.555488a0.js";const Ue={},Ve={class:""};function Le(o,t){return _(),v("div",Ve)}var Te=S(Ue,[["render",Le]]),C=(o=>(o.wifi="wifi",o.wifiStatus="wifiStatus",o.status="status",o.network="network",o.networkLoad="networkLoad",o.networkPppoe="networkPppoe",o.networkDhcp="networkDhcp",o.networkDns="networkDns",o))(C||{});const q=w(!1),x=w(),De=w([]),he=Symbol("ifaces"),Ge=V(()=>De.value),me=Symbol("network"),we=w(),Me=V(()=>we.value),je=Symbol("ports"),W=w([]),qe=V(()=>W.value),ke=Symbol("isWan"),He=V(()=>{for(let o=0;o{q.value=!1},ze=()=>{x.value="wifi"},Re=o=>{De.value=o,x.value="wifiStatus"},Je=(o,t)=>{W.value=t,we.value=o,x.value="network"},P=()=>{x.value="networkLoad"},X=()=>{Oe(),ge.push({path:"/router/network"})},Ke=()=>{x.value="networkDns"},Qe=()=>{x.value="networkDhcp"},Xe=()=>{x.value="networkPppoe"},Ye=e("div",{class:"form-item"},[e("div",{class:"form-item_desc"}," \u8BBE\u5B9A\u552F\u4E00\u7684\u540D\u79F0\u6216SSID\uFF08Service Set Identifier\uFF09\u65B9\u4FBF\u8FA8\u8BC6\u60A8\u7684\u65E0\u7EBF\u7F51\u7EDC ")],-1),Ze={class:"form-item"},et={class:"form-item_title"},tt={class:"form-item_conn"},st=["placeholder","onInput","onUpdate:modelValue","disabled"],ut={class:"form-item"},nt={class:"form-item_title"},ot={class:"form-item_conn"},at=["type","placeholder","onInput","onUpdate:modelValue","disabled"],lt=["src"],it={class:"form-item"},ct=["value"],rt=e("span",null,"\u540C\u6B65\u8BBE\u5B9A WIFI \u540D\u79F0\u53CA\u5BC6\u7801",-1),dt=e("div",{class:"",style:{height:"36px"}},null,-1),_t={class:"form-item"},pt={class:"form-item_actions"},vt=["disabled"],ft="/luci-static/istorerouter/icon/eye-close.png",Ft="/luci-static/istorerouter/icon/eye-on.png",Dt=N({__name:"wifi",setup(o){const t=w(!1),u=w([]),f=w(!0),i=w(!1),D=w(!1);(()=>E(this,null,function*(){D.value=!0;try{const{data:n}=yield g.Wireless.List.GET(),{error:r,result:a}=n;if(r)throw r;a!=null&&a.ifaces&&(u.value=a.ifaces.filter(p=>!p.isGuest).map(p=>ve(pe({},p),{hidden:p.hidden||!1,disabled:p.disabled||!1,isGuest:p.isGuest||!1,channel:p.channel||0,txpower:p.txpower||0})))}catch(n){console.log(n)}finally{D.value=!1}}))();const d=n=>{var r;return n.band==="2g"?"2.4G":(r=n.band)==null?void 0:r.toUpperCase()},c=(n,r)=>{var a;if(!!f.value&&r.band==="2g")for(let p=0;p{if(!!f.value&&r.band==="2g")for(let a=0;aE(this,null,function*(){if(t.value)return;t.value=!0;const n=$.Loading("\u914D\u7F6E\u4E2D...");try{const r={};for(let p=0;pD.value?b("v-if",!0):(_(),v("form",{key:0,onSubmit:M(l,["prevent"])},[Ye,(_(!0),v(k,null,Y(u.value,(a,p)=>(_(),v(k,{key:p},[e("div",Ze,[e("div",et,[e("span",null,A(d(a))+"Hz \u65E0\u7EBF\u540D\u79F0\uFF08SSID\uFF09",1)]),e("div",tt,[y(e("input",{type:"text",placeholder:`\u8BF7\u8F93\u5165 ${d(a)} WIFI \u540D\u79F0`,onInput:F=>c(F,a),"onUpdate:modelValue":F=>a.ssid=F,disabled:t.value,required:""},null,40,st),[[I,a.ssid,void 0,{trim:!0}]])])]),e("div",ut,[e("div",nt,[e("span",null,A(d(a))+"Hz \u65E0\u7EBF\u5BC6\u7801",1)]),e("div",ot,[y(e("input",{type:i.value?"text":"password",placeholder:`\u8BF7\u8F93\u5165 ${d(a)} WIFI \u5BC6\u7801`,onInput:F=>s(F,a),"onUpdate:modelValue":F=>a.key=F,disabled:t.value,required:""},null,40,at),[[Ae,a.key,void 0,{trim:!0}]]),e("img",{class:"seeIcon",src:i.value?ft:Ft,onClick:r[0]||(r[0]=F=>i.value=!i.value)},null,8,lt)])])],64))),128)),e("div",it,[e("label",null,[y(e("input",{type:"checkbox","onUpdate:modelValue":r[1]||(r[1]=a=>f.value=a),value:!f.value},null,8,ct),[[Ie,f.value]]),rt])]),dt,e("div",_t,[e("div",pt,[e("button",{class:"submit",disabled:t.value},"\u4FDD\u5B58\u914D\u7F6E",8,vt)])])],32))}});var ht=S(Dt,[]);const O=o=>(Z("data-v-355ecd95"),o=o(),ee(),o),mt=O(()=>e("div",{class:"",style:{height:"36px"}},null,-1)),wt=O(()=>e("div",{class:"form-item"},[e("div",{class:"form-item_desc"}," \u8BF7\u5C06 WiFi \u94FE\u63A5\u5230\u65B0\u7684\u65E0\u7EBFSSID ")],-1)),kt={class:"form-item"},Et={class:"form-item_title"},bt={class:"form-item_conn"},yt=["placeholder","onUpdate:modelValue"],Bt={class:"form-item"},Ct={class:"form-item_title"},$t={class:"form-item_conn"},gt=["type","placeholder","value"],It=["src"],At=O(()=>e("div",{class:"",style:{height:"36px"}},null,-1)),St={class:"form-item"},xt={key:0,class:"form-item_msg",style:{"text-align":"center"}},Pt=O(()=>e("div",{class:"form-item_msg",style:{"text-align":"center"}}," WiFi \u94FE\u63A5\u6210\u529F ",-1)),Nt="/luci-static/istorerouter/icon/eye-close.png",Wt="/luci-static/istorerouter/icon/eye-on.png",Ut=N({__name:"wifiStatus",setup(o){const t=R(he),u=w(!1),f=s=>{var l;return s.band==="2g"?"2.4G":(l=s.band)==null?void 0:l.toUpperCase()},i=w(!1),D=()=>E(this,null,function*(){if(!i.value)try{const{data:s}=yield g.Wireless.List.GET(),{error:l,result:n}=s;if(l)throw l;i.value=!0}catch(s){console.log(s)}finally{}}),h=()=>E(this,null,function*(){P()});let d;const c=()=>{d&&clearInterval(d)};return Se(()=>{setTimeout(()=>{D(),d=setInterval(()=>{D()},1e3)},3e3)}),xe(()=>{c()}),(s,l)=>(_(),v("form",{onSubmit:M(()=>{},["prevent"])},[mt,wt,(_(!0),v(k,null,Y(m(t),(n,r)=>(_(),v(k,{key:r},[e("div",kt,[e("div",Et,[e("span",null,A(f(n))+"Hz \u65E0\u7EBF\u540D\u79F0\uFF08SSID\uFF09",1)]),e("div",bt,[y(e("input",{type:"text",placeholder:`\u8BF7\u8F93\u5165 ${f(n)} WIFI \u540D\u79F0`,"onUpdate:modelValue":a=>n.ssid=a,disabled:"",required:""},null,8,yt),[[I,n.ssid,void 0,{trim:!0}]])])]),e("div",Bt,[e("div",Ct,[e("span",null,A(f(n))+"Hz \u65E0\u7EBF\u5BC6\u7801",1)]),e("div",$t,[e("input",{type:u.value?"text":"password",placeholder:`\u8BF7\u8F93\u5165 ${f(n)} WIFI \u5BC6\u7801`,value:n.key,disabled:"",required:""},null,8,gt),e("img",{class:"seeIcon",src:u.value?Nt:Wt,onClick:l[0]||(l[0]=a=>u.value=!u.value)},null,8,It)])])],64))),128)),At,e("div",St,[i.value?(_(),v(k,{key:1},[Pt,e("div",{class:"form-item_actions"},[e("button",{class:"submit",type:"button",onClick:h},"\u4E0B\u4E00\u6B65")])],64)):(_(),v("div",xt," \u7B49\u5F85 WiFi \u94FE\u63A5\u4E2D... "))])],32))}});var Vt=S(Ut,[["__scopeId","data-v-355ecd95"]]);const B=o=>(Z("data-v-3a156e70"),o=o(),ee(),o),Lt={class:"network"},Tt={class:"text-container"},Gt={class:"text-container_item"},Mt=B(()=>e("div",{class:"text-container_item_title"},[e("span",null,"\u8054\u7F51\u72B6\u6001:")],-1)),jt={class:"text-container_item_value"},qt={key:0},Ht={key:1},Ot={key:2},zt={key:3},Rt={key:4},Jt={class:"text-container_item"},Kt=B(()=>e("div",{class:"text-container_item_title"},[e("span",null,"\u8FDE\u63A5\u65B9\u5F0F:")],-1)),Qt={class:"text-container_item_value"},Xt={class:"text-container_item"},Yt=B(()=>e("div",{class:"text-container_item_title"},[e("span",null,"\u8054\u7F51\u65B9\u5F0F:")],-1)),Zt={class:"text-container_item_value"},es={class:"text-container_item"},ts=B(()=>e("div",{class:"text-container_item_title"},[e("span",null,"IPv4\u5730\u5740:")],-1)),ss={class:"text-container_item_value"},us={key:0,class:"text-container_item"},ns=B(()=>e("div",{class:"text-container_item_title"},[e("span",null,"IPv6\u5730\u5740:")],-1)),os={class:"text-container_item_value"},as={class:"text-container_item"},ls=B(()=>e("div",{class:"text-container_item_title"},[e("span",null,"DNS:")],-1)),is={class:"text-container_item_value"},cs={style:{width:"100%",display:"block"}},rs={class:"text-container_item"},ds=B(()=>e("div",{class:"text-container_item_title"},[e("span")],-1)),_s={class:"text-container_item_value"},ps={key:0,class:"manual-desc"},vs=B(()=>e("span",null,"\u65E0\u6CD5\u68C0\u6D4B\u5230\u7F51\u7EDC,\u53EF\u4EE5\u5230",-1)),fs=B(()=>e("span",null,"\u627E\u5230\u66F4\u591A\u914D\u7F6E",-1)),Fs={key:1,class:"manual-desc"},Ds=B(()=>e("span",null,"\u65E0\u6CD5\u8FDE\u63A5\u7F51\u7EDC\uFF0C\u68C0\u6D4B\u5230\u60A8\u7684 WAN \u53E3\u7F51\u7EBF\u672A\u63A5\u5165\uFF0C\u8BF7\u63A5\u5165\u540E\u91CD\u8BD5",-1)),hs=[Ds],ms=B(()=>e("div",{class:"manual-label"},[e("span",null,"\u4F7F\u7528\u4EE5\u4E0B\u65B9\u5F0F\u914D\u7F6E\u60A8\u7684\u7F51\u7EDC:")],-1)),ws=B(()=>e("span",null,"\u66F4\u591A\u8054\u7F51\u65B9\u5F0F\u8BF7\u524D\u5F80",-1)),ks=B(()=>e("span",null,"\u8F6F\u4EF6\u6E90\u9519\u8BEF,\u53EF\u4EE5\u5230",-1)),Es=B(()=>e("span",null,"\u627E\u5230\u66F4\u591A\u914D\u7F6E",-1)),bs=B(()=>e("div",{class:"manual-label"},[e("span",null,"\u4F7F\u7528\u4EE5\u4E0B\u65B9\u5F0F\u914D\u7F6E\u60A8\u7684\u7F51\u7EDC:")],-1)),ys=B(()=>e("span",null,"\u66F4\u591A\u8054\u7F51\u65B9\u5F0F\u8BF7\u524D\u5F80",-1)),Bs=B(()=>e("div",{class:"manual-desc"},[e("span",null,"\u65E0\u6CD5\u8FDE\u63A5\u7F51\u7EDC\uFF0CDNS \u9519\u8BEF\uFF0C\u8BF7\u624B\u52A8\u8BBE\u7F6E DNS")],-1)),Cs=N({__name:"network",setup(o){const t=r=>r.toUpperCase(),u=r=>{switch(r){case"pppoe":return"\u62E8\u53F7\u4E0A\u7F51";case"static":return"\u9759\u6001\u7F51\u7EDC";case"dhcp":return"DHCP"}},f=r=>{switch(r){case"manual":return"\u624B\u52A8\u914D\u7F6E";case"auto":return"\u81EA\u52A8\u83B7\u53D6";default:return""}},i=R(me);console.log(i==null?void 0:i.value);const D=R(ke),h=()=>{X()},d=()=>{Ke()},c=()=>{Xe()},s=()=>{Qe()},l=()=>{P()},n=()=>{X()};return(r,a)=>{var p,F,L,T,G,te,se,ue,ne,oe,ae,le,ie,ce,re;return _(),v("div",Lt,[b(" \u5DF2\u94FE\u63A5\u4E92\u8054\u7F51 "),e("div",Tt,[e("div",Gt,[Mt,e("div",jt,[((p=m(i))==null?void 0:p.networkInfo)=="netSuccess"?(_(),v("span",qt," \u5DF2\u8054\u7F51 ")):((F=m(i))==null?void 0:F.networkInfo)=="dnsFailed"?(_(),v("span",Ht," DNS\u9519\u8BEF,\u8BF7\u624B\u52A8\u8BBE\u7F6EDNS ")):((L=m(i))==null?void 0:L.networkInfo)=="softSourceFailed"?(_(),v("span",Ot," \u8F6F\u4EF6\u6E90\u89E3\u6790\u9519\u8BEF ")):((T=m(i))==null?void 0:T.networkInfo)=="netFailed"?(_(),v("span",zt," \u672A\u8054\u7F51 ")):(_(),v("span",Rt," \u68C0\u6D4B\u4E2D "))])]),e("div",Jt,[Kt,e("div",Qt,A(t(((G=m(i))==null?void 0:G.defaultInterface)||"")),1)]),e("div",Xt,[Yt,e("div",Zt,A(u(((te=m(i))==null?void 0:te.proto)||"")),1)]),e("div",es,[ts,e("div",ss,A((se=m(i))==null?void 0:se.ipv4addr),1)]),(ue=m(i))!=null&&ue.ipv6addr?(_(),v("div",us,[ns,e("div",os,A(m(i).ipv6addr),1)])):b("v-if",!0),e("div",as,[ls,e("div",is,[e("p",null,A(f((ne=m(i))==null?void 0:ne.dnsProto)),1),e("p",cs,A((ae=(oe=m(i))==null?void 0:oe.dnsList)==null?void 0:ae.join(", ")),1)])]),e("div",rs,[ds,e("div",_s,[b(" \u5982\u679C\u672A\u8054\u7F51 "),((le=m(i))==null?void 0:le.networkInfo)=="netFailed"?(_(),v(k,{key:0},[m(D)?(_(),v("div",ps,[vs,J(),e("a",{onClick:h},"\u7F51\u7EDC\u914D\u7F6E"),fs])):(_(),v("div",Fs,[...hs])),e("div",{class:"network-actions"},[e("button",{onClick:l,class:"reload"},"\u91CD\u8BD5")]),m(D)?(_(),v(k,{key:2},[ms,e("div",{class:"manual-links"},[e("li",null,[e("a",{onClick:c},"\u5BBD\u5E26\u62E8\u53F7(PPPOE)")]),e("li",null,[e("a",{onClick:s},"\u8FDE\u63A5\u5230\u73B0\u6709\u8DEF\u7531\u5668(DHCP)")]),e("li",null,[ws,e("a",{onClick:h},"\u7F51\u7EDC\u914D\u7F6E")])])],64)):b("v-if",!0)],64)):((ie=m(i))==null?void 0:ie.networkInfo)=="softSourceFailed"?(_(),v(k,{key:1},[b(" \u8F6F\u4EF6\u6E90\u9519\u8BEF "),e("div",{class:"manual-desc"},[ks,J(),e("a",{onClick:h},"\u7F51\u7EDC\u914D\u7F6E"),Es]),e("div",{class:"network-actions"},[e("button",{onClick:l,class:"reload"},"\u91CD\u8BD5")]),m(D)?(_(),v(k,{key:0},[bs,e("div",{class:"manual-links"},[e("li",null,[e("a",{onClick:c},"\u5BBD\u5E26\u62E8\u53F7(PPPOE)")]),e("li",null,[e("a",{onClick:s},"\u8FDE\u63A5\u5230\u73B0\u6709\u8DEF\u7531\u5668(DHCP)")]),e("li",null,[ys,e("a",{onClick:h},"\u7F51\u7EDC\u914D\u7F6E")])])],64)):b("v-if",!0)],64)):((ce=m(i))==null?void 0:ce.networkInfo)=="netSuccess"?(_(),v(k,{key:2},[b(" \u5DF2\u8054\u7F51 "),b(`
+ \u5DF2\u6210\u529F\u8FDE\u63A5\u5230\u4E92\u8054\u7F51,\u60A8\u4E5F\u53EF\u4EE5\u5230 \u7F51\u7EDC\u914D\u7F6E\u627E\u5230\u66F4\u591A\u914D\u7F6E +
`),e("div",{class:"network-actions"},[e("button",{class:"close",onClick:n},"\u5173\u95ED")])],64)):((re=m(i))==null?void 0:re.networkInfo)=="dnsFailed"?(_(),v(k,{key:3},[b(" dns\u9519\u8BEF "),Bs,e("div",{class:"network-actions"},[e("button",{class:"close",onClick:d},"DNS\u914D\u7F6E"),e("button",{onClick:l,class:"reload"},"\u91CD\u8BD5")])],64)):(_(),v(k,{key:4},[b(" \u68C0\u6D4B\u4E2D "),e("div",{class:"network-actions"},[e("button",{onClick:l,class:"reload"},"\u91CD\u8BD5")])],64))])])])])}}});var $s=S(Cs,[["__scopeId","data-v-3a156e70"]]);const Ee=o=>(Z("data-v-584fef14"),o=o(),ee(),o),gs={class:"network"},Is=Ee(()=>e("div",{class:"network-desc"}," \u8FDE\u63A5\u7F51\u7EDC\u8D85\u65F6 ",-1)),As=Ee(()=>e("br",null,null,-1)),Ss=N({__name:"networkLoad",setup(o){const t=w(),u=w(!0),f=w(!1),i=a=>E(this,null,function*(){yield new Promise(p=>{setTimeout(()=>{p()},a)})});let D=0;const h=()=>E(this,null,function*(){D<5?(yield i(3e3),yield l(),D++):f.value=!0}),d=w([]),c=()=>E(this,null,function*(){const{data:a}=yield g.Network.PortList.GET(),{result:p,error:F}=a;if(F)throw F;d.value=(p==null?void 0:p.ports)||[]}),s=()=>E(this,null,function*(){var a,p;try{const{data:F}=yield g.Network.Status.SetupFinish();if(F.result)switch(t.value=F.result,((a=t.value)==null?void 0:a.networkInfo)==="netFailed"&&(yield c()),(p=t.value)==null?void 0:p.networkInfo){case"netFailed":case"netSuccess":case"dnsFailed":case"softSourceFailed":Je(t.value,d.value);break;default:yield h()}else yield h()}catch(F){}}),l=()=>E(this,null,function*(){try{$.Clear()}catch(p){}u.value=!0;const a=$.Loading("\u6B63\u5728\u68C0\u6D4B\u7F51\u7EDC");try{yield s()}catch(p){}finally{a.Close(),u.value=!1}});l();const n=()=>E(this,null,function*(){f.value=!1,D=0,yield l()}),r=()=>{X()};return(a,p)=>(_(),v("div",gs,[f.value?(_(),v(k,{key:0},[Is,e("div",{class:"network-actions"},[e("button",{onClick:n,class:"reload"},"\u91CD\u8BD5"),J(),As,e("button",{class:"close",onClick:r},"\u624B\u52A8\u914D\u7F6E")])],64)):b("v-if",!0)]))}});var xs=S(Ss,[["__scopeId","data-v-584fef14"]]);const Ps=e("div",{class:"label-name"},[e("span",null,"DNS\u9009\u9879")],-1),Ns={class:"label-value"},Ws=e("option",{value:"auto"},"\u4F7F\u7528\u8FD0\u8425\u5546\u63D0\u4F9B\u7684DNS",-1),Us=e("option",{value:"manual"},"\u81EA\u5B9A\u4E49DNS",-1),Vs=[Ws,Us],Ls=e("div",{class:"label-name"},[e("span",null,"DNS\u670D\u52A1\u5668\u5730\u5740")],-1),Ts={class:"label-value"},Gs=e("div",{class:"label-name"}," \u5907\u7528DNS\u670D\u52A1\u5668\u5730\u5740 ",-1),Ms={class:"label-value"},js={class:"label-btns"},qs=["disabled"],Hs=["disabled"],Os=N({__name:"networkDns",setup(o){const t=U({interfaceName:"",dnsProto:"auto",manualDnsIp:[]}),u=U({dns1:"",dns2:""}),f=w(!1);(()=>E(this,null,function*(){f.value=!0;try{const d=yield g.Guide.DnsConfig.GET();if(d!=null&&d.data){const{result:c}=d.data;if(c){t.dnsProto=c.dnsProto,t.manualDnsIp=c.manualDnsIp||[];for(let s=0;sE(this,null,function*(){let d={};switch(t.dnsProto){case"auto":break;case"manual":d.manualDnsIp=[],t.manualDnsIp!=null&&t.manualDnsIp.length>0?d.manualDnsIp=t.manualDnsIp:(d.manualDnsIp.push(u.dns1),u.dns2&&d.manualDnsIp.push(u.dns2));break}d.dnsProto=t.dnsProto,d.interfaceName=t.interfaceName;const c=$.Loading("\u914D\u7F6E\u4E2D...");try{const s=yield g.Guide.DnsConfig.POST(d);if(s!=null&&s.data){const{success:l,error:n}=s==null?void 0:s.data;if(n)throw n;(l==null||l==0)&&P()}}catch(s){$.Error(`${s}`)}c.Close()}),h=()=>{P()};return(d,c)=>(_(),v("form",{class:"form-container",onSubmit:M(D,["prevent"])},[Ps,e("div",Ns,[y(e("select",{"onUpdate:modelValue":c[0]||(c[0]=s=>t.dnsProto=s)},[...Vs],512),[[K,t.dnsProto]])]),t.dnsProto=="manual"?(_(),v(k,{key:0},[Ls,e("div",Ts,[y(e("input",{type:"text",placeholder:"\u8BF7\u8F93\u5165 dns \u5730\u5740","onUpdate:modelValue":c[1]||(c[1]=s=>u.dns1=s),required:""},null,512),[[I,u.dns1,void 0,{trim:!0}]])]),Gs,e("div",Ms,[y(e("input",{type:"text",placeholder:"\u8BF7\u8F93\u5165\u5907\u7528 dns \u5730\u5740","onUpdate:modelValue":c[2]||(c[2]=s=>u.dns2=s)},null,512),[[I,u.dns2,void 0,{trim:!0}]])])],64)):b("v-if",!0),e("div",js,[e("button",{class:"back",type:"button",onClick:h,disabled:f.value},"\u8FD4\u56DE",8,qs),e("button",{class:"sumbit",disabled:f.value},"\u4FDD\u5B58",8,Hs)])],32))}});var zs=S(Os,[]);const Rs=e("div",{class:"label-info"}," \u8BF7\u786E\u4FDD\u60A8\u5DF2\u5C06\u8DEF\u7531 WAN \u53E3\u8FDE\u63A5\u5230\u4E0A\u7EA7\u8DEF\u7531\u5C40\u57DF\u7F51\uFF08 LAN \uFF09\u63A5\u53E3 ",-1),Js=e("div",{class:"label-name"},[e("span",null,"WAN \u63A5\u53E3\u914D\u7F6E\u65B9\u5F0F")],-1),Ks={class:"label-value"},Qs=e("option",{value:"dhcp"},"\u81EA\u52A8\u83B7\u53D6 IP \u5730\u5740\uFF08DHCP\uFF09",-1),Xs=e("option",{value:"static"},"\u9759\u6001 IP \u5730\u5740",-1),Ys=[Qs,Xs],Zs=e("div",{class:"label-name"},[e("span",null,"IP\u5730\u5740")],-1),eu={class:"label-value"},tu=e("div",{class:"label-name"},[e("span",null,"\u5B50\u7F51\u63A9\u7801")],-1),su={class:"label-value"},uu=e("div",{class:"label-name"},[e("span",null,"\u7F51\u5173\u5730\u5740")],-1),nu={class:"label-value"},ou=e("div",{class:"label-name"},[e("span",null,"DNS \u914D\u7F6E\u65B9\u5F0F")],-1),au={class:"label-value"},lu=e("option",{value:"auto"},"\u81EA\u52A8\u83B7\u53D6\uFF08DHCP\uFF09",-1),iu=e("option",{value:"manual"},"\u624B\u52A8\u914D\u7F6E",-1),cu=[lu,iu],ru=e("div",{class:"label-name"},[e("span",null,"DNS\u670D\u52A1\u5668")],-1),du={class:"label-value"},_u=["onUpdate:modelValue"],pu=e("div",{class:"label-name"},[e("span",null,"DNS\u670D\u52A1\u5668")],-1),vu={class:"label-value"},fu=e("div",{class:"label-name"}," \u5907\u7528DNS\u670D\u52A1\u5668 ",-1),Fu={class:"label-value"},Du={class:"label-btns"},hu=["disabled"],mu=["disabled"],wu=N({__name:"networkDhcp",setup(o){const t=U({enableLanDhcp:!1,wanProto:"dhcp",dnsProto:"auto",staticIp:"",subnetMask:"",manualDnsIp:[],gateway:""}),u=U({staticIP:""}),f=U({dnsAddr1:"",dnsAddr2:""}),i=w(!1);(()=>E(this,null,function*(){i.value=!0;try{const s=yield Promise.all([g.Guide.ClientModel.GET(),g.Network.Status.SetupFinish()]);if(s[0]){const l=s[0],{result:n,error:r}=l.data;if(n){const{wanProto:a,dnsProto:p,staticIp:F,subnetMask:L,gateway:T,manualDnsIp:G}=n;a&&(t.wanProto=a),p&&(t.dnsProto=p),F&&(t.staticIp=F),L&&(t.subnetMask=L),T&&(t.gateway=T),G&&(t.manualDnsIp=G||[])}if(r)throw r}if(s[1]){const l=s[1],{result:n,error:r}=l.data;if(n&&n.ipv4addr&&(u.staticIP=n.ipv4addr),r)throw r}}catch(s){$.Error(`${s}`)}i.value=!1}))();const h=s=>{s.target.value=="static"&&((t.staticIp==null||t.staticIp=="")&&(t.staticIp=u.staticIP),(t.subnetMask==null||t.subnetMask=="")&&(t.subnetMask="255.255.255.0"))},d=()=>E(this,null,function*(){const s={};switch(t.wanProto){case"dhcp":break;case"static":s.staticIp=t.staticIp,s.subnetMask=t.subnetMask,s.gateway=t.gateway||"";break}switch(t.dnsProto){case"auto":break;case"manual":s.manualDnsIp=[],t.manualDnsIp!=null&&t.manualDnsIp.length>0?s.manualDnsIp=t.manualDnsIp:(s.manualDnsIp.push(f.dnsAddr1),f.dnsAddr2&&s.manualDnsIp.push(f.dnsAddr2));break}s.dnsProto=t.dnsProto,s.wanProto=t.wanProto,i.value=!0;const l=$.Loading("\u4FDD\u5B58\u4E2D...");try{const n=yield g.Guide.ClientModel.POST(s);if(n!=null&&n.data){const{success:r,error:a}=n==null?void 0:n.data;if(a)throw a;(r==null||r==0)&&P()}}catch(n){$.Error(`${n}`)}i.value=!1,l.Close()}),c=()=>{P()};return(s,l)=>(_(),v("form",{class:"form-container",onSubmit:M(d,["prevent"])},[Rs,Js,e("div",Ks,[y(e("select",{"onUpdate:modelValue":l[0]||(l[0]=n=>t.wanProto=n),onInput:h},[...Ys],544),[[K,t.wanProto]])]),t.wanProto=="static"?(_(),v(k,{key:0},[Zs,e("div",eu,[y(e("input",{type:"text",placeholder:"ip\u5730\u5740","onUpdate:modelValue":l[1]||(l[1]=n=>t.staticIp=n),required:""},null,512),[[I,t.staticIp,void 0,{trim:!0}]])]),tu,e("div",su,[y(e("input",{type:"text",placeholder:"\u5B50\u7F51\u63A9\u7801\u5730\u5740","onUpdate:modelValue":l[2]||(l[2]=n=>t.subnetMask=n),required:""},null,512),[[I,t.subnetMask,void 0,{trim:!0}]])]),uu,e("div",nu,[y(e("input",{type:"text",placeholder:"\u7F51\u5173\u5730\u5740","onUpdate:modelValue":l[3]||(l[3]=n=>t.gateway=n),required:""},null,512),[[I,t.gateway,void 0,{trim:!0}]])])],64)):b("v-if",!0),ou,e("div",au,[y(e("select",{"onUpdate:modelValue":l[4]||(l[4]=n=>t.dnsProto=n)},[...cu],512),[[K,t.dnsProto]])]),t.dnsProto=="manual"?(_(),v(k,{key:1},[t.manualDnsIp!=null&&t.manualDnsIp.length>0?(_(!0),v(k,{key:0},Y(t.manualDnsIp,(n,r)=>(_(),v(k,null,[ru,e("div",du,[y(e("input",{type:"text",placeholder:"DNS\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":a=>t.manualDnsIp[r]=a},null,8,_u),[[I,t.manualDnsIp[r],void 0,{trim:!0}]])])],64))),256)):(_(),v(k,{key:1},[pu,e("div",vu,[y(e("input",{type:"text",placeholder:"\u4E3BDNS\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":l[5]||(l[5]=n=>f.dnsAddr1=n),required:""},null,512),[[I,f.dnsAddr1,void 0,{trim:!0}]])]),fu,e("div",Fu,[y(e("input",{type:"text",placeholder:"\u5907\u7528DNS\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":l[6]||(l[6]=n=>f.dnsAddr2=n)},null,512),[[I,f.dnsAddr2,void 0,{trim:!0}]])])],64))],64)):b("v-if",!0),e("div",Du,[e("button",{class:"back",type:"button",onClick:c,disabled:i.value},"\u8FD4\u56DE",8,hu),e("button",{class:"sumbit",disabled:i.value},"\u4FDD\u5B58",8,mu)])],32))}});var ku=S(wu,[]);const Eu=e("div",{class:"label-info"}," \u8BF7\u786E\u4FDD\u60A8\u5DF2\u5C06\u8DEF\u7531 WAN \u53E3\u8FDE\u63A5\u5230\u5149\u732B ",-1),bu=e("div",{class:"label-name"},[e("span",null,"\u8D26\u53F7")],-1),yu={class:"label-value"},Bu=e("div",{class:"label-name"},[e("span",null,"\u5BC6\u7801")],-1),Cu={class:"label-value"},$u={class:"label-btns"},gu=["disabled"],Iu=["disabled"],Au=N({__name:"networkPppoe",setup(o){const t=U({account:"",password:""}),u=w(!1),f=w(!1);(()=>E(this,null,function*(){u.value=!0;try{const d=yield g.Guide.Pppoe.GET(),{result:c}=d.data;c&&(t.account=c.account||"",t.password=c.password||"")}catch(d){$.Error(`${d}`)}finally{}u.value=!1,f.value=!0}))();const D=()=>E(this,null,function*(){if(t.account==""){$.Warning("\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A");return}if(t.password==""){$.Warning("\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A");return}u.value=!0;const d=$.Loading("\u4FDD\u5B58\u4E2D...");try{const c=yield g.Guide.Pppoe.POST({account:t.account,password:t.password});if(c.data){const{error:s,success:l}=c.data;if(s)throw s;(l==null||l==0)&&P()}}catch(c){$.Error(`${c}`)}finally{}u.value=!1,d.Close()}),h=()=>{P()};return(d,c)=>(_(),v("form",{class:"form-container",onSubmit:M(D,["prevent"])},[Eu,bu,e("div",yu,[y(e("input",{type:"text",placeholder:"\u5BBD\u5E26\u8D26\u53F7","onUpdate:modelValue":c[0]||(c[0]=s=>t.account=s),required:""},null,512),[[I,t.account,void 0,{trim:!0}]])]),Bu,e("div",Cu,[y(e("input",{type:"password",placeholder:"\u5BBD\u5E26\u5BC6\u7801","onUpdate:modelValue":c[1]||(c[1]=s=>t.password=s),required:""},null,512),[[I,t.password,void 0,{trim:!0}]])]),e("div",$u,[e("button",{class:"back",type:"button",onClick:h,disabled:u.value},"\u8FD4\u56DE",8,gu),e("button",{class:"sumbit",disabled:u.value},"\u4FDD\u5B58",8,Iu)])],32))}});var Su=S(Au,[]);const xu=N({__name:"index",setup(o){j(he,Ge),j(me,Me),j(je,qe),j(ke,He);const t=V(()=>{switch(x.value){case C.wifi:return ht;case C.wifiStatus:return Vt;case C.network:return $s;case C.networkLoad:return xs;case C.networkDns:return zs;case C.networkDhcp:return ku;case C.networkPppoe:return Su}return Te}),u=V(()=>{switch(x.value){case C.wifi:return"\u65E0\u7EBF\u7F51\u7EDC\u914D\u7F6E";case C.wifiStatus:return"\u65E0\u7EBF\u7F51\u7EDC\u72B6\u6001";case C.network:return"\u7F51\u7EDC\u72B6\u6001";case C.networkLoad:return"\u7F51\u7EDC\u68C0\u6D4B";case C.networkDns:return"DNS\u914D\u7F6E";case C.networkDhcp:return"DHCP\u914D\u7F6E";case C.networkPppoe:return"\u62E8\u53F7\u914D\u7F6E"}return""}),f=()=>E(this,null,function*(){try{const{data:D}=yield g.Guide.Setup.GET(),{result:h}=D;h&&h.need&&(q.value=!0,h.wifi?ze():P())}catch(D){console.log(D)}}),i=()=>{q.value=!1};return f(),(D,h)=>m(q)?(_(),H(We,{key:0,title:u.value,width:"860px",beforeClose:i},{default:Q(()=>[(_(),H(Fe(t.value)))]),_:1},8,["title"])):b("v-if",!0)}});var Pu=S(xu,[["__scopeId","data-v-4a856d94"]]);const Nu={class:"body"},Wu=N({__name:"index",setup(o){const t=Pe();return(u,f)=>{const i=fe("layout-header"),D=fe("router-view");return _(),v("div",{id:"main",key:m(t).reloadCount},[e("div",Nu,[z(i),z(D,null,{default:Q(h=>[(_(),H(Ne,null,{default:Q(()=>[h&&h.Component?(_(),H(Fe(h.Component),{key:h.route.path})):b("v-if",!0)]),_:2},1024))]),_:1}),b(" "),z(Pu)])])}}});var Tu=S(Wu,[["__scopeId","data-v-fee719e0"]]);export{Tu as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.43b6cc91.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.43b6cc91.js new file mode 100644 index 00000000..19f29cff --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.43b6cc91.js @@ -0,0 +1 @@ +var q=Object.defineProperty,j=Object.defineProperties;var H=Object.getOwnPropertyDescriptors;var P=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var I=(v,u,d)=>u in v?q(v,u,{enumerable:!0,configurable:!0,writable:!0,value:d}):v[u]=d,G=(v,u)=>{for(var d in u||(u={}))O.call(u,d)&&I(v,d,u[d]);if(P)for(var d of P(u))R.call(u,d)&&I(v,d,u[d]);return v},U=(v,u)=>j(v,H(u));var F=(v,u,d)=>new Promise((s,_)=>{var n=f=>{try{b(d.next(f))}catch(h){_(h)}},w=f=>{try{b(d.throw(f))}catch(h){_(h)}},b=f=>f.done?s(f.value):Promise.resolve(f.value).then(n,w);b((d=d.apply(v,u)).next())});import{d as N,r as D,l as K,o as l,c as i,f as e,w as g,Q as T,u as p,s as M,j as L,y as k,k as Q,h as c,F as E,e as V,g as $,T as W,t as C,p as J,q as X,R as Y,i as A,_ as z,z as Z,U as ee,V as se,P as te,W as ae,A as oe}from"./index.js";const o=v=>(J("data-v-6cbcd95a"),v=v(),X(),v),le={class:"form-item"},ie=o(()=>e("div",{class:"label-name"},[e("span",null,"\u542F\u7528Wi-Fi")],-1)),ne={class:"label-value"},de={class:"label-flex"},ue=["disabled"],ce=["disabled"],ve={class:"form-item"},re=o(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi\u540D\u79F0\uFF08SSID\uFF09")],-1)),_e={class:"label-value"},pe=["disabled"],be={class:"form-item"},he=o(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi \u5B89\u5168\u6027")],-1)),fe={class:"label-value"},me=["disabled"],ye=Y('',5),ge=[ye],we={class:"form-item"},Fe=o(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi \u5BC6\u7801")],-1)),ke={class:"label-value"},xe=["type","disabled"],Se=["src"],De={class:"form-item"},Ee=o(()=>e("div",{class:"label-name"},[e("span",null,"SSID \u53EF\u89C1\u6027")],-1)),Ae={class:"label-value"},Be=["disabled"],We=o(()=>e("option",{value:!1},"\u663E\u793A",-1)),Ve=o(()=>e("option",{value:!0},"\u9690\u85CF",-1)),Ce=[We,Ve],Pe={key:0,class:"form-item"},Ie=o(()=>e("div",{class:"label-name"},[e("span",null,"\u53D1\u5C04\u529F\u7387")],-1)),Ge={class:"label-value"},Ue=["disabled"],Te=o(()=>e("option",{value:100},"\u6700\u5927",-1)),Me=o(()=>e("option",{value:70},"\u9AD8",-1)),Ne=o(()=>e("option",{value:50},"\u4E2D",-1)),$e=o(()=>e("option",{value:30},"\u4F4E",-1)),ze=[Te,Me,Ne,$e],qe={key:1,class:"form-item"},je=o(()=>e("div",{class:"label-name"},[e("span",null,"\u65E0\u7EBF\u6A21\u5F0F")],-1)),He={class:"label-value"},Oe=["disabled"],Re={key:0,value:"11n/ax"},Ke={key:1,value:"11g/n/ax"},Le={key:2,value:"11b/g/n/ax"},Qe={key:3,value:"11b/g/n"},Je={key:4,value:"11ac/ax"},Xe={key:5,value:"11n/ac/ax"},Ye={key:6,value:"11a/n/ac/ax"},Ze={key:7,value:"11a/n/ac"},es={key:2,class:"form-item"},ss=o(()=>e("div",{class:"label-name"},[e("span",null,"\u9891\u5BBD")],-1)),ts={class:"label-value"},as=["disabled"],os=o(()=>e("option",{value:"20"},"20 MHz",-1)),ls=o(()=>e("option",{value:"40"},"40 MHz",-1)),is={key:0,value:"auto"},ns={key:1,value:"80"},ds={key:2,value:"160"},us={key:3,class:"form-item"},cs=o(()=>e("div",{class:"label-name"},[e("span",null,"\u4FE1\u9053")],-1)),vs={class:"label-value"},rs=["disabled"],_s=o(()=>e("option",{value:0},"\u81EA\u52A8",-1)),ps=["value"],bs=["disabled"],hs=o(()=>e("option",{value:0},"\u81EA\u52A8",-1)),fs=o(()=>e("option",{value:36},"36",-1)),ms=o(()=>e("option",{value:40},"40",-1)),ys=o(()=>e("option",{value:44},"44",-1)),gs=o(()=>e("option",{value:48},"48",-1)),ws=o(()=>e("option",{value:52},"52(DFS)",-1)),Fs=o(()=>e("option",{value:56},"56(DFS)",-1)),ks=o(()=>e("option",{value:60},"60(DFS)",-1)),xs=o(()=>e("option",{value:64},"64(DFS)",-1)),Ss=o(()=>e("option",{value:149},"149",-1)),Ds=o(()=>e("option",{value:153},"153",-1)),Es=o(()=>e("option",{value:157},"157",-1)),As=o(()=>e("option",{value:161},"161",-1)),Bs=[hs,fs,ms,ys,gs,ws,Fs,ks,xs,Ss,Ds,Es,As],Ws={class:"label-btns"},Vs=["disabled"],Cs="/luci-static/istorerouter/icon/eye-close.png",Ps="/luci-static/istorerouter/icon/eye-on.png",Is=N({__name:"form",props:{data:{type:null,required:!0}},emits:["getData"],setup(v,{emit:u}){const d=v,s=D(Object.assign({},d.data)),_=u,n=K("disabled"),w=D(!0),b=()=>F(this,null,function*(){if(s.value.txpower===d.data.txpower)return;const{data:m}=yield A.Wireless.Power.POST({device:s.value.device||"",txpower:s.value.txpower||0}),{error:a}=m;if(a)throw a}),f=()=>F(this,null,function*(){if(s.value.disabled===d.data.disabled)return;const{data:m}=yield A.Wireless.Switch.POST({ifaceName:s.value.ifaceName||"",enable:!s.value.disabled}),{error:a}=m;if(a)throw a}),h=()=>F(this,null,function*(){const{data:m}=yield A.Wireless.Edit.POST(s.value),{error:a,success:t}=m;if(a)throw a;(t==null||t==0)&&W.Success("\u914D\u7F6E\u5B8C\u6210")}),x=()=>F(this,null,function*(){if(n.value)return;n.value=!0;const m=W.Loading("\u914D\u7F6E\u4E2D...");try{yield b(),yield h(),yield f(),yield _("getData")}catch(a){W.Error(`${a}`)}finally{m.Close(),n.value=!1}});return(m,a)=>(l(),i("form",{class:"form-container",onSubmit:$(x,["prevent"])},[e("div",le,[ie,e("div",ne,[e("div",de,[e("label",null,[g(e("input",{type:"radio",value:!1,"onUpdate:modelValue":a[0]||(a[0]=t=>s.value.disabled=t),disabled:p(n)},null,8,ue),[[T,s.value.disabled]]),M(" \u5F00\u542F ")]),e("label",null,[g(e("input",{type:"radio",value:!0,"onUpdate:modelValue":a[1]||(a[1]=t=>s.value.disabled=t),disabled:p(n)},null,8,ce),[[T,s.value.disabled]]),M(" \u5173\u95ED ")])])])]),e("div",ve,[re,e("div",_e,[g(e("input",{"onUpdate:modelValue":a[2]||(a[2]=t=>s.value.ssid=t),disabled:p(n),placeholder:"\u8BF7\u8F93\u5165WIFI\u540D\u79F0"},null,8,pe),[[L,s.value.ssid]])])]),e("div",be,[he,e("div",fe,[g(e("select",{"onUpdate:modelValue":a[3]||(a[3]=t=>s.value.encryption=t),disabled:p(n)},[...ge],8,me),[[k,s.value.encryption]])])]),e("div",we,[Fe,e("div",ke,[g(e("input",{"onUpdate:modelValue":a[4]||(a[4]=t=>s.value.key=t),type:w.value?"password":"",disabled:p(n),placeholder:"\u8BF7\u8F93\u5165WIFI\u5BC6\u7801"},null,8,xe),[[Q,s.value.key]]),p(n)?c("v-if",!0):(l(),i("img",{key:0,class:"seeIcon",src:w.value?Ps:Cs,onClick:a[5]||(a[5]=t=>w.value=!w.value)},null,8,Se))])]),e("div",De,[Ee,e("div",Ae,[g(e("select",{"onUpdate:modelValue":a[6]||(a[6]=t=>s.value.hidden=t),disabled:p(n)},[...Ce],8,Be),[[k,s.value.hidden]])])]),s.value.isGuest?c("v-if",!0):(l(),i("div",Pe,[Ie,e("div",Ge,[g(e("select",{"onUpdate:modelValue":a[7]||(a[7]=t=>s.value.txpower=t),disabled:p(n)},[...ze],8,Ue),[[k,s.value.txpower]])])])),s.value.isGuest?c("v-if",!0):(l(),i("div",qe,[je,e("div",He,[g(e("select",{"onUpdate:modelValue":a[8]||(a[8]=t=>s.value.hwmode=t),disabled:p(n)},[s.value.band==="2g"?(l(),i("option",Re," 11n/ax ")):c("v-if",!0),s.value.band==="2g"?(l(),i("option",Ke," 11g/n/ax ")):c("v-if",!0),s.value.band==="2g"?(l(),i("option",Le," 11b/g/n/ax ")):c("v-if",!0),s.value.band==="2g"?(l(),i("option",Qe," 11b/g/n ")):c("v-if",!0),s.value.band==="5g"?(l(),i("option",Je," 11ac/ax ")):c("v-if",!0),s.value.band==="5g"?(l(),i("option",Xe," 11n/ac/ax ")):c("v-if",!0),s.value.band==="5g"?(l(),i("option",Ye," 11a/n/ac/ax ")):c("v-if",!0),s.value.band==="5g"?(l(),i("option",Ze," 11b/g/n ")):c("v-if",!0)],8,Oe),[[k,s.value.hwmode]])])])),s.value.isGuest?c("v-if",!0):(l(),i("div",es,[ss,e("div",ts,[g(e("select",{"onUpdate:modelValue":a[9]||(a[9]=t=>s.value.htmode=t),disabled:p(n)},[os,ls,s.value.band==="2g"?(l(),i("option",is," 20/40 MHz ")):c("v-if",!0),s.value.band==="5g"?(l(),i("option",ns," 80 MHz ")):c("v-if",!0),s.value.band==="5g"?(l(),i("option",ds," 160 MHz ")):c("v-if",!0)],8,as),[[k,s.value.htmode]])])])),s.value.isGuest?c("v-if",!0):(l(),i("div",us,[cs,e("div",vs,[s.value.band==="2g"?g((l(),i("select",{key:0,"onUpdate:modelValue":a[10]||(a[10]=t=>s.value.channel=t),disabled:p(n)},[_s,(l(),i(E,null,V(13,t=>e("option",{value:t},C(t),9,ps)),64))],8,rs)),[[k,s.value.channel]]):c("v-if",!0),s.value.band==="5g"?g((l(),i("select",{key:1,"onUpdate:modelValue":a[11]||(a[11]=t=>s.value.channel=t),disabled:p(n)},[...Bs],8,bs)),[[k,s.value.channel]]):c("v-if",!0)])])),e("div",Ws,[e("button",{class:"sumit btn primary-btn",disabled:p(n),onClick:x},"\u4FDD\u5B58\u914D\u7F6E",8,Vs)])],32))}});var Gs=z(Is,[["__scopeId","data-v-6cbcd95a"]]);const Us={id:"page",class:"page-container"},Ts={class:"page-flex"},Ms={class:"page-sidebar"},Ns=["onClick"],$s={class:"page-main"},zs=N({__name:"index",setup(v){return F(this,null,function*(){var a;let u,d;const s=D(!1);Z("disabled",s);const _=D([]),n=ee(),w=se(),b=D(String((a=n==null?void 0:n.query)==null?void 0:a.tab)),f=t=>{var S;return t.band==="2g"?"2.4G":(S=t.band)==null?void 0:S.toUpperCase()},h=t=>t.isGuest?t.band+"_Guest":t.band,x=t=>{s.value||(b.value=h(t),b.value!==n.query.tab&&w.push({query:{tab:b.value}}))},m=()=>F(this,null,function*(){try{const{data:t}=yield A.Wireless.List.GET(),{error:S,result:r}=t;if(S)throw S;r!=null&&r.ifaces&&(_.value=r.ifaces.map(y=>U(G({},y),{hidden:y.hidden||!1,disabled:y.disabled||!1,isGuest:y.isGuest||!1,channel:y.channel||0,txpower:y.txpower||0})));let B=!1;for(let y=0;y<_.value.length;y++)if(h(_.value[y])===b.value){x(_.value[y]),B=!0;break}!B&&_.value.length>0&&x(_.value[0])}catch(t){console.log(t)}});return[u,d]=te(()=>m()),yield u,d(),(t,S)=>(l(),i("div",Us,[e("div",Ts,[e("div",Ms,[(l(!0),i(E,null,V(_.value,r=>(l(),i("div",{key:h(r),class:ae(b.value===h(r)?"item activeItem":"item"),onClick:$(B=>x(r),["stop"])},C(f(r))+" "+C(r.isGuest?" \u8BBF\u5BA2":"")+" Wi-Fi ",11,Ns))),128))]),e("div",$s,[(l(!0),i(E,null,V(_.value,r=>(l(),i(E,{key:h(r)},[b.value===h(r)?(l(),oe(Gs,{key:0,data:r,onGetData:m},null,8,["data"])):c("v-if",!0)],64))),128))])])]))})}});var Hs=z(zs,[]);export{Hs as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.4f7de52c.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.4f7de52c.js new file mode 100644 index 00000000..8643d4d3 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.4f7de52c.js @@ -0,0 +1 @@ +var m=(r,v,l)=>new Promise((i,_)=>{var F=a=>{try{c(l.next(a))}catch(u){_(u)}},h=a=>{try{c(l.throw(a))}catch(u){_(u)}},c=a=>a.done?i(a.value):Promise.resolve(a.value).then(F,h);c((l=l.apply(r,v)).next())});import{_ as C,d as y,x as k,P as E,a as x,o as n,c as o,f as e,t as d,F as A,a4 as S,a5 as B,p as b,q as w,i as N}from"./index.js";const D=r=>(b("data-v-647a938c"),r=r(),w(),r),$={id:"page",class:"page-container"},I=D(()=>e("div",{class:"notice_info"},[e("li",null," \u52A8\u6001 DNS \uFF08DDNS\uFF09\u8BA9\u60A8\u5373\u4F7F\u5728\u6CA1\u6709\u9759\u6001 IP \u5730\u5740\u7684\u60C5\u51B5\u4E0B\uFF0C\u4ECD\u53EF\u5C06\u670D\u52A1\u5668\u8FDE\u540C\u7ED1\u5B9A\u7684\u57DF\u540D\u6620\u5C04\u81F3\u516C\u7F51\u4E0A\u3002 "),e("li",null," \u5982\u679C\u60A8\u6CA1\u6709\u516C\u7F51 IP \u8BF7\u4F7F\u7528 DDNSTO \uFF0C\u521D\u6B21\u4F7F\u7528 DDNSTO \u9700\u8981\u521D\u59CB\u5316\u914D\u7F6E ")],-1)),P={class:"text-container"},T={class:"text-container_item"},O=D(()=>e("div",{class:"text-container_item_title"},[e("span",null,"DDNSTO\uFF1A")],-1)),q={class:"text-container_item_flex"},G={class:"text-container_item_block"},j=["href"],V={key:0,class:"domain"},z={key:1,class:"domain"},H={class:"text-container_item"},J=D(()=>e("div",{class:"text-container_item_title"},[e("span",null,"myddns_ipv4\uFF1A")],-1)),K={class:"text-container_item_flex"},L={class:"text-container_item_block"},M=["href"],Q={key:1,class:"domain"},R={class:"text-container_item"},U=D(()=>e("div",{class:"text-container_item_title"},[e("span",null,"myddns_ipv6\uFF1A")],-1)),W={class:"text-container_item_flex"},X={class:"text-container_item_block"},Y=["href"],Z={key:1,class:"domain"},tt=y({__name:"index",setup(r){return m(this,null,function*(){let v,l;k({ipv4:"",ipv6:""});const i=k({ddnstoDomain:"",ipv4Domain:"",ipv6Domain:""}),_=k({install:!0,error:null}),F=()=>m(this,null,function*(){yield Promise.all([h()])}),h=()=>m(this,null,function*(){try{const t=yield N.Guide.Ddns.GET(),{result:s,error:p}=t.data;if(p)throw p;s&&(i.ddnstoDomain=s.ddnstoDomain,i.ipv4Domain=s.ipv4Domain,i.ipv6Domain=s.ipv6Domain)}catch(t){console.log(t)}});[v,l]=E(()=>F()),yield v,l();const c=x(()=>i.ddnstoDomain),a=x(()=>{const t=i.ipv4Domain;return t!=null&&t!=""&&t!="Stopped"?{url:`http://${t}`,title:t,ok:!0}:{url:`http://${t}`,title:"\u672A\u914D\u7F6E",ok:!1}}),u=x(()=>{const t=i.ipv6Domain;return t!=null&&t!=""&&t!="Stopped"?{url:`http://${t}`,title:t,ok:!0}:{url:`http://${t}`,title:"\u672A\u914D\u7F6E",ok:!1}}),g=()=>{S({domain:c.value,callback:t=>{}})},f=t=>{B({setup:t,callback:s=>{switch(t){case"ipv4":i.ipv4Domain=s.domain;break;case"ipv6":i.ipv6Domain=s.domain;break}}})};return(t,s)=>(n(),o("div",$,[I,e("div",P,[e("div",T,[O,e("div",q,[e("div",G,[_.install?(n(),o("a",{key:0,href:c.value,target:"_blank",class:"domain"},d(c.value),9,j)):(n(),o(A,{key:1},[_.error?(n(),o("a",V,d(_.error),1)):(n(),o("a",z,"\u672A\u5B89\u88C5"))],64)),e("a",{class:"setting",onClick:s[0]||(s[0]=p=>g())},"\u5FEB\u901F\u914D\u7F6E")])])]),e("div",H,[J,e("div",K,[e("div",L,[a.value.ok?(n(),o("a",{key:0,href:a.value.url,target:"_blank",class:"domain"},d(a.value.title),9,M)):(n(),o("a",Q,d(a.value.title),1)),e("a",{class:"setting",onClick:s[1]||(s[1]=p=>f("ipv4"))},"\u5FEB\u901F\u914D\u7F6E")])])]),e("div",R,[U,e("div",W,[e("div",X,[u.value.ok?(n(),o("a",{key:0,href:u.value.url,target:"_blank",class:"domain"},d(u.value.title),9,Y)):(n(),o("a",Z,d(u.value.title),1)),e("a",{class:"setting",onClick:s[2]||(s[2]=p=>f("ipv6"))},"\u5FEB\u901F\u914D\u7F6E")])])])])]))})}});var at=C(tt,[["__scopeId","data-v-647a938c"]]);export{at as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.555488a0.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.555488a0.js new file mode 100644 index 00000000..c0f0baae --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.555488a0.js @@ -0,0 +1 @@ +import{d as p,r as _,m as f,o as t,A as v,B as m,H as g,_ as y,c as s,h as l,f as a,t as h,G as b,I as C,J as k,K as x}from"./index.js";const w={key:0,id:"app-dialog"},B={key:0,class:"app-dialog_bg"},V={key:0,class:"app-dialog_header"},S={class:"app-dialog_body"},I=p({__name:"index",props:{title:{type:String},bg:{type:Boolean,default:!0},width:{type:String},beforeClose:{type:Function}},emits:["change","update:modelValue","handleClose"],setup(e,{emit:r}){const n=e,o=_(!1),i=r,c=()=>{n.beforeClose&&n.beforeClose()===!1||(o.value=!1,i("update:modelValue",!1),i("handleClose"))};return f(()=>{o.value=!0}),(u,d)=>(t(),v(g,{name:"dialog1"},{default:m(()=>[o.value?(t(),s("div",w,[e.bg?(t(),s("div",B)):l("v-if",!0),a("div",{class:"app-dialog_container",style:x({width:e.width})},[e.title!==void 0?(t(),s("div",V,[a("span",null,h(e.title),1),a("button",{class:"close",onClick:d[0]||(d[0]=N=>c())},[b(C)])])):l("v-if",!0),a("div",S,[k(u.$slots,"default",{},void 0,!0)])],4)])):l("v-if",!0)]),_:3}))}});var j=y(I,[["__scopeId","data-v-c4ccf04a"]]);export{j as d}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.79084d43.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.79084d43.js new file mode 100644 index 00000000..6d65e467 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.79084d43.js @@ -0,0 +1 @@ +var f=(h,x,m)=>new Promise((y,o)=>{var u=_=>{try{r(m.next(_))}catch(k){o(k)}},v=_=>{try{r(m.throw(_))}catch(k){o(k)}},r=_=>_.done?y(_.value):Promise.resolve(_.value).then(u,v);r((m=m.apply(h,x)).next())});import{_ as W,d as U,r as F,X as M,o as l,c as i,f as e,w as c,Q as C,s as A,y as b,h as n,j as I,k as N,g as T,T as D,i as S,p as z,q as H,R as O}from"./index.js";const t=h=>(z("data-v-894de0d4"),h=h(),H(),h),G={class:"form-item"},$=t(()=>e("div",{class:"label-name"},[e("span",null,"\u542F\u7528Wi-Fi")],-1)),j={class:"label-value"},K={class:"label-flex"},L={key:0,class:"form-item"},q=t(()=>e("div",{class:"label-name"},[e("span",null,"\u53D1\u5C04\u529F\u7387")],-1)),R={class:"label-value"},Q=t(()=>e("option",{value:100},"\u6700\u5927",-1)),X=t(()=>e("option",{value:70},"\u9AD8",-1)),J=t(()=>e("option",{value:50},"\u4E2D",-1)),Y=t(()=>e("option",{value:30},"\u4F4E",-1)),Z=[Q,X,J,Y],ee={class:"form-item"},oe=t(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi\u540D\u79F0\uFF08SSID\uFF09")],-1)),te={class:"label-value"},se=["disabled"],ae={class:"form-item"},le=t(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi \u5B89\u5168\u6027")],-1)),ie={class:"label-value"},ne=["disabled"],ue=O('',5),de=[ue],ve={class:"form-item"},ce=t(()=>e("div",{class:"label-name"},[e("span",null,"Wi-Fi \u5BC6\u7801")],-1)),_e={class:"label-value"},pe=["type","disabled"],re=["src"],he={class:"form-item"},be=t(()=>e("div",{class:"label-name"},[e("span",null,"SSID \u53EF\u89C1\u6027")],-1)),me={class:"label-value"},fe=["disabled"],ye=t(()=>e("option",{value:!1},"\u663E\u793A",-1)),ke=t(()=>e("option",{value:!0},"\u9690\u85CF",-1)),ge=[ye,ke],Fe={key:1,class:"form-item"},xe=t(()=>e("div",{class:"label-name"},[e("span",null,"\u65E0\u7EBF\u6A21\u5F0F")],-1)),De={class:"label-value"},Se=["disabled"],Ee={key:0,value:"11n/ax"},we={key:1,value:"11g/n/ax"},Ce={key:2,value:"11b/g/n/ax"},Ae={key:3,value:"11b/g/n"},Pe={key:4,value:"11ac/ax"},Be={key:5,value:"11n/ac/ax"},Ve={key:6,value:"11a/n/ac/ax"},We={key:7,value:"11a/n/ac"},Ue={key:2,class:"form-item"},Me=t(()=>e("div",{class:"label-name"},[e("span",null,"\u9891\u5BBD")],-1)),Ie={class:"label-value"},Ne=["disabled"],Te=t(()=>e("option",{value:"20"},"20 MHz",-1)),ze=t(()=>e("option",{value:"40"},"40 MHz",-1)),He={key:0,value:"auto"},Oe={key:1,value:"80"},Ge={key:2,value:"160"},$e={key:3,class:"form-item"},je=t(()=>e("div",{class:"label-name"},[e("span",null,"\u4FE1\u9053")],-1)),Ke={class:"label-value"},Le=["disabled"],qe=t(()=>e("option",{value:0},"\u81EA\u52A8",-1)),Re=t(()=>e("option",{value:1},"1",-1)),Qe=t(()=>e("option",{value:2},"2",-1)),Xe=t(()=>e("option",{value:3},"3",-1)),Je=t(()=>e("option",{value:4},"4",-1)),Ye=t(()=>e("option",{value:5},"5",-1)),Ze=t(()=>e("option",{value:6},"6",-1)),eo=t(()=>e("option",{value:7},"7",-1)),oo=t(()=>e("option",{value:8},"8",-1)),to=t(()=>e("option",{value:9},"9",-1)),so=t(()=>e("option",{value:10},"10",-1)),ao=t(()=>e("option",{value:11},"11",-1)),lo=t(()=>e("option",{value:12},"12",-1)),io=t(()=>e("option",{value:13},"13",-1)),no=[qe,Re,Qe,Xe,Je,Ye,Ze,eo,oo,to,so,ao,lo,io],uo=["disabled"],vo=t(()=>e("option",{value:0},"\u81EA\u52A8",-1)),co=t(()=>e("option",{value:36},"36",-1)),_o=t(()=>e("option",{value:40},"40",-1)),po=t(()=>e("option",{value:44},"44",-1)),ro=t(()=>e("option",{value:48},"48",-1)),ho=t(()=>e("option",{value:52},"52(DFS)",-1)),bo=t(()=>e("option",{value:56},"56(DFS)",-1)),mo=t(()=>e("option",{value:60},"60(DFS)",-1)),fo=t(()=>e("option",{value:64},"64(DFS)",-1)),yo=t(()=>e("option",{value:149},"149",-1)),ko=t(()=>e("option",{value:153},"153",-1)),go=t(()=>e("option",{value:157},"157",-1)),Fo=t(()=>e("option",{value:161},"161",-1)),xo=[vo,co,_o,po,ro,ho,bo,mo,fo,yo,ko,go,Fo],Do={class:"label-btns"},So={key:2,class:"sumit btn primary-btn"},Eo="/luci-static/istorerouter/icon/eye-close.png",wo="/luci-static/istorerouter/icon/eye-on.png",Co=U({__name:"index",props:{data:Object},emits:["list"],setup(h,{emit:x}){F(!1);const m=h,y=x,o=F({}),u=F(!1),v=F(""),r=F(!0);M(()=>m.data,p=>f(this,null,function*(){console.log(p),o.value=p}),{immediate:!0});const _=()=>{u.value=!u.value},k=()=>f(this,null,function*(){V()}),P=()=>{r.value=!r.value},E=p=>f(this,null,function*(){const s={ifaceName:o.value.ifaceName,enable:p},a=D.Loading("\u4FDD\u5B58\u4E2D...");try{const d=yield S.Wireless.Switch.POST(s);if(d!=null&&d.data){const{success:g,error:w}=d==null?void 0:d.data;w&&(v.value=w),(g==null||g==0)&&(y("list"),v.value="\u914D\u7F6E\u5B8C\u6210")}}catch(d){v.value=d}a.Close()}),B=()=>f(this,null,function*(){const p={device:o.value.device,txpower:o.value.txpower},s=D.Loading("\u4FDD\u5B58\u4E2D...");try{const a=yield S.Wireless.Power.POST(p);if(a!=null&&a.data){const{success:d,error:g}=a==null?void 0:a.data;g&&(v.value=g),(d==null||d==0)&&(y("list"),v.value="\u914D\u7F6E\u5B8C\u6210")}}catch(a){v.value=a}s.Close()}),V=()=>f(this,null,function*(){u.value=!0;const p=D.Loading("\u4FDD\u5B58\u4E2D...");try{const s=yield S.Wireless.Edit.POST(o.value);if(s!=null&&s.data){const{success:a,error:d}=s==null?void 0:s.data;d&&(v.value=d),(a==null||a==0)&&(y("list"),v.value="\u914D\u7F6E\u5B8C\u6210")}}catch(s){v.value=s}u.value=!0,p.Close()});return(p,s)=>(l(),i("form",{class:"form-container",onSubmit:T(k,["prevent"])},[e("div",G,[$,e("div",j,[e("div",K,[e("label",null,[c(e("input",{type:"radio",value:!1,"onUpdate:modelValue":s[0]||(s[0]=a=>o.value.disabled=a),onClick:s[1]||(s[1]=a=>E(!0))},null,512),[[C,o.value.disabled]]),A("\u5F00\u542F")]),e("label",null,[c(e("input",{type:"radio",value:!0,"onUpdate:modelValue":s[2]||(s[2]=a=>o.value.disabled=a),onClick:s[3]||(s[3]=a=>E(!1))},null,512),[[C,o.value.disabled]]),A("\u5173\u95ED")])])])]),o.value.isGuest?n("v-if",!0):(l(),i("div",L,[q,e("div",R,[c(e("select",{"onUpdate:modelValue":s[4]||(s[4]=a=>o.value.txpower=a),onChange:s[5]||(s[5]=a=>B())},[...Z],544),[[b,o.value.txpower]])])])),e("div",ee,[oe,e("div",te,[c(e("input",{"onUpdate:modelValue":s[6]||(s[6]=a=>o.value.ssid=a),disabled:u.value},null,8,se),[[I,o.value.ssid]])])]),e("div",ae,[le,e("div",ie,[c(e("select",{"onUpdate:modelValue":s[7]||(s[7]=a=>o.value.encryption=a),disabled:u.value},[...de],8,ne),[[b,o.value.encryption]])])]),e("div",ve,[ce,e("div",_e,[c(e("input",{"onUpdate:modelValue":s[8]||(s[8]=a=>o.value.key=a),type:r.value?"password":"",disabled:u.value},null,8,pe),[[N,o.value.key]]),u.value?n("v-if",!0):(l(),i("img",{key:0,class:"seeIcon",onClick:s[9]||(s[9]=a=>P()),src:r.value?wo:Eo},null,8,re))])]),e("div",he,[be,e("div",me,[c(e("select",{"onUpdate:modelValue":s[10]||(s[10]=a=>o.value.hidden=a),disabled:u.value},[...ge],8,fe),[[b,o.value.hidden]])])]),o.value.isGuest?n("v-if",!0):(l(),i("div",Fe,[xe,e("div",De,[c(e("select",{"onUpdate:modelValue":s[11]||(s[11]=a=>o.value.hwmode=a),disabled:u.value},[o.value.band==="2g"?(l(),i("option",Ee," 11n/ax ")):n("v-if",!0),o.value.band==="2g"?(l(),i("option",we," 11g/n/ax ")):n("v-if",!0),o.value.band==="2g"?(l(),i("option",Ce," 11b/g/n/ax ")):n("v-if",!0),o.value.band==="2g"?(l(),i("option",Ae," 11b/g/n ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Pe," 11ac/ax ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Be," 11n/ac/ax ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Ve," 11a/n/ac/ax ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",We," 11b/g/n ")):n("v-if",!0)],8,Se),[[b,o.value.hwmode]])])])),o.value.isGuest?n("v-if",!0):(l(),i("div",Ue,[Me,e("div",Ie,[c(e("select",{"onUpdate:modelValue":s[12]||(s[12]=a=>o.value.htmode=a),disabled:u.value},[Te,ze,o.value.band==="2g"?(l(),i("option",He," 20/40 MHz ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Oe," 80 MHz ")):n("v-if",!0),o.value.band==="5g"?(l(),i("option",Ge," 160 MHz ")):n("v-if",!0)],8,Ne),[[b,o.value.htmode]])])])),o.value.isGuest?n("v-if",!0):(l(),i("div",$e,[je,e("div",Ke,[o.value.band==="2g"?c((l(),i("select",{key:0,"onUpdate:modelValue":s[13]||(s[13]=a=>o.value.channel=a),disabled:u.value},[...no],8,Le)),[[b,o.value.channel]]):n("v-if",!0),o.value.band==="5g"?c((l(),i("select",{key:1,"onUpdate:modelValue":s[14]||(s[14]=a=>o.value.channel=a),disabled:u.value},[...xo],8,uo)),[[b,o.value.channel]]):n("v-if",!0)])])),e("div",Do,[u.value?(l(),i("button",{key:0,class:"btn",onClick:_},"\u4FEE\u6539")):n("v-if",!0),u.value?n("v-if",!0):(l(),i("button",{key:1,class:"btn",onClick:_},"\u53D6\u6D88")),u.value?n("v-if",!0):(l(),i("button",So,"\u5E94\u7528"))])],32))}});var Bo=W(Co,[["__scopeId","data-v-894de0d4"]]);export{Bo as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.834d14a5.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.834d14a5.js new file mode 100644 index 00000000..1e9e28bb --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.834d14a5.js @@ -0,0 +1 @@ +var r=(c,m,i)=>new Promise((E,t)=>{var n=l=>{try{o(i.next(l))}catch(v){t(v)}},s=l=>{try{o(i.throw(l))}catch(v){t(v)}},o=l=>l.done?E(l.value):Promise.resolve(l.value).then(n,s);o((i=i.apply(c,m)).next())});import{_ as V,d as T,D as I,r as f,x as k,P as M,o as w,c as b,f as u,w as _,Q as h,s as D,j as x,h as y,t as U,g as q,p as G,q as N,i as B,T as A}from"./index.js";const p=c=>(G("data-v-ed7c3c9c"),c=c(),N(),c),j=p(()=>u("p",null,[D(" \u6B22\u8FCE\u4F7F\u7528\u5FEB\u901F\u7F51\u7EDC\u914D\u7F6E\u5411\u5BFC\uFF0C\u8BF7\u9009\u62E9\u4E00\u79CD\u8FDE\u63A5\u65B9\u5F0F\u4EE5\u5F00\u59CB\u8054\u7F51\uFF0C\u6216\u4F7F\u7528\u5DE6\u4FA7\u83DC\u5355\u8FDB\u884C\u8054\u7F51\u914D\u7F6E "),u("br"),D(" \u6CA1\u627E\u5230\u60F3\u8981\u7684\u914D\u7F6E\uFF1F\u8BF7\u4F7F\u7528 "),u("a",{href:"/cgi-bin/luci/admin/network/network",target:"_blank"},"\u9AD8\u7EA7\u6A21\u5F0F")],-1)),L=p(()=>u("div",{class:"label-name"},[u("span",null,"\u8054\u7F51\u65B9\u5F0F")],-1)),O={class:"label-value"},Q={class:"label-flex"},R={style:{display:"none"}},z={key:0,class:"ul-container"},H=p(()=>u("div",{class:"ul-container_title"},[u("span",null,"\u62E8\u53F7\u8054\u7F51\u914D\u7F6E")],-1)),J=p(()=>u("div",{class:"label-value"},null,-1)),K=p(()=>u("div",{class:"label-name"},[u("span",null,"\u8D26\u53F7")],-1)),W={class:"label-value"},X=p(()=>u("div",{class:"label-name"},[u("span",null,"\u5BC6\u7801")],-1)),Y={class:"label-value"},Z={key:1,class:"label-btns"},$=["disabled"],uu={key:2,class:"label-msg"},eu=T({__name:"index",setup(c){return r(this,null,function*(){let m,i;const E=I(),t=f(""),n=f(!1),s=f(""),o=k({account:"",password:""}),l=k({wanProto:"dhcp",dnsProto:"auto",staticIp:"",subnetMask:"",manualDnsIp:[],gateway:""}),v=()=>r(this,null,function*(){n.value=!0;try{const d=yield B.Guide.Pppoe.GET(),{result:e}=d.data;e&&(o.account=e.account||"",o.password=e.password||"")}catch(d){s.value=d}t.value=yield E.getAsyncNetworkProto,n.value=!1});[m,i]=M(()=>v()),yield m,i();const g=()=>r(this,null,function*(){switch(t.value){case"pppoe":yield P();break;case"dhcp":yield S();break;default:s.value="\u627E\u4E0D\u5230\u4F60\u8981\u7684\u914D\u7F6E";break}}),P=()=>r(this,null,function*(){if(o.account==""){s.value="\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A";return}if(o.password==""){s.value="\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A";return}n.value=!0;const d=A.Loading("\u4FDD\u5B58\u4E2D...");try{const e=yield B.Guide.Pppoe.POST({account:o.account,password:o.password});if(e.data){const{error:a,success:F}=e.data;a&&(s.value=a),(F==null||F==0)&&(s.value="\u914D\u7F6E\u5B8C\u6210")}}catch(e){s.value=e}finally{}n.value=!1,d.Close()}),S=()=>r(this,null,function*(){const d={wanProto:l.wanProto,dnsProto:l.dnsProto};n.value=!0;const e=A.Loading("\u4FDD\u5B58\u4E2D...");try{const a=yield B.Guide.ClientModel.POST(d);if(a!=null&&a.data){const{success:F,error:C}=a==null?void 0:a.data;C&&(s.value=C),(F==null||F==0)&&(s.value="\u914D\u7F6E\u5B8C\u6210")}}catch(a){s.value=a}n.value=!1,e.Close()});return(d,e)=>(w(),b("form",{class:"form-container",onSubmit:q(g,["prevent"])},[j,L,u("div",O,[u("div",Q,[u("label",null,[_(u("input",{type:"radio",value:"pppoe","onUpdate:modelValue":e[0]||(e[0]=a=>t.value=a)},null,512),[[h,t.value]]),D("\u8D26\u53F7\u5BC6\u7801")]),u("label",null,[_(u("input",{type:"radio",value:"dhcp","onUpdate:modelValue":e[1]||(e[1]=a=>t.value=a)},null,512),[[h,t.value]]),D("\u81EA\u52A8\u8054\u7F51")]),u("label",R,[_(u("input",{type:"radio",value:"static",hidden:"true","onUpdate:modelValue":e[2]||(e[2]=a=>t.value=a)},null,512),[[h,t.value]]),D("\u7F51\u5173\u8054\u7F51")])])]),t.value=="pppoe"?(w(),b("ul",z,[H,J,K,u("div",W,[_(u("input",{type:"text",placeholder:"\u5BBD\u5E26\u8D26\u53F7","onUpdate:modelValue":e[3]||(e[3]=a=>o.account=a),required:""},null,512),[[x,o.account,void 0,{trim:!0}]])]),X,u("div",Y,[_(u("input",{type:"password",placeholder:"\u5BBD\u5E26\u5BC6\u7801","onUpdate:modelValue":e[4]||(e[4]=a=>o.password=a),required:""},null,512),[[x,o.password,void 0,{trim:!0}]])])])):y("v-if",!0),t.value=="pppoe"||t.value=="dhcp"?(w(),b("div",Z,[u("button",{class:"sumbit",disabled:n.value},"\u4FDD\u5B58",8,$)])):y("v-if",!0),s.value?(w(),b("div",uu,[u("span",null,U(s.value),1)])):y("v-if",!0)],32))})}});var su=V(eu,[["__scopeId","data-v-ed7c3c9c"]]);export{su as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.8c3e8b04.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.8c3e8b04.js new file mode 100644 index 00000000..ca027cf6 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.8c3e8b04.js @@ -0,0 +1 @@ +import{_ as w,d as I,L as x,D as S,a as l,x as P,M as y,o,c,h as r,f as t,t as e,u as d,N as b,p as A,q as N,O as U}from"./index.js";const s=_=>(A("data-v-934b24da"),_=_(),N(),_),V={id:"page",class:"page-container"},j={class:"text-container"},H={class:"text-container_item"},L=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u8054\u7F51\u72B6\u6001:")],-1)),q={class:"text-container_item_value"},M={key:0},O={key:1},$={key:2},z={key:4},G={class:"text-container_item"},J=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u8FDE\u63A5\u65B9\u5F0F:")],-1)),K={class:"text-container_item_value"},Q={class:"text-container_item"},R=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u5728\u7EBF\u8BBE\u5907:")],-1)),T={class:"text-container_item_value"},W={class:"text-container_item"},X=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"IPv4\u5730\u5740:")],-1)),Y={class:"text-container_item_value"},Z={key:0,class:"text-container_item"},tt=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"IPv6\u5730\u5740:")],-1)),et={class:"text-container_item_value"},st={class:"text-container_item"},nt=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"DNS:")],-1)),at={class:"text-container_item_value"},it={class:"text-container"},ot={class:"text-container_item"},ct=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u7CFB\u7EDF\u540D\u79F0:")],-1)),ut={class:"text-container_item_value"},_t={class:"text-container_item"},lt=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u56FA\u4EF6\u7248\u672C:")],-1)),rt={class:"text-container_item_value"},dt={class:"text-container_item"},vt=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u5185\u6838\u7248\u672C:")],-1)),pt={class:"text-container_item_value"},mt={class:"text-container_item"},ht=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u5DF2\u542F\u52A8:")],-1)),xt={class:"text-container_item_value"},Ft={class:"text-container_item"},gt=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u7CFB\u7EDF\u65F6\u95F4:")],-1)),Et={class:"text-container_item_value"},Bt={class:"text-container"},Dt={class:"text-container_item"},ft={class:"text-container_item_title"},kt={class:"text-container_item_value"},Ct={class:"progress-container"},wt={class:"text-container_item"},It=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"CPU:")],-1)),St={class:"text-container_item_value"},Pt={class:"progress-container"},yt=["value"],bt={class:"text-container_item"},At=s(()=>t("div",{class:"text-container_item_title"},[t("span",null,"\u5185\u5B58:")],-1)),Nt={class:"text-container_item_value"},Ut={class:"progress-container"},Vt=["value"],jt=I({__name:"index",setup(_){const{$gettext:F}=U,g=x.stampForm,E=x.stampForm,u=S(),n=l(()=>u.network),B=l(()=>u.device),a=P({cpuusage:0,temperature:0,menavailablePercentage:0,menusage:0}),v=l(()=>u.version),p=l(()=>u.time),D=i=>{switch(i){case"pppoe":return"\u62E8\u53F7\u4E0A\u7F51";case"static":return"\u9759\u6001\u7F51\u7EDC";case"dhcp":return"DHCP"}},f=i=>{switch(i){case"manual":return"\u624B\u52A8\u914D\u7F6E";case"auto":return"\u81EA\u52A8\u83B7\u53D6";default:return""}},k=i=>i.toUpperCase(),m=()=>{u.getSystemData().then(i=>{a.cpuusage=i.cpu.usage,a.temperature=i.cpu.temperature,a.menavailablePercentage=i.memery.availablePercentage||100,a.menusage=100-a.menavailablePercentage})};m();const C=setInterval(()=>{m()},5e3);return y(()=>{clearInterval(C)}),(i,Ht)=>{var h;return o(),c("div",V,[r(" \u72B6\u6001\u4FE1\u606F "),t("div",j,[t("div",H,[L,t("div",q,[n.value.networkInfo=="netSuccess"?(o(),c("span",M," \u5DF2\u8054\u7F51 ("+e(d(g)(n.value.uptimeStamp))+") ",1)):n.value.networkInfo=="dnsFailed"?(o(),c("span",O," DNS\u9519\u8BEF ")):n.value.networkInfo=="softSourceFailed"?(o(),c("span",$," \u8F6F\u4EF6\u6E90\u89E3\u6790\u9519\u8BEF ")):(o(),c("span",z," \u68C0\u6D4B\u4E2D "))])]),t("div",G,[J,t("div",K,e(k(n.value.defaultInterface||"")),1)]),t("div",Q,[R,t("div",T,e(B.value.devices.length),1)]),t("div",W,[X,t("div",Y,e(n.value.ipv4addr)+"\uFF08"+e(D(n.value.proto||""))+"\uFF09 ",1)]),n.value.ipv6addr?(o(),c("div",Z,[tt,t("div",et,e(n.value.ipv6addr),1)])):r("v-if",!0),t("div",st,[nt,t("div",at,[t("p",null,e(f(n.value.dnsProto)),1),t("p",null,e((h=n.value.dnsList)==null?void 0:h.join(", ")),1)])])]),r(" \u7CFB\u7EDF\u4FE1\u606F "),t("div",it,[t("div",ot,[ct,t("div",ut,[t("span",null,e(d(b).HostName),1)])]),t("div",_t,[lt,t("div",rt,[t("span",null,e(v.value.firmwareVersion),1)])]),t("div",dt,[vt,t("div",pt,[t("span",null,e(v.value.kernelVersion),1)])]),t("div",mt,[ht,t("div",xt,[t("span",null,e(d(E)(p.value.uptime)),1)])]),t("div",Ft,[gt,t("div",Et,[t("span",null,e(p.value.localtime),1)])])]),r(" \u4F7F\u7528\u7387\u4FE1\u606F "),t("div",Bt,[t("div",Dt,[t("div",ft,[t("span",null,e(d(F)("\u6E29\u5EA6"))+":",1)]),t("div",kt,[t("div",Ct,[t("span",null,e(a.temperature||"--")+"\u2103",1)])])]),t("div",wt,[It,t("div",St,[t("div",Pt,[t("progress",{value:a.cpuusage||0,max:"100"},null,8,yt),t("span",null,e(a.cpuusage)+"%",1)])])]),t("div",bt,[At,t("div",Nt,[t("div",Ut,[t("progress",{value:a.menusage||0,max:"100"},null,8,Vt),t("span",null,e(a.menusage)+"% ",1)])])])])])}}});var qt=w(jt,[["__scopeId","data-v-934b24da"]]);export{qt as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.a904a705.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.a904a705.js new file mode 100644 index 00000000..62239ed2 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.a904a705.js @@ -0,0 +1 @@ +var c=(d,b,r)=>new Promise((E,t)=>{var n=l=>{try{o(r.next(l))}catch(v){t(v)}},s=l=>{try{o(r.throw(l))}catch(v){t(v)}},o=l=>l.done?E(l.value):Promise.resolve(l.value).then(n,s);o((r=r.apply(d,b)).next())});import{_ as V,d as T,D as I,r as f,x as A,P as M,o as m,c as w,f as u,w as _,Q as h,s as D,j as k,h as y,t as U,g as q,p as G,q as N,i as B,T as x}from"./index.js";const p=d=>(G("data-v-0b184c1c"),d=d(),N(),d),j=p(()=>u("p",null,[D(" \u6B22\u8FCE\u4F7F\u7528\u5FEB\u901F\u7F51\u7EDC\u914D\u7F6E\u5411\u5BFC\uFF0C\u8BF7\u9009\u62E9\u4E00\u79CD\u8FDE\u63A5\u65B9\u5F0F\u4EE5\u5F00\u59CB\u8054\u7F51\uFF0C\u6216\u4F7F\u7528\u5DE6\u4FA7\u83DC\u5355\u8FDB\u884C\u8054\u7F51\u914D\u7F6E "),u("br"),D(" \u6CA1\u627E\u5230\u60F3\u8981\u7684\u914D\u7F6E\uFF1F\u8BF7\u4F7F\u7528 "),u("a",{href:"/cgi-bin/luci/admin/network/network",target:"_blank"},"\u9AD8\u7EA7\u6A21\u5F0F")],-1)),L=p(()=>u("div",{class:"label-name"},[u("span",null,"\u8054\u7F51\u65B9\u5F0F")],-1)),O={class:"label-value"},Q={class:"label-flex"},R={style:{display:"none"}},z={key:0,class:"ul-container"},H=p(()=>u("div",{class:"ul-container_title"},[u("span",null,"\u62E8\u53F7\u8054\u7F51\u914D\u7F6E")],-1)),J=p(()=>u("div",{class:"label-value"},null,-1)),K=p(()=>u("div",{class:"label-name"},[u("span",null,"\u8D26\u53F7")],-1)),W={class:"label-value"},X=p(()=>u("div",{class:"label-name"},[u("span",null,"\u5BC6\u7801")],-1)),Y={class:"label-value"},Z={key:1,class:"label-btns"},$=["disabled"],uu={key:2,class:"label-msg"},eu=T({__name:"index",setup(d){return c(this,null,function*(){let b,r;const E=I(),t=f(""),n=f(!1),s=f(""),o=A({account:"",password:""}),l=A({wanProto:"dhcp",dnsProto:"auto",staticIp:"",subnetMask:"",manualDnsIp:[],gateway:""}),v=()=>c(this,null,function*(){n.value=!0;try{const i=yield B.Guide.Pppoe.GET(),{result:e}=i.data;e&&(o.account=e.account||"",o.password=e.password||"")}catch(i){s.value=i}t.value=yield E.getAsyncNetworkProto,n.value=!1});[b,r]=M(()=>v()),yield b,r();const g=()=>c(this,null,function*(){switch(t.value){case"pppoe":yield P();break;case"dhcp":yield S();break;default:s.value="\u627E\u4E0D\u5230\u4F60\u8981\u7684\u914D\u7F6E";break}}),P=()=>c(this,null,function*(){if(o.account==""){s.value="\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A";return}if(o.password==""){s.value="\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A";return}n.value=!0;const i=x.Loading("\u4FDD\u5B58\u4E2D...");try{const e=yield B.Guide.Pppoe.POST({account:o.account,password:o.password});if(e.data){const{error:a,success:F}=e.data;a&&(s.value=a),(F==null||F==0)&&(s.value="\u914D\u7F6E\u5B8C\u6210")}}catch(e){s.value=e}finally{}n.value=!1,i.Close()}),S=()=>c(this,null,function*(){const i={wanProto:l.wanProto,dnsProto:l.dnsProto};n.value=!0;const e=x.Loading("\u4FDD\u5B58\u4E2D...");try{const a=yield B.Guide.ClientModel.POST(i);if(a!=null&&a.data){const{success:F,error:C}=a==null?void 0:a.data;C&&(s.value=C),(F==null||F==0)&&(s.value="\u914D\u7F6E\u5B8C\u6210")}}catch(a){s.value=a}n.value=!1,e.Close()});return(i,e)=>(m(),w("form",{class:"form-container",onSubmit:q(g,["prevent"])},[j,L,u("div",O,[u("div",Q,[u("label",null,[_(u("input",{type:"radio",value:"pppoe","onUpdate:modelValue":e[0]||(e[0]=a=>t.value=a)},null,512),[[h,t.value]]),D("\u8D26\u53F7\u5BC6\u7801")]),u("label",null,[_(u("input",{type:"radio",value:"dhcp","onUpdate:modelValue":e[1]||(e[1]=a=>t.value=a)},null,512),[[h,t.value]]),D("\u81EA\u52A8\u8054\u7F51")]),u("label",R,[_(u("input",{type:"radio",value:"static",hidden:"true","onUpdate:modelValue":e[2]||(e[2]=a=>t.value=a)},null,512),[[h,t.value]]),D("\u7F51\u5173\u8054\u7F51")])])]),t.value=="pppoe"?(m(),w("ul",z,[H,J,K,u("div",W,[_(u("input",{type:"text",placeholder:"\u5BBD\u5E26\u8D26\u53F7","onUpdate:modelValue":e[3]||(e[3]=a=>o.account=a),required:""},null,512),[[k,o.account,void 0,{trim:!0}]])]),X,u("div",Y,[_(u("input",{type:"password",placeholder:"\u5BBD\u5E26\u5BC6\u7801","onUpdate:modelValue":e[4]||(e[4]=a=>o.password=a),required:""},null,512),[[k,o.password,void 0,{trim:!0}]])])])):y("v-if",!0),t.value=="pppoe"||t.value=="dhcp"?(m(),w("div",Z,[u("button",{class:"sumbit",disabled:n.value},"\u4FDD\u5B58",8,$)])):y("v-if",!0),s.value?(m(),w("div",uu,[u("span",null,U(s.value),1)])):y("v-if",!0)],32))})}});var su=V(eu,[["__scopeId","data-v-0b184c1c"]]);export{su as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.b8f510b1.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.b8f510b1.js new file mode 100644 index 00000000..641ff185 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.b8f510b1.js @@ -0,0 +1 @@ +import{_ as r,d as a,E as e,o as u,A as p,B as s,G as i}from"./index.js";const c=a({__name:"index",setup(_){const t=[{name:"index",title:"\u7F51\u7EDC\u914D\u7F6E",path:"/router/network"},{name:"pppoe",title:"\u62E8\u53F7\u8FDE\u63A5",path:"/router/network/pppoe"},{name:"dhcp",title:"DHCP\u8FDE\u63A5",path:"/router/network/dhcp"},{name:"gateway",title:"\u65C1\u8DEF\u7531\u8FDE\u63A5",path:"/router/network/gateway"},{name:"intranet",title:"\u5185\u7F51\u914D\u7F6E",path:"/router/network/intranet"},{name:"dns",title:"DNS\u914D\u7F6E",path:"/router/network/dns"}];return(l,d)=>{const o=e("router-loading"),n=e("layout-page");return u(),p(n,{menus:t},{default:s(()=>[i(o)]),_:1})}}});var w=r(c,[]);export{w as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.b945217b.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.b945217b.js new file mode 100644 index 00000000..98acdb85 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.b945217b.js @@ -0,0 +1,48 @@ +import{_ as r,d as u,D as i,a as d,r as h,o as t,c as e,f as n,h as s,F as p,e as _,t as a}from"./index.js";const v={class:"ul-container"},m={class:"ul-container_body"},b={class:"page-table"},f=n("colgroup",null,[n("col"),n("col"),n("col"),n("col")],-1),g=n("thead",null,[n("tr",null,[n("th",null,"Mac"),n("th",null,"IPv4"),n("th",null,"IPv6"),n("th")])],-1),k=n("th",null,null,-1),x=n("th",null,null,-1),B=u({__name:"index",setup(y){const o=i(),c=d(()=>o.device.devices);return h(),(P,C)=>(t(),e("main",null,[n("ul",v,[s(`
+ DHCP\u8BBE\u5907 +
`),n("div",m,[n("table",b,[f,g,n("tbody",null,[(t(!0),e(p,null,_(c.value,l=>(t(),e("tr",null,[n("th",null,a(l.mac),1),n("th",null,a(l.ipv4addr),1),k,x]))),256))])])])]),s(`
    +
    + \u5C40\u57DF\u7F51\u8BBE\u5907 +
    +
    + + + + + + + + + + + + + + + + + + +
    MacIPv4IPv6
    +
    +
`)]))}});var F=r(B,[]);export{F as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.bc26a9cf.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.bc26a9cf.js new file mode 100644 index 00000000..5e69476f --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.bc26a9cf.js @@ -0,0 +1 @@ +var d=(_,c,l)=>new Promise((t,e)=>{var n=o=>{try{i(l.next(o))}catch(u){e(u)}},p=o=>{try{i(l.throw(o))}catch(u){e(u)}},i=o=>o.done?t(o.value):Promise.resolve(o.value).then(n,p);i((l=l.apply(_,c)).next())});import{_ as E,d as h,r as v,x as F,P as y,o as m,c as D,f as a,w,j as b,t as x,h as A,g as C,i as B,T as g}from"./index.js";const k=a("div",{class:"label-info"}," \u8BF7\u786E\u4FDD\u60A8\u5DF2\u5C06\u8DEF\u7531 WAN \u53E3\u8FDE\u63A5\u5230\u5149\u732B ",-1),T=a("div",{class:"label-name"},[a("span",null,"\u8D26\u53F7")],-1),P={class:"label-value"},S=a("div",{class:"label-name"},[a("span",null,"\u5BC6\u7801")],-1),V={class:"label-value"},q={class:"label-btns"},G=["disabled"],N={key:0,class:"label-msg"},j=h({__name:"index",setup(_){return d(this,null,function*(){let c,l;const t=v(""),e=F({account:"",password:""}),n=v(!1),p=v(!1),i=()=>d(this,null,function*(){n.value=!0;try{const u=yield B.Guide.Pppoe.GET(),{result:s}=u.data;s&&(e.account=s.account||"",e.password=s.password||"")}catch(u){t.value=u}finally{}n.value=!1,p.value=!0});[c,l]=y(()=>i()),yield c,l();const o=()=>d(this,null,function*(){if(e.account==""){t.value="\u8D26\u53F7\u4E0D\u80FD\u4E3A\u7A7A";return}if(e.password==""){t.value="\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A";return}n.value=!0;const u=g.Loading("\u4FDD\u5B58\u4E2D...");try{const s=yield B.Guide.Pppoe.POST({account:e.account,password:e.password});if(s.data){const{error:r,success:f}=s.data;r&&(t.value=r),(f==null||f==0)&&(t.value="\u914D\u7F6E\u5B8C\u6210")}}catch(s){t.value=s}finally{}n.value=!1,u.Close()});return(u,s)=>(m(),D("form",{class:"form-container",onSubmit:C(o,["prevent"])},[k,T,a("div",P,[w(a("input",{type:"text",placeholder:"\u5BBD\u5E26\u8D26\u53F7","onUpdate:modelValue":s[0]||(s[0]=r=>e.account=r),required:""},null,512),[[b,e.account,void 0,{trim:!0}]])]),S,a("div",V,[w(a("input",{type:"password",placeholder:"\u5BBD\u5E26\u5BC6\u7801","onUpdate:modelValue":s[1]||(s[1]=r=>e.password=r),required:""},null,512),[[b,e.password,void 0,{trim:!0}]])]),a("div",q,[a("button",{class:"sumbit",disabled:n.value},"\u4FDD\u5B58",8,G)]),t.value?(m(),D("div",N,[a("span",null,x(t.value),1)])):A("v-if",!0)],32))})}});var L=E(j,[]);export{L as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.bf7d9ca8.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.bf7d9ca8.js new file mode 100644 index 00000000..7cc046a2 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.bf7d9ca8.js @@ -0,0 +1 @@ +import{_ as n,d as p,$ as l,a as o,E as a,o as i,A as c,B as d,a0 as m,G as _}from"./index.js";const E=p({__name:"index",setup(b){const e=l(),t=o(()=>m(e.localApps||[],e.remoteApps||[],e.appsExpand,{tab:"all"})),u=o(()=>[{name:"istore-store",title:"\u5E94\u7528\u5546\u5E97",path:"/router/istore"},{name:"istore-installed",title:`\u5DF2\u5B89\u88C5 (${t.value.counts.installed})`,path:"/router/istore/installed"},{name:"istore-upgradable",title:`\u53EF\u5347\u7EA7 (${t.value.counts.upgradable})`,path:"/router/istore/upgradable"},{name:"istore-upload",title:"\u79BB\u7EBF\u5B89\u88C5",path:"/router/istore/upload"},{name:"istore-backup",title:"\u5907\u4EFD\u6062\u590D",path:"/router/istore/backup"},{name:"istore-source",title:"\u8F6F\u4EF6\u6E90",path:"/router/istore/source"}]);return(h,x)=>{const r=a("router-loading"),s=a("layout-page");return i(),c(s,{menus:u.value},{default:d(()=>[_(r)]),_:1},8,["menus"])}}});var g=n(E,[]);export{g as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.d9cbfa88.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.d9cbfa88.js new file mode 100644 index 00000000..4cd90e49 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.d9cbfa88.js @@ -0,0 +1,13 @@ +var te=Object.defineProperty,ue=Object.defineProperties;var ne=Object.getOwnPropertyDescriptors;var G=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var H=(t,s,n)=>s in t?te(t,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[s]=n,P=(t,s)=>{for(var n in s||(s={}))le.call(s,n)&&H(t,n,s[n]);if(G)for(var n of G(s))oe.call(s,n)&&H(t,n,s[n]);return t},Q=(t,s)=>ue(t,ne(s));var X=(t,s,n)=>{if(!s.has(t))throw TypeError("Cannot "+n)};var W=(t,s,n)=>(X(t,s,"read from private field"),n?n.call(t):s.get(t)),Z=(t,s,n)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,n)},J=(t,s,n,o)=>(X(t,s,"write to private field"),o?o.call(t,n):s.set(t,n),n);var g=(t,s,n)=>new Promise((o,u)=>{var p=c=>{try{v(n.next(c))}catch(l){u(l)}},m=c=>{try{v(n.throw(c))}catch(l){u(l)}},v=c=>c.done?o(c.value):Promise.resolve(c.value).then(p,m);v((n=n.apply(t,s)).next())});import{G as Y,Z as K,d as B,l as $,o as i,c as r,f as e,t as _,u as k,h as F,_ as E,x as ie,w,y as ae,F as D,e as x,j as de,T as f,i as U,r as C,Q as z,s as R,p as L,q,z as M,A as b,B as ce,W as S,a as j,E as re,D as _e}from"./index.js";import{d as pe}from"./chunk.555488a0.js";var A;class ve{constructor(){Z(this,A,void 0)}install(s){J(this,A,s)}openWindow(s,n){const o=document.createElement("div"),u=Y(s,Q(P({},n),{close:()=>{K(null,o),o.remove()}}));W(this,A)&&(u.appContext=W(this,A)._context),K(u,o),document.body.appendChild(o)}}A=new WeakMap;const me={class:"tab-content"},he={class:"item-label"},ke=e("div",{class:"item-label_key"},[e("span",null,"\u540D\u79F0")],-1),Fe={class:"item-label_value"},fe={key:0,class:"item-label"},be=e("div",{class:"item-label_key"},[e("span",null,"\u578B\u53F7")],-1),De={class:"item-label_value"},ye={class:"item-label"},$e=e("div",{class:"item-label_key"},[e("span",null,"\u8DEF\u5F84")],-1),Ce={class:"item-label_value"},xe={class:"item-label"},Be=e("div",{class:"item-label_key"},[e("span",null,"\u5BB9\u91CF")],-1),Ee={class:"item-label_value"},Ae={class:"item-label"},ge=e("div",{class:"item-label_key"},[e("span",null,"\u7C7B\u578B")],-1),we={class:"item-label_value"},Ie={key:1,class:"item-label"},Pe=e("div",{class:"item-label_key"},[e("span",null,"\u7CFB\u7EDF\u5206\u533A")],-1),Me=e("div",{class:"item-label_value"},[e("span",null,"true")],-1),Se=[Pe,Me],Ve={key:2,class:"item-label"},je=e("div",{class:"item-label_key"},[e("span",null,"docker\u5206\u533A")],-1),Oe=e("div",{class:"item-label_value"},[e("span",null,"true")],-1),Te=[je,Oe],Ne={key:3,class:"item-label"},We=e("div",{class:"item-label_key"},[e("span",null,"\u63A5\u5165\u65B9\u5F0F")],-1),ze=e("div",{class:"item-label_value"},[e("span",null,"\u5916\u63A5")],-1),Re=[We,ze],Ue={class:"item-label"},Le=e("div",{class:"item-label_key"},[e("span",null,"\u5206\u533A\u6570\u91CF")],-1),qe={class:"item-label_value"},Ge={key:4,class:"item-label"},He=e("div",{class:"item-label_key"},[e("span",null,"error")],-1),Qe={class:"item-label_value"},Xe=B({__name:"main",setup(t){const s=$("disk");return(n,o)=>{var u;return i(),r("section",me,[e("div",he,[ke,e("div",Fe,[e("span",null,_(k(s).name),1)])]),k(s).venderModel?(i(),r("div",fe,[be,e("div",De,[e("span",null,_(k(s).venderModel),1)])])):F("v-if",!0),e("div",ye,[$e,e("div",Ce,[e("span",null,_(k(s).path),1)])]),e("div",xe,[Be,e("div",Ee,[e("span",null,_(k(s).used)+"/"+_(k(s).total),1)])]),e("div",Ae,[ge,e("div",we,[e("span",null,_(k(s).partyLabelType),1)])]),k(s).isSystemRoot?(i(),r("div",Ie,[...Se])):F("v-if",!0),k(s).isDockerRoot?(i(),r("div",Ve,[...Te])):F("v-if",!0),k(s).isExternalDisk?(i(),r("div",Ne,[...Re])):F("v-if",!0),e("div",Ue,[Le,e("div",qe,[e("span",null,_((u=k(s).childrens)==null?void 0:u.length),1)])]),k(s).errorInfo?(i(),r("div",Ge,[He,e("div",Qe,[e("span",null,_(k(s).errorInfo),1)])])):F("v-if",!0)])}}});var Ze=E(Xe,[]);const Je={class:"tab-content"},Ke=e("div",{class:"label-name"},[e("span",null,"\u76EE\u6807\u5206\u533A")],-1),Ye={class:"label-value"},es=e("option",{value:-1},"\u9009\u62E9\u8981\u6302\u8F7D\u7684\u5206\u533A",-1),ss=["value"],ts=e("div",{class:"label-name"},[e("span",null,"\u6302\u8F7D\u70B9")],-1),us={class:"label-value"},ns={class:"label-btns"},ls=["disabled"],os=B({__name:"mount",props:{mountIndex:{type:Number,required:!0}},setup(t){const s=t,n=$("disk"),o=$("disabled"),u=ie({index:s.mountIndex!=null?s.mountIndex:-1,mountPoint:"",item:{mountPoint:"",path:"",name:"",filesystem:"",total:"",used:"",usage:0,uuid:"",isReadOnly:!1,isSystemRoot:!1,sizeInt:""}}),p=()=>{var c;const v=n.value;u.index==-1&&(u.item=null,u.mountPoint=""),v.childrens&&(u.item=v.childrens[u.index],u.mountPoint="/mnt/data_"+((c=u==null?void 0:u.item)==null?void 0:c.name))},m=()=>g(this,null,function*(){const v=n.value,c=u.item;if(c==null||u.index==-1){f.Message("\u83B7\u53D6\u4E0D\u5230\u8981\u6302\u8F7D\u7684\u5206\u533A");return}if(c.path==null||c.path==""){f.Message("\u83B7\u53D6\u4E0D\u5230\u6302\u8F7D\u7684\u5206\u533A\u8DEF\u5F84");return}if(c.uuid==null||c.uuid==""){f.Message("\u83B7\u53D6\u4E0D\u5230\u6302\u8F7D\u7684\u5206\u533AID");return}if(u.mountPoint==""){f.Message("\u6302\u8F7D\u70B9\u4E0D\u80FD\u4E3A\u7A7A");return}const l=f.Loading("\u6302\u8F7D\u4E2D...");try{const a=yield U.Nas.Disk.Partition.Mount.POST({path:c.path,uuid:c.uuid,mountPoint:u.mountPoint});if(a!=null&&a.data){const{result:d,error:h}=a==null?void 0:a.data;if(h)throw h;d&&(v&&v.childrens&&v.childrens[u.index]&&(v.childrens[u.index].mountPoint=d.mountPoint),f.Success("\u6302\u8F7D\u6210\u529F,\u8BF7\u5173\u95ED\u7A97\u53E3"))}}catch(a){f.Error(`${a}`)}finally{l.Close(),o.value=!1}});return u.index>=0&&p(),(v,c)=>(i(),r("section",Je,[Ke,e("div",Ye,[w(e("select",{"onUpdate:modelValue":c[0]||(c[0]=l=>u.index=l),onChange:p},[es,(i(!0),r(D,null,x(k(n).childrens,(l,a)=>{var d;return i(),r(D,null,[F(" \u672A\u6302\u8F7D\u7684\u5206\u533A "),l.mountPoint?F("v-if",!0):(i(),r("option",{key:0,value:a},_(l.path)+"\uFF08"+_(l.total)+"\uFF0C"+_((d=l==null?void 0:l.filesystem)==null?void 0:d.toUpperCase())+"\uFF09 ",9,ss))],64)}),256))],544),[[ae,u.index]])]),u.index!=-1?(i(),r(D,{key:0},[ts,e("div",us,[w(e("input",{type:"text","onUpdate:modelValue":c[1]||(c[1]=l=>u.mountPoint=l)},null,512),[[de,u.mountPoint,void 0,{trim:!0}]])]),e("div",ns,[e("button",{class:"mount",disabled:k(o),onClick:c[2]||(c[2]=l=>m())},"\u6302\u8F7D",8,ls)])],64)):F("v-if",!0)]))}});var is=E(os,[]);const as={class:"tab-content"},ds=e("colgroup",null,[e("col"),e("col"),e("col"),e("col"),e("col")],-1),cs=e("thead",null,[e("tr",null,[e("th",null," \u540D\u79F0 "),e("th",null," \u8DEF\u5F84 "),e("th",null," \u5BB9\u91CF "),e("th",null,"\u683C\u5F0F"),e("th",null," \u72B6\u6001 "),e("th",null," \u6302\u8F7D\u70B9 ")])],-1),rs={key:0},_s={key:1,class:"warning"},ps={key:0},vs=["onClick"],ms=B({__name:"partition",setup(t){const s=$("disk"),n=$("onMount");return(o,u)=>(i(),r("section",as,[e("table",null,[ds,cs,e("tbody",null,[(i(!0),r(D,null,x(k(s).childrens,(p,m)=>(i(),r("tr",null,[e("th",null,[e("span",null,_(p.name),1)]),e("th",null,_(p.path),1),e("th",null,[e("span",null,_(p.used||0)+"/"+_(p.total||0),1)]),e("th",null,[p.filesystem=="ext4"?(i(),r("span",rs,_(p.filesystem),1)):(i(),r("span",_s,_(p.filesystem),1))]),e("th",null,[e("span",null,_(p.isReadOnly?"\u53EA\u8BFB":"\u8BFB\u5199"),1)]),e("th",null,[p.mountPoint?(i(),r("span",ps,[e("span",null,_(p.mountPoint),1)])):(i(),r("a",{key:1,onClick:v=>k(n)(m)}," \u53BB\u6302\u8F7D ",8,vs))])]))),256))])])]))}});var hs=E(ms,[]);const O=t=>(L("data-v-4a6f1ab1"),t=t(),q(),t),ks={class:"tab-content"},Fs=O(()=>e("div",{class:"label-name"},[e("span",null,"\u8981\u683C\u5F0F\u5316\u7684\u76EE\u6807")],-1)),fs={class:"label-value2"},bs={class:"disk-item"},Ds=O(()=>e("em",{class:"disk_main"},"\u5168\u76D8",-1)),ys={class:"disk-item"},$s=["value"],Cs=O(()=>e("em",null,"\u5206\u533A",-1)),xs=O(()=>e("div",{class:"label-name"},[e("span",null,"\u683C\u5F0F\u5316\u4E3A")],-1)),Bs={class:"label-value2"},Es={class:"disk-item"},As={class:"label-btns"},gs=["disabled"],ws=B({__name:"foramt",setup(t){const s=$("disk"),n=$("updateDisk"),o=$("disabled"),u=C(-1),p=C("ext4"),m=()=>g(this,null,function*(){const l=P({},s.value),a=u.value;if(a==-1){if(!confirm(`\u8B66\u544A\uFF1A\u8BE5\u64CD\u4F5C\u5C06\u521D\u59CB\u5316 ${l.venderModel} \u786C\u76D8\u5E76\u521B\u5EFA\u4E00\u4E2A\u5206\u533A\uFF0C\u8BF7\u4F60\u8C28\u614E\u64CD\u4F5C`)||!confirm("\u662F\u5426\u786E\u5B9A\u521D\u59CB\u5316?"))return;v(l);return}if(l.childrens){const d=l.childrens[a],h=d.mountPoint||d.path;if(!confirm(`\u8B66\u544A\uFF1A\u683C\u5F0F\u5316\u4F1A\u6E05\u7A7A ${h} \u5206\u533A\u6570\u636E\uFF0C\u8BF7\u4F60\u8C28\u614E\u64CD\u4F5C`)||!confirm(`\u662F\u5426\u786E\u5B9A\u683C\u5F0F\u5316 ${h}?`))return;c(d,a);return}}),v=l=>g(this,null,function*(){if(o.value=!0,l.name==null||l.path==""){f.Warning("\u83B7\u53D6\u4E0D\u5230\u8BBE\u5907\u540D\u79F0");return}if(l.path==null||l.path==""){f.Warning("\u83B7\u53D6\u4E0D\u5230\u8BBE\u5907\u8DEF\u5F84");return}o.value=!0;const a=f.Loading("\u521D\u59CB\u5316\u4E2D...");try{const d=yield U.Nas.Disk.Init.POST({name:l.name,path:l.path});if(d!=null&&d.data){const{result:h,error:y}=d==null?void 0:d.data;if(y&&f.Warning(y),h){if(h.errorInfo){f.Warning(h.errorInfo);return}f.Success("\u521D\u59CB\u5316\u6210\u529F"),n(h)}}}catch(d){f.Error(d)}finally{a.Close(),o.value=!1}}),c=(l,a)=>g(this,null,function*(){if(o.value=!0,l.path==null||l.path==""){f.Warning("\u83B7\u53D6\u4E0D\u5230\u5206\u533A\u8DEF\u5F84");return}o.value=!0;const d=f.Loading("\u683C\u5F0F\u5316\u4E2D...");try{const h=yield U.Nas.Disk.Partition.Format.POST({path:l.path,uuid:l.uuid,mountPoint:l.mountPoint});if(h!=null&&h.data){const{result:y,error:I}=h==null?void 0:h.data;if(I&&f.Warning(I),y){f.Success("\u683C\u5F0F\u5316\u6210\u529F");const N=P({},s.value);N.childrens&&(N.childrens[a]=y),n(N)}}}catch(h){f.Error(h)}finally{d.Close(),o.value=!1}});return(l,a)=>(i(),r("section",ks,[Fs,e("div",fs,[e("label",bs,[w(e("input",{type:"radio",value:-1,"onUpdate:modelValue":a[0]||(a[0]=d=>u.value=d)},null,512),[[z,u.value]]),Ds,R(_(k(s).path)+"\uFF08"+_(k(s).total)+"\uFF09 ",1)]),(i(!0),r(D,null,x(k(s).childrens,(d,h)=>{var y;return i(),r("label",ys,[w(e("input",{type:"radio",value:h,"onUpdate:modelValue":a[1]||(a[1]=I=>u.value=I)},null,8,$s),[[z,u.value]]),Cs,R(_(d.path)+"\uFF08"+_(d.total)+"\uFF0C"+_((y=d==null?void 0:d.filesystem)==null?void 0:y.toUpperCase())+"\uFF09 ",1)])}),256))]),xs,e("div",Bs,[e("label",Es,[w(e("input",{type:"radio",value:"ext4","onUpdate:modelValue":a[2]||(a[2]=d=>p.value=d)},null,512),[[z,p.value]]),R(" EXT4 ")])]),e("div",As,[e("button",{class:"mount",disabled:k(o),onClick:a[3]||(a[3]=d=>m())},"\u683C\u5F0F\u5316",8,gs)])]))}});var Is=E(ws,[["__scopeId","data-v-4a6f1ab1"]]);const Ps={class:"tabls"},Ms=["disabled"],Ss=["disabled"],Vs=["disabled"],js=["disabled"],Os=B({__name:"index",props:{disk:{type:Object,required:!0},close:Function},setup(t){const s=t,n=()=>{v.value&&location.reload(),s.close&&s.close()},o=C("main"),u=C(!1),p=C(s.disk),m=C(null),v=C(!1);M("disk",p),M("updateDisk",l=>{p.value=l,v.value=!0}),M("disabled",u),M("onMount",l=>{m.value=l,o.value="mount"});const c=l=>{l=="mount"&&(m.value=null),o.value=l};return(l,a)=>(i(),b(pe,{onHandleClose:n,title:"Storage Manager",width:"920px"},{default:ce(()=>[e("ul",Ps,[e("button",{class:S({on:o.value=="main"}),onClick:a[0]||(a[0]=d=>c("main")),disabled:u.value},"\u6458\u8981",10,Ms),e("button",{class:S({on:o.value=="partition"}),onClick:a[1]||(a[1]=d=>c("partition")),disabled:u.value},"\u5206\u533A",10,Ss),e("button",{class:S({on:o.value=="mount"}),onClick:a[2]||(a[2]=d=>c("mount")),disabled:u.value},"\u6302\u8F7D",10,Vs),e("button",{class:S({on:o.value=="foramt"}),onClick:a[3]||(a[3]=d=>c("foramt")),disabled:u.value},"\u683C\u5F0F\u5316",10,js)]),o.value=="main"?(i(),b(Ze,{key:0})):o.value=="partition"?(i(),b(hs,{key:1})):o.value=="mount"?(i(),b(is,{key:2,mountIndex:m.value},null,8,["mountIndex"])):o.value=="foramt"?(i(),b(Is,{key:3})):F("v-if",!0)]),_:1}))}});var Ts=E(Os,[["__scopeId","data-v-5902eff0"]]);class Ns extends ve{OpenDisk(s){this.openWindow(Ts,s)}}const ee=new Ns;ee.OpenDisk;const se=t=>(L("data-v-25ccdec0"),t=t(),q(),t),Ws={class:"disk-item"},zs={class:"disk-item_contanier"},Rs={class:"disk-item_icon"},Us={class:"disk-item_name"},Ls=se(()=>e("div",{class:"auto"},null,-1)),qs={class:"disk-item_used"},Gs={key:0,class:"disk-item_info"},Hs={class:"label-msg.warning"},Qs={key:1,class:"disk-item_info"},Xs=se(()=>e("div",{class:"auto"},null,-1)),Zs=B({__name:"item",props:{disk:{type:Object,required:!0}},setup(t){const s=t;j(()=>{var o;return((o=s.disk.childrens)==null?void 0:o.length)||0}),j(()=>{var u,p;let o=0;return(p=(u=s.disk)==null?void 0:u.childrens)==null||p.forEach(m=>{if(!m.mountPoint){const v=Number(m.sizeInt),c=(1<<30)*2;v>c&&o++}}),o});const n=()=>{ee.OpenDisk({disk:s.disk})};return(o,u)=>{const p=re("icon-disk");return i(),r("div",Ws,[e("div",zs,[e("div",Rs,[Y(p)]),e("div",Us,[e("span",null,_(t.disk.name)+" \u3010"+_(t.disk.size)+"\u3011"+_(t.disk.venderModel),1)]),Ls,e("div",qs,[e("span",null,_(t.disk.used)+" / "+_(t.disk.total),1)])]),t.disk.errorInfo?(i(),r("div",Gs,[e("span",Hs,_(t.disk.errorInfo),1)])):(i(),r("div",Qs,[F(" \u7C7B\u578B:{{ disk.partyLabelType }} "),e("span",null,_(t.disk.path),1),Xs,F(" \u5F53\u6CA1\u6709\u5206\u533A\u65F6 "),F(` + \u683C\u5F0F\u5316\u5E76\u6302\u8F7D + + + \u683C\u5F0F\u5316 + `),F(" \u5F53\u6709\u672A\u6302\u8F7D\u7684\u5206\u533A\u65F6 "),F(` + \u6302\u8F7D\u5206\u533A + `),e("a",{onClick:u[0]||(u[0]=m=>n())}," \u67E5\u770B ")])),F(`
+
+ {{ item.name }} + {{ item.mountPoint }} +
+
`)])}}});var V=E(Zs,[["__scopeId","data-v-25ccdec0"]]);const T=t=>(L("data-v-08368c95"),t=t(),q(),t),Js={key:0,class:"ul-container"},Ks=T(()=>e("div",{class:"ul-container_title"},[e("span",null,"\u7CFB\u7EDF\u78C1\u76D8")],-1)),Ys={class:"ul-container_body"},et={key:1,class:"ul-container"},st=T(()=>e("div",{class:"ul-container_title"},[e("span",null,"\u5DF2\u6302\u8F7D\u78C1\u76D8")],-1)),tt={class:"ul-container_body"},ut={key:2,class:"ul-container"},nt=T(()=>e("div",{class:"ul-container_title"},[e("span",null,"\u672A\u8BC6\u522B\u78C1\u76D8")],-1)),lt={class:"ul-container_body"},ot={key:3,class:"ul-container"},it=T(()=>e("div",{class:"ul-container_title"},[e("span",null,"raid")],-1)),at={class:"ul-container_body"},dt=B({__name:"index",setup(t){const s=_e(),n=j(()=>s.disk),o=j(()=>s.raid.disks);return(u,p)=>(i(),r("main",null,[n.value.rootDisks.length>0?(i(),r("ul",Js,[Ks,e("div",Ys,[F(" \u8FC7\u6EE4\u51FA\u7CFB\u7EDF\u6240\u5728\u5206\u533A\u662F\u5426\u5728\u8BE5\u78C1\u76D8 "),(i(!0),r(D,null,x(n.value.rootDisks,(m,v)=>(i(),b(V,{disk:m},null,8,["disk"]))),256))])])):F("v-if",!0),n.value.mountedDisks.length>0?(i(),r("ul",et,[st,e("div",tt,[(i(!0),r(D,null,x(n.value.mountedDisks,(m,v)=>(i(),b(V,{disk:m},null,8,["disk"]))),256))])])):F("v-if",!0),n.value.errorDisks.length>0?(i(),r("ul",ut,[nt,e("div",lt,[(i(!0),r(D,null,x(n.value.errorDisks,(m,v)=>(i(),b(V,{disk:m},null,8,["disk"]))),256))])])):F("v-if",!0),o.value.length>0?(i(),r("ul",ot,[it,e("div",at,[(i(!0),r(D,null,x(o.value,(m,v)=>(i(),b(V,{disk:m},null,8,["disk"]))),256))])])):F("v-if",!0)]))}});var pt=E(dt,[["__scopeId","data-v-08368c95"]]);export{pt as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.e13fda41.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.e13fda41.js new file mode 100644 index 00000000..bd868dea --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.e13fda41.js @@ -0,0 +1 @@ +import{_ as o,E as r,o as n,c as t,G as s}from"./index.js";const a={},c={id:"page",class:"page-container"};function _(i,p){const e=r("router-loading");return n(),t("div",c,[s(e)])}var l=o(a,[["render",_]]);export{l as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.ec358d08.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.ec358d08.js new file mode 100644 index 00000000..ed20ca6e --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.ec358d08.js @@ -0,0 +1 @@ +var h=Object.defineProperty;var F=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var v=(l,s,u)=>s in l?h(l,s,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[s]=u,b=(l,s)=>{for(var u in s||(s={}))C.call(s,u)&&v(l,u,s[u]);if(F)for(var u of F(s))x.call(s,u)&&v(l,u,s[u]);return l};var E=(l,s,u)=>new Promise((c,d)=>{var r=n=>{try{a(u.next(n))}catch(o){d(o)}},t=n=>{try{a(u.throw(n))}catch(o){d(o)}},a=n=>n.done?c(n.value):Promise.resolve(n.value).then(r,t);a((u=u.apply(l,s)).next())});import{_ as y,d as A,r as D,x as w,o as m,c as _,f as e,w as i,j as p,Q as B,s as f,t as g,h as V,g as k,R as I,T as M,i as N}from"./index.js";const P=I('
\u65C1\u8DEF\u7531\u6A21\u5F0F\uFF0C\u4E5F\u53EB\u5355\u81C2\u8DEF\u7531\u6A21\u5F0F\u3002\u60A8\u53EF\u4EE5\u7528\u4E0A\u4E00\u7EA7\u8DEF\u7531\u62E8\u53F7\uFF0C\u7136\u540E\u7531\u8BE5\u8BBE\u5907\u6765\u5B9E\u73B0\u4E00\u4E9B\u9AD8\u7EA7\u529F\u80FD\u3002
LAN \u63A5\u53E3\u914D\u7F6E\u65B9\u5F0F
IP \u5730\u5740\uFF08\u8BF7\u548C\u4E0A\u4E00\u6B65\u8BB0\u5F55\u7684\u4E3B\u8DEF\u7531\u5730\u5740\u5728\u540C\u4E00\u7F51\u6BB5\uFF09
',4),S={class:"label-value"},U=e("div",{class:"label-name"},[e("span",null,"\u5B50\u7F51\u63A9\u7801")],-1),q={class:"label-value"},L=e("div",{class:"label-name"},[e("span",null,"\u7F51\u5173\u5730\u5740")],-1),T={class:"label-value"},H=e("div",{class:"label-name"},[e("span",null,"DNS\u670D\u52A1\u5668")],-1),R={class:"label-value"},j=e("div",{class:"label-name"},[e("span",null,"\u662F\u5426\u63D0\u4F9B DHCP\uFF08\u5982\u679C\u662F\u63D0\u4F9B DHCP\uFF0C\u5219\u9700\u8981\u5173\u95ED\u4E3B\u8DEF\u7531 DHCP\uFF09")],-1),G={class:"label-value"},O={class:"label-flex"},Q={class:"label-btns"},z=["disabled"],J={key:0,class:"label-msg"},K=A({__name:"index",setup(l){const s=D(""),u=w({subnetMask:"255.255.255.0",staticDnsIp:"223.5.5.5",staticLanIp:"",gateway:"",enableDhcp:!0}),c=D(!1),d=()=>E(this,null,function*(){const r=b({},u),t=M.Loading("\u914D\u7F6E\u4E2D...");try{const a=yield N.Guide.GatewayRouter.POST(r);if(a!=null&&a.data){const{success:n,error:o}=a==null?void 0:a.data;o&&(s.value=o),(n==null||n==0)&&(s.value="\u914D\u7F6E\u6210\u529F")}}catch(a){s.value=a}t.Close()});return(r,t)=>(m(),_("form",{class:"form-container",onSubmit:k(d,["prevent"])},[P,e("div",S,[i(e("input",{type:"text",placeholder:"ip\u5730\u5740","onUpdate:modelValue":t[0]||(t[0]=a=>u.staticLanIp=a),required:""},null,512),[[p,u.staticLanIp,void 0,{trim:!0}]])]),U,e("div",q,[i(e("input",{type:"text",placeholder:"\u5B50\u7F51\u63A9\u7801\u5730\u5740","onUpdate:modelValue":t[1]||(t[1]=a=>u.subnetMask=a),required:""},null,512),[[p,u.subnetMask,void 0,{trim:!0}]])]),L,e("div",T,[i(e("input",{type:"text",placeholder:"\u7F51\u5173\u5730\u5740","onUpdate:modelValue":t[2]||(t[2]=a=>u.gateway=a),required:""},null,512),[[p,u.gateway,void 0,{trim:!0}]])]),H,e("div",R,[i(e("input",{type:"text",placeholder:"dns\u670D\u52A1\u5668\u5730\u5740","onUpdate:modelValue":t[3]||(t[3]=a=>u.staticDnsIp=a),required:""},null,512),[[p,u.staticDnsIp,void 0,{trim:!0}]])]),j,e("div",G,[e("div",O,[e("label",null,[i(e("input",{type:"radio",value:!1,"onUpdate:modelValue":t[4]||(t[4]=a=>u.enableDhcp=a)},null,512),[[B,u.enableDhcp]]),f("\u5173\u95ED")]),e("label",null,[i(e("input",{type:"radio",value:!0,"onUpdate:modelValue":t[5]||(t[5]=a=>u.enableDhcp=a)},null,512),[[B,u.enableDhcp]]),f("\u542F\u7528")])])]),e("div",Q,[e("button",{class:"sumbit",disabled:c.value},"\u4FDD\u5B58",8,z)]),s.value?(m(),_("div",J,[e("span",null,g(s.value),1)])):V("v-if",!0)],32))}});var Y=y(K,[]);export{Y as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.f5c13beb.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.f5c13beb.js new file mode 100644 index 00000000..292b723b --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/chunk.f5c13beb.js @@ -0,0 +1 @@ +var p=(o,u,s)=>new Promise((h,c)=>{var f=r=>{try{t(s.next(r))}catch(l){c(l)}},x=r=>{try{t(s.throw(r))}catch(l){c(l)}},t=r=>r.done?h(r.value):Promise.resolve(r.value).then(f,x);t((s=s.apply(o,u)).next())});import{_ as w,d as v,x as B,P as m,M as g,o as i,c as a,f as e,F as k,e as y,s as _,t as n,p as A,q as C,i as M}from"./index.js";const d=o=>(A("data-v-2e3223f5"),o=o(),C(),o),D={class:"page-table"},F=d(()=>e("colgroup",null,[e("col"),e("col"),e("col"),e("col"),e("col"),e("col")],-1)),E=d(()=>e("thead",null,[e("tr",null,[e("th",null," \u72B6\u6001 "),e("th",null," \u63A5\u53E3 "),e("th",null," \u7C7B\u578B "),e("th",null," mac "),e("th",null," \u63A5\u6536 "),e("th",null," \u53D1\u9001 ")])],-1)),b={class:"flex-icon"},N=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:v":"https://vecta.io/nano",width:"48",height:"38",viewBox:"0 0 12.7 10.05"},[e("defs",null,[e("filter",{id:"A","color-interpolation-filters":"sRGB"},[e("feColorMatrix",{result:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "}),e("feColorMatrix",{values:"0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"}),e("feColorMatrix",{in:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "})]),e("path",{id:"B",d:"M80.56 75.75h3.91v22.79h-3.91z"})]),e("g",{transform:"translate(0 -286.95)"},[e("rect",{x:".21",y:"287.25",width:"12.33",height:"9.5",ry:".57",fill:"#e6e6e6",stroke:"#e6e6e6","stroke-linejoin":"round","stroke-width":".37","paint-order":"normal"}),e("path",{transform:"matrix(.105 0 0 .0989 -6.0834 280.6)",d:"M73.96 75.66h89.41c2.31 0 4.17 1.86 4.17 4.17v52.65h-21.74v9.41h-8.69v12.59h-36.87v-12.59h-8.69v-9.41H69.79V79.83c0-2.31 1.86-4.17 4.17-4.17z",fill:"#999",filter:"url(#A)",stroke:"#999","stroke-width":"2.5"}),e("g",{transform:"matrix(.1048 0 0 .1048 -6.0999 280.7)",fill:"#fff",filter:"url(#A)",stroke:"#fff"},[e("use",{"xlink:href":"#B"}),e("use",{"xlink:href":"#B",x:"73.04"}),e("use",{"xlink:href":"#B",x:"52.17"}),e("use",{"xlink:href":"#B",x:"41.74"}),e("use",{"xlink:href":"#B",x:"31.3"}),e("use",{"xlink:href":"#B",x:"20.87"}),e("use",{"xlink:href":"#B",x:"10.43"}),e("use",{"xlink:href":"#B",x:"62.61"})]),e("rect",{x:"1.24",y:"294.55",width:"1.6",height:"1.38",ry:".11",fill:"#ccc",stroke:"#ccc","stroke-width":".22","paint-order":"normal"})])],-1)),S=d(()=>e("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"48",height:"38",viewBox:"0 0 12.7 10.05","xmlns:v":"https://vecta.io/nano"},[e("defs",null,[e("filter",{id:"A","color-interpolation-filters":"sRGB"},[e("feColorMatrix",{result:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "}),e("feColorMatrix",{values:"0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0"}),e("feColorMatrix",{in:"A",values:"2 -0.5 -0.5 0 0 -0.5 2 -0.5 0 0 -0.5 -0.5 2 0 0 0 0 0 1 0 "})]),e("path",{id:"B",d:"M80.56 75.75h3.91v22.79h-3.91z"})]),e("g",{transform:"translate(-.03 -287.07)"},[e("rect",{x:".24",y:"287.36",width:"12.33",height:"9.5",ry:".57",fill:"#e6e6e6",stroke:"#e6e6e6","stroke-linejoin":"round","stroke-width":".37","paint-order":"normal"}),e("path",{transform:"matrix(.105 0 0 .0989 -6.0532 280.72)",d:"M73.96 75.66h89.41c2.31 0 4.17 1.86 4.17 4.17v52.65h-21.74v9.41h-8.69v12.59h-36.87v-12.59h-8.69v-9.41H69.79V79.83c0-2.31 1.86-4.17 4.17-4.17z",fill:"#4d4d4d",filter:"url(#A)",stroke:"#4d4d4d","stroke-width":"2.5"}),e("g",{transform:"matrix(.1048 0 0 .1048 -6.0697 280.81)",fill:"#fff",filter:"url(#A)",stroke:"#fff"},[e("use",{"xlink:href":"#B"}),e("use",{"xlink:href":"#B",x:"73.04"}),e("use",{"xlink:href":"#B",x:"52.17"}),e("use",{"xlink:href":"#B",x:"41.74"}),e("use",{"xlink:href":"#B",x:"31.3"}),e("use",{"xlink:href":"#B",x:"20.87"}),e("use",{"xlink:href":"#B",x:"10.43"}),e("use",{"xlink:href":"#B",x:"62.61"})]),e("rect",{x:"1.27",y:"294.67",width:"1.6",height:"1.38",ry:".11",fill:"#55d400",stroke:"#55d400","stroke-width":".22","paint-order":"normal"})])],-1)),j=v({__name:"index",setup(o){return p(this,null,function*(){let u,s;const h=B({ports:[]}),c=t=>{switch(t){case"full":return"\u5168\u53CC\u5DE5";case"half":return"\u534A\u53CC\u5DE5"}};let f=!1;const x=()=>p(this,null,function*(){try{const t=yield M.Network.PortList.GET();if(t!=null&&t.data){const{result:r}=t==null?void 0:t.data;r&&(h.ports=r.ports||[])}}catch(t){console.log(t)}setTimeout(()=>{f||x()},1e4)});return[u,s]=m(()=>x()),yield u,s(),g(()=>{f=!0}),(t,r)=>(i(),a("table",D,[F,E,e("tbody",null,[(i(!0),a(k,null,y(h.ports,l=>(i(),a("tr",null,[e("th",b,[l.linkState=="DOWN"?(i(),a(k,{key:0},[N,_("\u672A\u8FDE\u63A5 ")],64)):(i(),a(k,{key:1},[S,_(" \u5DF2\u8FDE\u63A5 ")],64))]),e("th",null,n(l.name)+"\uFF08"+n(l.interfaceNames.join(",").toLocaleUpperCase())+"\uFF09 ",1),e("th",null,n(c(l.duplex)),1),e("th",null,n(l.macAddress||"--"),1),e("th",null,n(l.rx_packets||"--"),1),e("th",null,n(l.tx_packets||"--"),1)]))),256))])]))})}});var L=w(j,[["__scopeId","data-v-2e3223f5"]]);export{L as default}; diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/i18n/en.json b/luci-app-istorerouter/htdocs/luci-static/istorerouter/i18n/en.json new file mode 100644 index 00000000..8962d745 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/i18n/en.json @@ -0,0 +1 @@ +{"en":{"download":"Download","monitor":"Monitor","multimedia":"Multimedia","nas":"NAS","net":"Net","networking":"Networking","service":"Service","system":"System","tool":"Tool"}} \ No newline at end of file diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/i18n/zh-cn.json b/luci-app-istorerouter/htdocs/luci-static/istorerouter/i18n/zh-cn.json new file mode 100644 index 00000000..1092ea22 --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/i18n/zh-cn.json @@ -0,0 +1 @@ +{"zh-CN":{"download":"下载","monitor":"监控","multimedia":"多媒体","nas":"NAS","net":"网络","networking":"组网","service":"服务","system":"系统","tool":"工具"}} \ No newline at end of file diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/icon/eye-close.png b/luci-app-istorerouter/htdocs/luci-static/istorerouter/icon/eye-close.png new file mode 100644 index 00000000..662ccf3d Binary files /dev/null and b/luci-app-istorerouter/htdocs/luci-static/istorerouter/icon/eye-close.png differ diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/icon/eye-on.png b/luci-app-istorerouter/htdocs/luci-static/istorerouter/icon/eye-on.png new file mode 100644 index 00000000..fb3bd070 Binary files /dev/null and b/luci-app-istorerouter/htdocs/luci-static/istorerouter/icon/eye-on.png differ diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/image/bg.gif b/luci-app-istorerouter/htdocs/luci-static/istorerouter/image/bg.gif new file mode 100644 index 00000000..3708095a Binary files /dev/null and b/luci-app-istorerouter/htdocs/luci-static/istorerouter/image/bg.gif differ diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/image/logo.png b/luci-app-istorerouter/htdocs/luci-static/istorerouter/image/logo.png new file mode 100644 index 00000000..08cb6469 Binary files /dev/null and b/luci-app-istorerouter/htdocs/luci-static/istorerouter/image/logo.png differ diff --git a/luci-app-istorerouter/htdocs/luci-static/istorerouter/index.js b/luci-app-istorerouter/htdocs/luci-static/istorerouter/index.js new file mode 100644 index 00000000..333fdb1f --- /dev/null +++ b/luci-app-istorerouter/htdocs/luci-static/istorerouter/index.js @@ -0,0 +1,87 @@ +var M1=Object.defineProperty,D1=Object.defineProperties;var $1=Object.getOwnPropertyDescriptors;var Hl=Object.getOwnPropertySymbols;var A1=Object.prototype.hasOwnProperty,F1=Object.prototype.propertyIsEnumerable;var lr=Math.pow,Yl=(e,t,n)=>t in e?M1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$t=(e,t)=>{for(var n in t||(t={}))A1.call(t,n)&&Yl(e,n,t[n]);if(Hl)for(var n of Hl(t))F1.call(t,n)&&Yl(e,n,t[n]);return e},Ul=(e,t)=>D1(e,$1(t));var K=(e,t,n)=>new Promise((s,r)=>{var o=l=>{try{a(n.next(l))}catch(c){r(c)}},i=l=>{try{a(n.throw(l))}catch(c){r(c)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(o,i);a((n=n.apply(e,t)).next())});const I1=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerpolicy&&(o.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?o.credentials="include":r.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}};I1();/** +* @vue/shared v3.4.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function xn(e,t){const n=new Set(e.split(","));return t?s=>n.has(s.toLowerCase()):s=>n.has(s)}const De=Object.freeze({}),js=Object.freeze([]),nt=()=>{},R1=()=>!1,Vr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Do=e=>e.startsWith("onUpdate:"),Be=Object.assign,La=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},L1=Object.prototype.hasOwnProperty,me=(e,t)=>L1.call(e,t),Z=Array.isArray,ms=e=>Br(e)==="[object Map]",Qs=e=>Br(e)==="[object Set]",Vl=e=>Br(e)==="[object Date]",ne=e=>typeof e=="function",Re=e=>typeof e=="string",Jt=e=>typeof e=="symbol",we=e=>e!==null&&typeof e=="object",ei=e=>(we(e)||ne(e))&&ne(e.then)&&ne(e.catch),Eu=Object.prototype.toString,Br=e=>Eu.call(e),Na=e=>Br(e).slice(8,-1),xu=e=>Br(e)==="[object Object]",ja=e=>Re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,vr=xn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),N1=xn("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),ti=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},j1=/-(\w)/g,Rt=ti(e=>e.replace(j1,(t,n)=>n?n.toUpperCase():"")),H1=/\B([A-Z])/g,kn=ti(e=>e.replace(H1,"-$1").toLowerCase()),Ss=ti(e=>e.charAt(0).toUpperCase()+e.slice(1)),us=ti(e=>e?`on${Ss(e)}`:""),Qn=(e,t)=>!Object.is(e,t),Fs=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Ao=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Ou=e=>{const t=Re(e)?Number(e):NaN;return isNaN(t)?e:t};let Bl;const ni=()=>Bl||(Bl=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function si(e){if(Z(e)){const t={};for(let n=0;n{if(n){const s=n.split(U1);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Pr(e){let t="";if(Re(e))t=e;else if(Z(e))for(let n=0;nks(n,t))}const Pu=e=>!!(e&&e.__v_isRef===!0),We=e=>Re(e)?e:e==null?"":Z(e)||we(e)&&(e.toString===Eu||!ne(e.toString))?Pu(e)?We(e.value):JSON.stringify(e,Mu,2):String(e),Mu=(e,t)=>Pu(t)?Mu(e,t.value):ms(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Mi(s,o)+" =>"]=r,n),{})}:Qs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Mi(n))}:Jt(t)?Mi(t):we(t)&&!Z(t)&&!xu(t)?String(t):t,Mi=(e,t="")=>{var n;return Jt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.4.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Zt(e,...t){console.warn(`[Vue warn] ${e}`,...t)}let _t;class Du{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=_t,!t&&_t&&(this.index=(_t.scopes||(_t.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const n=_t;try{return _t=this,t()}finally{_t=n}}else Zt("cannot run an inactive effect scope.")}on(){_t=this}off(){_t=this.parent}stop(t){if(this._active){let n,s;for(n=0,s=this.effects.length;n=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Cn()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=Kn,n=gs;try{return Kn=!0,gs=this,this._runnings++,Gl(this),this.fn()}finally{Wl(this),this._runnings--,gs=n,Kn=t}}stop(){this.active&&(Gl(this),Wl(this),this.onStop&&this.onStop(),this.active=!1)}}function nh(e){return e.value}function Gl(e){e._trackId++,e._depsLength=0}function Wl(e){if(e.deps.length>e._depsLength){for(let t=e._depsLength;t{const n=new Map;return n.cleanup=e,n.computed=t,n},Fo=new WeakMap,_s=Symbol("iterate"),ea=Symbol("Map key iterate");function lt(e,t,n){if(Kn&&gs){let s=Fo.get(e);s||Fo.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=Nu(()=>s.delete(n))),Ru(gs,r,{target:e,type:t,key:n})}}function qt(e,t,n,s,r,o){const i=Fo.get(e);if(!i)return;let a=[];if(t==="clear")a=[...i.values()];else if(n==="length"&&Z(e)){const l=Number(s);i.forEach((c,d)=>{(d==="length"||!Jt(d)&&d>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(i.get(n)),t){case"add":Z(e)?ja(n)&&a.push(i.get("length")):(a.push(i.get(_s)),ms(e)&&a.push(i.get(ea)));break;case"delete":Z(e)||(a.push(i.get(_s)),ms(e)&&a.push(i.get(ea)));break;case"set":ms(e)&&a.push(i.get(_s));break}Ua();for(const l of a)l&&Lu(l,4,{target:e,type:t,key:n,newValue:s,oldValue:r,oldTarget:o});Va()}function sh(e,t){const n=Fo.get(e);return n&&n.get(t)}const rh=xn("__proto__,__v_isRef,__isVue"),ju=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Jt)),zl=oh();function oh(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=re(this);for(let o=0,i=this.length;o{e[t]=function(...n){On(),Ua();const s=re(this)[t].apply(this,n);return Va(),Cn(),s}}),e}function ih(e){Jt(e)||(e=String(e));const t=re(this);return lt(t,"has",e),t.hasOwnProperty(e)}class Hu{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?zu:Wu:o?Gu:Bu).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=Z(t);if(!r){if(i&&me(zl,n))return Reflect.get(zl,n,s);if(n==="hasOwnProperty")return ih}const a=Reflect.get(t,n,s);return(Jt(n)?ju.has(n):rh(n))||(r||lt(t,"get",n),o)?a:Ye(a)?i&&ja(n)?a:a.value:we(a)?r?Ku(a):en(a):a}}class Yu extends Hu{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];if(!this._isShallow){const l=Tn(o);if(!_n(s)&&!Tn(s)&&(o=re(o),s=re(s)),!Z(t)&&Ye(o)&&!Ye(s))return l?!1:(o.value=s,!0)}const i=Z(t)&&ja(n)?Number(n)e,ri=e=>Reflect.getPrototypeOf(e);function to(e,t,n=!1,s=!1){e=e.__v_raw;const r=re(e),o=re(t);n||(Qn(t,o)&<(r,"get",t),lt(r,"get",o));const{has:i}=ri(r),a=s?Ba:n?Ga:Mr;if(i.call(r,t))return a(e.get(t));if(i.call(r,o))return a(e.get(o));e!==r&&e.get(t)}function no(e,t=!1){const n=this.__v_raw,s=re(n),r=re(e);return t||(Qn(e,r)&<(s,"has",e),lt(s,"has",r)),e===r?n.has(e):n.has(e)||n.has(r)}function so(e,t=!1){return e=e.__v_raw,!t&<(re(e),"iterate",_s),Reflect.get(e,"size",e)}function ql(e,t=!1){!t&&!_n(e)&&!Tn(e)&&(e=re(e));const n=re(this);return ri(n).has.call(n,e)||(n.add(e),qt(n,"add",e,e)),this}function Kl(e,t,n=!1){!n&&!_n(t)&&!Tn(t)&&(t=re(t));const s=re(this),{has:r,get:o}=ri(s);let i=r.call(s,e);i?Vu(s,r,e):(e=re(e),i=r.call(s,e));const a=o.call(s,e);return s.set(e,t),i?Qn(t,a)&&qt(s,"set",e,t,a):qt(s,"add",e,t),this}function Jl(e){const t=re(this),{has:n,get:s}=ri(t);let r=n.call(t,e);r?Vu(t,n,e):(e=re(e),r=n.call(t,e));const o=s?s.call(t,e):void 0,i=t.delete(e);return r&&qt(t,"delete",e,void 0,o),i}function Zl(){const e=re(this),t=e.size!==0,n=ms(e)?new Map(e):new Set(e),s=e.clear();return t&&qt(e,"clear",void 0,void 0,n),s}function ro(e,t){return function(s,r){const o=this,i=o.__v_raw,a=re(i),l=t?Ba:e?Ga:Mr;return!e&<(a,"iterate",_s),i.forEach((c,d)=>s.call(r,l(c),l(d),o))}}function oo(e,t,n){return function(...s){const r=this.__v_raw,o=re(r),i=ms(o),a=e==="entries"||e===Symbol.iterator&&i,l=e==="keys"&&i,c=r[e](...s),d=n?Ba:t?Ga:Mr;return!t&<(o,"iterate",l?ea:_s),{next(){const{value:u,done:f}=c.next();return f?{value:u,done:f}:{value:a?[d(u[0]),d(u[1])]:d(u),done:f}},[Symbol.iterator](){return this}}}}function In(e){return function(...t){{const n=t[0]?`on key "${t[0]}" `:"";Zt(`${Ss(e)} operation ${n}failed: target is readonly.`,re(this))}return e==="delete"?!1:e==="clear"?void 0:this}}function dh(){const e={get(o){return to(this,o)},get size(){return so(this)},has:no,add:ql,set:Kl,delete:Jl,clear:Zl,forEach:ro(!1,!1)},t={get(o){return to(this,o,!1,!0)},get size(){return so(this)},has:no,add(o){return ql.call(this,o,!0)},set(o,i){return Kl.call(this,o,i,!0)},delete:Jl,clear:Zl,forEach:ro(!1,!0)},n={get(o){return to(this,o,!0)},get size(){return so(this,!0)},has(o){return no.call(this,o,!0)},add:In("add"),set:In("set"),delete:In("delete"),clear:In("clear"),forEach:ro(!0,!1)},s={get(o){return to(this,o,!0,!0)},get size(){return so(this,!0)},has(o){return no.call(this,o,!0)},add:In("add"),set:In("set"),delete:In("delete"),clear:In("clear"),forEach:ro(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=oo(o,!1,!1),n[o]=oo(o,!0,!1),t[o]=oo(o,!1,!0),s[o]=oo(o,!0,!0)}),[e,n,t,s]}const[fh,hh,ph,mh]=dh();function oi(e,t){const n=t?e?mh:ph:e?hh:fh;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(me(n,r)&&r in s?n:s,r,o)}const gh={get:oi(!1,!1)},_h={get:oi(!1,!0)},vh={get:oi(!0,!1)},yh={get:oi(!0,!0)};function Vu(e,t,n){const s=re(n);if(s!==n&&t.call(e,s)){const r=Na(e);Zt(`Reactive ${r} contains both the raw and reactive versions of the same object${r==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Bu=new WeakMap,Gu=new WeakMap,Wu=new WeakMap,zu=new WeakMap;function wh(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function bh(e){return e.__v_skip||!Object.isExtensible(e)?0:wh(Na(e))}function en(e){return Tn(e)?e:ii(e,!1,ah,gh,Bu)}function qu(e){return ii(e,!1,ch,_h,Gu)}function Ku(e){return ii(e,!0,lh,vh,Wu)}function zt(e){return ii(e,!0,uh,yh,zu)}function ii(e,t,n,s,r){if(!we(e))return Zt(`value cannot be made ${t?"readonly":"reactive"}: ${String(e)}`),e;if(e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=bh(e);if(i===0)return e;const a=new Proxy(e,i===2?s:n);return r.set(e,a),a}function gn(e){return Tn(e)?gn(e.__v_raw):!!(e&&e.__v_isReactive)}function Tn(e){return!!(e&&e.__v_isReadonly)}function _n(e){return!!(e&&e.__v_isShallow)}function Io(e){return e?!!e.__v_raw:!1}function re(e){const t=e&&e.__v_raw;return t?re(t):e}function Gn(e){return Object.isExtensible(e)&&$o(e,"__v_skip",!0),e}const Mr=e=>we(e)?en(e):e,Ga=e=>we(e)?Ku(e):e,Sh="Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free";class Ju{constructor(t,n,s,r){this.getter=t,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new Ya(()=>t(this._value),()=>vo(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=re(this);return(!t._cacheable||t.effect.dirty)&&Qn(t._value,t._value=t.effect.run())&&vo(t,4),Zu(t),t.effect._dirtyLevel>=2&&(this._warnRecursive&&Zt(Sh,` + +getter: `,this.getter),vo(t,2)),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function kh(e,t,n=!1){let s,r;const o=ne(e);o?(s=e,r=()=>{Zt("Write operation failed: computed value is readonly")}):(s=e.get,r=e.set);const i=new Ju(s,r,o||!r,n);return t&&!n&&(i.effect.onTrack=t.onTrack,i.effect.onTrigger=t.onTrigger),i}function Zu(e){var t;Kn&&gs&&(e=re(e),Ru(gs,(t=e.dep)!=null?t:e.dep=Nu(()=>e.dep=void 0,e instanceof Ju?e:void 0),{target:e,type:"get",key:"value"}))}function vo(e,t=4,n,s){e=re(e);const r=e.dep;r&&Lu(r,t,{target:e,type:"set",key:"value",newValue:n,oldValue:s})}function Ye(e){return!!(e&&e.__v_isRef===!0)}function Ke(e){return Qu(e,!1)}function Th(e){return Qu(e,!0)}function Qu(e,t){return Ye(e)?e:new Eh(e,t)}class Eh{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:re(t),this._value=n?t:Mr(t)}get value(){return Zu(this),this._value}set value(t){const n=this.__v_isShallow||_n(t)||Tn(t);if(t=n?t:re(t),Qn(t,this._rawValue)){const s=this._rawValue;this._rawValue=t,this._value=n?t:Mr(t),vo(this,4,t,s)}}}function pt(e){return Ye(e)?e.value:e}const xh={get:(e,t,n)=>pt(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Ye(r)&&!Ye(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Xu(e){return gn(e)?e:new Proxy(e,xh)}function Ql(e){Io(e)||Zt("toRefs() expects a reactive object but received a plain one.");const t=Z(e)?new Array(e.length):{};for(const n in e)t[n]=ed(e,n);return t}class Oh{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return sh(re(this._object),this._key)}}class Ch{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Di(e,t,n){return Ye(e)?e:ne(e)?new Ch(e):we(e)&&arguments.length>1?ed(e,t,n):Ke(e)}function ed(e,t,n){const s=e[t];return Ye(s)?s:new Oh(e,t,n)}/** +* @vue/runtime-core v3.4.35 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/const vs=[];function yr(e){vs.push(e)}function wr(){vs.pop()}let $i=!1;function M(e,...t){if($i)return;$i=!0,On();const n=vs.length?vs[vs.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Ph();if(s)vn(s,n,11,[e+t.map(o=>{var i,a;return(a=(i=o.toString)==null?void 0:i.call(o))!=null?a:JSON.stringify(o)}).join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${pi(n,o.type)}>`).join(` +`),r]);else{const o=[`[Vue warn]: ${e}`,...t];r.length&&o.push(` +`,...Mh(r)),console.warn(...o)}Cn(),$i=!1}function Ph(){let e=vs[vs.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Mh(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[` +`],...Dh(n))}),t}function Dh({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${pi(e.component,e.type,s)}`,o=">"+n;return e.props?[r,...$h(e.props),o]:[r+o]}function $h(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...td(s,e[s]))}),n.length>3&&t.push(" ..."),t}function td(e,t,n){return Re(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ye(t)?(t=td(e,re(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):ne(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=re(t),n?t:[`${e}=`,t])}function nd(e,t){e!==void 0&&(typeof e!="number"?M(`${t} is not a valid number - got ${JSON.stringify(e)}.`):isNaN(e)&&M(`${t} is NaN - the duration expression might be incorrect.`))}const Wa={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",[0]:"setup function",[1]:"render function",[2]:"watcher getter",[3]:"watcher callback",[4]:"watcher cleanup function",[5]:"native event handler",[6]:"component event handler",[7]:"vnode hook",[8]:"directive hook",[9]:"transition hook",[10]:"app errorHandler",[11]:"app warnHandler",[12]:"ref function",[13]:"async component loader",[14]:"scheduler flush",[15]:"component update"};function vn(e,t,n,s){try{return s?e(...s):e()}catch(r){Xs(r,t,n)}}function Ot(e,t,n,s){if(ne(e)){const r=vn(e,t,n,s);return r&&ei(r)&&r.catch(o=>{Xs(o,t,n)}),r}if(Z(e)){const r=[];for(let o=0;o>>1,r=ot[s],o=Ar(r);oVt&&ot.splice(t,1)}function Ro(e){Z(e)?Hs.push(...e):(!jn||!jn.includes(e,e.allowRecurse?fs+1:fs))&&Hs.push(e),rd()}function Xl(e,t,n=Dr?Vt+1:0){for(t=t||new Map;nAr(n)-Ar(s));if(Hs.length=0,jn){jn.push(...t);return}for(jn=t,e=e||new Map,fs=0;fse.id==null?1/0:e.id,Lh=(e,t)=>{const n=Ar(e)-Ar(t);if(n===0){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function id(e){ta=!1,Dr=!0,e=e||new Map,ot.sort(Lh);const t=n=>qa(e,n);try{for(Vt=0;VtFh){const s=t.i,r=s&&sl(s.type);return Xs(`Maximum recursive updates exceeded${r?` in component <${r}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}else e.set(t,n+1)}}let Jn=!1;const yo=new Map;ni().__VUE_HMR_RUNTIME__={createRecord:Ai(ad),rerender:Ai(Hh),reload:Ai(Yh)};const Ts=new Map;function Nh(e){const t=e.type.__hmrId;let n=Ts.get(t);n||(ad(t,e.type),n=Ts.get(t)),n.instances.add(e)}function jh(e){Ts.get(e.type.__hmrId).instances.delete(e)}function ad(e,t){return Ts.has(e)?!1:(Ts.set(e,{initialDef:Lo(t),instances:new Set}),!0)}function Lo(e){return qd(e)?e.__vccOpts:e}function Hh(e,t){const n=Ts.get(e);!n||(n.initialDef.render=t,[...n.instances].forEach(s=>{t&&(s.render=t,Lo(s.type).render=t),s.renderCache=[],Jn=!0,s.effect.dirty=!0,s.update(),Jn=!1}))}function Yh(e,t){const n=Ts.get(e);if(!n)return;t=Lo(t),ec(n.initialDef,t);const s=[...n.instances];for(let r=0;r{o.parent.update(),a.delete(o)})):o.appContext.reload?o.appContext.reload():typeof window!="undefined"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required.")}Ro(()=>{yo.clear()})}function ec(e,t){Be(e,t);for(const n in e)n!=="__file"&&!(n in t)&&delete e[n]}function Ai(e){return(t,n)=>{try{return e(t,n)}catch(s){console.error(s),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Bt,gr=[],na=!1;function Gr(e,...t){Bt?Bt.emit(e,...t):na||gr.push({event:e,args:t})}function ld(e,t){var n,s;Bt=e,Bt?(Bt.enabled=!0,gr.forEach(({event:r,args:o})=>Bt.emit(r,...o)),gr=[]):typeof window!="undefined"&&window.HTMLElement&&!((s=(n=window.navigator)==null?void 0:n.userAgent)!=null&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{ld(o,t)}),setTimeout(()=>{Bt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,na=!0,gr=[])},3e3)):(na=!0,gr=[])}function Uh(e,t){Gr("app:init",e,t,{Fragment:Ee,Text:qr,Comment:ze,Static:Sr})}function Vh(e){Gr("app:unmount",e)}const Bh=Ka("component:added"),cd=Ka("component:updated"),Gh=Ka("component:removed"),Wh=e=>{Bt&&typeof Bt.cleanupBuffer=="function"&&!Bt.cleanupBuffer(e)&&Gh(e)};/*! #__NO_SIDE_EFFECTS__ */function Ka(e){return t=>{Gr(e,t.appContext.app,t.uid,t.parent?t.parent.uid:void 0,t)}}const zh=ud("perf:start"),qh=ud("perf:end");function ud(e){return(t,n,s)=>{Gr(e,t.appContext.app,t.uid,t,n,s)}}function Kh(e,t,n){Gr("component:emit",e.appContext.app,e,t,n)}let qe=null,li=null;function No(e){const t=qe;return qe=e,li=e&&e.type.__scopeId||null,t}function ts(e){li=e}function ns(){li=null}function it(e,t=qe,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&_c(-1);const o=No(t);let i;try{i=e(...r)}finally{No(o),s._d&&_c(1)}return cd(t),i};return s._n=!0,s._c=!0,s._d=!0,s}function dd(e){N1(e)&&M("Do not use built-in directive ids as custom directive id: "+e)}function Ms(e,t){if(qe===null)return M("withDirectives can only be used inside render functions."),e;const n=hi(qe),s=e.dirs||(e.dirs=[]);for(let r=0;r{e.isMounted=!0}),_d(()=>{e.isUnmounting=!0}),e}const kt=[Function,Array],fd={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:kt,onEnter:kt,onAfterEnter:kt,onEnterCancelled:kt,onBeforeLeave:kt,onLeave:kt,onAfterLeave:kt,onLeaveCancelled:kt,onBeforeAppear:kt,onAppear:kt,onAfterAppear:kt,onAppearCancelled:kt},hd=e=>{const t=e.subTree;return t.component?hd(t.component):t},Zh={name:"BaseTransition",props:fd,setup(e,{slots:t}){const n=tn(),s=Jh();return()=>{const r=t.default&&md(t.default(),!0);if(!r||!r.length)return;let o=r[0];if(r.length>1){let f=!1;for(const m of r)if(m.type!==ze){if(f){M(" can only be used on a single element or component. Use for lists.");break}o=m,f=!0}}const i=re(e),{mode:a}=i;if(a&&a!=="in-out"&&a!=="out-in"&&a!=="default"&&M(`invalid mode: ${a}`),s.isLeaving)return Fi(o);const l=tc(o);if(!l)return Fi(o);let c=sa(l,i,s,n,f=>c=f);jo(l,c);const d=n.subTree,u=d&&tc(d);if(u&&u.type!==ze&&!Gt(l,u)&&hd(n).type!==ze){const f=sa(u,i,s,n);if(jo(u,f),a==="out-in"&&l.type!==ze)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},Fi(o);a==="in-out"&&l.type!==ze&&(f.delayLeave=(m,_,b)=>{const B=pd(s,u);B[String(u.key)]=u,m[Hn]=()=>{_(),m[Hn]=void 0,delete c.delayedLeave},c.delayedLeave=b})}return o}}},Qh=Zh;function pd(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function sa(e,t,n,s,r){const{appear:o,mode:i,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:d,onEnterCancelled:u,onBeforeLeave:f,onLeave:m,onAfterLeave:_,onLeaveCancelled:b,onBeforeAppear:B,onAppear:L,onAfterAppear:I,onAppearCancelled:D}=t,W=String(e.key),O=pd(n,e),V=(N,k)=>{N&&Ot(N,s,9,k)},w=(N,k)=>{const T=k[1];V(N,k),Z(N)?N.every(E=>E.length<=1)&&T():N.length<=1&&T()},ce={mode:i,persisted:a,beforeEnter(N){let k=l;if(!n.isMounted)if(o)k=B||l;else return;N[Hn]&&N[Hn](!0);const T=O[W];T&&Gt(e,T)&&T.el[Hn]&&T.el[Hn](),V(k,[N])},enter(N){let k=c,T=d,E=u;if(!n.isMounted)if(o)k=L||c,T=I||d,E=D||u;else return;let se=!1;const xe=N[io]=$e=>{se||(se=!0,$e?V(E,[N]):V(T,[N]),ce.delayedLeave&&ce.delayedLeave(),N[io]=void 0)};k?w(k,[N,xe]):xe()},leave(N,k){const T=String(e.key);if(N[io]&&N[io](!0),n.isUnmounting)return k();V(f,[N]);let E=!1;const se=N[Hn]=xe=>{E||(E=!0,k(),xe?V(b,[N]):V(_,[N]),N[Hn]=void 0,O[T]===e&&delete O[T])};O[T]=e,m?w(m,[N,se]):se()},clone(N){const k=sa(N,t,n,s,r);return r&&r(k),k}};return ce}function Fi(e){if(Wr(e))return e=Qt(e),e.children=null,e}function tc(e){if(!Wr(e))return e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ne(n.default))return n.default()}}function jo(e,t){e.shapeFlag&6&&e.component?jo(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function md(e,t=!1,n){let s=[],r=0;for(let o=0;o1)for(let o=0;oBe({name:e.name},t,{setup:e}))():e}const br=e=>!!e.type.__asyncLoader,Wr=e=>e.type.__isKeepAlive;function Xh(e,t){gd(e,"a",t)}function e0(e,t){gd(e,"da",t)}function gd(e,t,n=Je){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(ci(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Wr(r.parent.vnode)&&t0(s,t,n,r),r=r.parent}}function t0(e,t,n,s){const r=ci(t,e,s,!0);zr(()=>{La(s[t],r)},n)}function ci(e,t,n=Je,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{On();const a=Es(n),l=Ot(t,n,e,i);return a(),Cn(),l});return s?r.unshift(o):r.push(o),o}else{const r=us(Wa[e].replace(/ hook$/,""));M(`${r} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const Pn=e=>(t,n=Je)=>{(!fi||e==="sp")&&ci(e,(...s)=>t(...s),n)},n0=Pn("bm"),er=Pn("m"),s0=Pn("bu"),r0=Pn("u"),_d=Pn("bum"),zr=Pn("um"),o0=Pn("sp"),i0=Pn("rtg"),a0=Pn("rtc");function l0(e,t=Je){ci("ec",e,t)}const Ho="components";function dt(e,t){return yd(Ho,e,!0,t)||e}const Ja=Symbol.for("v-ndc");function vd(e){return Re(e)?yd(Ho,e,!1)||e:e||Ja}function yd(e,t,n=!0,s=!1){const r=qe||Je;if(r){const o=r.type;if(e===Ho){const a=sl(o,!1);if(a&&(a===t||a===Rt(t)||a===Ss(Rt(t))))return o}const i=nc(r[e]||o[e],t)||nc(r.appContext[e],t);if(!i&&s)return o;if(n&&!i){const a=e===Ho?` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.`:"";M(`Failed to resolve ${e.slice(0,-1)}: ${t}${a}`)}return i}else M(`resolve${Ss(e.slice(0,-1))} can only be used in render() or setup().`)}function nc(e,t){return e&&(e[t]||e[Rt(t)]||e[Ss(Rt(t))])}function Yo(e,t,n,s){let r;const o=n&&n[s];if(Z(e)||Re(e)){r=new Array(e.length);for(let i=0,a=e.length;it(i,a,void 0,o&&o[a]));else{const i=Object.keys(e);r=new Array(i.length);for(let a=0,l=i.length;a1&&(M("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template."),o=()=>[]),o&&o._c&&(o._d=!1),A();const i=o&&wd(o(n)),a=Ze(Ee,{key:(n.key||i&&i.key||`_${t}`)+(!i&&s?"_fb":"")},i||(s?s():[]),i&&e._===1?64:-2);return!r&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function wd(e){return e.some(t=>qs(t)?!(t.type===ze||t.type===Ee&&!wd(t.children)):!0)?e:null}const ra=e=>e?Wd(e)?hi(e):ra(e.parent):null,ys=Be(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>zt(e.props),$attrs:e=>zt(e.attrs),$slots:e=>zt(e.slots),$refs:e=>zt(e.refs),$parent:e=>ra(e.parent),$root:e=>ra(e.root),$emit:e=>e.emit,$options:e=>Qa(e),$forceUpdate:e=>e.f||(e.f=()=>{e.effect.dirty=!0,ai(e.update)}),$nextTick:e=>e.n||(e.n=$r.bind(e.proxy)),$watch:e=>W0.bind(e)}),Za=e=>e==="_"||e==="$",Ii=(e,t)=>e!==De&&!e.__isScriptSetup&&me(e,t),bd={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:a,appContext:l}=e;if(t==="__isVue")return!0;let c;if(t[0]!=="$"){const m=i[t];if(m!==void 0)switch(m){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Ii(s,t))return i[t]=1,s[t];if(r!==De&&me(r,t))return i[t]=2,r[t];if((c=e.propsOptions[0])&&me(c,t))return i[t]=3,o[t];if(n!==De&&me(n,t))return i[t]=4,n[t];oa&&(i[t]=0)}}const d=ys[t];let u,f;if(d)return t==="$attrs"?(lt(e.attrs,"get",""),Go()):t==="$slots"&<(e,"get",t),d(e);if((u=a.__cssModules)&&(u=u[t]))return u;if(n!==De&&me(n,t))return i[t]=4,n[t];if(f=l.config.globalProperties,me(f,t))return f[t];qe&&(!Re(t)||t.indexOf("__v")!==0)&&(r!==De&&Za(t[0])&&me(r,t)?M(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):e===qe&&M(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`))},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Ii(r,t)?(r[t]=n,!0):r.__isScriptSetup&&me(r,t)?(M(`Cannot mutate + + + + <%+tasks/embed%> + + <% + local luci_main = type(luci.config) == "table" and type(luci.config.main) == "table" and luci.config.main or {} + -%> + +
+ + + + diff --git a/luci-app-istorerouter/luasrc/view/istorerouter/main_dev.htm b/luci-app-istorerouter/luasrc/view/istorerouter/main_dev.htm new file mode 100644 index 00000000..9b7a75ad --- /dev/null +++ b/luci-app-istorerouter/luasrc/view/istorerouter/main_dev.htm @@ -0,0 +1,63 @@ +<% + local ver = require "luci.version" +-%> + + + + + + + + + + + + + + + + <%+tasks/embed%> + + <% + local luci_main = type(luci.config) == "table" and type(luci.config.main) == "table" and luci.config.main or {} + -%> + +
+ + + diff --git a/luci-app-istorerouter/root/etc/config/istorerouter b/luci-app-istorerouter/root/etc/config/istorerouter new file mode 100644 index 00000000..d1f988d7 --- /dev/null +++ b/luci-app-istorerouter/root/etc/config/istorerouter @@ -0,0 +1,3 @@ +config istorerouter + option 'enabled' '1' + option 'model' 'router' diff --git a/luci-app-istorerouter/root/etc/uci-defaults/50_luci-istorerouter b/luci-app-istorerouter/root/etc/uci-defaults/50_luci-istorerouter new file mode 100755 index 00000000..d7bfee27 --- /dev/null +++ b/luci-app-istorerouter/root/etc/uci-defaults/50_luci-istorerouter @@ -0,0 +1,4 @@ +#!/bin/sh + +rm -f /tmp/luci-indexcache +exit 0 diff --git a/luci-app-istorerouter/root/usr/share/luci/menu.d/luci-app-istorerouter.json b/luci-app-istorerouter/root/usr/share/luci/menu.d/luci-app-istorerouter.json new file mode 100644 index 00000000..3c4fdfa1 --- /dev/null +++ b/luci-app-istorerouter/root/usr/share/luci/menu.d/luci-app-istorerouter.json @@ -0,0 +1,9 @@ +{ + "admin/istorerouter": { + "order": 0, + "action": { + "type": "template", + "path": "istorerouter/index" + } + } +} \ No newline at end of file diff --git a/luci-app-passwall2/root/usr/share/passwall2/app.sh b/luci-app-passwall2/root/usr/share/passwall2/app.sh index 4ee70b2e..4b7ee9cf 100755 --- a/luci-app-passwall2/root/usr/share/passwall2/app.sh +++ b/luci-app-passwall2/root/usr/share/passwall2/app.sh @@ -857,14 +857,16 @@ acl_node() { unset _error_log_file continue fi + local run_new_dnsmasq=1 + local DNSMASQ_TUN_DNS="127.0.0.1#${dns_listen_port}" + local DNSMASQ_DEFAULT_DNS="${AUTO_DNS}" + local DNSMASQ_LOCAL_DNS="${LOCAL_DNS:-${AUTO_DNS}}" + [ -n "${DIRECT_DNS_DNSMASQ_SERVER}" ] && DNSMASQ_LOCAL_DNS="${DIRECT_DNS_DNSMASQ_SERVER}" if [ "${flag}" = "default" ]; then set_cache_var "GLOBAL_SOCKS_server" "127.0.0.1:$socks_port" set_cache_var "ACL_GLOBAL_node" "$node" - local RUN_NEW_DNSMASQ=$(config_n_get @global[0] dns_redirect 1) - local DNSMASQ_DEFAULT_DNS="${AUTO_DNS}" - local DNSMASQ_LOCAL_DNS="${LOCAL_DNS:-${AUTO_DNS}}" - local DNSMASQ_TUN_DNS="127.0.0.1#${dns_listen_port}" - if [ "${RUN_NEW_DNSMASQ}" == "0" ]; then + run_new_dnsmasq=$(config_n_get @global[0] dns_redirect 1) + if [ "${run_new_dnsmasq}" != "1" ]; then #Rewrite the default DNS service configuration #Modify the default dnsmasq service lua $APP_PATH/helper_dnsmasq.lua stretch @@ -882,21 +884,16 @@ acl_node() { uci -q commit dhcp lua $APP_PATH/helper_dnsmasq.lua logic_restart - else - #Run a copy dnsmasq instance, DNS hijack for that need proxy devices. - dnsmasq_port=$(get_new_port auto) - run_copy_dnsmasq flag="default" listen_port=${dnsmasq_port} local_dns="${DNSMASQ_LOCAL_DNS}" tun_dns="${DNSMASQ_TUN_DNS}" default_dns="${DNSMASQ_DEFAULT_DNS}" - #dhcp.leases to hosts - $APP_PATH/lease2hosts.sh > /dev/null 2>&1 & - log 2 "Dnsmasq[${dnsmasq_port}]:(127.0.0.1:${dns_listen_port})" fi - else + fi + [ "${run_new_dnsmasq}" == "1" ] && { + #Run a copy dnsmasq instance, DNS hijack for that need proxy devices. dnsmasq_port=$(get_new_port auto) - run_copy_dnsmasq flag="${flag}" listen_port=${dnsmasq_port} local_dns="${LOCAL_DNS:-${AUTO_DNS}}" tun_dns="127.0.0.1#${dns_listen_port}" default_dns="${AUTO_DNS}" - #dhcp.leases to hostsMore actions + run_copy_dnsmasq flag="${flag}" listen_port=${dnsmasq_port} local_dns="${DNSMASQ_LOCAL_DNS}" tun_dns="${DNSMASQ_TUN_DNS}" default_dns="${DNSMASQ_DEFAULT_DNS}" + #dhcp.leases to hosts $APP_PATH/lease2hosts.sh > /dev/null 2>&1 & log 2 "Dnsmasq[${dnsmasq_port}]:(127.0.0.1:${dns_listen_port})" - fi + } rm -f ${TMP_ACL_PATH}/acl_node_${nid} done } @@ -1030,6 +1027,7 @@ get_direct_dns() { DIRECT_DNS_PROTO="${direct_dns_protocol}" DIRECT_DNS_SERVER=$(echo ${result} | awk '{print $1}') DIRECT_DNS_PORT=$(echo ${result} | awk '{print $2}') + [ "${DIRECT_DNS_PROTO}" = "udp" ] && DIRECT_DNS_DNSMASQ_SERVER="${DIRECT_DNS_SERVER}#${DIRECT_DNS_PORT}" RETURN_DNS="${RETURN_DNS},${DIRECT_DNS_SERVER}#${DIRECT_DNS_PORT}#${DIRECT_DNS_PROTO}" } fi diff --git a/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua b/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua index f3ce59d7..17ec2f3e 100644 --- a/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua +++ b/luci-app-passwall2/root/usr/share/passwall2/helper_dnsmasq.lua @@ -140,6 +140,10 @@ function copy_instance(var) end end tinsert(conf_lines, "port=" .. LISTEN_PORT) + --dhcp.leases to hostsMore actions + local hosts = api.CACHE_PATH .. "/dhcp-hosts" + sys.call("touch " .. hosts) + tinsert(conf_lines, "addn-hosts=" .. hosts) if TMP_DNSMASQ_PATH then sys.call("rm -rf " .. TMP_DNSMASQ_PATH .. "/*passwall2*") end @@ -159,7 +163,6 @@ function add_rule(var) local FLAG = var["FLAG"] local TMP_DNSMASQ_PATH = var["TMP_DNSMASQ_PATH"] local DNSMASQ_CONF_FILE = var["DNSMASQ_CONF_FILE"] - local LISTEN_PORT = var["LISTEN_PORT"] local DEFAULT_DNS = var["DEFAULT_DNS"] local LOCAL_DNS = var["LOCAL_DNS"] local TUN_DNS = var["TUN_DNS"] @@ -317,20 +320,6 @@ function add_rule(var) if DNSMASQ_CONF_FILE ~= "nil" then local conf_lines = {} - if LISTEN_PORT then - --Copy dnsmasq instance - conf_lines = copy_instance({ - ["LISTEN_PORT"] = LISTEN_PORT, - ["TMP_DNSMASQ_PATH"] = TMP_DNSMASQ_PATH, - ["return"] = "1" - }) - --dhcp.leases to hostsMore actions - local hosts = api.CACHE_PATH .. "/dhcp-hosts" - sys.call("touch " .. hosts) - tinsert(conf_lines, "addn-hosts=" .. hosts) - else - --Modify the default dnsmasq service - end tinsert(conf_lines, string.format("conf-dir=%s", TMP_DNSMASQ_PATH)) if dnsmasq_default_dns then for s in string.gmatch(dnsmasq_default_dns, '[^' .. "," .. ']+') do diff --git a/luci-lib-linkeaseauth/Makefile b/luci-lib-linkeaseauth/Makefile index 4b127d1e..3d03706a 100644 --- a/luci-lib-linkeaseauth/Makefile +++ b/luci-lib-linkeaseauth/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI shared OpenWrt auth bridge for LinkEase apps LUCI_PKGARCH:=all -PKG_VERSION:=1.0.0 +PKG_VERSION:=1.0.1 PKG_RELEASE:=1 include $(TOPDIR)/feeds/luci/luci.mk diff --git a/luci-lib-linkeaseauth/luasrc/controller/linkease_auth.lua b/luci-lib-linkeaseauth/luasrc/controller/linkease_auth.lua index e3014752..f5a2516b 100644 --- a/luci-lib-linkeaseauth/luasrc/controller/linkease_auth.lua +++ b/luci-lib-linkeaseauth/luasrc/controller/linkease_auth.lua @@ -40,6 +40,50 @@ local function authority_host(authority) return authority:match("^([^:]+)") or authority end +local function valid_authority(authority) + return authority and authority ~= "" and authority:match("^[A-Za-z0-9%._%-%[%]:]+$") ~= nil +end + +local function request_authority() + local http = require "luci.http" + local forwarded_host = http.getenv("HTTP_X_FORWARDED_HOST") or "" + local request_host = http.getenv("HTTP_HOST") or "" + + if valid_authority(forwarded_host) then + return forwarded_host + end + if valid_authority(request_host) then + return request_host + end + return "" +end + +local function request_scheme() + local http = require "luci.http" + local forwarded_proto = http.getenv("HTTP_X_FORWARDED_PROTO") or "" + + if forwarded_proto == "https" then + return "https" + end + if http.getenv("HTTPS") == "on" then + return "https" + end + return "http" +end + +local function absolute_luci_url(path) + if not path or path == "" or path:match("^https?://") then + return path + end + + local authority = request_authority() + if authority == "" then + return path + end + + return request_scheme() .. "://" .. authority .. path +end + local function valid_apps_return(value) if not value or value == "" then return false @@ -62,7 +106,7 @@ local function valid_apps_return(value) local http = require "luci.http" local uci = require "luci.model.uci".cursor() - local request_host = http.getenv("HTTP_HOST") or "" + local request_host = request_authority() local lan_host = uci:get("network", "lan", "ipaddr") or "" local authority_host_value = authority_host(authority) @@ -135,7 +179,7 @@ end local function auth_finish_url() local dispatcher = require "luci.dispatcher" - return dispatcher.build_url("admin", "services", "linkease_auth", "auth_finish") + return absolute_luci_url(dispatcher.build_url("admin", "services", "linkease_auth", "auth_finish")) end function linkease_auth() diff --git a/v2ray-geodata/Makefile b/v2ray-geodata/Makefile index ce5bdfaf..edc3922d 100644 --- a/v2ray-geodata/Makefile +++ b/v2ray-geodata/Makefile @@ -12,13 +12,13 @@ PKG_MAINTAINER:=Tianling Shen include $(INCLUDE_DIR)/package.mk -GEOIP_VER:=202608050239 +GEOIP_VER:=202609040609 GEOIP_FILE:=geoip.dat.$(GEOIP_VER) define Download/geoip URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/ URL_FILE:=geoip.dat FILE:=$(GEOIP_FILE) - HASH:=c67bd077eb102cec74fab759b73d17f99275f56af10a87c14d9fd983508f5ce1 + HASH:=1cba1f0982cf62502fa079c66047c3d0c608196da5b3305671e68f60e917a482 endef GEOSITE_VER:=20260904020013 diff --git a/v2raya/Makefile b/v2raya/Makefile index c737f158..d927837c 100644 --- a/v2raya/Makefile +++ b/v2raya/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=v2rayA -PKG_VERSION:=2.4.16 +PKG_VERSION:=2.4.17 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/v2rayA/v2rayA/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=209885554640bc01999272279ee65c456ed7093055b7ee580cb3251b55af711f +PKG_HASH:=0965204ef0be8c4dacbd5e18a1c07b49f55f3c1d006c594f6f33a095eeb791da PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/service PKG_LICENSE:=AGPL-3.0-only @@ -60,7 +60,7 @@ define Download/v2raya-web URL:=https://github.com/v2rayA/v2rayA/releases/download/v$(PKG_VERSION)/ URL_FILE:=web.tar.gz FILE:=$(WEB_FILE) - HASH:=992a7eb21d5ecef1d94ed763114812d6082d1732bed5505349134133b33502f4 + HASH:=19f475b43a95bcc6f71fa6228c6aaeffeaffffb9b061c8909d507001a26ca76d endef define Build/Prepare