@abtnode/blocklet-services 1.17.5-beta-20251208-123021-e8c53f96 → 1.17.5-beta-20251211-104355-426d7eb6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +4 -3
- package/api/libs/connect/session.js +8 -0
- package/api/services/auth/connect/switch-passport.js +1 -0
- package/dist/assets/{access-control-uMgSmVtl.js → access-control-IlS9bRr-.js} +1 -1
- package/dist/assets/{add-component-core-Dc36lTWq.js → add-component-core-C-_aLQBz.js} +1 -1
- package/dist/assets/{add-resource-CNyb02oE.js → add-resource-XQetfXuS.js} +1 -1
- package/dist/assets/{addon-BrD52yP8.js → addon-CPaBImJJ.js} +1 -1
- package/dist/assets/{advanced-BTz3ZBM_.js → advanced-CUNgNTNM.js} +1 -1
- package/dist/assets/{aigne-CKJhF6YF.js → aigne-DDhuuwyt.js} +1 -1
- package/dist/assets/{appearance-BJ1pZ5mv.js → appearance-AkjlL2MN.js} +1 -1
- package/dist/assets/{arrow-down.svg-C_9IZZzE.js → arrow-down.svg-CLPv42Ts.js} +1 -1
- package/dist/assets/{audit-logs-Cv97rr17.js → audit-logs-BJbhp6rq.js} +1 -1
- package/dist/assets/{authorize-B7P46IV2.js → authorize-DoMNooPH.js} +1 -1
- package/dist/assets/{bind-account-jReeH6gL.js → bind-account-Bf-i6l1N.js} +1 -1
- package/dist/assets/{branding-DTiVyAwp.js → branding-B2AlR3c5.js} +1 -1
- package/dist/assets/{branding-DDbf7iKd.js → branding-BHk1N1BK.js} +1 -1
- package/dist/assets/{branding-Dw7bAXb5.js → branding-DqTBF5P-.js} +4 -4
- package/dist/assets/{bundle-avatar-CKp8Upr1.js → bundle-avatar-9Ca9QZUW.js} +1 -1
- package/dist/assets/{complete-I86fdk2J.js → complete-CqSH6toa.js} +1 -1
- package/dist/assets/{component-BxDPcxLA.js → component-7HV0Hvn9.js} +3 -3
- package/dist/assets/{config-3y5DLQbx.js → config-CQKQ0piW.js} +1 -1
- package/dist/assets/{config-uqOLSuI1.js → config-Dgz1kG7o.js} +1 -1
- package/dist/assets/{config-CmTXD9uy.js → config-asJCQFrP.js} +1 -1
- package/dist/assets/{config-navigation-IlBVGJJp.js → config-navigation-C92NAXT9.js} +2 -2
- package/dist/assets/{config-space-CMOK4l4q.js → config-space-DE3G4Cex.js} +1 -1
- package/dist/assets/{confirm-DQ4M1D6U.js → confirm-CgfCUcg7.js} +1 -1
- package/dist/assets/{connect-Bt_sH-vn.js → connect-BfyN1i4g.js} +1 -1
- package/dist/assets/{connect-to-CTgmFTT0.js → connect-to-Blh-_sSq.js} +1 -1
- package/dist/assets/{connect-N6Jlg0kg.js → connect-xt8buCYP.js} +1 -1
- package/dist/assets/dashboard-zIbaIlSV.js +106 -0
- package/dist/assets/{delete-confirm-CkOWa6dE.js → delete-confirm-DvmzIUZ1.js} +1 -1
- package/dist/assets/{domain-CNgcPSuz.js → domain-B6wWNAiq.js} +1 -1
- package/dist/assets/{domain-action-card-DglaZM09.js → domain-action-card-C5yzzKNk.js} +1 -1
- package/dist/assets/{domains-xkwgfn_I.js → domains-D1v_SAUM.js} +1 -1
- package/dist/assets/{email-B0VF90tU.js → email-D4pjv2rf.js} +1 -1
- package/dist/assets/engine-Cqq-CfqS.js +1 -0
- package/dist/assets/{exchange-passport-CrW7dVAg.js → exchange-passport-JG2VzrwY.js} +1 -1
- package/dist/assets/{form-BqVjSzP6.js → form-DJba6UgL.js} +1 -1
- package/dist/assets/{fuel-Cgu54jtO.js → fuel-BvKSHeYs.js} +1 -1
- package/dist/assets/{gen-access-key-D4Zopy1D.js → gen-access-key-D2uOnk4Y.js} +1 -1
- package/dist/assets/{gen-simple-access-key-BOkAbBHA.js → gen-simple-access-key-BHaZsMy6.js} +1 -1
- package/dist/assets/{get-safe-url-DKPL0sDC.js → get-safe-url-BR0YQrf1.js} +1 -1
- package/dist/assets/{home-CAGJ1uyT.js → home-BqGW5QuC.js} +1 -1
- package/dist/assets/{iframe-DvPZuyhb.js → iframe-BpYTPOgL.js} +1 -1
- package/dist/assets/{index-CbziauTS.js → index--2Lrnvw3.js} +1 -1
- package/dist/assets/{index-Bka-tTFw.js → index-6jAOqnzo.js} +1 -1
- package/dist/assets/{index-eMvzC3RF.js → index-7RZRe6I8.js} +1 -1
- package/dist/assets/{index-vB1fWp5c.js → index-89sUu6pI.js} +5 -5
- package/dist/assets/{index-Dq0Srq3h.js → index-BDPCAdo8.js} +1 -1
- package/dist/assets/{index-x4RKBi5w.js → index-BF9aWDd-.js} +1 -1
- package/dist/assets/{index-DKeCxW4D.js → index-BFAOiTVZ.js} +1 -1
- package/dist/assets/{index-DTXEQVwg.js → index-BFu_bHNr.js} +1 -1
- package/dist/assets/{index-BmQjG3jd.js → index-BHV7DYRw.js} +1 -1
- package/dist/assets/{index-B6tDB9NM.js → index-Beoh7TtG.js} +1 -1
- package/dist/assets/{index-DXScybaX.js → index-BwEPekg-.js} +53 -53
- package/dist/assets/{index-BTBqUQm1.js → index-C4nVBXFh.js} +1 -1
- package/dist/assets/{index-Dj0nGRrj.js → index-C4rNyUJR.js} +1 -1
- package/dist/assets/{index-BU1h5ax2.js → index-C7xVDMaw.js} +1 -1
- package/dist/assets/{index-DhsOorTb.js → index-CGUfWPkU.js} +1 -1
- package/dist/assets/{index-C6xsUkOM.js → index-D9KdJVv3.js} +3 -3
- package/dist/assets/{index-CLtIjagu.js → index-DAfHACWI.js} +1 -1
- package/dist/assets/{index-B-FsPHvJ.js → index-DV_G5ZaV.js} +1 -1
- package/dist/assets/{index-B6WvmZFK.js → index-DrDIN8z_.js} +1 -1
- package/dist/assets/{index-BvTGUpv5.js → index-Lz66mdZg.js} +1 -1
- package/dist/assets/{index-BSf_vZgi.js → index-Tm9AG8me.js} +1 -1
- package/dist/assets/{index-8pWloMM4.js → index-UFVzVnJL.js} +2 -2
- package/dist/assets/{index-C9dtkWmq.js → index-ZFeCjsY0.js} +1 -1
- package/dist/assets/{index-nDxxcSRU.js → index-mFkjcqDS.js} +1 -1
- package/dist/assets/{index-PD6zy1bY.js → index-nFc-zoFp.js} +1 -1
- package/dist/assets/{index-C3fi8Y-l.js → index-wgJ0Ribb.js} +1 -1
- package/dist/assets/{invitation-D95v3XVN.js → invitation-25ABHFSI.js} +1 -1
- package/dist/assets/{invitations-DMcpv_mD.js → invitations-D5u5pFlf.js} +1 -1
- package/dist/assets/{invite-DnfMFz38.js → invite-B9H7UW54.js} +1 -1
- package/dist/assets/{isURL-CFycC-gz.js → isURL-D_eVqYHX.js} +1 -1
- package/dist/assets/{issue-passport-BaMEOyaL.js → issue-passport-B3EN5ou8.js} +1 -1
- package/dist/assets/{item-BmeJ8uZM.js → item-DooZVMh7.js} +1 -1
- package/dist/assets/{landing-page-BQv8Dm_n.js → landing-page-CZNu8ctq.js} +1 -1
- package/dist/assets/{layout-TOJ7kEb4.js → layout-xnT1yChe.js} +1 -1
- package/dist/assets/{list-Dxgf_FJ5.js → list-BgNLpjWi.js} +1 -1
- package/dist/assets/{list-Citro58J.js → list-CILfbP6V.js} +1 -1
- package/dist/assets/{localization-CfvvNuIZ.js → localization-NlRDiJzN.js} +1 -1
- package/dist/assets/{log-BL7saUR-.js → log-I5PV3FzS.js} +1 -1
- package/dist/assets/{login-CfPEbOMU.js → login-gy_d5wsO.js} +1 -1
- package/dist/assets/{login-oauth-callback-CbHNtlhV.js → login-oauth-callback-B-qZp0L1.js} +1 -1
- package/dist/assets/{logo-uploader-CXV5koKw.js → logo-uploader-8oB55Gbf.js} +1 -1
- package/dist/assets/{lost-passport-DJ2zK8hy.js → lost-passport-DQ272s95.js} +1 -1
- package/dist/assets/{open-window-qEAgomZG.js → open-window-B31R-VJL.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-D5hqgkBT.js → over-due-invoice-payment-b5i259Fd.js} +1 -1
- package/dist/assets/{overview-C_lm4_df.js → overview-CBAwd3m3.js} +1 -1
- package/dist/assets/{passport-item-3DI7pGBf.js → passport-item-BNVRSFDA.js} +1 -1
- package/dist/assets/{passport-DM5SPbHM.js → passport-qKoYJv1z.js} +1 -1
- package/dist/assets/{permission-s1vfZfOB.js → permission-DPhiBJ88.js} +1 -1
- package/dist/assets/{preferences-_yaCJj1p.js → preferences-CPS69XGg.js} +1 -1
- package/dist/assets/{profile-embed-C9mA_S9A.js → profile-embed-C8j82OII.js} +1 -1
- package/dist/assets/{publish-resource-Q3Sg4NhQ.js → publish-resource-CAZpiiyU.js} +1 -1
- package/dist/assets/{runtime-DJ07buOB.js → runtime-D_oEexG8.js} +1 -1
- package/dist/assets/sdk-scX8Ivz9.js +1 -0
- package/dist/assets/{security-BB8LkO1d.js → security-BTUcux6b.js} +1 -1
- package/dist/assets/{session-BYUJUwt5.js → session-CRWmj0aY.js} +1 -1
- package/dist/assets/{setup-D_uNhYL1.js → setup-BZzXFt66.js} +1 -1
- package/dist/assets/{simple-select-Bh-KqIzp.js → simple-select-tkIjyxKn.js} +1 -1
- package/dist/assets/{spaces-CAh777pB.js → spaces-CK2sS_K4.js} +1 -1
- package/dist/assets/{start-BXVj6K34.js → start-BAGyfDcc.js} +1 -1
- package/dist/assets/{starting-progress-Cr7Dhtc0.js → starting-progress-Vf5B87L_.js} +1 -1
- package/dist/assets/{status-C1igPCAc.js → status-B26LD9b8.js} +1 -1
- package/dist/assets/{step-actions-CzQHsGG8.js → step-actions-whhEwXeU.js} +1 -1
- package/dist/assets/{studio-NLZNkTb4.js → studio-BhCPVNj9.js} +1 -1
- package/dist/assets/switch-D9a1NbN9.js +1 -0
- package/dist/assets/{team-_EogfHX7.js → team-BBmd7Ftm.js} +1 -1
- package/dist/assets/{traffic-BbiwlHWj.js → traffic-CBg2rerP.js} +1 -1
- package/dist/assets/{transfer-gc1GZBIx.js → transfer-CQdJf_ou.js} +1 -1
- package/dist/assets/{unsubscribe-DuwSXkBI.js → unsubscribe-BRBqCQoL.js} +1 -1
- package/dist/assets/{use-app-logo-iwMRCv-t.js → use-app-logo-Db3Cx7ix.js} +1 -1
- package/dist/assets/{user-center-DfwrnXim.js → user-center-C78nXFWM.js} +2 -2
- package/dist/assets/{user-follower-BLRS0VYS.js → user-follower-BKjyhKra.js} +1 -1
- package/dist/assets/{util-IJIaP2Ju.js → util-BZv9hcRu.js} +1 -1
- package/dist/assets/{util-DPYbSMU0.js → util-C-jGkff8.js} +1 -1
- package/dist/assets/{wait-connect-iNFEi-e2.js → wait-connect-DdXKY-S_.js} +1 -1
- package/dist/assets/{wizard-DGVZKhvx.js → wizard-BpRGgmeM.js} +1 -1
- package/dist/assets/{wizard-components-DAyQuqLW.js → wizard-components--we8Ptjk.js} +1 -1
- package/dist/assets/{wrap-locale-BHrzeI1j.js → wrap-locale-Dhrtl6f9.js} +1 -1
- package/dist/assets/{zh-CVVdRn45.js → zh-sjDSDMBD.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +2 -2
- package/package.json +30 -29
- package/dist/assets/dashboard-DRyb1sbI.js +0 -106
- package/dist/assets/engine-DHTRYPdG.js +0 -1
- package/dist/assets/sdk-Bomrk-jh.js +0 -1
- package/dist/assets/switch-D2wksu-s.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l}from"./vendor-react-CUXIiAnY.js";import{V as C,$ as E,j as M,k as P}from"./vendor-ux-r9bApERu.js";import{k as y}from"./vendor-hooks-PN9SWiQm.js";import{j as e,ak as s,a6 as S,aX as w,b1 as W,y as L,x as _,bc as B,M as D,T as z,a$ as A,I as K,bd as N,Q as F,W as U}from"./vendor-mui-core-BPQ6AEW_.js";import{c as $,_ as k}from"./index-
|
|
1
|
+
import{r as l}from"./vendor-react-CUXIiAnY.js";import{V as C,$ as E,j as M,k as P}from"./vendor-ux-r9bApERu.js";import{k as y}from"./vendor-hooks-PN9SWiQm.js";import{j as e,ak as s,a6 as S,aX as w,b1 as W,y as L,x as _,bc as B,M as D,T as z,a$ as A,I as K,bd as N,Q as F,W as U}from"./vendor-mui-core-BPQ6AEW_.js";import{c as $,_ as k}from"./index-BwEPekg-.js";import{a as V}from"./api-uGeIZn4a.js";import{T as q}from"./table-tips-sMVI7VOu.js";import{u as G}from"./team-BBmd7Ftm.js";import{u as H}from"./session-CRWmj0aY.js";import"./vendor-utils-BgSaqjGx.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-D8WYBDYe.js";import"./use-mobile-ajdJIsoX.js";import"./isURL-D_eVqYHX.js";import"./use-app-logo-Db3Cx7ix.js";function T({endpoint:i}){const[t,a]=l.useState("mcp-link"),x=k(),{api:h}=k(),{teamDid:m}=G(),{t:c,locale:p}=C(),{session:r}=H(),{data:u,run:o,loading:g}=y(()=>{const f={owner:$.SERVER_ROLES.ADMIN}[r?.user?.role]||r?.user?.role;return h.createAccessKey({input:{teamDid:m,passport:f,authType:"simple",remark:"Generated by MCP Servers"}})},{manual:!0}),{imgPrefix:n}=x,j=l.useMemo(()=>[{icon:e.jsx(s,{sx:{width:20,height:20},children:"🔗"}),value:"mcp-link",label:"MCP Link"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/claude.webp`,alt:"Claude",sx:{width:20,height:20}}),value:"claude",label:"Claude"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/cursor.png`,alt:"Cursor",sx:{width:20,height:20}}),value:"cursor",label:"Cursor"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/cline.png`,alt:"Cline",sx:{width:20,height:20}}),value:"cline",label:"Cline"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/roocline.png`,alt:"Roo Cline",sx:{width:20,height:20}}),value:"roo-cline",label:"Roo Cline"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/windsurf.png`,alt:"Windsurf",sx:{width:20,height:20}}),value:"windsurf",label:"Windsurf"},{icon:e.jsx(s,{component:"img",src:`${n}/mcp/witsy.png`,alt:"Witsy",sx:{width:20,height:20}}),value:"witsy",label:"Witsy"}],[n]),v=j.find(d=>d.value===t),b=l.useMemo(()=>u?.data?.accessKeySecret,[u]),R=l.useMemo(()=>!b&&t!=="mcp-link",[b,t]),I=d=>{const f=`npx @blocklet/install-mcp@latest i ${i} --client ${d} --streamableHTTP --oauth2Bearer ${b}`;switch(d){case"cursor":case"claude":case"cline":case"roo-cline":case"windsurf":case"witsy":return f;case"mcp-link":default:return i}};return e.jsxs(s,{className:"mcp-servers-container",children:[e.jsx(M,{tabs:j,current:t,onChange:a,scrollButtons:"auto",iconPosition:"start"}),e.jsxs(s,{children:[e.jsxs(s,{sx:{display:"flex",alignItems:"center",gap:.5},children:[e.jsx(z,{component:"span",variant:"h6",sx:{fontWeight:"bold",my:2},children:t==="mcp-link"?v?.label:`${v?.label} ${c("installCommand")}`}),t!=="mcp-link"&&e.jsx(A,{href:`https://www.arcblock.io/docs/blocklet-developer/${p}/mcp-${t}`,target:"_blank",rel:"noopener noreferrer",children:e.jsx(K,{size:"small",children:e.jsx(N,{fontSize:"small"})})})]}),e.jsxs(s,{className:"mcp-servers-codeblock",sx:{position:"relative","& pre":{borderRadius:1},"& .codeblock__inner":{overflow:"auto !important",borderRadius:1}},children:[e.jsx(P,{code:I(t),language:"shell",style:{margin:0},showDefaultText:!1}),R&&e.jsx(s,{sx:{position:"absolute",top:0,right:0,left:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",bgcolor:"action.active",backdropFilter:"blur(3px)",WebkitBackdropFilter:"blur(3px)",zIndex:1},children:g?e.jsx(S,{}):e.jsx(F,{variant:"contained",color:"primary",onClick:o,size:"small",children:`${c("common.generate")} ${c("command")}`})})]})]})]})}T.propTypes={endpoint:U.string.isRequired};function ce(){const[i,t]=l.useState(null),{t:a,locale:x}=C(),h=`${window?.blocklet?.appUrl}${$.WELLKNOWN_SERVICE_PATH_PREFIX}/mcp/servers`,{data:m,loading:c,error:p}=y(()=>Promise.all([V.get(h)])),r=l.useMemo(()=>m?.[0]?.data?.servers||[],[m]);l.useEffect(()=>{r?.length&&t(r.find(o=>o.did===window?.blocklet?.did)||r[0])},[r]);const u=o=>{const g=o.target.value;t(r.find(n=>n.did===g))};return c?e.jsx(s,{children:e.jsx(S,{})}):p?e.jsx(w,{color:"error",children:p?.message}):r?.length?e.jsxs(W,{sx:{gap:2,maxWidth:1200},children:[e.jsx(q,{title:a("mcp.listTitle"),tooltipTitle:a("mcp.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${x}/mcp-server`}),e.jsxs(L,{fullWidth:!0,children:[e.jsx(_,{id:"server-select-label",children:a("mcp.available")}),e.jsx(B,{labelId:"server-select-label",value:i?.did||"",label:a("mcp.available"),onChange:u,children:r.map(o=>e.jsx(D,{value:o.did,children:e.jsxs(s,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(E,{variant:"rounded",shape:"square",did:o.did,src:o.logo,size:20}),e.jsx(s,{sx:{fontSize:14},children:o.name})]})},o.did))})]}),i&&e.jsx(T,{endpoint:i.endpoint})]}):e.jsx(w,{color:"warning",children:a("mcp.noServer")})}export{ce as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a,D as M,T as _,ce as T,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as Z,av as B,f as C,b$ as J,ch as K}from"./vendor-mui-core-BPQ6AEW_.js";import{r as d,k as L,L as z,n as ee,o as ae}from"./vendor-react-CUXIiAnY.js";import{H as E,aW as te}from"./index-
|
|
1
|
+
import{j as a,D as M,T as _,ce as T,Q as W,cf as q,aV as X,ak as h,cg as Y,aU as Z,av as B,f as C,b$ as J,ch as K}from"./vendor-mui-core-BPQ6AEW_.js";import{r as d,k as L,L as z,n as ee,o as ae}from"./vendor-react-CUXIiAnY.js";import{H as E,aW as te}from"./index-BwEPekg-.js";import{e as ie}from"./vendor-hooks-PN9SWiQm.js";import{M as re,l as m,a0 as A,a1 as S}from"./vendor-ux-r9bApERu.js";import{z as oe}from"./vendor-arcblock-D8WYBDYe.js";const H=d.createContext(null),se=e=>{const i=d.use(H);return d.useLayoutEffect(()=>{},[]),i};function le({children:e=void 0,...i}){const[t,r]=d.useState({inFullPage:!1,showToggleButton:!1,headerVisibleInFullPage:!0,footerVisibleInFullPage:!1,sidebarVisibleInFullPage:!1}),s=()=>{r(o=>({...o,inFullPage:!o.inFullPage}))},l=d.useMemo(()=>({...t,headerVisible:!t.inFullPage||t.headerVisibleInFullPage,footerVisible:!t.inFullPage||t.footerVisibleInFullPage,sidebarVisible:!t.inFullPage||t.sidebarVisibleInFullPage,toggleFullPage:s,configure:o=>r(n=>({...n,...o}))}),[t]);return a.jsx(H,{value:l,...i,children:e})}function ne({name:e,size:i=36,alt:t="",color:r="#000000",prefix:s="/images",showBadge:l=!1,style:o={},...n}){const c=`${s}/${e}-${r.replace(/^#/,"")}.png`;return a.jsxs(de,{style:{width:i,height:i},children:[a.jsx(re,{width:i,height:i,alt:t||e,src:c,style:Object.assign({width:i},o),...n}),l&&a.jsx("i",{className:"badge-point"})]})}const de=m("div")`
|
|
2
2
|
position: relative;
|
|
3
3
|
.badge-point {
|
|
4
4
|
position: absolute;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,W as m,a6 as z,T as j,at as _e,D as We,cH as V,ao as J,cI as Ke,ak as h,b1 as K,a$ as Ge,s as xe,cJ as be,co as Fe,am as ge,cq as Ye,M as F,aO as Y,bX as $e,aP as $,Q as qe,be as He,aR as Qe,cK as Xe,cL as Ve,cM as Je,cN as Ze,c2 as he}from"./vendor-mui-core-BPQ6AEW_.js";import{k as ke,j as je,a as ue}from"./vendor-hooks-PN9SWiQm.js";import{r as b,u as et}from"./vendor-react-CUXIiAnY.js";import{ac as O,_ as L,a1 as E,Y as N,aQ as tt,aR as st,aI as nt,c as T,v as ot}from"./index-
|
|
1
|
+
import{j as e,W as m,a6 as z,T as j,at as _e,D as We,cH as V,ao as J,cI as Ke,ak as h,b1 as K,a$ as Ge,s as xe,cJ as be,co as Fe,am as ge,cq as Ye,M as F,aO as Y,bX as $e,aP as $,Q as qe,be as He,aR as Qe,cK as Xe,cL as Ve,cM as Je,cN as Ze,c2 as he}from"./vendor-mui-core-BPQ6AEW_.js";import{k as ke,j as je,a as ue}from"./vendor-hooks-PN9SWiQm.js";import{r as b,u as et}from"./vendor-react-CUXIiAnY.js";import{ac as O,_ as L,a1 as E,Y as N,aQ as tt,aR as st,aI as nt,c as T,v as ot}from"./index-BwEPekg-.js";import{H as B,V as D,p as at,Q as q,h as rt,W as it,n as le,j as ct}from"./vendor-ux-r9bApERu.js";import{u as lt}from"./use-mobile-ajdJIsoX.js";import{a as H,d as Ce,a0 as dt,c as pt,D as we,C as me}from"./vendor-utils-BgSaqjGx.js";import{o as Be}from"./vendor-arcblock-D8WYBDYe.js";import{b as ut,u as mt,D as ft,c as de,a as xt}from"./index-wgJ0Ribb.js";import"./index-CJ1z6qNA.js";import"./index-BojVbZw0.js";import"./api-uGeIZn4a.js";import{u as De,C as gt,D as ht,a as St}from"./connect-to-Blh-_sSq.js";import{b as yt,c as bt,d as kt,i as jt,e as fe,f as Ct,h as wt,j as Bt}from"./spaces-CK2sS_K4.js";import{f as Q}from"./index-DBs9Ljax.js";import{v as Dt}from"./index-ySP_m_Ux.js";import{E as Et}from"./index-BnOhhAn2.js";import{x as It}from"./index-DRYJ0xIl.js";import{g as Se}from"./get-safe-url-BR0YQrf1.js";import{S as Tt}from"./switch-control-D-yLpfsT.js";import{C as Rt,u as Pt}from"./config-space-DE3G4Cex.js";import{L as ye}from"./list-header-Cv_gaaAc.js";import"./lottie-web-4koyQiv_.js";import"./index-B7Hwfql4.js";async function vt({blockletDid:t,nodeApi:n,spaceGateways:o}){let s=!1;const r=await Promise.all(o.map(async a=>{let{name:c}=a;const i=await yt(a.endpoint);return!H(i)&&i!==c&&(c=i,s=!0),{...a,name:c}}));return s&&await Promise.all(r.filter(a=>a.did).map(a=>n.updateBlockletSpaceGateway({input:{did:t,where:{did:a.did},spaceGateway:{...a}}}))),r}function At({refresh:t}={}){const{blocklet:n}=O(),o=n?.meta?.did,{api:s}=L();return ke(async()=>{if(!o)return[];const{spaceGateways:r}=await s.getBlockletSpaceGateways({input:{did:o}});return await vt({blockletDid:o,nodeApi:s,spaceGateways:r})??[]},{refreshDeps:[o,t],onError(r){r?.message?.includes("not logged")?console.warn(r):(console.error(r),B.error(Q(r)))}})}function Ee({deps:t,setLoading:n,backupDate:o}={deps:[],setLoading:()=>{},backupDate:new Date}){const{blocklet:s}=O(),[r,a]=b.useState([]),{api:c}=L(),[i,d]=b.useMemo(()=>o?[E(o).startOf("day").toISOString(),E(o).endOf("day").toISOString()]:[E().startOf("year").toISOString(),E().endOf("day").toISOString()],[o]),l=Ce(async()=>{try{if(n(!0),!s){a([]);return}const{backups:f}=await c.getBlockletBackups({input:{did:s.meta.did,startTime:i,endTime:d}});a(f??[])}catch(f){console.error(f),B.error(Q(f))}finally{n(!1)}},1e3);return je(async()=>{l()},[s?.meta?.did].concat(t)),{backups:r}}function zt({appDid:t}){const{backups:n}=Ee(),[o,s]=b.useState({message:"",progress:0,completed:!1}),r=L(),{ws:{useSubscription:a}}=r;return a(N.BlockletEvents.backupProgress,c=>{t===c?.appDid&&s(()=>({...c}))},[t]),b.useEffect(()=>{if(n?.length&&dt(n[0]?.status)){const[c]=n;s(()=>({message:c.message,progress:c.progress,completed:c.progress>=100}))}},[n]),o}function Ot({deps:t=[],setLoading:n=()=>{}}={}){const{blocklet:o}=O(),[s,r]=b.useState([]),{api:a}=L(),c=b.useCallback(Ce(async()=>{if(!a||!o?.meta?.did){r([]);return}try{n(!0);const i=E(),d=i.subtract(1,"year"),{summary:l}=await a.getBlockletBackupSummary({input:{did:o.meta.did,startTime:d.toISOString(),endTime:i.toISOString()}}),f=Array.isArray(l)?l.map(p=>({...p,successCount:+p.successCount,errorCount:+p.errorCount})):[];r(f)}catch(i){console.error("Failed to fetch backup summary:",i),B.error(Q(i)),r([])}finally{n(!1)}},1e3),[]);return je(async()=>(await c(),()=>{c.cancel()}),[o?.meta?.did].concat(t)),{backupSummary:s}}const Ie=b.createContext({}),{Provider:Lt,Consumer:bs}=Ie;function Te({children:t}){const{t:n}=D(),{api:o}=L(),{blocklet:s}=O(),[r,a]=b.useState(null),[c,i]=b.useState(!1),{data:d,loading:l,mutate:f}=At({refresh:c}),p=pt(d),x=zt({appDid:s?.appDid}),u=b.useMemo(()=>bt(s?.environments),[s?.environments]),[k,w]=b.useState(!1),[S,y]=b.useState(0),{backups:Z}=Ee({deps:[S,r],setLoading:w,backupDate:r}),[ee,te]=b.useState(0),{backupSummary:se}=Ot({deps:[ee]}),[_,M]=b.useState(d?.find(g=>g.endpoint===u)),I=s?.settings?.autoBackup,P=()=>{i(g=>!g)},ne=()=>{te(g=>g+1)},oe=()=>{y(g=>g+1)},G=async g=>{await o.updateAutoBackup({input:{did:s.meta.did,autoBackup:g}})},X=async()=>{await o.abortBlockletBackup({input:{appPid:s.meta.did}})},ae=async(g,A)=>{try{f(R=>{const v=[...R];return v.push({...g,loading:!0}),v}),await o.addBlockletSpaceGateway({input:{did:s.meta.did,spaceGateway:g}}),u!==A&&await o.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:A}]}}),M(g),P(),B.success(n("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"}))}catch(R){throw console.error(R),f(v=>[...v].filter(W=>W.did!==g.did)),R}},re=async g=>{g&&(g.endpoint===u&&(await o.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),I?.enabled&&await G({enabled:!1})),await o.deleteBlockletSpaceGateway({input:{did:s.meta.did,spaceGatewayDid:g?.did}}),f(A=>{const R=[...A];return R.splice(R.indexOf(g),1),R}),M(g),P())},ie=async g=>{await Promise.all([o.updateBlockletSpaceGateway({input:{did:s.meta.did,where:{did:g.did},spaceGateway:g}}),u!==g.endpoint&&o.configBlocklet({input:{did:[s.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:g.endpoint}]}})]),B.success(n("storage.spaces.connectedWithName",{name:g?.name??"DID Spaces"})),P()},C=g=>g?.endpoint===u;return e.jsx(Lt,{value:{spaceGateways:d||[],selectedSpaceGateway:_,addSpaceGateway:ae,deleteSpaceGateway:re,updateSpaceGateway:ie,refreshSpaceGateways:P,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:p,spaceGatewayIsSelected:C,updateAutoBackup:G,abortBlockletBackup:X,backupEndpoint:u,backupProgress:x,backups:Z,backupSummary:se,refreshBackupSummary:ne,refreshBackups:oe,setBackupDate:a,backupsLoading:k,autoBackup:I},children:t})}Te.propTypes={children:m.any.isRequired};function U(){return b.useContext(Ie)}function Re({...t}){const{blocklet:n}=O(),{info:o}=L(),{t:s}=D(),r=De({blocklet:n}),a=tt(o),{spaceGateways:c,addSpaceGateway:i}=U(),d={checkFn:we.create({baseURL:me(window.location.origin,st())}).get,webWalletUrl:a,extraParams:{appPid:n.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:o.did}},l=async({endpoint:p,name:x,did:u})=>{const k=await kt(p);if(!await jt(k)){B.error(s("storage.spaces.gateway.add.invalidUrl"));return}if(c.some(y=>y.endpoint===p)){B.error(s("storage.spaces.gateway.add.duplicate",{name:x}));return}await i({name:x,did:u,url:k,endpoint:p},p)},f=async({spaceGateway:p})=>{try{await l(p)}catch(x){console.error(x),B.error(Q(x))}};return e.jsx(ut,{...t,connectScope:"app",options:d,onSuccess:f})}function Ut(){const{api:t}=L(),{blocklet:n}=O(),{data:o,loading:s}=ke(()=>t.getBlocklet({input:{did:n?.meta?.did,attachDiskInfo:!0,attachRuntimeInfo:!0}}),{ready:!!n?.meta?.did,refreshDeps:[n?.meta?.did]});return{blocklet:o?.blocklet??null,loading:s}}function Pe({...t}){const{t:n}=b.useContext(at),{blocklet:o,loading:s}=Ut();if(o?.diskInfo){const r=(i,d,l)=>e.jsxs(j,{children:[i," ",e.jsx("strong",{children:d?nt(d):"empty"})]}),a=o.environments.reduce((i,d)=>(i[d.key]=d.value,i),{}),c=[{key:"appDir",name:n("blocklet.diskInfo.appDir"),value:r(a.BLOCKLET_APP_DIR,o.diskInfo.app)},{key:"dataDir",name:n("blocklet.diskInfo.dataDir"),value:r(a.BLOCKLET_DATA_DIR,o.diskInfo.data)},{key:"logDir",name:n("blocklet.diskInfo.logDir"),value:r(a.BLOCKLET_LOG_DIR,o.diskInfo.log)},{key:"cacheDir",name:n("blocklet.diskInfo.cacheDir"),value:r(a.BLOCKLET_CACHE_DIR,o.diskInfo.cache)}];return e.jsx(Mt,{component:"div",...t,children:c.map(i=>e.jsx(Dt,{valueComponent:"div",nameWidth:120,name:i.name,children:i.value},i.key))})}return s?e.jsx(z,{}):e.jsx(j,{children:n("blocklet.diskInfo.empty")})}const Mt=_e(j)``;function ve(){const{t}=D(),{setBackupDate:n,backupSummary:o}=U(),s=mt({key:"lg"}),r=b.useRef(null),a=We(),c=b.useCallback(l=>{n(l)},[n]),i=b.useMemo(()=>{const l=E().add(1,"day"),f=l.subtract(1,"year"),p=new Map(o.map(u=>[u.date,{date:u.date,successCount:u.successCount,errorCount:u.errorCount}])),x=[];for(let u=f.clone();E(u).isBefore(l);u=u.add(1,"day")){const k=u.format("YYYY-MM-DD");x.push(p.get(k)||{date:k,successCount:0,errorCount:0})}return x},[o]),d=b.useMemo(()=>({grid:{containLabel:!0,right:10,top:30,bottom:12},tooltip:{formatter:k=>{const{date:w,successCount:S,errorCount:y}=i[k.dataIndex]||{date:k.data[0],successCount:0,errorCount:0};return[`<div>${t("common.time")}: ${w}</div>`,`<div>${t("common.succeeded")}: ${S}</div>`,`<div>${t("common.failed")}: ${y}</div>`].join(`
|
|
2
2
|
`)},backgroundColor:a.palette.background.paper,borderColor:a.palette.divider,textStyle:{color:a.palette.text.primary,fontSize:14},extraCssText:`box-shadow: ${a.shadows[2]}; border-radius: 4px;`,padding:[8,10]},visualMap:{show:!1,min:-12,max:12,pieces:[{min:Number.MIN_SAFE_INTEGER,max:-9,color:V[600]},{min:-9,max:-6,color:V[500]},{min:-6,max:-3,color:V[400]},{min:-3,max:-1,color:V[300]},{min:0,max:0,color:a.palette.grey[200]},{min:1,max:3,color:J[300]},{min:3,max:6,color:J[400]},{min:6,max:9,color:J[500]},{min:9,max:Number.MAX_SAFE_INTEGER,color:J[600]}],orient:"horizontal",left:"center",bottom:12,itemWidth:12,itemHeight:12,textStyle:{color:a.palette.text.secondary,fontSize:12}},calendar:{top:30,left:50,right:10,bottom:4,cellSize:[8,8],splitLine:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,color:a.palette.background.default},dayLabel:{show:!0,firstDay:0,nameMap:["","Mon","","Wed","","Fri",""],position:"start",margin:4,fontSize:10,color:a.palette.text.primary,fontWeight:"400",width:20},monthLabel:{show:!0,nameMap:"cn",align:"left",color:a.palette.text.primary,fontWeight:"400",fontSize:12,position:"start",margin:4,width:30,padding:[0,2]},yearLabel:{show:!1},range:[E().subtract(11,"month").startOf("month").format("YYYY-MM-DD"),E().endOf("month").format("YYYY-MM-DD")],orient:"horizontal"},series:{type:"heatmap",coordinateSystem:"calendar",data:i.map(k=>[k.date,k.errorCount?-k.errorCount:k.successCount]),label:{show:!1},itemStyle:{borderWidth:2,borderColor:a.palette.background.default,borderRadius:4},emphasis:{itemStyle:{borderWidth:2,borderColor:Ke[200],color:"inherit"}}}}),[i,t,a]);return e.jsxs(e.Fragment,{children:[e.jsx(h,{ref:r,sx:{maxWidth:"1280px",border:"1px solid",borderColor:"divider",padding:"8px",overflowX:"auto"},children:e.jsx(h,{sx:{width:"1200px",height:"180px",position:"relative"},children:e.jsx(Et,{option:d,style:{height:"100%",width:"100%"},notMerge:!0,lazyUpdate:!1,opts:{renderer:"canvas"},onEvents:{click:l=>{l.componentType==="series"&&l.data&&c(l.data[0])}}})})}),e.jsx(h,{sx:{display:"flex",justifyContent:"flex-end",mt:1,mr:s?2:5,mb:2},children:e.jsxs(K,{direction:s?"column":"row",spacing:s?2:1,sx:{width:"100%",justifyContent:"flex-start",alignItems:s?"flex-start":"center"},children:[e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(h,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #8B5000 0%, #A36200 33%, #C17700 66%, #E29000 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.failed")})]}),e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(h,{sx:{width:32,height:12,borderRadius:.5,bgcolor:"grey.200",border:"1px solid",borderColor:"grey.200"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.without")})]}),e.jsxs(K,{direction:"row",spacing:1,sx:{alignItems:"center"},children:[e.jsx(h,{sx:{width:32,height:12,borderRadius:.5,background:"linear-gradient(90deg, #9be9a8 0%, #40c463 33%, #30a14e 66%, #216e39 100%)"}}),e.jsx(j,{variant:"body2",sx:{color:"text.secondary"},children:t("storage.spaces.backup.succeeded")})]})]})})]})}const Nt=xe(({className:t,...n})=>e.jsx(ge,{...n,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Ae({status:t,message:n="",createdAt:o}){const{t:s}=D(),r=t===T.BACKUPS.STATUS.PROGRESS&&E().diff(o,"hours")>=T.BACKUPS.TIMEOUT_HOURS,a=r&&s("common.timeoutError"),c=t===T.BACKUPS.STATUS.PROGRESS&&!r,i=t===T.BACKUPS.STATUS.SUCCEEDED&&!r;return c?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(z,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):i?e.jsx(q,{type:"success",children:s("common.succeeded")}):e.jsxs(h,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(q,{type:"error",children:s("common.failed")}),e.jsx(ge,{style:{display:"flex",alignItems:"center",flexShrink:0},title:n||a,children:e.jsx(be,{children:e.jsx(Ye,{style:{width:"24px",height:"24px"},color:"error"})})})]})}Ae.propTypes={status:m.string.isRequired,message:m.string,createdAt:m.string.isRequired};function ze({metadata:t={}}){const{t:n}=D();if(H(t))return e.jsx(q,{type:"success",children:n("common.succeeded")});const o=t.count||0,s=t.size||0,r=It(s,{iec:!0}),a=e.jsxs(h,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:[e.jsxs(j,{variant:"body2",children:[n("common.fileCount"),": ",o]}),e.jsxs(j,{variant:"body2",children:[n("common.fileSize"),": ",r]})]});return e.jsxs(h,{sx:{display:"inline-flex",alignItems:"center"},children:[e.jsx(q,{type:"success",children:n("common.succeeded")}),e.jsx(Nt,{title:a,style:{display:"flex",alignItems:"center",flexShrink:0},placement:"left",children:e.jsx(be,{children:e.jsx(Fe,{style:{width:"24px",height:"24px"},color:"primary"})})})]})}ze.propTypes={metadata:m.object};function Oe(){const{t,locale:n}=D(),{spaceGateways:o,backups:s,backupsLoading:r}=U(),a=b.useMemo(()=>[{label:"DID Space",name:"target",options:{customBodyRenderLite:i=>{const{targetUrl:d,targetName:l,status:f,createdAt:p}=s[i],x=f===T.BACKUPS.STATUS.PROGRESS&&E().diff(p,"hours")>=T.BACKUPS.TIMEOUT_HOURS,u=f===T.BACKUPS.STATUS.SUCCEEDED&&!x,k=l||o.find(w=>d?.includes(fe(w?.endpoint)))?.name||"Unknown DID Space";return u?e.jsx(Ge,{href:d,target:"_blank",sx:{fontSize:"16px"},children:k}):e.jsx(j,{variant:"body1",sx:{fontSize:"16px"},children:k})}}},{label:t("common.strategy"),name:"strategy",options:{customBodyRender:i=>{const d=t(i===0?"common.auto":"common.manual");return e.jsx(q,{children:d})}}},{label:t("common.startTime"),name:"createdAt",options:{customBodyRender:i=>E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.endTime"),name:"updatedAt",options:{customBodyRender:i=>H(i)?"":E(i).format("YYYY-MM-DD HH:mm:ss")}},{label:t("common.status"),name:"status",options:{customBodyRenderLite:i=>{const d=s?.[i]??{},{status:l,message:f,createdAt:p,metadata:x}=d,u=l===T.BACKUPS.STATUS.PROGRESS&&E().diff(p,"hours")>=T.BACKUPS.TIMEOUT_HOURS,k=l===T.BACKUPS.STATUS.PROGRESS&&!u,w=l===T.BACKUPS.STATUS.SUCCEEDED&&!u;return k?e.jsxs(j,{sx:{display:"inline-flex",alignItems:"center",fontSize:"14px"},children:[e.jsx(z,{sx:{marginRight:"4px"},size:"12px"}),t("common.progress")]}):w?e.jsx(ze,{metadata:x}):e.jsx(Ae,{status:l,message:f,createdAt:p})}}}],[s,o,t]),c=b.useMemo(()=>!s?.length,[s]);return e.jsx(e.Fragment,{children:c?e.jsx(h,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100px",color:"#9397A1",marginTop:"16px",marginBottom:"24px"},children:t("storage.spaces.record.emptyData")}):e.jsx(rt,{title:"",loading:r,data:s,columns:a,emptyNode:t("storage.spaces.record.emptyData",n),options:{download:!1,filter:!1,print:!1,search:!1,viewColumns:!1}})})}function _t(){const{t}=D();return e.jsxs(h,{children:[e.jsxs(h,{sx:{display:"flex",gap:3,flexDirection:{xs:"column",md:"row"}},children:[e.jsxs(h,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",minWidth:240},children:[e.jsx(ft,{style:{cursor:"pointer",width:"150px",height:"100%",maxHeight:160}}),e.jsx(j,{sx:{my:2,textAlign:"center",color:"text.secondary"},children:t("storage.spaces.connect.provider")}),e.jsx(Re,{})]}),e.jsxs(h,{sx:{flexGrow:1,minWidth:0},children:[e.jsx(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.spaces.backup.records")})}),e.jsx(ve,{})]})]}),e.jsx(Oe,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function Le({spaceGateway:t,onConfirm:n=()=>{},onCancel:o=()=>{}}){const{t:s}=D(),[r,a]=b.useState(!1),[c,i]=b.useState(!1),d=(p,x)=>{p?.preventDefault(),p?.stopPropagation(),a(x)},l=async p=>{try{p?.stopPropagation(),i(!0),await n?.(t),a(!1)}catch(x){console.error(x),B.error(`${s("storage.space.gateway.delete.failed")}: ${Q(x)}`)}finally{a(!1),i(!1)}},f=p=>{d(p,!1),o?.(p)};return e.jsxs(e.Fragment,{children:[e.jsxs(F,{color:"red",onClick:p=>d(p,!0),children:[e.jsx(Y,{style:{minWidth:24,color:"red"},children:e.jsx($e,{fontSize:"small"})}),e.jsx($,{style:{color:"red"},children:s("common.disconnect")})]}),e.jsx(it,{title:s("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:s("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:c}},cancelButton:{text:s("common.cancel"),props:{size:"small",variant:"outlined",disabled:c}},onConfirm:l,onCancel:f,children:e.jsx(j,{sx:{wordWrap:"break-word"},children:s("storage.spaces.gateway.delete.descForBackup",{name:`${t?.name}`})})})]})}Le.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool}).isRequired,onConfirm:m.func,onCancel:m.func};function Ue({spaceGateway:t,selected:n,onDelete:o=()=>{},onConnect:s=()=>{},enableSwitchToSpace:r=!0,backupInProgress:a=!1,...c}){const{abortBlockletBackup:i}=U(),[d,l]=b.useState(null),{t:f}=D(),[p,x]=b.useState(!1),u=(S,y)=>{S.stopPropagation(),S.preventDefault(),l(y&&S.currentTarget)},k=async S=>{try{x(!0),u(S,!1),await s(t)}catch(y){console.error(y),B.error(y.message)}finally{x(!1)}},w=async S=>{try{x(!0),u(S,!1),await i()}catch(y){console.error(y),B.error(y.message)}finally{x(!1)}};return e.jsxs(e.Fragment,{children:[p||t?.loading?e.jsx(z,{sx:{ml:1},size:"24px"}):e.jsx(qe,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:S=>u(S,!0),...c,children:e.jsx(He,{})}),e.jsxs(Qe,{id:"simple-menu",anchorEl:d,keepMounted:!0,open:!!d,onClose:S=>u(S,!1),children:[e.jsxs(F,{onClick:S=>{u(S,!1),window.open(Se(t.endpoint?Ct(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Xe,{fontSize:"small"})}),e.jsx($,{children:f("common.open")})]}),e.jsxs(F,{onClick:S=>{u(S,!1),window.open(Se(wt(t.endpoint),{allowDomains:null}))},children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Ve,{fontSize:"small"})}),e.jsx($,{children:f("storage.spaces.strategy.viewBackupFiles")})]}),!n&&r&&e.jsxs(F,{onClick:k,children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Je,{fontSize:"small"})}),e.jsx($,{children:f("storage.spaces.connect.switchToSpace")})]}),a&&e.jsxs(F,{onClick:w,children:[e.jsx(Y,{style:{minWidth:24},children:e.jsx(Ze,{fontSize:"small"})}),e.jsx($,{children:f("storage.spaces.connect.abortBlockletBackup")})]}),!a&&e.jsx(Le,{spaceGateway:t,onConfirm:async()=>{l(null),await o?.(t)},onCancel:()=>l(null)})]})]})}Ue.propTypes={spaceGateway:m.shape({name:m.string.isRequired,url:m.string.isRequired,protected:m.bool,endpoint:m.string.isRequired,loading:m.bool}).isRequired,selected:m.bool.isRequired,enableSwitchToSpace:m.bool,onDelete:m.func,onConnect:m.func,backupInProgress:m.bool};const Wt=xe(({className:t,...n})=>e.jsx(ge,{...n,classes:{popper:t}}))(()=>({".MuiTooltip-tooltip":{backgroundColor:"transparent",padding:0,margin:0,boxShadow:"none",maxWidth:"none"},".MuiTooltip-arrow":{color:"rgba(230, 235, 245, 1)"}}));function Me({spaceGateway:t,spaceStatus:n,selected:o,onConnected:s=()=>{},onDeleted:r=()=>{},onBackedUp:a=()=>{}}){const{t:c,locale:i}=D(),{blocklet:d}=O(),{api:l,info:{did:f}}=L(),{appDid:p,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:S}=De({blocklet:d}),{backupProgress:y,updateSpaceGateway:Z,deleteSpaceGateway:ee,refreshBackupSummary:te,refreshBackups:se}=U(),[_,M]=b.useState(!1),[I,P]=b.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:c("storage.spaces.authorize.title",{appName:x},i),scan:c("storage.spaces.authorize.scan",{appName:x},i),confirm:"",success:e.jsx(j,{gutterBottom:!0,children:c("storage.spaces.authorize.success")})},onClose:()=>{P(C=>({...C,open:!1}))}}),ne=o&&!_&&n===de.DISCONNECTED,oe=o&&!_&&!t.loading&&n===de.CONNECTED,G=o&&_&&n===de.CONNECTED&&y?.progress>=0,X=async()=>{try{if(await Bt(t?.endpoint)){await l.configBlocklet({input:{did:[d.meta.did],configs:[{key:N.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(c("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),s?.(null,t);return}}catch(C){console.error(C),s?.(C,t);return}P(C=>({...C,open:!0,prefix:me(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:we.create({baseURL:me(t.url,"space")}).get,extraParams:{appDid:p,appName:x,appDescription:u,scopes:k,appUrl:w,referrer:S,nodeDid:f,spaceDid:t.did}}))},ae=async(C,g)=>{const A=g(C.endpoint),R=fe(A),v=C.space?g(C.space):{};if(t.did&&R!==t.did){P(Ne=>({...Ne,open:!1}));const W=c("storage.spaces.gateway.switch.failedForMismatchSpace",{name:v?.name?v.name:""});B.error(W),s?.(new Error(W),t);return}const ce={...t,name:v.name??"DID Space",did:v.did??fe(A),endpoint:A};await Z(ce),P(W=>({...W,open:!1})),s?.(null,ce)},re=async()=>{try{if(_)return;M(!0),await l.backupBlocklet({input:{appDid:d.appDid,to:"spaces"}})}catch(C){console.error(C),B.error(C.message),a?.(C,t)}finally{M(!0)}},ie=async()=>{try{await ee(t),B.success(c("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r?.(null,t)}catch(C){console.error(C),r?.(C,t)}};return b.useEffect(()=>{y?.completed?(o&&(y?.progress===100?(B.success(c("storage.spaces.backupSuccessfully")),a?.(null,t)):y.message&&a?.(new Error(y?.message),t),y.progress=0,y.message=""),M(!1),te(),se()):y.progress&&M(!0)},[y]),e.jsxs(e.Fragment,{children:[e.jsxs(h,{sx:{display:"flex",alignItems:"center",".action-btn":{borderRadius:1,marginLeft:1}},children:[oe&&e.jsx(le,{className:"action-btn",variant:"outlined",size:"small",onClick:re,children:c("storage.spaces.strategy.backupNow")}),ne&&e.jsx(le,{className:"action-btn",variant:"outlined",size:"small",onClick:X,children:c("storage.spaces.disconnected.reconnectNow")}),G&&e.jsx(Wt,{title:y?.message&&e.jsx(h,{sx:{p:1,borderRadius:1,boxShadow:2,color:"black",backgroundColor:"white"},children:e.jsx(j,{variant:"body2",children:y.message})}),children:e.jsxs(le,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(z,{variant:"determinate",value:y?.progress,size:14,sx:{mr:1}}),y?.progress,"%"]})}),e.jsx(ot,{forceConnected:!1,saveConnect:!1,prefix:I.prefix,open:I.open,popup:!0,action:I.action,baseUrl:I.baseUrl,checkFn:I.checkFn,onSuccess:ae,onClose:I.onClose,checkTimeout:I.checkTimeout,extraParams:I.extraParams,messages:I.messages,locale:i},"get-endpoint")]}),e.jsx(Ue,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:o,onDelete:ie,onConnect:X,enableSwitchToSpace:y?.completed||H(y?.message),backupInProgress:G})]})}Me.propTypes={spaceGateway:m.shape({did:m.string.isRequired,name:m.string.isRequired,url:m.string.isRequired,endpoint:m.string.isRequired,protected:m.bool,loading:m.bool}).isRequired,spaceStatus:m.string.isRequired,selected:m.bool.isRequired,onConnected:m.func,onDeleted:m.func,onBackedUp:m.func};function Kt({...t}){const{t:n}=D();return e.jsxs(h,{...t,children:[e.jsx(h,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:3},children:e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:n("storage.spaces.backup.records")})}),e.jsx(ve,{}),e.jsx(Oe,{})]})}function Gt({...t}){const{t:n}=D(),{autoBackup:o,updateAutoBackup:s}=U(),r=async()=>{try{const a=!o?.enabled;await s({enabled:a}),B.success(n(a?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(a){B.error(a.message)}};return e.jsx(Tt,{checked:!!o?.enabled,onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(j,{sx:{marginRight:"8px"},children:e.jsx("span",{children:n("storage.spaces.autoBackup.title")})})},style:{...t.style}})}function Ft(){const{t}=D(),{spaceGateways:n,spaceGatewaysLoading:o,spaceGatewayIsSelected:s}=U(),r=o&&!n?.length,a=({spaceGateway:c,spaceStatus:i,selected:d,refresh:l})=>e.jsx(Me,{spaceGateway:c,spaceStatus:i,selected:d,onConnected:()=>l(),onBackedUp:f=>f&&l()});return e.jsxs(h,{sx:{display:"flex",flexDirection:"column"},children:[e.jsxs(h,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},gap:{xs:1,md:2},justifyContent:{xs:"center",md:"flex-start"},alignItems:{xs:"flex-start",md:"center"}},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1},children:t("storage.spaces.connected.title")}),e.jsx(Gt,{}),e.jsx(Re,{})]}),e.jsx(h,{sx:{mt:2},children:r?e.jsx(h,{sx:{display:"flex",justifyContent:"center"},children:e.jsx(z,{})}):e.jsx(he,{container:!0,spacing:2,children:e.jsx(e.Fragment,{children:n.map(c=>e.jsx(he,{size:{xs:12,md:6},children:e.jsx(xt,{endpoint:c.endpoint,selected:s(c),action:a},c.endpoint)},c.endpoint))})})}),e.jsx(Kt,{sx:{marginTop:"24px"}}),e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold",mb:2},children:t("common.dataStorage")}),e.jsx(Pe,{})]})}function Yt(){const{spaceGatewaysFirstLoading:t,spaceGateways:n}=U();return t?e.jsx(Be,{relative:"parent",children:e.jsx(z,{})}):H(n)?e.jsx(_t,{}):e.jsx(Ft,{})}function $t(){return e.jsx(Te,{children:e.jsx(Yt,{})})}function qt(){const{spaceGateway:t,settingStorageEndpoint:n,updateSpaceGateway:o,hasStorageEndpoint:s,loading:r,storageEndpoint:a}=Pt(),c=ue(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Be,{relative:"parent",children:e.jsx(z,{})}):e.jsxs(h,{sx:{maxWidth:"md",position:"relative"},children:[s?e.jsx(gt,{spaceGateway:t,settingStorageEndpoint:n}):e.jsx(ht,{}),e.jsx(h,{sx:c,children:e.jsx(St,{onConnect:o,storageEndpoint:a})})]})}function Ht(){const{t}=D();return e.jsxs(Rt,{children:[e.jsxs(K,{spacing:1,sx:{marginBottom:2},children:[e.jsx(j,{sx:{fontSize:"1.2rem",fontWeight:"bold"},children:t("storage.appLevel.title")}),e.jsx(j,{sx:{color:"text.secondary"},children:t("storage.appLevel.description")})]}),e.jsx(qt,{})]})}function Qt({navOrientation:t="vertical",...n}){const{t:o,locale:s}=D(),{blocklet:r}=O(),a=lt({key:"md"}),[c,i]=et(),d=c.get("tab")||"backup",l=a?"horizontal":t,f=ue(()=>{const w=[{label:o("common.backup"),value:"backup"}],S=r?.capabilities?.didSpace;return(S===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||S===N.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&w.push({label:o("common.storage"),value:"storage"}),w},[s,l]),x=ue(()=>({backup:e.jsx($t,{}),storage:e.jsx(Ht,{})}))[d],u=w=>{i(S=>(w==="backup"?S.delete("tab"):S.set("tab",w),S))};if(f.length<=1)return e.jsx(pe,{children:x});const k=e.jsx(ct,{tabs:f,current:d,orientation:l,onChange:u,sx:[{borderRight:1,height:"100%",borderColor:"divider"},l==="horizontal"&&{borderRight:0}]});if(l==="vertical")return e.jsx(h,{...n,children:e.jsxs(K,{direction:{md:"column",lg:"row"},sx:{gap:2},children:[e.jsx(h,{sx:{flexShrink:0},children:e.jsx(ye,{left:k})}),e.jsx(h,{sx:{flexGrow:1,minWidth:0},children:e.jsx(pe,{sx:{mt:1},children:x})})]})});if(l==="horizontal")return e.jsxs(h,{...n,children:[e.jsx(ye,{left:k}),e.jsx(pe,{sx:{mt:2},children:x})]})}Qt.propTypes={navOrientation:m.oneOf(["vertical","horizontal"])};const pe=xe(h)`
|
|
3
3
|
position: relative;
|
|
4
4
|
min-height: 66vh;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as g}from"./vendor-react-CUXIiAnY.js";import{j as e,y as O,x as X,bc as G,M as J,ak as m,W as x,a6 as ke,cb as ve,b1 as Q,z as U,b6 as Te,a5 as Ae,at as P,T as E,cc as Ke,bb as Re,aX as De,Q as Se,ci as Ie}from"./vendor-mui-core-BPQ6AEW_.js";import{V as S,z as B,n as F,p as Be,b as oe,k as H,H as $e,a2 as Ne,o as Ee,J as _e,h as Pe,i as We}from"./vendor-ux-r9bApERu.js";import{f as ze}from"./index-DBs9Ljax.js";import{c as z,_ as I,o as Me,aJ as qe,ac as Le,ar as ie,as as ae,at as re,e as Ue}from"./index-
|
|
1
|
+
import{r as g}from"./vendor-react-CUXIiAnY.js";import{j as e,y as O,x as X,bc as G,M as J,ak as m,W as x,a6 as ke,cb as ve,b1 as Q,z as U,b6 as Te,a5 as Ae,at as P,T as E,cc as Ke,bb as Re,aX as De,Q as Se,ci as Ie}from"./vendor-mui-core-BPQ6AEW_.js";import{V as S,z as B,n as F,p as Be,b as oe,k as H,H as $e,a2 as Ne,o as Ee,J as _e,h as Pe,i as We}from"./vendor-ux-r9bApERu.js";import{f as ze}from"./index-DBs9Ljax.js";import{c as z,_ as I,o as Me,aJ as qe,ac as Le,ar as ie,as as ae,at as re,e as Ue}from"./index-BwEPekg-.js";import{a as ce}from"./passport-item-BNVRSFDA.js";import{u as W}from"./team-BBmd7Ftm.js";import{l as le}from"./arrow-down.svg-CLPv42Ts.js";import{T as de}from"./index-Tm9AG8me.js";import{C as pe}from"./confirm-CgfCUcg7.js";import{R as Fe,C as _}from"./vendor-utils-BgSaqjGx.js";import{u as He}from"./session-CRWmj0aY.js";import{C as V}from"./click-to-copy-BuSTGPjJ.js";import{f as Ve}from"./index-BojVbZw0.js";import{D as Oe}from"./delete-confirm-DvmzIUZ1.js";import{P as Xe}from"./permission-DPhiBJ88.js";import{l as M}from"./vendor-arcblock-D8WYBDYe.js";import{B as Ge}from"./bundle-avatar-9Ca9QZUW.js";import{W as Je}from"./did-address-j4poFq12.js";import{u as me}from"./use-mobile-ajdJIsoX.js";import{A as Qe}from"./actions-DhSvOHy-.js";import{T as ne}from"./table-tips-sMVI7VOu.js";import{s as Ye}from"./vendor-hooks-PN9SWiQm.js";import"./lottie-web-4koyQiv_.js";import"./ua-parser-DP5omx3I.js";import"./util-BZv9hcRu.js";import"./base32-eAS52qli.js";import"./isURL-D_eVqYHX.js";import"./use-app-logo-Db3Cx7ix.js";import"./vendor-mui-x-CWNb8fsW.js";import"./AdapterDayjs-DEl3BogQ.js";function Y({value:s}){const{t,locale:n}=S(),a=new Date;return new Date(s)<a?e.jsxs("span",{style:{color:"red"},children:[e.jsx(B,{value:s,locale:n}),`${t("setting.accessKey.expired",{time:""})}`]}):e.jsx(B,{mode:"daysLeft",value:s,locale:n,type:"all"})}Y.propTypes={value:x.string.isRequired};function Z({value:s,onChange:t,...n}){const{t:a}=S(),i=g.useMemo(()=>[{value:"signature",title:a("setting.accessKey.signature"),description:a("setting.accessKey.signatureDesc")},{value:"simple",title:a("setting.accessKey.simple"),description:a("setting.accessKey.simpleDesc")}],[a]);return e.jsxs(O,{style:{width:"100%"},variant:"outlined",...n,children:[e.jsx(X,{children:a("setting.accessKey.authType")}),e.jsx(G,{value:s,onChange:t,fullWidth:!0,label:a("setting.accessKey.authType"),IconComponent:l=>e.jsx(le,{...l,width:20,height:20}),children:i.map(l=>e.jsx(J,{value:l.value,children:e.jsxs(m,{children:[e.jsx("span",{children:l.title}),e.jsx(m,{sx:{maxWidth:510,fontSize:12,color:"#999",whiteSpace:"normal"},children:l.description})]})},l.value))})]})}Z.propTypes={value:x.string.isRequired,onChange:x.func.isRequired};const ee=()=>{const s=z.RBAC_CONFIG.roles.filter(i=>i.passport),{inService:t}=I(),{roles:n}=W(),a=[...s,...t?n:[]];return Fe(a,"name").filter(i=>i.name!==z.ROLES.OWNER)};function ue(){const{session:s}=He(),t=ee();return g.useMemo(()=>{if(!s?.user?.role)return[];if(["owner","admin"].includes(s.user.role))return t;const a=t.filter(l=>l.name==="guest");return[...t.filter(l=>l.name!=="guest").filter(l=>s.user.passports.find(b=>b.role===l.name)),...a]},[t,s?.user?.passports,s?.user?.role])}function xe({onCreate:s=()=>{},remark:t=""}){const{api:n}=I(),{teamDid:a}=W(),{t:i}=S(),[l,b]=g.useState(!1),[p,j]=g.useState(null),u=ue(),K=()=>{b(!1),j(null)},C=async r=>{const{remark:w,passport:f,authType:o}=r;b(!0);const v=await n.createAccessKey({input:{teamDid:a,remark:w.trim(),passport:f,expireAt:r.expireAt?new Date(r.expireAt).getTime():null,authType:o}}),{data:R}=v;s(R),j(null),b(!1)},d={title:`${i("common.create")} ${i("accessKey")}`,description:(r,w,f)=>e.jsxs(Q,{sx:{gap:3},children:[e.jsx(U,{label:i("setting.accessKey.tip"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,margin:"dense",value:r.remark,onChange:o=>{w({...r,remark:o.target.value,__disableConfirm:!r.passport||!o.target.value.trim()}),o.target.value.trim()?f(""):f(i("setting.accessKey.remarkInvalid"))},slotProps:{htmlInput:{"data-cy":"remark-input"}}}),e.jsxs(O,{style:{width:"100%"},variant:"outlined",children:[e.jsx(X,{sx:{width:"calc(100% - 46px)"},children:i("setting.accessKey.passport")}),e.jsx(G,{"data-cy":"create-access-key-select-passport",value:r.passport,onChange:o=>{const v=o.target.value;f(null),w({...r,passport:v,__disableConfirm:!r.remark||!v})},fullWidth:!0,label:i("setting.accessKey.passport"),disabled:l,IconComponent:o=>e.jsx(le,{...o,width:20,height:20}),children:u.map(o=>e.jsx(J,{value:o.name,"data-cy":`create-access-key-passport-option-${o.name}`,children:e.jsxs(m,{children:[e.jsx("span",{children:o.title||o.name}),e.jsx(m,{sx:{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify"},children:o.description})]})},o.name))})]}),e.jsx(Z,{value:r.authType,onChange:o=>{w({...r,authType:o.target.value})}}),e.jsx(de,{placeholder:i("setting.accessKey.expireTime"),value:r.expireAt,onChange:o=>{w({...r,expireAt:o,__disableConfirm:!r.passport||!r.remark||!o})}})]}),confirm:i("common.confirm"),cancel:i("common.cancel"),color:"primary",params:{remark:t,authType:"signature",__disableConfirm:!t.trim()},onConfirm:C,onCancel:K};return e.jsxs(e.Fragment,{children:[e.jsxs(F,{edge:"end",variant:"contained",color:"primary","data-cy":"add-access-key-btn",onClick:r=>{r.stopPropagation(),j(d)},className:"rule-action",children:[l?e.jsx(ke,{size:16}):e.jsx(ve,{style:{fontSize:16}}),i("common.create")]}),p&&e.jsx(pe,{title:p.title,description:p.description,confirm:p.confirm,color:p.color,cancel:p.cancel,params:p.params,onConfirm:p.onConfirm,onCancel:p.onCancel})]})}xe.propTypes={remark:x.string,onCreate:x.func};function fe({onConfirm:s=()=>{},accessKeyId:t,accessKeySecret:n,hideSecret:a=!0}){const{t:i}=g.useContext(Be),[l,b]=g.useState(!1),[p,j]=g.useState(()=>a),u=I(),K=()=>{j(!p)},C=f=>{b(f.target.checked)},d=_(window.location.origin,u?.info?.routing?.adminPath),r=g.useMemo(()=>a?`const Client = require('@blocklet/server-js');
|
|
2
2
|
const ensureServerEndpoint = require('@abtnode/util/lib/ensure-server-endpoint');
|
|
3
3
|
const { joinURL } = require('ufo');
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ const result = await client.getBlocklet(
|
|
|
16
16
|
{ input: { did: rootDid, attachRuntimeInfo: false } },
|
|
17
17
|
{ headers: { 'x-access-blocklet': rootDid } }
|
|
18
18
|
);
|
|
19
|
-
`:u.inService?`curl -H "Authorization: Bearer ${n}" "${_(window.blocklet?.appUrl,z.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/did/session")}"`:`curl -H "Authorization: Bearer ${n}" "${_(d,"/api/did/session")}"`,[a,t,n,u.inService,d]),
|
|
19
|
+
`:u.inService?`curl -H "Authorization: Bearer ${n}" "${_(window.blocklet?.appUrl,z.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/did/session")}"`:`curl -H "Authorization: Bearer ${n}" "${_(d,"/api/did/session")}"`,[a,t,n,u.inService,d]),w=g.useMemo(()=>a?`blocklet deploy --endpoint ${u.inService?window.blocklet?.appUrl:d} --access-key ${t} --access-secret ${n} {blockletPath}/.blocklet/bundle;`:null,[a,t,n,u.inService,d]);return e.jsxs(oe,{title:i("common.createSuccess"),fullWidth:!0,open:!0,disableEscapeKeyDown:!0,onClose:(f,o)=>{o!=="backdropClick"&&s()},showCloseButton:!1,actions:e.jsx("div",{children:e.jsx(F,{disabled:a?!l:!1,onClick:s,color:"primary",autoFocus:!0,variant:"contained","data-cy":"submit-confirm-dialog",children:i("common.confirm")})}),"aria-labelledby":"simple-dialog-title",children:[e.jsx("div",{children:e.jsx(Ze,{children:i(a?"setting.accessKey.saveSecretTip":"setting.accessKey.viewSecret")})}),e.jsx("div",{style:{marginTop:"20px"}}),e.jsxs(L,{children:[e.jsx(q,{children:i("setting.accessKey.accessKeyId")}),e.jsx(V,{children:t})]}),e.jsxs(L,{children:[e.jsx(q,{children:i("setting.accessKey.accessKeySecret")}),p?e.jsx(F,{"data-cy":"show-secret-btn",color:"primary",onClick:K,children:i("setting.accessKey.showSecret")}):e.jsx(V,{children:n})]}),!p&&e.jsxs(L,{children:[e.jsx(q,{children:`Access Key ${i("setting.accessKey.usage")}`}),e.jsx(H,{code:r,language:"shell",showDefaultText:!1}),w&&e.jsx(H,{code:w,language:"shell",showDefaultText:!1})]}),a&&e.jsx("div",{children:e.jsx(Te,{value:"end",disabled:p,control:e.jsx(Ae,{checked:l,onChange:C}),label:i("setting.accessKey.iKnow"),labelPlacement:"end"})})]})}fe.propTypes={accessKeyId:x.string.isRequired,accessKeySecret:x.string.isRequired,onConfirm:x.func,hideSecret:x.bool};const q=P.div`
|
|
20
20
|
display: flex;
|
|
21
21
|
justify-content: space-between;
|
|
22
22
|
align-items: center;
|
|
@@ -27,14 +27,14 @@ const result = await client.getBlocklet(
|
|
|
27
27
|
`,Ze=P.div`
|
|
28
28
|
font-size: 16px;
|
|
29
29
|
font-weight: bold;
|
|
30
|
-
`;function he({accessKeyId:s,time:t,remark:n,onDelete:a=()=>{},onClose:
|
|
30
|
+
`;function he({accessKeyId:s,time:t,remark:n,onDelete:a=()=>{},onClose:i=()=>{}}){const{t:l,locale:b}=S(),{api:p}=I(),{teamDid:j}=W(),u=()=>{i()},K=async()=>{try{await p.deleteAccessKey({input:{teamDid:j,accessKeyId:s}}),a()}catch(r){$e.error(r?.message)}finally{u()}},C=r=>({key:`<b>${s}</b>`,name:`<b>${n}</b>`,time:Me(r,b),timeAge:Ve(new Date(r),qe(b))}),d={keyName:n,title:l("setting.accessKey.title"),description:t?`${l("setting.accessKey.description",C(t))}`:`${l("setting.accessKey.descriptionNoTime",{key:`<b>${s}</b>`,name:`<b>${n}</b>`})}`,confirmPlaceholder:l("setting.accessKey.confirm_desc",{name:n}),confirm:l("common.delConfirm"),cancel:l("common.cancel"),onConfirm:K,onCancel:u};return e.jsx(Oe,{keyName:d.keyName,title:d.title,description:d.description,confirmPlaceholder:d.confirmPlaceholder,confirm:d.confirm,cancel:d.cancel,params:d.params,onConfirm:d.onConfirm,onCancel:d.onCancel})}he.propTypes={accessKeyId:x.string.isRequired,time:x.string.isRequired,remark:x.string.isRequired,onDelete:x.func,onClose:x.func};function ge({accessKeyId:s,remark:t="",onUpdate:n=()=>{},passport:a="",expireAt:i="",authType:l="signature",onClose:b=()=>{}}){const{api:p}=I(),{teamDid:j}=W(),{t:u}=S(),[K,C]=g.useState(!1),d=ue(),r=()=>{C(!1),b()},w=async o=>{const{accessKeyId:v,remark:R="",passport:h,expireAt:y,authType:$}=o;C(!0),await p.updateAccessKey({input:{teamDid:j,accessKeyId:v,remark:R.trim(),passport:h,expireAt:y?new Date(y).getTime():null,authType:$}}),n(),r()},f={title:`${u("common.update")} ${u("accessKey")}`,description:(o,v,R)=>e.jsxs(Q,{sx:{gap:3},children:[e.jsx(U,{label:u("setting.accessKey.accessKeyId"),autoComplete:"off",variant:"outlined",name:"accessKeyId",fullWidth:!0,autoFocus:!0,margin:"dense",value:o.accessKeyId,disabled:!0}),e.jsx(U,{label:u("common.remark"),autoComplete:"off",variant:"outlined",name:"remark",fullWidth:!0,autoFocus:!0,value:o.remark,onChange:h=>{v({...o,remark:h.target.value,__disableConfirm:!h.target.value.trim()}),h.target.value.trim()?R(""):R(u("setting.accessKey.remarkInvalid"))}}),e.jsxs(O,{style:{width:"100%"},variant:"outlined",children:[e.jsx(X,{children:u("setting.accessKey.passport")}),e.jsx(G,{"data-cy":"update-access-key-select-passport",value:o.passport,onChange:h=>{const y=h.target.value;R(null),v({...o,passport:y,__disableConfirm:!o.remark||!y})},fullWidth:!0,label:u("setting.accessKey.passport"),disabled:K,children:d.map(h=>e.jsx(J,{value:h.name,"data-cy":`update-access-key-passport-option-${h.name}`,children:e.jsxs(m,{children:[e.jsx("span",{children:h.title||h.name}),e.jsx(m,{sx:{maxWidth:440,fontSize:12,color:"#999",whiteSpace:"normal",textAlign:"justify"},children:h.description})]})},h.name))})]}),e.jsx(Z,{disabled:!0,value:o.authType,onChange:h=>{v({...o,authType:h.target.value})}}),e.jsx(de,{placeholder:u("setting.accessKey.expireTime"),value:o.expireAt,onChange:h=>{v({...o,expireAt:h,__disableConfirm:!o.passport||!o.remark||!h})}})]}),confirm:u("common.confirm"),cancel:u("common.cancel"),color:"primary",params:{accessKeyId:s,remark:t,passport:a,expireAt:i,authType:l},onConfirm:w,onCancel:r};return e.jsx(pe,{title:f.title,description:f.description,confirm:f.confirm,color:f.color,cancel:f.cancel,params:f.params,onConfirm:f.onConfirm,onCancel:f.onCancel})}ge.propTypes={accessKeyId:x.string.isRequired,remark:x.string,passport:x.string,expireAt:x.string,authType:x.string,onUpdate:x.func,onClose:x.func};function ye({accessKey:s,onCancel:t}){const{t:n}=S();return e.jsx(oe,{title:n("accessKey"),onClose:t,open:!0,PaperProps:{sx:{maxWidth:800,"@media (max-width: 768px)":{margin:"16px",maxWidth:"calc(100vw - 32px)"}}},fullWidth:!0,children:e.jsx(et,{children:e.jsx(be,{accessKey:s})})})}ye.propTypes={accessKey:x.object.isRequired,onCancel:x.func.isRequired};const et=P(m)`
|
|
31
31
|
margin-top: -16px;
|
|
32
32
|
|
|
33
33
|
.tabs {
|
|
34
34
|
margin-left: 0;
|
|
35
35
|
margin-right: 0;
|
|
36
36
|
}
|
|
37
|
-
`;function be({accessKey:s}){const{t,locale:n}=S(),{blocklet:a}=Le(),
|
|
37
|
+
`;function be({accessKey:s}){const{t,locale:n}=S(),{blocklet:a}=Le(),i=I(),l=ee(),b=me(),p=(a?.children||[]).find(d=>d?.meta?.did===s.componentDid),j=l.find(d=>d.name===s.passport),u=j?j.title:s.passport,K=g.useMemo(()=>i.inService?`curl -H "Authorization: Bearer blocklet-${M.toBase58(s.accessKeyPublic)}" "${_(window.blocklet?.appUrl,z.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/did/session")}"`:`curl -H "Authorization: Bearer blocklet-${M.toBase58(s.accessKeyPublic)}" "${_(window.location.origin,i?.info?.routing?.adminPath,"/api/did/session")}"`,[s.accessKeyPublic,i.inService,i?.info?.routing?.adminPath]),C=[{title:t("common.baseInfo"),items:[{label:t("setting.accessKey.accessKeyId"),content:e.jsx(Je,{did:s.accessKeyId,showQrcode:!0})},...s.authType==="simple"?[{label:t("setting.accessKey.accessKeySecret"),content:e.jsx(V,{children:`blocklet-${M.toBase58(s.accessKeyPublic)}`})}]:[],{label:t("common.role"),content:e.jsx(m,{children:ce(u,s.passport)})},{label:t("common.createdVia"),content:s.createdVia},{label:t("common.createdBy"),content:s.createdBy?e.jsx(ie,{showDid:!0,did:s.createdBy,cardType:re.Detailed,infoType:ae.Minimal,sx:{border:0,padding:0}}):"-"}]},{title:t("common.timeInfo"),items:[{label:t("common.createdAt"),content:s.createdAt?e.jsx(B,{value:s.createdAt,type:b?"absolute":"all",locale:n}):"-"},{label:t("common.lastUsedAt"),content:s.lastUsedAt?e.jsx(B,{value:s.lastUsedAt,type:b?"absolute":"all",locale:n}):"-"},{label:t("common.expiredAt"),content:s.expireAt?e.jsx(Y,{value:s.expireAt}):t("common.neverExpired")}]},{title:t("common.otherInfo"),items:[{label:t("setting.accessKey.authType"),content:s.authType},{label:t("common.remark"),content:s.remark},...s.authType!=="signature"?[{label:t("setting.accessKey.resourceType"),content:s.resourceType||"-"},{label:t("setting.accessKey.resourceId"),content:s.resourceId||"-"}]:[],...p?[{label:t("setting.accessKey.component"),content:e.jsxs(m,{sx:{width:{xs:250,sm:400},display:"flex",alignItems:"center"},children:[e.jsx(Ge,{blocklet:p,ancestors:[a]}),e.jsx(m,{sx:{ml:"16px",minWidth:0},children:e.jsxs(m,{className:"component-header",children:[e.jsx(m,{className:"component-name",children:Ue.getDisplayName(p,!0)}),e.jsx(m,{className:"component-version",children:p?.meta?.version})]})})]},p)}]:[],s.authType!=="signature"?{label:t("setting.accessKey.usage"),content:e.jsx(H,{code:K,language:"shell",showDefaultText:!1})}:null].filter(Boolean)}];return e.jsx(tt,{gap:3,children:e.jsx(m,{className:"info-area",children:C.map(d=>e.jsxs(m,{sx:{mb:3},children:[e.jsx(E,{variant:"h6",sx:{mb:1.5},children:d.title}),e.jsx(m,{className:"info-grid",children:d.items.map(r=>e.jsxs(m,{className:"info-item",children:[e.jsx(m,{className:"info-label",children:e.jsx(E,{variant:"subtitle2",color:"textSecondary",children:r.label})}),e.jsx(m,{className:"info-content",sx:{flex:1,minWidth:0,"@media (max-width: 768px)":{width:"100%",flex:"none"}},children:r.content})]},r.label))})]},d.title))})})}be.propTypes={accessKey:x.object.isRequired};const tt=P(Q)`
|
|
38
38
|
.info-card {
|
|
39
39
|
margin-bottom: 24px;
|
|
40
40
|
overflow: hidden;
|
|
@@ -147,4 +147,4 @@ const result = await client.getBlocklet(
|
|
|
147
147
|
margin: 0;
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
`;function st({isSelf:s=!1,columnSx:t={}}){const{t:n,locale:a}=S(),{api:
|
|
150
|
+
`;function st({isSelf:s=!1,columnSx:t={}}){const{t:n,locale:a}=S(),{api:i,inService:l}=I(),{teamDid:b}=W(),[p,j]=g.useState({}),[u,K]=g.useState(null),[C,d]=g.useState(null),[r,w]=g.useState(null),f=me(),o=ee(),v=g.useRef(null),R=`access-keys-${b}`,h=Ne(R),[y,$]=g.useState({searchText:h.searchText||"",pageSize:h.rowsPerPage||10,page:1}),D=Ye(async()=>{const c={teamDid:b,paging:{page:y.page,pageSize:y.pageSize}};return y.searchText&&(c.remark=y.searchText),await i.getAccessKeys({input:c})},[y.page,y.pageSize,y.searchText]),{loading:je,error:te}=D,N=g.useMemo(()=>D.value?.list||[],[D.value?.list]),se=g.useMemo(()=>s?["accessKeyId","createdVia","createdBy","createdBy"]:[],[s]),Ce=g.useMemo(()=>[{label:n("common.name"),name:"remark",options:{customBodyRender:(c,{rowIndex:T})=>{const A=N[T];return e.jsx(m,{className:"remark",sx:Ee({display:"flex",alignItems:"center",gap:2},t),children:e.jsx(E,{children:A.remark||"N/A"})})}}},{label:"Access Key ID",name:"accessKeyId",options:{customBodyRender:c=>e.jsx(m,{sx:t,children:e.jsx(_e,{showDidLogo:!1,children:c})})}},{label:n("common.role"),name:"passport",options:{customBodyRender:c=>{const T=o.find(k=>k.name===c),A=T?T.title:c;return e.jsx(m,{sx:t,children:ce(A,c)})}}},{label:n("common.createdVia"),name:"createdVia",options:{customBodyRender:c=>e.jsx(E,{sx:t,children:c})}},{label:n("setting.accessKey.authType"),name:"authType",options:{customBodyRender:c=>e.jsx(E,{sx:t,children:n(`setting.accessKey.${c}`)})}},{label:n("common.createdAt"),name:"createdAt",options:{customBodyRender:c=>e.jsx(m,{sx:t,children:c?e.jsx(B,{value:c,locale:a}):"-"})}},{label:n("common.lastUsedAt"),name:"lastUsedAt",options:{customBodyRender:c=>e.jsx(m,{sx:t,children:c?e.jsx(B,{value:c,locale:a}):"-"})}},{label:n("common.expiredAt"),name:"expireAt",options:{customBodyRender:c=>e.jsx(m,{className:"expired-at",sx:t,children:c?e.jsx(Y,{value:c}):n("common.neverExpired")})}},{label:n("common.createdBy"),name:"createdBy",width:100,options:{customBodyRender:c=>e.jsx(m,{sx:t,children:c?e.jsx(ie,{showDid:!0,did:c,cardType:re.Detailed,infoType:ae.Minimal,sx:{border:0,padding:0,...f&&{minWidth:"unset"}}}):"-"})}},{label:n("common.actions"),name:"actions",width:100,align:"center",verticalKeyAlign:"center",options:{customBodyRender:(c,{rowIndex:T})=>{const A=N[T];return e.jsx(m,{sx:t,children:e.jsx(Qe,{"data-cy":"access-key-actions",actions:[{icon:e.jsx(Ke,{}),text:n("common.edit"),onClick:k=>{k.stopPropagation(),w(A)}},{icon:e.jsx(Re,{}),text:n("common.delete"),onClick:k=>{k.stopPropagation(),d(A)}}]})})}}}].filter(c=>!se.includes(c.name)),[N,a,n,o,d,w,t,f,se]),we=({page:c,rowsPerPage:T,searchText:A})=>{y.pageSize!==T?$(k=>({...k,pageSize:T,page:1})):y.page!==c+1?$(k=>({...k,searchText:A,page:c+1})):y.searchText!==A&&$(k=>({...k,searchText:A,page:1}))};return te?e.jsx(De,{severity:"error",children:ze(te)}):e.jsxs(m,{ref:v,sx:{".custom-toobar-btns":{gap:"8px"},".custom-toobar-title .custom-toobar-title-inner>span":{display:"flex",alignItems:"center","white-space":"inherit",height:"100%"}},children:[f?e.jsx(ne,{title:n("setting.accessKey.listTitle"),tooltipTitle:n("setting.accessKey.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${a}/access-key`}):null,e.jsx(Pe,{durable:R,durableKeys:["page","rowsPerPage","searchText"],data:N,locale:a,columns:Ce,className:"pc-access-key-table",options:{sort:!1,download:!1,filter:!1,print:!1,viewColumns:!1,page:y.page-1,rowsPerPage:y.pageSize,count:D.value?.paging?.total||0,searchText:y.searchText,searchDebounceTime:600,onRowClick(c,{dataIndex:T},A){if(v.current?.contains(A.target)){const k=N[T];K(k)}}},loading:je,onChange:we,title:f?null:e.jsx(ne,{title:n("setting.accessKey.listTitle"),tooltipTitle:n("setting.accessKey.tooltipTitle"),link:`https://www.arcblock.io/docs/blocklet-developer/${a}/access-key`}),customButtons:[e.jsx(Xe,{permission:l?"":"mutate_accessKey",children:e.jsx(xe,{onCreate:c=>{const{accessKeyId:T,accessKeySecret:A,authType:k}=c;j({show:!0,accessKeyId:T,accessKeySecret:A,authType:k})}})}),e.jsx(Se,{variant:"contained",color:"primary",startIcon:e.jsx(Ie,{}),onClick:()=>{D.retry()},children:n("common.refresh")})],emptyNode:e.jsx(We,{children:n("oauth.client.empty")})}),p.show&&e.jsx(fe,{hideSecret:p.authType==="signature",onConfirm:()=>{D.retry(),j({show:!1})},...p}),u&&e.jsx(ye,{onCancel:()=>K(null),accessKey:u}),C&&e.jsx(he,{accessKeyId:C.accessKeyId,time:C.lastUsedAt,remark:C.remark||"N/A",onDelete:D.retry,onClose:()=>d(null)}),r&&e.jsx(ge,{...r,onUpdate:D.retry,onClose:()=>w(null)})]})}st.propTypes={isSelf:x.bool,columnSx:x.object};export{st as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as v,g as $e,a as qe}from"./vendor-react-CUXIiAnY.js";import{g as Ue,k as Z}from"./vendor-hooks-PN9SWiQm.js";import{j as e,ak as t,at as $,b1 as Y,a6 as B,aX as He,am as G,co as Ge,U as Ye,T as F,a3 as Ke,W as S,z as O,M as Q,I as _,cp as ge,cb as je,A as Ve,x as Ze,c3 as Qe,c4 as ee,bw as Xe,F as Je,bc as es,s as ss}from"./vendor-mui-core-BPQ6AEW_.js";import{V as A,b as W,j as ts,h as ae,z as se,H as P,n as z,i as re,P as ye,x as ve,Q as as,a2 as rs}from"./vendor-ux-r9bApERu.js";import{_ as D,o as os,a1 as be,c as M,B as J,ac as ns,e as is,Y as ls,a2 as V,b5 as cs}from"./index-
|
|
1
|
+
import{r as v,g as $e,a as qe}from"./vendor-react-CUXIiAnY.js";import{g as Ue,k as Z}from"./vendor-hooks-PN9SWiQm.js";import{j as e,ak as t,at as $,b1 as Y,a6 as B,aX as He,am as G,co as Ge,U as Ye,T as F,a3 as Ke,W as S,z as O,M as Q,I as _,cp as ge,cb as je,A as Ve,x as Ze,c3 as Qe,c4 as ee,bw as Xe,F as Je,bc as es,s as ss}from"./vendor-mui-core-BPQ6AEW_.js";import{V as A,b as W,j as ts,h as ae,z as se,H as P,n as z,i as re,P as ye,x as ve,Q as as,a2 as rs}from"./vendor-ux-r9bApERu.js";import{_ as D,o as os,a1 as be,c as M,B as J,ac as ns,e as is,Y as ls,a2 as V,b5 as cs}from"./index-BwEPekg-.js";import{W as oe}from"./did-address-j4poFq12.js";import{u as N}from"./team-BBmd7Ftm.js";import{a as ne,r as ie,b as le,c as Se,d as X,e as ds,u as ps,f as us}from"./passport-item-BNVRSFDA.js";import{p as Ce}from"./util-BZv9hcRu.js";import{u as ms}from"./use-mobile-ajdJIsoX.js";import{v as H}from"./index-CJ1z6qNA.js";import{w as q,P as fs}from"./permission-DPhiBJ88.js";import{C as xs}from"./Google-FE-PKKgg.js";import{c as hs}from"./create-passport-svg-CIUyZVGt.js";import{A as gs}from"./vendor-arcblock-D8WYBDYe.js";import{G as K,_ as js}from"./vendor-utils-BgSaqjGx.js";import{e as we}from"./edit.svg-Dz9cVo7r.js";import{H as ce,P as ys}from"./index-BHV7DYRw.js";import{C as Te}from"./confirm-CgfCUcg7.js";import{L as Ie}from"./list-header-Cv_gaaAc.js";import{f as te}from"./index-DBs9Ljax.js";import{u as vs}from"./useSetState-cWrp7qoX.js";import"./lottie-web-4koyQiv_.js";import"./session-CRWmj0aY.js";import"./isURL-D_eVqYHX.js";import"./use-app-logo-Db3Cx7ix.js";import"./ua-parser-DP5omx3I.js";import"./base32-eAS52qli.js";import"./cloneDeep-DHlHhGOY.js";import"./lock.svg-BPCZ0CT3.js";const me="info";function Pe({createPassportSvg:c,passport:s,onCancel:p,onSwitchPassport:u=()=>{}}){const{t:f}=A(),i=Ue({tab:me}),d={info:{label:f("common.basicInfo"),value:me,component:()=>e.jsx(De,{passport:s,createPassportSvg:c})},logs:{label:f("common.logs"),value:"logs",component:()=>e.jsx(Ae,{passport:s})},related:{label:f("team.passport.related"),value:"related",component:()=>e.jsx(Le,{passport:s,onSwitchPassport:u})}},l=Object.values(d).map(({label:h,value:m})=>({label:h,value:m})).filter(h=>h.value==="related"?s.parentDid:!0),r=d[i.tab]||d.info,n=h=>{i.tab=h};return e.jsx(W,{title:f("common.passport"),onClose:p,open:!0,PaperProps:{style:{maxWidth:800,minHeight:"80vh"}},fullWidth:!0,children:e.jsxs(bs,{children:[e.jsx(t,{className:"tabs",children:e.jsx(ts,{tabs:l,current:i.tab,onChange:n,scrollButtons:"auto"})}),e.jsx(t,{className:"body",children:e.jsx(r.component,{})})]})})}Pe.propTypes={createPassportSvg:S.func.isRequired,passport:S.object.isRequired,onCancel:S.func.isRequired,onSwitchPassport:S.func};const bs=$(t)`
|
|
2
2
|
margin-top: -16px;
|
|
3
3
|
|
|
4
4
|
.tabs {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,a6 as f,ak as r,at as j,W as n}from"./vendor-mui-core-BPQ6AEW_.js";import{r as h}from"./vendor-react-CUXIiAnY.js";import{p as S,n as p}from"./vendor-ux-r9bApERu.js";import{a as C}from"./page-header-BkgoSN-0.js";import{ac as g}from"./index-
|
|
1
|
+
import{j as t,a6 as f,ak as r,at as j,W as n}from"./vendor-mui-core-BPQ6AEW_.js";import{r as h}from"./vendor-react-CUXIiAnY.js";import{p as S,n as p}from"./vendor-ux-r9bApERu.js";import{a as C}from"./page-header-BkgoSN-0.js";import{ac as g}from"./index-BwEPekg-.js";import{o as b}from"./vendor-arcblock-D8WYBDYe.js";import{u as k}from"./config-space-DE3G4Cex.js";import{C as y,D as v,a as w}from"./connect-to-Blh-_sSq.js";import{S as c}from"./step-actions-whhEwXeU.js";import{S as E}from"./layout-xnT1yChe.js";import"./vendor-utils-BgSaqjGx.js";import"./vendor-hooks-PN9SWiQm.js";import"./lottie-web-4koyQiv_.js";import"./spaces-CK2sS_K4.js";import"./api-uGeIZn4a.js";import"./index-wgJ0Ribb.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./index-CJ1z6qNA.js";import"./index-DBs9Ljax.js";import"./use-mobile-C5RjvO7g.js";import"./content-layout-B-2tfq3i.js";function T({onNext:a=()=>{},onPrevious:d=()=>{}}){const{t:e}=h.useContext(S),{blocklet:o}=g(),{spaceGateway:m,settingStorageEndpoint:l,updateSpaceGateway:u,hasStorageEndpoint:x,loading:i,storageEndpoint:s}=k();return i?t.jsx(b,{relative:"parent",children:t.jsx(f,{})}):t.jsxs(B,{children:[t.jsx("div",{className:"header",children:t.jsx(C,{title:e("setup.didSpace.title"),subTitle:e("setup.didSpace.subTitle"),onClickBack:d})}),t.jsxs(r,{className:"form-container",sx:{width:"100%",maxWidth:"720px"},children:[x?t.jsx(y,{spaceGateway:m,settingStorageEndpoint:l}):t.jsx(v,{}),o?.capabilities?.didSpace&&t.jsx(r,{sx:{display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"24px"},children:t.jsx(w,{onConnect:u,storageEndpoint:s})})]}),o?.capabilities?.didSpace==="required"&&t.jsx(c,{mt:8,children:t.jsx(p,{loading:i,variant:"contained",disabled:i||!s,onClick:()=>a(),children:e("setup.continue")})}),o?.capabilities?.didSpace==="optional"&&t.jsx(c,{blocklet:o,onStartNow:()=>a("complete"),children:t.jsx(p,{className:"start-now",loading:i,variant:"contained",disabled:i,onClick:()=>a(),children:e(s?"setup.continue":"setup.skip")})})]})}T.propTypes={onNext:n.func,onPrevious:n.func};const B=j(E)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
`;export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t,at as r}from"./vendor-mui-core-BPQ6AEW_.js";import{r as s}from"./vendor-react-CUXIiAnY.js";import{p as n}from"./vendor-ux-r9bApERu.js";import{t as p}from"./index-
|
|
1
|
+
import{j as t,at as r}from"./vendor-mui-core-BPQ6AEW_.js";import{r as s}from"./vendor-react-CUXIiAnY.js";import{p as n}from"./vendor-ux-r9bApERu.js";import{t as p}from"./index-BwEPekg-.js";import"./vendor-utils-BgSaqjGx.js";import"./vendor-hooks-PN9SWiQm.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-D8WYBDYe.js";function l(){const{t:o}=s.useContext(n);return t.jsx(a,{style:{paddingTop:"25vh"},children:t.jsx(p,{status:"404",description:o("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const a=r.main``;export{l as default};
|