most-box 0.2.4 → 0.2.5

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.
Files changed (52) hide show
  1. package/out/admin/index.html +0 -0
  2. package/out/app/index.html +0 -0
  3. package/out/assets/{AppShell-gILTcRs-.js → AppShell-oF8wPXde.js} +1 -1
  4. package/out/assets/{FilePreviewOverlay-CM-fcIaD.js → FilePreviewOverlay-DTBZt89J.js} +1 -1
  5. package/out/assets/{LanguageToggle-B99eQcTE.js → LanguageToggle-HAJ3D6Ne.js} +1 -1
  6. package/out/assets/{MarketingHeader-Q2cpkqAM.js → MarketingHeader-B3vYocUz.js} +1 -1
  7. package/out/assets/{MarketingLayout-X3Nj2JvA.js → MarketingLayout-CapVVXTP.js} +1 -1
  8. package/out/assets/{MarketingThemeToggle-z4jr4-vt.js → MarketingThemeToggle-B47H68ro.js} +1 -1
  9. package/out/assets/{MilkdownEditor-Bv2VA3bu.js → MilkdownEditor-CRA9oxMp.js} +1 -1
  10. package/out/assets/{OpenSidebarButton-CaQJk5LD.js → OpenSidebarButton-D3JRO-Hh.js} +1 -1
  11. package/out/assets/{SidebarAccount-CpNVqNva.js → SidebarAccount-8_hQAYXx.js} +1 -1
  12. package/out/assets/{downloadValidation-xzpa5rap.js → downloadValidation-eInMiVSX.js} +1 -1
  13. package/out/assets/index--p9MKNEl.js +31 -0
  14. package/out/assets/index-DEu4udaa.css +1 -0
  15. package/out/assets/{index.lazy-H7NATHUs.js → index.lazy-2K3f5PZe.js} +1 -1
  16. package/out/assets/{index.lazy-CxpNXlwa.js → index.lazy-B-2etVwK.js} +1 -1
  17. package/out/assets/index.lazy-B4WTQF5E.js +1 -0
  18. package/out/assets/index.lazy-BFfsQrRe.js +1 -0
  19. package/out/assets/{index.lazy-Dzf-q-Vf.js → index.lazy-C5udBnrO.js} +1 -1
  20. package/out/assets/{index.lazy-CJBRtbWA.js → index.lazy-C84HrZpm.js} +1 -1
  21. package/out/assets/{index.lazy-erexqght.js → index.lazy-CBC2N5p_.js} +2 -2
  22. package/out/assets/{index.lazy-b_N8nrYw.js → index.lazy-CzANViGX.js} +1 -1
  23. package/out/assets/index.lazy-D3cw7yyA.js +2 -0
  24. package/out/assets/{index.lazy-0DsJzEoI.js → index.lazy-DVVZzbCN.js} +1 -1
  25. package/out/assets/{index.lazy-DOgKxDuF.js → index.lazy-DxZgywoV.js} +1 -1
  26. package/out/assets/{index.lazy-CPV-dZxo.js → index.lazy-RBLN4SE9.js} +1 -1
  27. package/out/assets/index.lazy-s4E2z9AY.js +2 -0
  28. package/out/assets/{mp-DjXDNjls.js → mp-CJWipckT.js} +1 -1
  29. package/out/assets/triangle-alert-CO_5uXy2.js +1 -0
  30. package/out/assets/{useChannelMessages-DS1ntAKN.js → useChannelMessages-D_306Ymv.js} +1 -1
  31. package/out/assets/{useGameRoom-BSPkCY3n.js → useGameRoom-CURx56m6.js} +1 -1
  32. package/out/assets/{userProfile-BmzBA_Bk.js → userProfile-oeBvU6ch.js} +1 -1
  33. package/out/chat/index.html +0 -0
  34. package/out/chat/join/index.html +0 -0
  35. package/out/download/index.html +2 -2
  36. package/out/game/gandengyan/index.html +0 -0
  37. package/out/game/index.html +0 -0
  38. package/out/game/zhajinhua/index.html +0 -0
  39. package/out/index.html +2 -2
  40. package/out/note/index.html +0 -0
  41. package/out/ping/index.html +2 -2
  42. package/out/profile/index.html +0 -0
  43. package/out/web3/index.html +0 -0
  44. package/package.json +1 -1
  45. package/server/src/utils/api.js +149 -9
  46. package/out/assets/index-CgErXULe.css +0 -1
  47. package/out/assets/index-DN0kD5zr.js +0 -31
  48. package/out/assets/index.lazy-CQavt0-9.js +0 -2
  49. package/out/assets/index.lazy-CUq9lbK_.js +0 -1
  50. package/out/assets/index.lazy-GtegOPkJ.js +0 -2
  51. package/out/assets/index.lazy-s3nUpCQ1.js +0 -1
  52. package/out/assets/triangle-alert-D-qigSSn.js +0 -1
@@ -1 +1 @@
1
- import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{b as r,g as i,v as a}from"./userStore-q0BBZsIV.js";import{t as o}from"./arrow-right-mNO53HQi.js";import{a as s}from"./LanguageToggle-B99eQcTE.js";import{t as c}from"./download-Bhqn6hL1.js";import{t as l}from"./external-link-CNR21yFA.js";import{t as u}from"./hard-drive-4vHpA5kz.js";import{t as d}from"./message-square-Eu86zZup.js";import{t as f}from"./notebook-pen-CfdFgaDE.js";import{t as p}from"./wallet-DmZMdK9A.js";import{A as m,I as h,f as g,m as _}from"./index-DN0kD5zr.js";import{t as v}from"./MarketingLayout-X3Nj2JvA.js";var y=i(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),b=i(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),x=i(`gamepad-2`,[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]),S=t(e(),1),C=n(),w=[{id:`app`,titleKey:`portal.feature.app.title`,subtitleKey:`portal.feature.app.subtitle`,icon:(0,C.jsx)(b,{size:28}),path:`/app/`,requiresBackend:!0,heroKey:`portal.feature.app.hero`,descKey:`portal.feature.app.desc`,featureKeys:[`portal.feature.app.bullet.localIdentity`,`portal.feature.app.bullet.hyperswarm`,`portal.feature.app.bullet.largeFiles`,`portal.feature.app.bullet.cid`,`portal.feature.app.bullet.seedAfterDownload`,`portal.feature.app.bullet.noCloud`,`portal.feature.app.bullet.desktop`,`portal.feature.app.bullet.openSource`],steps:[{num:`1`,titleKey:`portal.feature.app.step.download.title`,descKey:`portal.feature.app.step.download.desc`,link:`/download/`,linkTextKey:`portal.feature.app.step.download.link`,hideInDesktopClient:!0},{num:`2`,titleKey:`portal.feature.app.step.install.title`,descKey:`portal.feature.app.step.install.desc`,hideInDesktopClient:!0},{num:`3`,titleKey:`portal.feature.app.step.share.title`,descKey:`portal.feature.app.step.share.desc`}]},{id:`chat`,titleKey:`portal.feature.chat.title`,subtitleKey:`portal.feature.chat.subtitle`,icon:(0,C.jsx)(d,{size:28}),path:`/chat/`,requiresBackend:!0,heroKey:`portal.feature.chat.hero`,descKey:`portal.feature.chat.desc`,featureKeys:[`portal.feature.chat.bullet.encrypted`,`portal.feature.chat.bullet.identity`,`portal.feature.chat.bullet.sync`,`portal.feature.chat.bullet.offline`,`portal.feature.chat.bullet.noAccount`],steps:[{num:`1`,titleKey:`portal.feature.chat.step.download.title`,descKey:`portal.feature.chat.step.download.desc`,link:`/download/`,linkTextKey:`portal.feature.chat.step.download.link`,hideInDesktopClient:!0},{num:`2`,titleKey:`portal.feature.chat.step.create.title`,descKey:`portal.feature.chat.step.create.desc`},{num:`3`,titleKey:`portal.feature.chat.step.send.title`,descKey:`portal.feature.chat.step.send.desc`}]},{id:`note`,titleKey:`portal.feature.note.title`,subtitleKey:`portal.feature.note.subtitle`,icon:(0,C.jsx)(f,{size:28}),path:`/note/`,requiresBackend:!1,heroKey:`portal.feature.note.hero`,descKey:`portal.feature.note.desc`,featureKeys:[`portal.feature.note.bullet.markdown`,`portal.feature.note.bullet.privacy`,`portal.feature.note.bullet.folders`,`portal.feature.note.bullet.web3`,`portal.feature.note.bullet.backup`,`portal.feature.note.bullet.independent`],steps:[{num:`1`,titleKey:`portal.feature.note.step.account.title`,descKey:`portal.feature.note.step.account.desc`},{num:`2`,titleKey:`portal.feature.note.step.create.title`,descKey:`portal.feature.note.step.create.desc`},{num:`3`,titleKey:`portal.feature.note.step.backup.title`,descKey:`portal.feature.note.step.backup.desc`}]},{id:`gandengyan`,titleKey:`portal.feature.game.title`,subtitleKey:`portal.feature.game.subtitle`,icon:(0,C.jsx)(x,{size:28}),path:`/game/gandengyan/`,requiresBackend:!0,heroKey:`portal.feature.game.hero`,descKey:`portal.feature.game.desc`,featureKeys:[`portal.feature.game.bullet.account`,`portal.feature.game.bullet.channel`,`portal.feature.game.bullet.link`,`portal.feature.game.bullet.rules`,`portal.feature.game.bullet.maintain`],steps:[{num:`1`,titleKey:`portal.feature.game.step.login.title`,descKey:`portal.feature.game.step.login.desc`},{num:`2`,titleKey:`portal.feature.game.step.create.title`,descKey:`portal.feature.game.step.create.desc`},{num:`3`,titleKey:`portal.feature.game.step.test.title`,descKey:`portal.feature.game.step.test.desc`}]},{id:`web3`,titleKey:`portal.feature.web3.title`,subtitleKey:`portal.feature.web3.subtitle`,icon:(0,C.jsx)(p,{size:28}),path:`/web3/`,requiresBackend:!1,heroKey:`portal.feature.web3.hero`,descKey:`portal.feature.web3.desc`,featureKeys:[`portal.feature.web3.bullet.frontend`,`portal.feature.web3.bullet.keys`,`portal.feature.web3.bullet.mnemonic`,`portal.feature.web3.bullet.eth`,`portal.feature.web3.bullet.pem`,`portal.feature.web3.bullet.qr`],steps:[{num:`1`,titleKey:`portal.feature.web3.step.username.title`,descKey:`portal.feature.web3.step.username.desc`},{num:`2`,titleKey:`portal.feature.web3.step.keys.title`,descKey:`portal.feature.web3.step.keys.desc`},{num:`3`,titleKey:`portal.feature.web3.step.export.title`,descKey:`portal.feature.web3.step.export.desc`}]}];function T(){let e=_(e=>e.hasBackend),t=_(e=>e.openConnectModal),[n,i]=(0,S.useState)(`app`),{t:a}=h(),d=g(),f=w.find(e=>e.id===n)||w[0],p=a(f.titleKey),v=f.steps.filter(e=>!(d&&e.hideInDesktopClient));return(0,C.jsxs)(`div`,{className:`portal-page`,children:[(0,C.jsx)(`section`,{className:`portal-hero`,children:(0,C.jsxs)(`div`,{className:`mkt-container`,children:[(0,C.jsx)(`h1`,{className:`portal-hero-title`,children:a(`common.brand`)}),(0,C.jsx)(`p`,{className:`portal-hero-subtitle`,children:a(`portal.hero.subtitle`)})]})}),(0,C.jsx)(`section`,{className:`portal-cards-section`,children:(0,C.jsxs)(`div`,{className:`mkt-container`,children:[(0,C.jsx)(`div`,{className:`portal-cards`,children:w.map(t=>{let o=n===t.id,s=t.requiresBackend,c=s?e===!0?`connected`:e===!1?`disconnected`:`checking`:`none`,l=a(t.titleKey);return(0,C.jsxs)(`button`,{className:`portal-card ${o?`active`:``}`,onClick:()=>i(t.id),children:[(0,C.jsx)(r,{to:t.path,className:`btn btn-icon portal-card-open-btn`,onClick:e=>e.stopPropagation(),title:a(`portal.openFeature`,{title:l}),children:(0,C.jsx)(y,{size:16})}),(0,C.jsx)(`div`,{className:`portal-card-icon`,children:t.icon}),(0,C.jsx)(`div`,{className:`portal-card-title`,children:l}),(0,C.jsx)(`div`,{className:`portal-card-subtitle`,children:a(t.subtitleKey)}),s?(0,C.jsxs)(`div`,{className:`ui-badge portal-card-status ${c}`,children:[c===`checking`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`status-dot checking`}),a(`common.status.checking`)]}),c===`connected`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`status-dot connected`}),a(`common.status.connected`)]}),c===`disconnected`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`status-dot disconnected`}),a(`common.status.needsConnection`)]})]}):(0,C.jsxs)(`div`,{className:`ui-badge portal-card-status ready`,children:[(0,C.jsx)(`span`,{className:`status-dot ready`}),a(`common.status.ready`)]})]},t.id)})}),(0,C.jsxs)(`div`,{className:`portal-node-actions`,"aria-label":a(`portal.nodeEntry`),children:[(0,C.jsxs)(`button`,{onClick:t,className:`btn btn-secondary`,children:[(0,C.jsx)(m,{size:16}),a(`portal.webConnectNode`)]}),(0,C.jsxs)(r,{to:`/admin/`,className:`btn btn-secondary`,children:[(0,C.jsx)(u,{size:16}),a(`portal.nodeAdmin`)]})]})]})}),(0,C.jsx)(`section`,{className:`portal-marketing`,children:(0,C.jsx)(`div`,{className:`mkt-container`,children:(0,C.jsxs)(`div`,{className:`portal-marketing-inner`,children:[(0,C.jsxs)(`div`,{className:`portal-marketing-header`,children:[(0,C.jsx)(`h2`,{children:a(f.heroKey)}),(0,C.jsx)(`p`,{children:a(f.descKey)})]}),(0,C.jsx)(`div`,{className:`portal-marketing-features`,children:f.featureKeys.map(e=>(0,C.jsxs)(`div`,{className:`portal-feature-item`,children:[(0,C.jsx)(`span`,{className:`portal-feature-icon`,children:(0,C.jsx)(s,{size:14,strokeWidth:3})}),(0,C.jsx)(`span`,{children:a(e)})]},e))}),(0,C.jsx)(`div`,{className:`portal-marketing-steps`,children:v.map((e,t)=>(0,C.jsxs)(`div`,{className:`portal-step`,children:[(0,C.jsx)(`span`,{className:`portal-step-num`,children:t+1}),(0,C.jsxs)(`div`,{className:`portal-step-content`,children:[(0,C.jsx)(`strong`,{children:a(e.titleKey)}),(0,C.jsx)(`p`,{children:a(e.descKey)}),e.code&&(0,C.jsx)(`code`,{className:`portal-step-code`,translate:`no`,children:e.code}),e.link&&e.linkTextKey&&(0,C.jsx)(`p`,{className:`portal-step-link`,children:(0,C.jsxs)(r,{to:e.link,children:[a(e.linkTextKey),` `,(0,C.jsx)(l,{size:12})]})})]})]},e.num))}),(0,C.jsxs)(`div`,{className:`portal-actions`,children:[(0,C.jsxs)(r,{to:f.path,className:`btn btn-primary`,children:[a(`portal.enterFeature`,{title:p}),(0,C.jsx)(o,{size:16})]}),f.requiresBackend&&e===!1&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`button`,{onClick:t,className:`btn btn-secondary`,children:[(0,C.jsx)(m,{size:16}),a(`portal.webConnectNode`)]}),!d&&(0,C.jsxs)(r,{to:`/download/`,className:`btn btn-secondary`,children:[(0,C.jsx)(c,{size:16}),a(`nav.downloadClient`)]})]})]})]})})})]})}function E(){return(0,C.jsx)(v,{children:(0,C.jsx)(T,{})})}var D=a(`/`)({component:E});export{D as Route};
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{b as r,g as i,v as a}from"./userStore-q0BBZsIV.js";import{t as o}from"./arrow-right-mNO53HQi.js";import{a as s}from"./LanguageToggle-HAJ3D6Ne.js";import{t as c}from"./download-Bhqn6hL1.js";import{t as l}from"./external-link-CNR21yFA.js";import{t as u}from"./hard-drive-4vHpA5kz.js";import{t as d}from"./message-square-Eu86zZup.js";import{t as f}from"./notebook-pen-CfdFgaDE.js";import{t as p}from"./wallet-DmZMdK9A.js";import{R as m,f as h,j as g,m as _}from"./index--p9MKNEl.js";import{t as v}from"./MarketingLayout-CapVVXTP.js";var y=i(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),b=i(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),x=i(`gamepad-2`,[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]),S=t(e(),1),C=n(),w=[{id:`app`,titleKey:`portal.feature.app.title`,subtitleKey:`portal.feature.app.subtitle`,icon:(0,C.jsx)(b,{size:28}),path:`/app/`,requiresBackend:!0,heroKey:`portal.feature.app.hero`,descKey:`portal.feature.app.desc`,featureKeys:[`portal.feature.app.bullet.localIdentity`,`portal.feature.app.bullet.hyperswarm`,`portal.feature.app.bullet.largeFiles`,`portal.feature.app.bullet.cid`,`portal.feature.app.bullet.seedAfterDownload`,`portal.feature.app.bullet.noCloud`,`portal.feature.app.bullet.desktop`,`portal.feature.app.bullet.openSource`],steps:[{num:`1`,titleKey:`portal.feature.app.step.download.title`,descKey:`portal.feature.app.step.download.desc`,link:`/download/`,linkTextKey:`portal.feature.app.step.download.link`,hideInDesktopClient:!0},{num:`2`,titleKey:`portal.feature.app.step.install.title`,descKey:`portal.feature.app.step.install.desc`,hideInDesktopClient:!0},{num:`3`,titleKey:`portal.feature.app.step.share.title`,descKey:`portal.feature.app.step.share.desc`}]},{id:`chat`,titleKey:`portal.feature.chat.title`,subtitleKey:`portal.feature.chat.subtitle`,icon:(0,C.jsx)(d,{size:28}),path:`/chat/`,requiresBackend:!0,heroKey:`portal.feature.chat.hero`,descKey:`portal.feature.chat.desc`,featureKeys:[`portal.feature.chat.bullet.encrypted`,`portal.feature.chat.bullet.identity`,`portal.feature.chat.bullet.sync`,`portal.feature.chat.bullet.offline`,`portal.feature.chat.bullet.noAccount`],steps:[{num:`1`,titleKey:`portal.feature.chat.step.download.title`,descKey:`portal.feature.chat.step.download.desc`,link:`/download/`,linkTextKey:`portal.feature.chat.step.download.link`,hideInDesktopClient:!0},{num:`2`,titleKey:`portal.feature.chat.step.create.title`,descKey:`portal.feature.chat.step.create.desc`},{num:`3`,titleKey:`portal.feature.chat.step.send.title`,descKey:`portal.feature.chat.step.send.desc`}]},{id:`note`,titleKey:`portal.feature.note.title`,subtitleKey:`portal.feature.note.subtitle`,icon:(0,C.jsx)(f,{size:28}),path:`/note/`,requiresBackend:!1,heroKey:`portal.feature.note.hero`,descKey:`portal.feature.note.desc`,featureKeys:[`portal.feature.note.bullet.markdown`,`portal.feature.note.bullet.privacy`,`portal.feature.note.bullet.folders`,`portal.feature.note.bullet.web3`,`portal.feature.note.bullet.backup`,`portal.feature.note.bullet.independent`],steps:[{num:`1`,titleKey:`portal.feature.note.step.account.title`,descKey:`portal.feature.note.step.account.desc`},{num:`2`,titleKey:`portal.feature.note.step.create.title`,descKey:`portal.feature.note.step.create.desc`},{num:`3`,titleKey:`portal.feature.note.step.backup.title`,descKey:`portal.feature.note.step.backup.desc`}]},{id:`gandengyan`,titleKey:`portal.feature.game.title`,subtitleKey:`portal.feature.game.subtitle`,icon:(0,C.jsx)(x,{size:28}),path:`/game/gandengyan/`,requiresBackend:!0,heroKey:`portal.feature.game.hero`,descKey:`portal.feature.game.desc`,featureKeys:[`portal.feature.game.bullet.account`,`portal.feature.game.bullet.channel`,`portal.feature.game.bullet.link`,`portal.feature.game.bullet.rules`,`portal.feature.game.bullet.maintain`],steps:[{num:`1`,titleKey:`portal.feature.game.step.login.title`,descKey:`portal.feature.game.step.login.desc`},{num:`2`,titleKey:`portal.feature.game.step.create.title`,descKey:`portal.feature.game.step.create.desc`},{num:`3`,titleKey:`portal.feature.game.step.test.title`,descKey:`portal.feature.game.step.test.desc`}]},{id:`web3`,titleKey:`portal.feature.web3.title`,subtitleKey:`portal.feature.web3.subtitle`,icon:(0,C.jsx)(p,{size:28}),path:`/web3/`,requiresBackend:!1,heroKey:`portal.feature.web3.hero`,descKey:`portal.feature.web3.desc`,featureKeys:[`portal.feature.web3.bullet.frontend`,`portal.feature.web3.bullet.keys`,`portal.feature.web3.bullet.mnemonic`,`portal.feature.web3.bullet.eth`,`portal.feature.web3.bullet.pem`,`portal.feature.web3.bullet.qr`],steps:[{num:`1`,titleKey:`portal.feature.web3.step.username.title`,descKey:`portal.feature.web3.step.username.desc`},{num:`2`,titleKey:`portal.feature.web3.step.keys.title`,descKey:`portal.feature.web3.step.keys.desc`},{num:`3`,titleKey:`portal.feature.web3.step.export.title`,descKey:`portal.feature.web3.step.export.desc`}]}];function T(){let e=_(e=>e.hasBackend),t=_(e=>e.openConnectModal),[n,i]=(0,S.useState)(`app`),{t:a}=m(),d=h(),f=w.find(e=>e.id===n)||w[0],p=a(f.titleKey),v=f.steps.filter(e=>!(d&&e.hideInDesktopClient));return(0,C.jsxs)(`div`,{className:`portal-page`,children:[(0,C.jsx)(`section`,{className:`portal-hero`,children:(0,C.jsxs)(`div`,{className:`mkt-container`,children:[(0,C.jsx)(`h1`,{className:`portal-hero-title`,children:a(`common.brand`)}),(0,C.jsx)(`p`,{className:`portal-hero-subtitle`,children:a(`portal.hero.subtitle`)})]})}),(0,C.jsx)(`section`,{className:`portal-cards-section`,children:(0,C.jsxs)(`div`,{className:`mkt-container`,children:[(0,C.jsx)(`div`,{className:`portal-cards`,children:w.map(t=>{let o=n===t.id,s=t.requiresBackend,c=s?e===!0?`connected`:e===!1?`disconnected`:`checking`:`none`,l=a(t.titleKey);return(0,C.jsxs)(`button`,{className:`portal-card ${o?`active`:``}`,onClick:()=>i(t.id),children:[(0,C.jsx)(r,{to:t.path,className:`btn btn-icon portal-card-open-btn`,onClick:e=>e.stopPropagation(),title:a(`portal.openFeature`,{title:l}),children:(0,C.jsx)(y,{size:16})}),(0,C.jsx)(`div`,{className:`portal-card-icon`,children:t.icon}),(0,C.jsx)(`div`,{className:`portal-card-title`,children:l}),(0,C.jsx)(`div`,{className:`portal-card-subtitle`,children:a(t.subtitleKey)}),s?(0,C.jsxs)(`div`,{className:`ui-badge portal-card-status ${c}`,children:[c===`checking`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`status-dot checking`}),a(`common.status.checking`)]}),c===`connected`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`status-dot connected`}),a(`common.status.connected`)]}),c===`disconnected`&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`status-dot disconnected`}),a(`common.status.needsConnection`)]})]}):(0,C.jsxs)(`div`,{className:`ui-badge portal-card-status ready`,children:[(0,C.jsx)(`span`,{className:`status-dot ready`}),a(`common.status.ready`)]})]},t.id)})}),(0,C.jsxs)(`div`,{className:`portal-node-actions`,"aria-label":a(`portal.nodeEntry`),children:[(0,C.jsxs)(`button`,{onClick:t,className:`btn btn-secondary`,children:[(0,C.jsx)(g,{size:16}),a(`portal.webConnectNode`)]}),(0,C.jsxs)(r,{to:`/admin/`,className:`btn btn-secondary`,children:[(0,C.jsx)(u,{size:16}),a(`portal.nodeAdmin`)]})]})]})}),(0,C.jsx)(`section`,{className:`portal-marketing`,children:(0,C.jsx)(`div`,{className:`mkt-container`,children:(0,C.jsxs)(`div`,{className:`portal-marketing-inner`,children:[(0,C.jsxs)(`div`,{className:`portal-marketing-header`,children:[(0,C.jsx)(`h2`,{children:a(f.heroKey)}),(0,C.jsx)(`p`,{children:a(f.descKey)})]}),(0,C.jsx)(`div`,{className:`portal-marketing-features`,children:f.featureKeys.map(e=>(0,C.jsxs)(`div`,{className:`portal-feature-item`,children:[(0,C.jsx)(`span`,{className:`portal-feature-icon`,children:(0,C.jsx)(s,{size:14,strokeWidth:3})}),(0,C.jsx)(`span`,{children:a(e)})]},e))}),(0,C.jsx)(`div`,{className:`portal-marketing-steps`,children:v.map((e,t)=>(0,C.jsxs)(`div`,{className:`portal-step`,children:[(0,C.jsx)(`span`,{className:`portal-step-num`,children:t+1}),(0,C.jsxs)(`div`,{className:`portal-step-content`,children:[(0,C.jsx)(`strong`,{children:a(e.titleKey)}),(0,C.jsx)(`p`,{children:a(e.descKey)}),e.code&&(0,C.jsx)(`code`,{className:`portal-step-code`,translate:`no`,children:e.code}),e.link&&e.linkTextKey&&(0,C.jsx)(`p`,{className:`portal-step-link`,children:(0,C.jsxs)(r,{to:e.link,children:[a(e.linkTextKey),` `,(0,C.jsx)(l,{size:12})]})})]})]},e.num))}),(0,C.jsxs)(`div`,{className:`portal-actions`,children:[(0,C.jsxs)(r,{to:f.path,className:`btn btn-primary`,children:[a(`portal.enterFeature`,{title:p}),(0,C.jsx)(o,{size:16})]}),f.requiresBackend&&e===!1&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`button`,{onClick:t,className:`btn btn-secondary`,children:[(0,C.jsx)(g,{size:16}),a(`portal.webConnectNode`)]}),!d&&(0,C.jsxs)(r,{to:`/download/`,className:`btn btn-secondary`,children:[(0,C.jsx)(c,{size:16}),a(`nav.downloadClient`)]})]})]})]})})})]})}function E(){return(0,C.jsx)(v,{children:(0,C.jsx)(T,{})})}var D=a(`/`)({component:E});export{D as Route};
@@ -0,0 +1,2 @@
1
+ import{n as e,o as t,r as n,t as r}from"./jsx-runtime-Bt-cYkS5.js";import{g as i,v as a}from"./userStore-q0BBZsIV.js";import{t as o}from"./download-Bhqn6hL1.js";import{t as s}from"./file-text-CFfvvCnM.js";import{t as c}from"./hard-drive-4vHpA5kz.js";import{t as l}from"./refresh-cw--JB8k6mH.js";import{t as u}from"./save-DN4eprSt.js";import{t as d}from"./shield-check-c0labdRH.js";import{t as f}from"./trash-2-zdhWec_U.js";import{t as p}from"./triangle-alert-CO_5uXy2.js";import{t as m}from"./wifi-CVqaPDcv.js";import{C as h,P as g,R as _,S as v,h as y,j as b,m as x,v as S}from"./index--p9MKNEl.js";import{t as C}from"./dayjs.min-Dcc0B6Je.js";import{t as ee}from"./MarketingHeader-B3vYocUz.js";import{t as w}from"./format-CR8oUWq6.js";var te=i(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),ne=i(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),T=i(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),E=n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e||={};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m<p;m+=1){var h=f[m];h.d&&(c=o?n(t).diff(a,h.d,!0):a.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))})),D=n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(C()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_cn=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-cn`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`周日_周一_周二_周三_周四_周五_周六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`周`:e+`日`},weekStart:1,yearStart:4,formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日Ah点mm分`,LLLL:`YYYY年M月D日ddddAh点mm分`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s内`,past:`%s前`,s:`几秒`,m:`1 分钟`,mm:`%d 分钟`,h:`1 小时`,hh:`%d 小时`,d:`1 天`,dd:`%d 天`,M:`1 个月`,MM:`%d 个月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))})),O=n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r(C()):typeof define==`function`&&define.amd?define([`dayjs`],r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_locale_zh_tw=r(n.dayjs)})(e,(function(e){function t(e){return e&&typeof e==`object`&&`default`in e?e:{default:e}}var n=t(e),r={name:`zh-tw`,weekdays:`星期日_星期一_星期二_星期三_星期四_星期五_星期六`.split(`_`),weekdaysShort:`週日_週一_週二_週三_週四_週五_週六`.split(`_`),weekdaysMin:`日_一_二_三_四_五_六`.split(`_`),months:`一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),ordinal:function(e,t){return t===`W`?e+`週`:e+`日`},formats:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日 HH:mm`,LLLL:`YYYY年M月D日dddd HH:mm`,l:`YYYY/M/D`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日dddd HH:mm`},relativeTime:{future:`%s內`,past:`%s前`,s:`幾秒`,m:`1 分鐘`,mm:`%d 分鐘`,h:`1 小時`,hh:`%d 小時`,d:`1 天`,dd:`%d 天`,M:`1 個月`,MM:`%d 個月`,y:`1 年`,yy:`%d 年`},meridiem:function(e,t){var n=100*e+t;return n<600?`凌晨`:n<900?`早上`:n<1100?`上午`:n<1300?`中午`:n<1800?`下午`:`晚上`}};return n.default.locale(r,null,!0),r}))})),k=t(e(),1),A=t(C(),1),j=t(E(),1);D(),O();var M=r();A.default.extend(j.default);var re=null;function ie(e,t){let n=Math.max(0,Number(e)||0),r=Math.floor(n/86400),i=Math.floor(n%86400/3600),a=Math.floor(n%3600/60);return r>0?t(`admin.uptime.daysHours`,{days:r,hours:i}):i>0?t(`admin.uptime.hoursMinutes`,{hours:i,minutes:a}):t(`admin.uptime.minutes`,{minutes:a})}function N(e){return Number.isFinite(e)?String(Math.round(e/(1024*1024*1024)*100)/100):`0`}function P(e){let t=Number(e);return!Number.isFinite(t)||t<0?0:Math.round(t*1024*1024*1024)}function ae(e){return Array.from(new Set(String(e||``).split(/[\n,]/).map(e=>e.trim()).filter(Boolean)))}function F(e,t=12,n=8){return e?e.length<=t+n+3?e:`${e.slice(0,t)}...${e.slice(-n)}`:`-`}function oe(e,t){switch(e.seedStatus){case`queued`:return t(`admin.seedStatus.queued`);case`joining`:return t(`admin.seedStatus.joining`);case`active`:return t(`admin.seedStatus.active`);case`paused`:return t(`admin.seedStatus.paused`);case`error`:return e.seedError?t(`admin.seedStatus.errorWithMessage`,{message:e.seedError}):t(`admin.seedStatus.error`);default:return e.joined?t(`admin.seedStatus.active`):t(`admin.seedStatus.notJoined`)}}function I(e){return{"zh-CN":`zh-cn`,"zh-TW":`zh-tw`,en:`en`}[e]}function se(e,t,n){if(!e)return t(`admin.time.never`);let r=(0,A.default)(e);if(!r.isValid())return t(`admin.time.never`);if(r.isAfter((0,A.default)()))return t(`admin.time.justNow`);let i=I(n);return r.locale(i).from((0,A.default)().locale(i))}var ce=[{labelKey:`admin.seedHelp.active.label`,tone:`active`,descKey:`admin.seedHelp.active.desc`},{labelKey:`admin.seedHelp.pending.label`,tone:`pending`,descKey:`admin.seedHelp.pending.desc`},{labelKey:`admin.seedHelp.paused.label`,tone:`muted`,descKey:`admin.seedHelp.paused.desc`},{labelKey:`admin.seedHelp.error.label`,tone:`error`,descKey:`admin.seedHelp.error.desc`}],le=[{value:`all`,labelKey:`admin.logFilter.all`},{value:`join`,labelKey:`admin.logFilter.join`},{value:`pull`,labelKey:`admin.logFilter.pull`},{value:`verify`,labelKey:`admin.logFilter.verify`},{value:`serve`,labelKey:`admin.logFilter.serve`},{value:`error`,labelKey:`admin.logFilter.error`}],L={join:[`join`,`joined`,`topic`],pull:[`pull`,`p2p`],verify:[`verify`,`verified`,`integrity`,`download:success`],serve:[`seed`,`seeding`,`holding`,`publish:success`,`topic:joined`],error:[`error`,`failed`,`fail`]};function R(e){let t=``;try{t=JSON.stringify(e.data||{})}catch{}return[e.level,e.event,e.message,t].map(e=>String(e||``).toLowerCase()).join(` `)}function ue(e,t){let n=String(t||`all`).trim().toLowerCase();if(!n||n===`all`)return!0;let r=R(e);return n===`error`?e.level===`error`||L.error.some(e=>r.includes(e)):(L[n]||[n]).some(e=>r.includes(e))}function z(){let{t:e,locale:t,formatNumber:n,formatTime:r}=_(),i=x(e=>e.hasBackend),a=x(e=>e.addToast),[C,E]=(0,k.useState)(re),[D,O]=(0,k.useState)([]),[A,j]=(0,k.useState)(``),[I,L]=(0,k.useState)(!1),[R,z]=(0,k.useState)(!1),[B,V]=(0,k.useState)(!1),[H,de]=(0,k.useState)(`all`),[U,fe]=(0,k.useState)([]),[pe,W]=(0,k.useState)(``),[G,K]=(0,k.useState)({dataPath:``,capacityGiB:`100`,maxFileSizeGiB:`10`,remoteInvites:``}),q=i===!0;function J(){return q?!0:(a(e(i===null?`admin.toast.backendChecking`:`admin.toast.backendDisconnected`),`warning`),!1)}let me=(0,k.useMemo)(()=>!C||C.capacity.configuredBytes<=0?0:Math.min(100,Math.round(C.capacity.usedBytes/C.capacity.configuredBytes*100)),[C]),he=(0,k.useMemo)(()=>(C?.holdings||[]).slice(0,100),[C]),ge=Math.max(0,(C?.holdings.length||0)-100),Y=h(),X=!!Y&&!Y.includes(`localhost`)&&!Y.includes(`127.0.0.1`),Z=async()=>{if(!q)return!1;try{let e=await y.get(`/api/node/status`).json(),t=await y.get(`/api/node/config`).json();return E(e),K({dataPath:t.dataPath||e.dataPath||``,capacityGiB:N(t.capacityBytes),maxFileSizeGiB:N(t.maxFileSizeBytes),remoteInvites:(t.remoteInvites||[]).join(`
2
+ `)}),j(``),!0}catch(t){let n=await S(t,e(`admin.error.readStatus`));return j(n),a(n,`error`),!1}},_e=async()=>{J()&&await Z()&&a(e(`admin.toast.statusRefreshed`),`success`)},Q=async(e=H)=>{if(q)try{let t=new URLSearchParams({limit:`80`,filter:e});O((await y.get(`/api/node/logs?${t.toString()}`).json()).logs||[])}catch{}},$=async()=>{if(q)try{fe((await y.get(`/api/admin/users`).json()).users||[])}catch{}},ve=async()=>{if(J()){L(!0);try{await y.post(`/api/node/config`,{json:{dataPath:G.dataPath,capacityBytes:P(G.capacityGiB),maxFileSizeBytes:P(G.maxFileSizeGiB),remoteInvites:ae(G.remoteInvites)}}).json(),a(G.dataPath===(C?.dataPath||``)?e(`admin.toast.configSaved`):e(`admin.toast.configSavedRestart`),`success`),await Z(),await Q()}catch(t){let n=await S(t,e(`admin.error.saveConfig`));a(n,`error`),j(n)}finally{L(!1)}}},ye=async()=>{C?.nodeId&&(await navigator.clipboard.writeText(C.nodeId),a(e(`admin.toast.nodeIdCopied`),`success`))},be=async()=>{if(J()){z(!0);try{await y.delete(`/api/node/logs`).json(),O([]),a(e(`admin.toast.logsCleared`),`success`)}catch(t){let n=await S(t,e(`admin.error.clearLogs`));a(n,`error`),j(n)}finally{z(!1)}}},xe=async()=>{if(J()){V(!0);try{let t=await y.get(`/api/node/diagnostics`).json(),n=new Blob([JSON.stringify(t,null,2)],{type:`application/json`}),r=URL.createObjectURL(n),i=document.createElement(`a`),o=new Date().toISOString().replace(/[:.]/g,`-`);i.href=r,i.download=`mostbox-diagnostics-${o}.json`,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r),a(e(`admin.toast.diagnosticsExported`),`success`)}catch(t){let n=await S(t,e(`admin.error.exportDiagnostics`));a(n,`error`),j(n)}finally{V(!1)}}},Se=async t=>{if(J()&&window.confirm(e(`admin.confirm.clearUserData`,{address:`${t.slice(0,6)}...${t.slice(-4)}`}))){W(t);try{await y.delete(`/api/admin/users/${t}/data`).json(),a(e(`admin.toast.userDataCleared`),`success`),await $(),await Z()}catch(t){let n=await S(t,e(`admin.error.clearUserData`));a(n,`error`),j(n)}finally{W(``)}}};return(0,k.useEffect)(()=>{if(!q||X)return;Z(),Q(),$();let e=null,t=!1;return(async()=>{if(e=new WebSocket(await v(`/ws`)),t){e.close();return}e.onmessage=e=>{try{let t=JSON.parse(e.data);t.event===`node:status`&&E(t.data),t.event===`node:log`&&ue(t.data,H)&&O(e=>[t.data,...e].slice(0,80)),t.event===`node:logs:cleared`&&O([]),(t.event===`publish:success`||t.event===`download:success`||t.event===`network:status`)&&Z()}catch{}}})(),()=>{t=!0,e?.close()}},[q,X,H]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(ee,{}),(0,M.jsxs)(`main`,{className:`admin-page`,children:[(0,M.jsxs)(`header`,{className:`admin-topbar`,children:[(0,M.jsx)(`div`,{className:`admin-title-group`,children:(0,M.jsx)(`h1`,{children:e(`admin.title`)})}),(0,M.jsxs)(`div`,{className:`admin-topbar-actions`,children:[(0,M.jsxs)(`span`,{className:`admin-status-pill ${C?.status===`online`?`online`:``}`,children:[(0,M.jsx)(te,{size:14}),C?.status===`online`?e(`admin.status.online`):e(`admin.status.waiting`)]}),(0,M.jsxs)(`button`,{className:`btn btn-secondary`,onClick:_e,children:[(0,M.jsx)(l,{size:16}),e(`admin.action.refresh`)]})]})]}),i===!1&&(0,M.jsxs)(`section`,{className:`admin-panel admin-error`,children:[(0,M.jsx)(b,{size:20}),(0,M.jsx)(`span`,{children:e(`admin.error.localDaemonDisconnected`)})]}),X&&(0,M.jsxs)(`section`,{className:`admin-panel admin-error`,children:[(0,M.jsx)(p,{size:18}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`h2`,{children:e(`admin.remoteUnavailable.title`)}),(0,M.jsx)(`p`,{children:e(`admin.remoteUnavailable.desc`)})]})]}),!X&&A&&(0,M.jsxs)(`section`,{className:`admin-panel admin-error`,children:[(0,M.jsx)(s,{size:20}),(0,M.jsx)(`span`,{children:A})]}),!X&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`section`,{className:`admin-overview`,children:[(0,M.jsxs)(`div`,{className:`admin-metric`,children:[(0,M.jsx)(`div`,{className:`admin-metric-icon`,children:(0,M.jsx)(d,{size:18})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:e(`admin.metric.nodeId`)}),(0,M.jsx)(`strong`,{translate:`no`,children:F(C?.nodeId||``)})]}),(0,M.jsx)(`button`,{className:`btn btn-icon admin-metric-action`,onClick:ye,"aria-label":e(`admin.action.copyNodeId`),children:(0,M.jsx)(ne,{size:15})})]}),(0,M.jsxs)(`div`,{className:`admin-metric`,children:[(0,M.jsx)(`div`,{className:`admin-metric-icon`,children:(0,M.jsx)(m,{size:18})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:e(`admin.metric.connections`)}),(0,M.jsx)(`strong`,{children:C?e(`admin.metric.peers`,{count:C.network.peers}):`-`})]})]}),(0,M.jsxs)(`div`,{className:`admin-metric`,children:[(0,M.jsx)(`div`,{className:`admin-metric-icon`,children:(0,M.jsx)(c,{size:18})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:e(`admin.metric.capacity`)}),(0,M.jsxs)(`strong`,{children:[me,`%`]})]})]}),(0,M.jsxs)(`div`,{className:`admin-metric`,children:[(0,M.jsx)(`div`,{className:`admin-metric-icon`,children:(0,M.jsx)(b,{size:18})}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:e(`admin.metric.uptime`)}),(0,M.jsx)(`strong`,{children:C?ie(C.uptimeSeconds,e):`-`})]})]})]}),(0,M.jsxs)(`section`,{className:`admin-grid`,children:[(0,M.jsxs)(`div`,{className:`admin-panel admin-span-2`,children:[(0,M.jsxs)(`div`,{className:`admin-panel-header`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`h2`,{children:e(`admin.nodeStatus.title`)})}),(0,M.jsx)(g,{size:18})]}),(0,M.jsxs)(`div`,{className:`admin-status-grid`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:e(`admin.nodeStatus.version`)}),(0,M.jsx)(`strong`,{translate:`no`,children:C?.version||`-`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:e(`admin.nodeStatus.listen`)}),(0,M.jsx)(`strong`,{translate:`no`,children:C?`${C.host}:${C.port}`:`-`})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`span`,{children:e(`admin.nodeStatus.dataPath`)}),(0,M.jsx)(`strong`,{translate:`no`,children:C?.dataPath||`-`})]})]}),(0,M.jsx)(`div`,{className:`admin-address-list`,children:(C?.listen.addresses||[]).map(e=>(0,M.jsxs)(`span`,{translate:`no`,children:[e.label,`: `,e.ip,`:`,C?.port]},`${e.type}-${e.ip}`))})]}),(0,M.jsxs)(`div`,{className:`admin-panel admin-span-2`,children:[(0,M.jsxs)(`div`,{className:`admin-panel-header`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`h2`,{children:e(`admin.userData.title`)})}),(0,M.jsx)(T,{size:18})]}),(0,M.jsxs)(`div`,{className:`admin-table`,children:[(0,M.jsxs)(`div`,{className:`admin-table-row admin-table-head`,children:[(0,M.jsx)(`span`,{children:e(`admin.userData.user`)}),(0,M.jsx)(`span`,{children:e(`admin.userData.files`)}),(0,M.jsx)(`span`,{children:e(`admin.userData.trash`)}),(0,M.jsx)(`span`,{children:e(`admin.userData.actions`)})]}),U.map(t=>(0,M.jsxs)(`div`,{className:`admin-table-row`,children:[(0,M.jsx)(`span`,{title:t.address,translate:`no`,children:F(t.address)}),(0,M.jsx)(`span`,{children:n(t.fileCount)}),(0,M.jsx)(`span`,{children:n(t.trashCount)}),(0,M.jsx)(`span`,{children:(0,M.jsxs)(`button`,{className:`btn btn-ghost`,onClick:()=>Se(t.address),disabled:pe===t.address,children:[(0,M.jsx)(f,{size:16}),e(`admin.action.clear`)]})})]},t.address)),U.length===0&&(0,M.jsx)(`div`,{className:`admin-empty-row`,children:e(`admin.userData.empty`)})]})]}),(0,M.jsxs)(`div`,{className:`admin-panel admin-span-2`,children:[(0,M.jsxs)(`div`,{className:`admin-panel-header`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`h2`,{children:e(`admin.settings.title`)})}),(0,M.jsx)(T,{size:18})]}),(0,M.jsxs)(`div`,{className:`admin-settings-fields`,children:[(0,M.jsxs)(`label`,{className:`admin-field admin-field-wide`,children:[(0,M.jsx)(`span`,{children:e(`admin.settings.dataPath`)}),(0,M.jsx)(`input`,{className:`input`,value:G.dataPath,onChange:e=>K(t=>({...t,dataPath:e.target.value}))})]}),(0,M.jsxs)(`label`,{className:`admin-field`,children:[(0,M.jsx)(`span`,{children:e(`admin.settings.capacityGiB`)}),(0,M.jsx)(`input`,{className:`input`,type:`number`,min:`0`,step:`1`,value:G.capacityGiB,onChange:e=>K(t=>({...t,capacityGiB:e.target.value}))})]}),(0,M.jsxs)(`label`,{className:`admin-field`,children:[(0,M.jsx)(`span`,{children:e(`admin.settings.maxFileSizeGiB`)}),(0,M.jsx)(`input`,{className:`input`,type:`number`,min:`0`,step:`1`,value:G.maxFileSizeGiB,onChange:e=>K(t=>({...t,maxFileSizeGiB:e.target.value}))})]}),(0,M.jsxs)(`label`,{className:`admin-field admin-field-wide`,children:[(0,M.jsx)(`span`,{children:e(`admin.settings.remoteInvites`)}),(0,M.jsx)(`textarea`,{className:`input admin-textarea`,value:G.remoteInvites,placeholder:e(`admin.settings.remoteInvitesPlaceholder`),onChange:e=>K(t=>({...t,remoteInvites:e.target.value}))})]})]}),(0,M.jsx)(`p`,{className:`admin-field-hint`,children:e(`admin.settings.hint`)}),(0,M.jsxs)(`button`,{className:`btn btn-primary btn-full`,onClick:ve,disabled:I,children:[(0,M.jsx)(u,{size:16}),e(`admin.action.saveConfig`)]})]}),(0,M.jsxs)(`div`,{className:`admin-panel admin-span-2`,children:[(0,M.jsxs)(`div`,{className:`admin-panel-header`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`h2`,{children:e(`admin.holdings.title`)})}),(0,M.jsx)(c,{size:18})]}),(0,M.jsxs)(`div`,{className:`admin-capacity-row`,children:[(0,M.jsx)(`progress`,{value:me,max:`100`}),(0,M.jsxs)(`span`,{children:[w(C?.capacity.usedBytes||0),` /`,` `,w(C?.capacity.configuredBytes||0)]})]}),(0,M.jsx)(`div`,{className:`admin-seed-help`,"aria-label":e(`admin.seedHelp.label`),children:ce.map(t=>(0,M.jsxs)(`div`,{className:`admin-seed-help-item`,children:[(0,M.jsx)(`span`,{className:`admin-seed-dot ${t.tone}`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`strong`,{children:e(t.labelKey)}),(0,M.jsx)(`span`,{children:e(t.descKey)})]})]},t.labelKey))}),ge>0&&(0,M.jsx)(`p`,{className:`admin-table-note`,children:e(`admin.holdings.hiddenCount`,{count:n(ge)})}),(0,M.jsxs)(`div`,{className:`admin-table`,children:[(0,M.jsxs)(`div`,{className:`admin-table-row admin-table-head`,children:[(0,M.jsx)(`span`,{children:e(`admin.holdings.file`)}),(0,M.jsx)(`span`,{children:`CID`}),(0,M.jsx)(`span`,{children:e(`admin.holdings.size`)}),(0,M.jsx)(`span`,{children:`Peer`}),(0,M.jsx)(`span`,{children:e(`admin.holdings.lastServed`)}),(0,M.jsx)(`span`,{children:e(`admin.holdings.status`)})]}),he.map(n=>(0,M.jsxs)(`div`,{className:`admin-table-row`,children:[(0,M.jsx)(`span`,{translate:`no`,children:n.fileName||`-`}),(0,M.jsx)(`span`,{title:n.cid,translate:`no`,children:F(n.cid)}),(0,M.jsx)(`span`,{children:w(n.size)}),(0,M.jsx)(`span`,{children:n.peerCount??0}),(0,M.jsx)(`span`,{title:n.lastServedAt||``,children:se(n.lastServedAt,e,t)}),(0,M.jsx)(`span`,{className:`admin-seed-pill ${n.seedStatus===`error`?`error`:n.seedStatus===`active`||n.joined?`active`:``}`,children:oe(n,e)})]},n.cid)),(!C||C.holdings.length===0)&&(0,M.jsx)(`div`,{className:`admin-empty-row`,children:e(`admin.holdings.empty`)})]})]}),(0,M.jsxs)(`div`,{className:`admin-panel admin-span-2`,children:[(0,M.jsxs)(`div`,{className:`admin-panel-header`,children:[(0,M.jsx)(`div`,{children:(0,M.jsx)(`h2`,{children:e(`admin.logs.title`)})}),(0,M.jsxs)(`div`,{className:`admin-panel-actions`,children:[(0,M.jsxs)(`button`,{className:`btn btn-secondary`,onClick:xe,disabled:B,children:[(0,M.jsx)(o,{size:16}),e(`admin.action.exportDiagnostics`)]}),(0,M.jsxs)(`button`,{className:`btn btn-ghost`,onClick:be,disabled:R||D.length===0,children:[(0,M.jsx)(f,{size:16}),e(`admin.action.clearLogs`)]}),(0,M.jsx)(s,{size:18})]})]}),(0,M.jsx)(`div`,{className:`admin-log-filter`,"aria-label":e(`admin.logs.filterLabel`),children:le.map(t=>(0,M.jsx)(`button`,{type:`button`,className:H===t.value?`active`:``,onClick:()=>{de(t.value),Q(t.value)},children:e(t.labelKey)},t.value))}),(0,M.jsxs)(`div`,{className:`admin-log-list`,children:[D.map(e=>(0,M.jsxs)(`div`,{className:`admin-log-row`,children:[(0,M.jsx)(`time`,{children:r(e.ts)}),(0,M.jsx)(`span`,{className:`admin-log-level ${e.level}`,translate:`no`,children:e.level}),(0,M.jsx)(`strong`,{translate:`no`,children:e.event}),(0,M.jsx)(`span`,{translate:`no`,children:e.message})]},e.id)),D.length===0&&(0,M.jsx)(`div`,{className:`admin-empty-row`,children:e(`admin.logs.empty`)})]})]})]})]})]})]})}var B=a(`/admin/`)({component:z});export{B as Route};
@@ -1 +1 @@
1
- import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{f as r,g as i,m as a}from"./userStore-q0BBZsIV.js";import{a as o}from"./LanguageToggle-B99eQcTE.js";import{t as s}from"./copy-5aEv78Eq.js";import{I as c}from"./index-DN0kD5zr.js";import{t as l}from"./dayjs.min-Dcc0B6Je.js";var u=i(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),d=i(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),f=t(e(),1),p=n();function m({text:e,label:t,copiedLabel:n,className:r=`btn btn-icon`,iconSize:i=14}){let{t:a}=c(),[l,u]=(0,f.useState)(!1),d=n||a(`common.copied`),m=t||a(`common.copy`);async function h(){try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),1500)}catch{}}return(0,p.jsxs)(`button`,{type:`button`,className:r,onClick:h,title:l?d:m,children:[l?(0,p.jsx)(o,{size:i}):(0,p.jsx)(s,{size:i}),t?l?d:t:null]})}var h=t(r(),1);l();var g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=e=>{let t=[];for(;e>=128;)t.push(e&127|128),e>>=7;return t.push(e),t},v=e=>{let t=new Uint8Array([8,1,18,..._(e.length)]),n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n},y=(e,t)=>{if(e.length===0)return``;let n=t.length,r=0;for(;r<e.length&&e[r]===0;)r++;let i=[0];for(let t=r;t<e.length;t++){let r=e[t];for(let e=0;e<i.length;e++){let t=i[e]*256+r;i[e]=t%n,r=Math.floor(t/n)}for(;r>0;)i.push(r%n),r=Math.floor(r/n)}let a=``;for(let e=0;e<r;e++)a+=t[0];for(let e=i.length-1;e>=0;e--)a+=t[i[e]];return a},b=(e,t)=>{let n=t.slice(2),r=new Uint8Array(a(e+n));return h.default.sign.keyPair.fromSecretKey(r)},x=(e,t)=>{let n=v(b(e,t).publicKey),r=new Uint8Array(2+n.length);r[0]=0,r[1]=36,r.set(n,2);let i=new Uint8Array([1,114]),a=new Uint8Array(i.length+r.length);return a.set(i,0),a.set(r,i.length),`k`+y(a,g)};export{u as a,d as i,x as n,m as r,b as t};
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{f as r,g as i,m as a}from"./userStore-q0BBZsIV.js";import{a as o}from"./LanguageToggle-HAJ3D6Ne.js";import{t as s}from"./copy-5aEv78Eq.js";import{R as c}from"./index--p9MKNEl.js";import{t as l}from"./dayjs.min-Dcc0B6Je.js";var u=i(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),d=i(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),f=t(e(),1),p=n();function m({text:e,label:t,copiedLabel:n,className:r=`btn btn-icon`,iconSize:i=14}){let{t:a}=c(),[l,u]=(0,f.useState)(!1),d=n||a(`common.copied`),m=t||a(`common.copy`);async function h(){try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),1500)}catch{}}return(0,p.jsxs)(`button`,{type:`button`,className:r,onClick:h,title:l?d:m,children:[l?(0,p.jsx)(o,{size:i}):(0,p.jsx)(s,{size:i}),t?l?d:t:null]})}var h=t(r(),1);l();var g=`0123456789abcdefghijklmnopqrstuvwxyz`,_=e=>{let t=[];for(;e>=128;)t.push(e&127|128),e>>=7;return t.push(e),t},v=e=>{let t=new Uint8Array([8,1,18,..._(e.length)]),n=new Uint8Array(t.length+e.length);return n.set(t,0),n.set(e,t.length),n},y=(e,t)=>{if(e.length===0)return``;let n=t.length,r=0;for(;r<e.length&&e[r]===0;)r++;let i=[0];for(let t=r;t<e.length;t++){let r=e[t];for(let e=0;e<i.length;e++){let t=i[e]*256+r;i[e]=t%n,r=Math.floor(t/n)}for(;r>0;)i.push(r%n),r=Math.floor(r/n)}let a=``;for(let e=0;e<r;e++)a+=t[0];for(let e=i.length-1;e>=0;e--)a+=t[i[e]];return a},b=(e,t)=>{let n=t.slice(2),r=new Uint8Array(a(e+n));return h.default.sign.keyPair.fromSecretKey(r)},x=(e,t)=>{let n=v(b(e,t).publicKey),r=new Uint8Array(2+n.length);r[0]=0,r[1]=36,r.set(n,2);let i=new Uint8Array([1,114]),a=new Uint8Array(i.length+r.length);return a.set(i,0),a.set(r,i.length),`k`+y(a,g)};export{u as a,d as i,x as n,m as r,b as t};
@@ -0,0 +1 @@
1
+ import{g as e}from"./userStore-q0BBZsIV.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t};
@@ -1,3 +1,3 @@
1
- import{n as e,o as t}from"./jsx-runtime-Bt-cYkS5.js";import{t as n}from"./userStore-q0BBZsIV.js";import{S as r}from"./index-DN0kD5zr.js";import{i,r as a}from"./userProfile-BmzBA_Bk.js";var o=t(e(),1);function s(e=``,t=[]){let n=[e,...t];return[...new Set(n.filter(Boolean))]}function c(e=[]){return s(``,e).join(`
1
+ import{n as e,o as t}from"./jsx-runtime-Bt-cYkS5.js";import{t as n}from"./userStore-q0BBZsIV.js";import{S as r}from"./index--p9MKNEl.js";import{i,r as a}from"./userProfile-oeBvU6ch.js";var o=t(e(),1);function s(e=``,t=[]){let n=[e,...t];return[...new Set(n.filter(Boolean))]}function c(e=[]){return s(``,e).join(`
2
2
  `)}function l(e,t){let n=new Set(e),r=new Set(t);return{subscribe:[...r].filter(e=>!n.has(e)),unsubscribe:[...n].filter(e=>!r.has(e))}}function u(e){return String(e.id||`${e.author||``}-${e.timestamp||``}-${e.content||``}`)}function d(e){let t=Number(e.timestamp);return Number.isFinite(t)?t:0}function f(e){return e.map((e,t)=>({message:e,index:t})).sort((e,t)=>{let n=d(e.message)-d(t.message);return n===0?e.index-t.index:n}).map(e=>e.message)}function p({isReady:e,enabled:t=!0,channelName:d=``,extraSubscribedChannelNames:p=[],peerId:m=``,waitForPeerId:h=!1,limit:g=100,reconnectBaseDelay:_=2500,acceptMessage:v,getMessageKey:y=u,onSyncError:b,onSocketEvent:x,onReconnect:S}){let C=n(e=>e.identity),[w,T]=(0,o.useState)([]),[E,D]=(0,o.useState)(!1),O=(0,o.useMemo)(()=>c(p),[p]),k=(0,o.useRef)(null),A=(0,o.useRef)(d),j=(0,o.useRef)(p),M=(0,o.useRef)(null),N=(0,o.useRef)(0),P=(0,o.useRef)(v),F=(0,o.useRef)(y),I=(0,o.useRef)(x),L=(0,o.useRef)(b),R=(0,o.useRef)(S),z=(0,o.useRef)(m),B=(0,o.useRef)(new Set);(0,o.useEffect)(()=>{j.current=O?O.split(`
3
3
  `):[]},[O]),(0,o.useEffect)(()=>{P.current=v},[v]),(0,o.useEffect)(()=>{F.current=y},[y]),(0,o.useEffect)(()=>{I.current=x},[x]),(0,o.useEffect)(()=>{L.current=b},[b]),(0,o.useEffect)(()=>{R.current=S},[S]);let V=(0,o.useCallback)(e=>{let t=P.current;return t?e.filter(t):e},[]),H=(0,o.useCallback)((e,t,n=!0)=>{let r=[...e];for(let e of V(t)){let t=F.current(e);if(n){let n=r.findIndex(t=>t.pending&&t.author?.toLowerCase()===e.author?.toLowerCase()&&t.content===e.content);if(n!==-1){r[n]={...e,id:e.id||t};continue}}r.some(e=>F.current(e)===t)||r.push({...e,id:e.id||t})}return f(r)},[V]),U=(0,o.useCallback)((e,t)=>{k.current?.readyState===WebSocket.OPEN&&k.current.send(JSON.stringify({event:e,data:t}))},[]),W=(0,o.useCallback)(e=>{let t=new Set(e.filter(Boolean)),n=l(B.current,t);for(let e of n.unsubscribe)U(`channel:unsubscribe`,{channel:e});for(let e of n.subscribe)U(`channel:subscribe`,{channel:e});B.current=t},[U]),G=(0,o.useCallback)(()=>s(A.current,j.current),[]),K=(0,o.useCallback)(async(t=A.current,n={})=>{if(!t||!e)return[];try{let e=V(await i.getChannelMessages(t,g));return T(t=>n.replace?f(e):H(t,e,!1)),e}catch(e){return n.replace&&T([]),await L.current?.(e),[]}},[V,e,g,H]);(0,o.useEffect)(()=>{z.current=m,m&&(U(`register`,{peerId:m}),h&&(W(G()),A.current&&K(A.current,{replace:!0})))},[G,m,W,K,h,U]);let q=(0,o.useCallback)(()=>{T([])},[]),J=(0,o.useCallback)(async({channelName:e=A.current,content:t,attachment:n,optimisticId:r})=>{let o=t.trim();if(!e||!o||!C)return null;let s=a(C),c={id:r||`${s.author}-${Date.now()}-${Math.random().toString(36).slice(2)}`,...s,content:o,timestamp:Date.now(),pending:!0,attachment:n};T(e=>f([...e,c]));try{let t=await i.sendChannelMessage({channelName:e,content:o,...s,attachment:n});return T(e=>f(e.map(e=>e.id===c.id?{...t.message,id:t.message.id||F.current(t.message)}:e))),t.message}catch(e){throw T(e=>e.filter(e=>e.id!==c.id)),e}},[C]);return(0,o.useEffect)(()=>{A.current=d,!(!e||!t)&&(d&&K(d,{replace:!0}),(!h||z.current)&&W(G()))},[d,t,O,G,e,W,K,h]),(0,o.useEffect)(()=>{!e||!t||h&&!z.current||W(G())},[t,G,e,W,h]),(0,o.useEffect)(()=>{if(!e||!t){D(!1);return}let n=!1;N.current=0;async function i(){let e=new WebSocket(await r(`/ws`));if(n){e.close();return}e.onopen=()=>{D(!0),N.current=0,z.current&&e.send(JSON.stringify({event:`register`,data:{peerId:z.current}})),(!h||z.current)&&(B.current.clear(),W(G()),A.current&&K(A.current,{replace:!0}),R.current?.())},e.onmessage=e=>{try{let t=JSON.parse(e.data);I.current?.(t.event,t.data),t.event===`channel:message`&&t.data?.channel===A.current&&t.data?.message&&T(e=>H(e,[t.data.message])),t.event===`user:metadata:updated`&&t.data?.scope===`channels`&&A.current&&K(A.current,{replace:!0})}catch{}},e.onclose=()=>{if(D(!1),n)return;let e=N.current;if(e>=20)return;let t=Math.min(_*2**e,3e4);N.current=e+1,M.current=setTimeout(i,t)},e.onerror=()=>e.close(),k.current=e}return i(),()=>{n=!0,M.current&&clearTimeout(M.current),k.current?.close(),k.current=null,B.current.clear()}},[t,G,e,H,_,W,K,h]),{clearMessages:q,connected:E,messages:w,sendMessage:J,setMessages:T,syncMessages:K}}export{p as t};
@@ -1 +1 @@
1
- import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{b as r,g as i,t as a}from"./userStore-q0BBZsIV.js";import{I as o,N as s,O as c,m as l,v as u}from"./index-DN0kD5zr.js";import{t as d}from"./SidebarAccount-CpNVqNva.js";import{i as f,n as p,r as m,t as h}from"./userProfile-BmzBA_Bk.js";import{t as g}from"./useChannelMessages-DS1ntAKN.js";var _=i(`spade`,[[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5`,key:`1aw2pz`}]]),v=i(`swords`,[[`polyline`,{points:`14.5 17.5 3 6 3 3 6 3 17.5 14.5`,key:`1hfsw2`}],[`line`,{x1:`13`,x2:`19`,y1:`19`,y2:`13`,key:`1vrmhu`}],[`line`,{x1:`16`,x2:`20`,y1:`16`,y2:`20`,key:`1bron3`}],[`line`,{x1:`19`,x2:`21`,y1:`21`,y2:`19`,key:`13pww6`}],[`polyline`,{points:`14.5 6.5 18 3 21 3 21 6 17.5 9.5`,key:`hbey2j`}],[`line`,{x1:`5`,x2:`9`,y1:`14`,y2:`18`,key:`1hf58s`}],[`line`,{x1:`7`,x2:`4`,y1:`17`,y2:`20`,key:`pidxm4`}],[`line`,{x1:`3`,x2:`5`,y1:`19`,y2:`21`,key:`1pehsh`}]]),y=n(),b=[{id:`gandengyan`,labelKey:`game.gandengyan.title`,href:`/game/gandengyan/`,icon:(0,y.jsx)(v,{size:16})},{id:`zhajinhua`,labelKey:`game.zhajinhua.title`,href:`/game/zhajinhua/`,icon:(0,y.jsx)(_,{size:16})}];function x({activeGame:e,closeSidebar:t}){let{t:n}=o();return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`button`,{type:`button`,className:`sidebar-header sidebar-header-link`,onClick:c(),children:[(0,y.jsx)(s,{size:18}),(0,y.jsx)(`h1`,{children:`MOST PEOPLE`})]}),(0,y.jsx)(`nav`,{className:`sidebar-nav`,children:b.map(i=>(0,y.jsxs)(r,{to:i.href,className:`sidebar-nav-btn ${e===i.id?`active`:``}`,onClick:t,children:[i.icon,(0,y.jsx)(`span`,{children:n(i.labelKey)})]},i.id))}),(0,y.jsx)(d,{})]})}var S=t(e(),1),C=`game`,w=`mostbox.game.event`,T=[`gandengyan`,`zhajinhua`],E=`ABCDEFGHJKLMNPQRSTUVWXYZ23456789`;function D(e){let t=String(e||``).trim().toLowerCase();return T.includes(t)?t:``}function O(e){return String(e||``).trim().toUpperCase().replace(/[^A-Z0-9]/g,``).slice(0,8)}function k(e){return/^[A-Z0-9]{4,8}$/.test(String(e||``))}function A(){let e=``;for(let t=0;t<6;t++)e+=E[V(32)];return e}function j(e,t){let n=D(e),r=O(t);return!n||!k(r)?``:`game.${n}.${r.toLowerCase()}`}function M({gameId:e,roomCode:t,event:n,payload:r}){let i=D(e);return{kind:w,version:1,gameId:i,roomCode:O(t),event:String(n||``),eventId:B(i||`game`),payload:r||{}}}function N(e,t={}){try{let n=JSON.parse(String(e||``));if(!n||n.kind!==`mostbox.game.event`||n.version!==1||typeof n.event!=`string`||typeof n.eventId!=`string`)return null;let r=D(n.gameId),i=O(n.roomCode);return!r||!k(i)||t.gameId&&r!==D(t.gameId)||t.roomCode&&i!==O(t.roomCode)?null:{...n,gameId:r,roomCode:i,payload:n.payload&&typeof n.payload==`object`?n.payload:{}}}catch{return null}}function P(e=[],t={}){let n=[],r=new Map,i=``;for(let a of z(e)){let e=N(a.content,t);if(e){if(e.event===`room:create`){let t=I(e.payload?.player,a);if(!t)continue;i||=t.address,R(n,r,t);continue}if(e.event===`player:join`){let t=I(e.payload?.player,a);t&&R(n,r,t);continue}if(e.event===`player:leave`){let t=L(e.payload?.player?.address||a.author);if(t){let e=n.findIndex(e=>e.address===t);e!==-1&&(n.splice(e,1),r.delete(t))}}}}return{gameId:D(t.gameId),roomCode:O(t.roomCode),hostAddress:i,players:n}}function F(e=[],t={}){let n=null;for(let r of z(e)){let e=N(r.content,t);if(!e||e.event!==`room:state`)continue;let i=Number(e.payload?.seq||0);(!n||i>=Number(n.payload?.seq||0))&&(n=e)}return n}function I(e,t){if(!e||typeof e!=`object`)return null;let n=t&&typeof t==`object`?t:{author:t},r=n.author,i=L(e.address||r);if(!i||L(r)!==i)return null;let a=String(n.authorName||e.name||``).trim().slice(0,50)||U(i),o=String(n.avatar||e.avatar||``).trim(),s={address:i,name:a,publicKey:String(e.publicKey||``).trim(),joinedAt:Number(e.joinedAt||Date.now())};return o&&(s.avatar=o.slice(0,4096)),s}function L(e){let t=String(e||``).trim();return/^0x[a-fA-F0-9]{40}$/.test(t)?t.toLowerCase():``}function R(e,t,n){let r=t.get(n.address);if(r){Object.assign(r,n);return}e.push(n),t.set(n.address,n)}function z(e){return[...e].sort((e,t)=>Number(e.timestamp||0)-Number(t.timestamp||0))}function B(e){return`${e}_${Date.now()}_${H(4)}`}function V(e){if(globalThis.crypto?.getRandomValues){let t=new Uint32Array(1);return globalThis.crypto.getRandomValues(t),t[0]%e}return Math.floor(Math.random()*e)}function H(e){let t=new Uint8Array(e);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let e=0;e<t.length;e++)t[e]=Math.floor(Math.random()*256);return[...t].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function U(e){return e?`${e.slice(0,6)}...${e.slice(-4)}`:``}function W({gameId:e,onError:t,getPlayerPayload:n}){let{t:r}=o(),i=l(e=>e.hasBackend),s=l(e=>e.checkBackend),c=l(e=>e.openConnectModal),d=a(e=>e.identity),p=a(e=>e.openLoginModal),[m,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(!1),w=i===!0,T=(0,S.useCallback)(async(e,n)=>{let r=await u(e,n);t&&t(r)},[t]),E=(0,S.useCallback)(t=>!!N(t.content,{gameId:e,roomCode:m}),[e,m]),D=(0,S.useCallback)(t=>{let n=N(t.content,{gameId:e,roomCode:m});return n?`${t.author}-${n.eventId}`:`${t.author}-${t.timestamp}-${t.content}`},[e,m]),{clearMessages:k,connected:P,messages:F,sendMessage:I,syncMessages:L}=g({isReady:w,enabled:!!d,channelName:v,limit:500,acceptMessage:E,getMessageKey:D,onSyncError:e=>T(e,r(`game.room.error.readLog`))}),R=(0,S.useMemo)(()=>F.map(t=>({message:t,event:N(t.content,{gameId:e,roomCode:m})})).filter(e=>e.event),[e,F,m]),z=(0,S.useCallback)(()=>d?w?!0:(c(),!1):(p(),!1),[w,c,p,d]);(0,S.useEffect)(()=>{i===null&&s()},[s,i]);let B=(0,S.useCallback)(async(i,a=!1)=>{if(!z()||!d)return!1;let o=a?A():O(i),s=j(e,o);if(!s)return t&&t(r(`game.room.error.invalidCode`)),!1;x(!0);try{let t=await f.createChannel(s,C,h(d)),r=t.channelKey||t.key||s;return await G(r,d,e,o,a?`room:create`:`player:join`,{player:q(d,n?.(d))}),_(o),y(r),k(),!0}catch(e){return await T(e,r(a?`game.room.error.createFailed`:`game.room.error.joinFailed`)),!1}finally{x(!1)}},[z,e,n,t,T,k,r,d]);return{channelName:v,connected:P,createRoom:(0,S.useCallback)(()=>B(``,!0),[B]),ensureReady:z,isBackendReady:w,joinRoom:(0,S.useCallback)(e=>B(e),[B]),joining:b,messages:F,roomCode:m,roomEvents:R,sendRoomEvent:(0,S.useCallback)(async(t,n={})=>{if(!z()||!d||!v||!m)return!1;let i=M({gameId:e,roomCode:m,event:t,payload:n}),a=JSON.stringify(i);try{return await I({channelName:v,content:a,optimisticId:`${d.address}-${i.eventId}`}),!0}catch(e){return await T(e,r(`game.room.error.sendEventFailed`)),!1}},[v,z,e,T,m,I,r,d]),setRoomCode:_,syncMessages:L,userIdentity:d}}async function G(e,t,n,r,i,a){let o=M({gameId:n,roomCode:r,event:i,payload:a});await f.sendChannelMessage({channelName:e,content:JSON.stringify(o),...m(t)})}function K(e){return{address:e.address,name:p(e),avatar:e.avatar||``,publicKey:``,joinedAt:Date.now()}}function q(e,t={}){let n=K(e),r={...n,...t};return Object.prototype.hasOwnProperty.call(t,`avatar`)||(r.avatar=n.avatar),r}export{_ as a,x as i,P as n,F as r,W as t};
1
+ import{n as e,o as t,t as n}from"./jsx-runtime-Bt-cYkS5.js";import{b as r,g as i,t as a}from"./userStore-q0BBZsIV.js";import{F as o,R as s,k as c,m as l,v as u}from"./index--p9MKNEl.js";import{t as d}from"./SidebarAccount-8_hQAYXx.js";import{i as f,n as p,r as m,t as h}from"./userProfile-oeBvU6ch.js";import{t as g}from"./useChannelMessages-D_306Ymv.js";var _=i(`spade`,[[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`M2 14.499a5.5 5.5 0 0 0 9.591 3.675.6.6 0 0 1 .818.001A5.5 5.5 0 0 0 22 14.5c0-2.29-1.5-4-3-5.5l-5.492-5.312a2 2 0 0 0-3-.02L5 8.999c-1.5 1.5-3 3.2-3 5.5`,key:`1aw2pz`}]]),v=i(`swords`,[[`polyline`,{points:`14.5 17.5 3 6 3 3 6 3 17.5 14.5`,key:`1hfsw2`}],[`line`,{x1:`13`,x2:`19`,y1:`19`,y2:`13`,key:`1vrmhu`}],[`line`,{x1:`16`,x2:`20`,y1:`16`,y2:`20`,key:`1bron3`}],[`line`,{x1:`19`,x2:`21`,y1:`21`,y2:`19`,key:`13pww6`}],[`polyline`,{points:`14.5 6.5 18 3 21 3 21 6 17.5 9.5`,key:`hbey2j`}],[`line`,{x1:`5`,x2:`9`,y1:`14`,y2:`18`,key:`1hf58s`}],[`line`,{x1:`7`,x2:`4`,y1:`17`,y2:`20`,key:`pidxm4`}],[`line`,{x1:`3`,x2:`5`,y1:`19`,y2:`21`,key:`1pehsh`}]]),y=n(),b=[{id:`gandengyan`,labelKey:`game.gandengyan.title`,href:`/game/gandengyan/`,icon:(0,y.jsx)(v,{size:16})},{id:`zhajinhua`,labelKey:`game.zhajinhua.title`,href:`/game/zhajinhua/`,icon:(0,y.jsx)(_,{size:16})}];function x({activeGame:e,closeSidebar:t}){let{t:n}=s();return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)(`button`,{type:`button`,className:`sidebar-header sidebar-header-link`,onClick:c(),children:[(0,y.jsx)(o,{size:18}),(0,y.jsx)(`h1`,{children:`MOST PEOPLE`})]}),(0,y.jsx)(`nav`,{className:`sidebar-nav`,children:b.map(i=>(0,y.jsxs)(r,{to:i.href,className:`sidebar-nav-btn ${e===i.id?`active`:``}`,onClick:t,children:[i.icon,(0,y.jsx)(`span`,{children:n(i.labelKey)})]},i.id))}),(0,y.jsx)(d,{})]})}var S=t(e(),1),C=`game`,w=`mostbox.game.event`,T=[`gandengyan`,`zhajinhua`],E=`ABCDEFGHJKLMNPQRSTUVWXYZ23456789`;function D(e){let t=String(e||``).trim().toLowerCase();return T.includes(t)?t:``}function O(e){return String(e||``).trim().toUpperCase().replace(/[^A-Z0-9]/g,``).slice(0,8)}function k(e){return/^[A-Z0-9]{4,8}$/.test(String(e||``))}function A(){let e=``;for(let t=0;t<6;t++)e+=E[V(32)];return e}function j(e,t){let n=D(e),r=O(t);return!n||!k(r)?``:`game.${n}.${r.toLowerCase()}`}function M({gameId:e,roomCode:t,event:n,payload:r}){let i=D(e);return{kind:w,version:1,gameId:i,roomCode:O(t),event:String(n||``),eventId:B(i||`game`),payload:r||{}}}function N(e,t={}){try{let n=JSON.parse(String(e||``));if(!n||n.kind!==`mostbox.game.event`||n.version!==1||typeof n.event!=`string`||typeof n.eventId!=`string`)return null;let r=D(n.gameId),i=O(n.roomCode);return!r||!k(i)||t.gameId&&r!==D(t.gameId)||t.roomCode&&i!==O(t.roomCode)?null:{...n,gameId:r,roomCode:i,payload:n.payload&&typeof n.payload==`object`?n.payload:{}}}catch{return null}}function P(e=[],t={}){let n=[],r=new Map,i=``;for(let a of z(e)){let e=N(a.content,t);if(e){if(e.event===`room:create`){let t=I(e.payload?.player,a);if(!t)continue;i||=t.address,R(n,r,t);continue}if(e.event===`player:join`){let t=I(e.payload?.player,a);t&&R(n,r,t);continue}if(e.event===`player:leave`){let t=L(e.payload?.player?.address||a.author);if(t){let e=n.findIndex(e=>e.address===t);e!==-1&&(n.splice(e,1),r.delete(t))}}}}return{gameId:D(t.gameId),roomCode:O(t.roomCode),hostAddress:i,players:n}}function F(e=[],t={}){let n=null;for(let r of z(e)){let e=N(r.content,t);if(!e||e.event!==`room:state`)continue;let i=Number(e.payload?.seq||0);(!n||i>=Number(n.payload?.seq||0))&&(n=e)}return n}function I(e,t){if(!e||typeof e!=`object`)return null;let n=t&&typeof t==`object`?t:{author:t},r=n.author,i=L(e.address||r);if(!i||L(r)!==i)return null;let a=String(n.authorName||e.name||``).trim().slice(0,50)||U(i),o=String(n.avatar||e.avatar||``).trim(),s={address:i,name:a,publicKey:String(e.publicKey||``).trim(),joinedAt:Number(e.joinedAt||Date.now())};return o&&(s.avatar=o.slice(0,4096)),s}function L(e){let t=String(e||``).trim();return/^0x[a-fA-F0-9]{40}$/.test(t)?t.toLowerCase():``}function R(e,t,n){let r=t.get(n.address);if(r){Object.assign(r,n);return}e.push(n),t.set(n.address,n)}function z(e){return[...e].sort((e,t)=>Number(e.timestamp||0)-Number(t.timestamp||0))}function B(e){return`${e}_${Date.now()}_${H(4)}`}function V(e){if(globalThis.crypto?.getRandomValues){let t=new Uint32Array(1);return globalThis.crypto.getRandomValues(t),t[0]%e}return Math.floor(Math.random()*e)}function H(e){let t=new Uint8Array(e);if(globalThis.crypto?.getRandomValues)globalThis.crypto.getRandomValues(t);else for(let e=0;e<t.length;e++)t[e]=Math.floor(Math.random()*256);return[...t].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function U(e){return e?`${e.slice(0,6)}...${e.slice(-4)}`:``}function W({gameId:e,onError:t,getPlayerPayload:n}){let{t:r}=s(),i=l(e=>e.hasBackend),o=l(e=>e.checkBackend),c=l(e=>e.openConnectModal),d=a(e=>e.identity),p=a(e=>e.openLoginModal),[m,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(``),[b,x]=(0,S.useState)(!1),w=i===!0,T=(0,S.useCallback)(async(e,n)=>{let r=await u(e,n);t&&t(r)},[t]),E=(0,S.useCallback)(t=>!!N(t.content,{gameId:e,roomCode:m}),[e,m]),D=(0,S.useCallback)(t=>{let n=N(t.content,{gameId:e,roomCode:m});return n?`${t.author}-${n.eventId}`:`${t.author}-${t.timestamp}-${t.content}`},[e,m]),{clearMessages:k,connected:P,messages:F,sendMessage:I,syncMessages:L}=g({isReady:w,enabled:!!d,channelName:v,limit:500,acceptMessage:E,getMessageKey:D,onSyncError:e=>T(e,r(`game.room.error.readLog`))}),R=(0,S.useMemo)(()=>F.map(t=>({message:t,event:N(t.content,{gameId:e,roomCode:m})})).filter(e=>e.event),[e,F,m]),z=(0,S.useCallback)(()=>d?w?!0:(c(),!1):(p(),!1),[w,c,p,d]);(0,S.useEffect)(()=>{i===null&&o()},[o,i]);let B=(0,S.useCallback)(async(i,a=!1)=>{if(!z()||!d)return!1;let o=a?A():O(i),s=j(e,o);if(!s)return t&&t(r(`game.room.error.invalidCode`)),!1;x(!0);try{let t=await f.createChannel(s,C,h(d)),r=t.channelKey||t.key||s;return await G(r,d,e,o,a?`room:create`:`player:join`,{player:q(d,n?.(d))}),_(o),y(r),k(),!0}catch(e){return await T(e,r(a?`game.room.error.createFailed`:`game.room.error.joinFailed`)),!1}finally{x(!1)}},[z,e,n,t,T,k,r,d]);return{channelName:v,connected:P,createRoom:(0,S.useCallback)(()=>B(``,!0),[B]),ensureReady:z,isBackendReady:w,joinRoom:(0,S.useCallback)(e=>B(e),[B]),joining:b,messages:F,roomCode:m,roomEvents:R,sendRoomEvent:(0,S.useCallback)(async(t,n={})=>{if(!z()||!d||!v||!m)return!1;let i=M({gameId:e,roomCode:m,event:t,payload:n}),a=JSON.stringify(i);try{return await I({channelName:v,content:a,optimisticId:`${d.address}-${i.eventId}`}),!0}catch(e){return await T(e,r(`game.room.error.sendEventFailed`)),!1}},[v,z,e,T,m,I,r,d]),setRoomCode:_,syncMessages:L,userIdentity:d}}async function G(e,t,n,r,i,a){let o=M({gameId:n,roomCode:r,event:i,payload:a});await f.sendChannelMessage({channelName:e,content:JSON.stringify(o),...m(t)})}function K(e){return{address:e.address,name:p(e),avatar:e.avatar||``,publicKey:``,joinedAt:Date.now()}}function q(e,t={}){let n=K(e),r={...n,...t};return Object.prototype.hasOwnProperty.call(t,`avatar`)||(r.avatar=n.avatar),r}export{_ as a,x as i,P as n,F as r,W as t};
@@ -1 +1 @@
1
- import{h as e,x as t}from"./index-DN0kD5zr.js";var n={getChannels(t={}){let n=new URLSearchParams;t.type&&n.set(`type`,t.type);let r=n.toString();return e.get(r?`/api/channels?${r}`:`/api/channels`).json()},createChannel(t,n=`personal`,r={}){return e.post(`/api/channels`,{json:{name:t,type:n,...r}}).json()},leaveChannel(t){return e.delete(`/api/channels`,{json:{channelKey:t}}).json()},getChannelMessages(t,n=100,r=0){return e.get(`/api/channels/${encodeURIComponent(t)}/messages?limit=${n}&offset=${r}`).json()},sendChannelMessage({channelName:t,content:n,author:r,authorName:i,avatar:a,attachment:o}){return e.post(`/api/channels/${encodeURIComponent(t)}/messages`,{json:o?{content:n,author:r,authorName:i,avatar:a,attachment:o}:{content:n,author:r,authorName:i,avatar:a}}).json()},getChannelMembers(t){return e.get(`/api/channels/${encodeURIComponent(t)}/members`).json()},getChannelPeers(t){return e.get(`/api/channels/${encodeURIComponent(t)}/peers`).json()},setChannelRemark(t,n){return e.put(`/api/channels/${encodeURIComponent(t)}/remark`,{json:{remark:n}}).json()},setChannelPinned(t,n){return e.put(`/api/channels/${encodeURIComponent(t)}/pin`,{json:{pinned:n}}).json()},getFileDownloadUrl(e){return t(`/api/files/${e}/download`)}};function r(e){return e.displayName||e.username}function i(e){return{displayName:r(e),avatar:e.avatar||``}}function a(e){return{author:e.address,authorName:r(e),avatar:e.avatar||``}}export{n as i,r as n,a as r,i as t};
1
+ import{h as e,x as t}from"./index--p9MKNEl.js";var n={getChannels(t={}){let n=new URLSearchParams;t.type&&n.set(`type`,t.type);let r=n.toString();return e.get(r?`/api/channels?${r}`:`/api/channels`).json()},createChannel(t,n=`personal`,r={}){return e.post(`/api/channels`,{json:{name:t,type:n,...r}}).json()},leaveChannel(t){return e.delete(`/api/channels`,{json:{channelKey:t}}).json()},getChannelMessages(t,n=100,r=0){return e.get(`/api/channels/${encodeURIComponent(t)}/messages?limit=${n}&offset=${r}`).json()},sendChannelMessage({channelName:t,content:n,author:r,authorName:i,avatar:a,attachment:o}){return e.post(`/api/channels/${encodeURIComponent(t)}/messages`,{json:o?{content:n,author:r,authorName:i,avatar:a,attachment:o}:{content:n,author:r,authorName:i,avatar:a}}).json()},getChannelMembers(t){return e.get(`/api/channels/${encodeURIComponent(t)}/members`).json()},getChannelPeers(t){return e.get(`/api/channels/${encodeURIComponent(t)}/peers`).json()},setChannelRemark(t,n){return e.put(`/api/channels/${encodeURIComponent(t)}/remark`,{json:{remark:n}}).json()},setChannelPinned(t,n){return e.put(`/api/channels/${encodeURIComponent(t)}/pin`,{json:{pinned:n}}).json()},getFileDownloadUrl(e){return t(`/api/files/${e}/download`)}};function r(e){return e.displayName||e.username}function i(e){return{displayName:r(e),avatar:e.avatar||``}}function a(e){return{author:e.address,authorName:r(e),avatar:e.avatar||``}}export{n as i,r as n,a as r,i as t};
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-CgErXULe.css" data-precedence="default"/><title>下载 MostBox 桌面客户端</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="下载 MostBox 桌面客户端,获得完整的 P2P 文件分享、下载校验和持续做种能力"/><link rel="modulepreload" href="/assets/index-DN0kD5zr.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="modulepreload" href="/assets/userStore-q0BBZsIV.js"/><link rel="modulepreload" href="/assets/useNavigate-DWlBD_-b.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
1
+ <!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-DEu4udaa.css" data-precedence="default"/><title>下载 MostBox 桌面客户端</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="下载 MostBox 桌面客户端,获得完整的 P2P 文件分享、下载校验和持续做种能力"/><link rel="modulepreload" href="/assets/index--p9MKNEl.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="modulepreload" href="/assets/userStore-q0BBZsIV.js"/><link rel="modulepreload" href="/assets/useNavigate-DWlBD_-b.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
2
2
  (function() {
3
3
  var theme = localStorage.getItem('theme');
4
4
  if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
@@ -17,4 +17,4 @@
17
17
  window.onunhandledrejection = function(event) {
18
18
  console.error('[Unhandled Promise Rejection]', event.reason);
19
19
  };
20
- </script><!--$--><div class="download-page"><nav class="mkt-nav"><div class="mkt-nav-inner"><button type="button" class="mkt-nav-logo"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left" aria-hidden="true"><path d="m12 19-7-7 7-7"></path><path d="M19 12H5"></path></svg><span>MOST PEOPLE</span></button><div class="mkt-nav-cta"><button type="button" class="mkt-theme-toggle" aria-label="切换主题" title="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"></path></svg></button><span class="ui-action-menu-anchor"><button type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="_R_a5r6_" class="language-toggle mkt-theme-toggle" aria-label="选择语言" title="选择语言 (当前语言: 简体中文)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></span></div></div></nav><section class="download-hero"><div class="mkt-container"><div class="download-hero-icon"><svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg></div><h1 class="download-hero-title">下载客户端</h1><p class="download-hero-desc">桌面客户端是当前 MVP 的首选入口,内置本地 P2P 节点,提供发布、下载校验和持续做种的完整能力。Web 端只连接已有 MostBox 节点。</p></div></section><section class="download-platforms"><div class="mkt-container"><h2 class="download-section-title">选择你的平台</h2><div class="download-options"><div class="ui-segmented-control download-source-tabs" role="tablist" aria-label="下载来源"><button type="button" role="tab" aria-selected="false" disabled="" class="ui-segmented-option download-source-tab"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud" aria-hidden="true"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"></path></svg>Cloudflare R2</button><button type="button" role="tab" aria-selected="true" class="ui-segmented-option download-source-tab is-active"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code" aria-hidden="true"><path d="m16 18 6-6-6-6"></path><path d="m8 6-6 6 6 6"></path></svg>GitHub Releases</button></div><p class="download-source-note">正在获取 Cloudflare R2 高速镜像。</p><div class="download-platform-grid"><article class="download-platform-card is-recommended"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>x64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a></div></div><span class="download-recommended-badge">当前</span></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>arm64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>x64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>arm64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>x64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>arm64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article></div></div></div></section><section class="download-comparison"><div class="mkt-container"><h2 class="download-section-title">Web 端 vs 桌面端</h2><div class="download-table-wrap"><table class="download-table"><thead><tr><th>功能</th><th>Web 端</th><th>桌面端</th></tr></thead><tbody><tr><td>节点能力</td><td class="col-web">连接已有节点</td><td class="col-desktop">内置本地节点</td></tr><tr><td>P2P 文件分享</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>下载校验</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>持续做种</td><td class="col-web">依赖所连节点</td><td class="col-desktop">默认开启</td></tr><tr><td>大文件传输</td><td class="col-web">依赖所连节点</td><td class="col-desktop">10GB 上限内</td></tr></tbody></table></div></div></section><section class="download-cta"><div class="mkt-container"><p class="download-hero-desc">使用 npm 入口请先安装 Node.js &gt;= 22.12,然后运行 npx most-box@latest 启动本机完整节点。</p></div></section><section class="download-cta"><div class="mkt-container"><a href="/" class="btn btn-primary">回首页</a></div></section><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><p class="mkt-footer-copy">MostBox</p></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-DN0kD5zr.js","/assets/jsx-runtime-Bt-cYkS5.js","/assets/userStore-q0BBZsIV.js","/assets/useNavigate-DWlBD_-b.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-DN0kD5zr.js"}}],css:$R[8]=["/assets/index-CgErXULe.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1781685605247,s:"success",ssr:!0},$R[11]={i:"downloaddownload",u:1781685605250,s:"success",ssr:!0}],lastMatchId:"downloaddownload"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-DN0kD5zr.js"></script></body></html>
20
+ </script><!--$--><div class="download-page"><nav class="mkt-nav"><div class="mkt-nav-inner"><button type="button" class="mkt-nav-logo"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-left" aria-hidden="true"><path d="m12 19-7-7 7-7"></path><path d="M19 12H5"></path></svg><span>MOST PEOPLE</span></button><div class="mkt-nav-cta"><button type="button" class="mkt-theme-toggle" aria-label="切换主题" title="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"></path></svg></button><span class="ui-action-menu-anchor"><button type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="_R_a5r6_" class="language-toggle mkt-theme-toggle" aria-label="选择语言" title="选择语言 (当前语言: 简体中文)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></span></div></div></nav><section class="download-hero"><div class="mkt-container"><div class="download-hero-icon"><svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg></div><h1 class="download-hero-title">下载客户端</h1><p class="download-hero-desc">桌面客户端是当前 MVP 的首选入口,内置本地 P2P 节点,提供发布、下载校验和持续做种的完整能力。Web 端只连接已有 MostBox 节点。</p></div></section><section class="download-platforms"><div class="mkt-container"><h2 class="download-section-title">选择你的平台</h2><div class="download-options"><div class="ui-segmented-control download-source-tabs" role="tablist" aria-label="下载来源"><button type="button" role="tab" aria-selected="false" disabled="" class="ui-segmented-option download-source-tab"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-cloud" aria-hidden="true"><path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z"></path></svg>Cloudflare R2</button><button type="button" role="tab" aria-selected="true" class="ui-segmented-option download-source-tab is-active"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-code" aria-hidden="true"><path d="m16 18 6-6-6-6"></path><path d="m8 6-6 6 6 6"></path></svg>GitHub Releases</button></div><p class="download-source-note">正在获取 Cloudflare R2 高速镜像。</p><div class="download-platform-grid"><article class="download-platform-card is-recommended"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>x64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a></div></div><span class="download-recommended-badge">当前</span></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-monitor" aria-hidden="true"><rect width="20" height="14" x="2" y="3" rx="2"></rect><line x1="8" x2="16" y1="21" y2="21"></line><line x1="12" x2="12" y1="17" y2="21"></line></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Windows</h3><span>arm64</span></div><p>Windows 10 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .exe</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>x64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-apple" aria-hidden="true"><path d="M12 6.528V3a1 1 0 0 1 1-1h0"></path><path d="M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>macOS</h3><span>arm64</span></div><p>macOS 12 Monterey 或更高版本</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .dmg</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>x64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article><article class="download-platform-card"><div class="download-platform-icon"><svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-laptop" aria-hidden="true"><path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z"></path><path d="M20.054 15.987H3.946"></path></svg></div><div class="download-platform-content"><div class="download-platform-heading"><h3>Linux</h3><span>arm64</span></div><p>Ubuntu 20.04+ / Debian 11+ / 其他主流发行版</p><dl class="download-platform-meta"><div><dt>来源</dt><dd>GitHub Releases</dd></div></dl><div class="download-platform-actions"><a href="https://github.com/most-people/most/releases/latest" class="btn btn-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载 .AppImage</a></div></div></article></div></div></div></section><section class="download-comparison"><div class="mkt-container"><h2 class="download-section-title">Web 端 vs 桌面端</h2><div class="download-table-wrap"><table class="download-table"><thead><tr><th>功能</th><th>Web 端</th><th>桌面端</th></tr></thead><tbody><tr><td>节点能力</td><td class="col-web">连接已有节点</td><td class="col-desktop">内置本地节点</td></tr><tr><td>P2P 文件分享</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>下载校验</td><td class="col-web">依赖所连节点</td><td class="col-desktop">完整支持</td></tr><tr><td>持续做种</td><td class="col-web">依赖所连节点</td><td class="col-desktop">默认开启</td></tr><tr><td>大文件传输</td><td class="col-web">依赖所连节点</td><td class="col-desktop">10GB 上限内</td></tr></tbody></table></div></div></section><section class="download-cta"><div class="mkt-container"><p class="download-hero-desc">使用 npm 入口请先安装 Node.js &gt;= 22.12,然后运行 npx most-box@latest 启动本机完整节点。</p></div></section><section class="download-cta"><div class="mkt-container"><a href="/" class="btn btn-primary">回首页</a></div></section><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><p class="mkt-footer-copy">MostBox</p></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index--p9MKNEl.js","/assets/jsx-runtime-Bt-cYkS5.js","/assets/userStore-q0BBZsIV.js","/assets/useNavigate-DWlBD_-b.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index--p9MKNEl.js"}}],css:$R[8]=["/assets/index-DEu4udaa.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1781690061745,s:"success",ssr:!0},$R[11]={i:"downloaddownload",u:1781690061748,s:"success",ssr:!0}],lastMatchId:"downloaddownload"})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index--p9MKNEl.js"></script></body></html>
Binary file
Binary file
Binary file
package/out/index.html CHANGED
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-CgErXULe.css" data-precedence="default"/><title>MostBox</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="P2P 文件分享,无需注册"/><link rel="modulepreload" href="/assets/index-DN0kD5zr.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="modulepreload" href="/assets/userStore-q0BBZsIV.js"/><link rel="modulepreload" href="/assets/useNavigate-DWlBD_-b.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
1
+ <!DOCTYPE html><html lang="zh-CN" data-scroll-behavior="smooth"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><link rel="stylesheet" href="/assets/index-DEu4udaa.css" data-precedence="default"/><title>MostBox</title><meta name="theme-color" content="#5e6ad2"/><meta name="description" content="P2P 文件分享,无需注册"/><link rel="modulepreload" href="/assets/index--p9MKNEl.js"/><link rel="modulepreload" href="/assets/jsx-runtime-Bt-cYkS5.js"/><link rel="modulepreload" href="/assets/userStore-q0BBZsIV.js"/><link rel="modulepreload" href="/assets/useNavigate-DWlBD_-b.js"/><link rel="icon" href="/logo.svg" type="image/svg+xml"/><script>
2
2
  (function() {
3
3
  var theme = localStorage.getItem('theme');
4
4
  if (theme === 'dark' || (!theme && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
@@ -17,4 +17,4 @@
17
17
  window.onunhandledrejection = function(event) {
18
18
  console.error('[Unhandled Promise Rejection]', event.reason);
19
19
  };
20
- </script><!--$--><div class="mkt-layout"><nav class="mkt-nav"><div class="mkt-nav-inner"><a class="mkt-nav-logo active" href="/" data-status="active" aria-current="page"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.4"></rect><rect x="14" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="2" y="14" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="14" y="14" width="8" height="8" rx="2" fill="var(--accent)"></rect></svg>MOST PEOPLE</a><div class="mkt-nav-cta"><button type="button" class="mkt-theme-toggle" aria-label="切换主题" title="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"></path></svg></button><span class="ui-action-menu-anchor"><button type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="_R_55r6_" class="language-toggle mkt-theme-toggle" aria-label="选择语言" title="选择语言 (当前语言: 简体中文)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></span><a href="/download/" class="btn btn-primary mkt-nav-preview"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载客户端</a><button type="button" class="btn btn-secondary">开始使用</button></div></div></nav><main class="mkt-layout-main"><div class="portal-page"><section class="portal-hero"><div class="mkt-container"><h1 class="portal-hero-title">MOST PEOPLE</h1><p class="portal-hero-subtitle">去中心化 P2P 工具箱</p></div></section><section class="portal-cards-section"><div class="mkt-container"><div class="portal-cards"><button class="portal-card active"><a title="打开MostBox" href="/app/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></div><div class="portal-card-title">MostBox</div><div class="portal-card-subtitle">P2P 文件分享</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开P2P 聊天" href="/chat/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square" aria-hidden="true"><path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"></path></svg></div><div class="portal-card-title">P2P 聊天</div><div class="portal-card-subtitle">频道加密通讯</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开笔记" href="/note/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-notebook-pen" aria-hidden="true"><path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"></path><path d="M2 6h4"></path><path d="M2 10h4"></path><path d="M2 14h4"></path><path d="M2 18h4"></path><path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"></path></svg></div><div class="portal-card-title">笔记</div><div class="portal-card-subtitle">加密云备份</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button><button class="portal-card "><a title="打开游戏" href="/game/gandengyan/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gamepad2 lucide-gamepad-2" aria-hidden="true"><line x1="6" x2="10" y1="11" y2="11"></line><line x1="8" x2="8" y1="9" y2="13"></line><line x1="15" x2="15.01" y1="12" y2="12"></line><line x1="18" x2="18.01" y1="10" y2="10"></line><path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"></path></svg></div><div class="portal-card-title">游戏</div><div class="portal-card-subtitle">P2P 牌桌</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开Web3" href="/web3/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wallet" aria-hidden="true"><path d="M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"></path><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"></path></svg></div><div class="portal-card-title">Web3</div><div class="portal-card-subtitle">账户工具箱</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button></div><div class="portal-node-actions" aria-label="节点入口"><button class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg>Web 连接节点</button><a href="/admin/" class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hard-drive" aria-hidden="true"><path d="M10 16h.01"></path><path d="M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><path d="M21.946 12.013H2.054"></path><path d="M6 16h.01"></path></svg>节点管理</a></div></div></section><section class="portal-marketing"><div class="mkt-container"><div class="portal-marketing-inner"><div class="portal-marketing-header"><h2>P2P 文件分享,无需注册</h2><p>基于 Hyperswarm 的去中心化文件传输,让文件分享回归点对点。MostBox 不是云盘;链接来自 CID,可用性来自当前在线种子。当前 MVP 优先使用桌面客户端。</p></div><div class="portal-marketing-features"><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>无需云端账号,使用本地身份隔离数据</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Hyperswarm P2P 直连传输</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>GB 级大文件流式处理</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相同文件 = 相同 CID,链接可反复校验</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>下载完成后默认继续做种</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相比微信、QQ 或网盘,不依赖中心化账号和云端托管</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Web 端只连接已有节点,桌面端提供完整 P2P 能力</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>MIT 开源,自托管,数据完全自主掌控</span></div></div><div class="portal-marketing-steps"><div class="portal-step"><span class="portal-step-num">1</span><div class="portal-step-content"><strong>下载客户端</strong><p>支持 Windows、macOS 和 Linux,桌面端提供完整的 P2P 能力。</p><p class="portal-step-link"><a href="/download/">前往下载页<!-- --> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></p></div></div><div class="portal-step"><span class="portal-step-num">2</span><div class="portal-step-content"><strong>安装并运行</strong><p>安装后打开应用,无需单独安装 Node.js。</p></div></div><div class="portal-step"><span class="portal-step-num">3</span><div class="portal-step-content"><strong>开始分享</strong><p>发布文件生成 most:// 链接,朋友下载校验通过后也会成为新的种子。</p></div></div></div><div class="portal-actions"><a href="/app/" class="btn btn-primary">进入 MostBox<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right" aria-hidden="true"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg></a></div></div></div></section></div></main><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><div class="mkt-footer-links"><a class="active" href="/" data-status="active" aria-current="page">关于</a><a href="/ping/">网络</a><a href="https://github.com/most-people/most" target="_blank" rel="noopener noreferrer">GitHub</a></div><span class="mkt-footer-copy">© <!-- -->2026<!-- --> MOST PEOPLE · MIT License</span><span class="mkt-footer-build" translate="no">v<!-- -->0.2.4</span></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index-DN0kD5zr.js","/assets/jsx-runtime-Bt-cYkS5.js","/assets/userStore-q0BBZsIV.js","/assets/useNavigate-DWlBD_-b.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index-DN0kD5zr.js"}}],css:$R[8]=["/assets/index-CgErXULe.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1781685604980,s:"success",ssr:!0},$R[11]={i:"",u:1781685605179,s:"success",ssr:!0}],lastMatchId:""})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index-DN0kD5zr.js"></script></body></html>
20
+ </script><!--$--><div class="mkt-layout"><nav class="mkt-nav"><div class="mkt-nav-inner"><a class="mkt-nav-logo active" href="/" data-status="active" aria-current="page"><svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.4"></rect><rect x="14" y="2" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="2" y="14" width="8" height="8" rx="2" fill="var(--accent)" opacity="0.7"></rect><rect x="14" y="14" width="8" height="8" rx="2" fill="var(--accent)"></rect></svg>MOST PEOPLE</a><div class="mkt-nav-cta"><button type="button" class="mkt-theme-toggle" aria-label="切换主题" title="切换主题"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-moon" aria-hidden="true"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"></path></svg></button><span class="ui-action-menu-anchor"><button type="button" aria-haspopup="menu" aria-expanded="false" aria-controls="_R_55r6_" class="language-toggle mkt-theme-toggle" aria-label="选择语言" title="选择语言 (当前语言: 简体中文)"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-languages" aria-hidden="true"><path d="m5 8 6 6"></path><path d="m4 14 6-6 2-3"></path><path d="M2 5h12"></path><path d="M7 2h1"></path><path d="m22 22-5-10-5 10"></path><path d="M14 18h6"></path></svg></button></span><a href="/download/" class="btn btn-primary mkt-nav-preview"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-download" aria-hidden="true"><path d="M12 15V3"></path><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><path d="m7 10 5 5 5-5"></path></svg>下载客户端</a><button type="button" class="btn btn-secondary">开始使用</button></div></div></nav><main class="mkt-layout-main"><div class="portal-page"><section class="portal-hero"><div class="mkt-container"><h1 class="portal-hero-title">MOST PEOPLE</h1><p class="portal-hero-subtitle">去中心化 P2P 工具箱</p></div></section><section class="portal-cards-section"><div class="mkt-container"><div class="portal-cards"><button class="portal-card active"><a title="打开MostBox" href="/app/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-folder-open" aria-hidden="true"><path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"></path></svg></div><div class="portal-card-title">MostBox</div><div class="portal-card-subtitle">P2P 文件分享</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开P2P 聊天" href="/chat/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-square" aria-hidden="true"><path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"></path></svg></div><div class="portal-card-title">P2P 聊天</div><div class="portal-card-subtitle">频道加密通讯</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开笔记" href="/note/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-notebook-pen" aria-hidden="true"><path d="M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4"></path><path d="M2 6h4"></path><path d="M2 10h4"></path><path d="M2 14h4"></path><path d="M2 18h4"></path><path d="M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"></path></svg></div><div class="portal-card-title">笔记</div><div class="portal-card-subtitle">加密云备份</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button><button class="portal-card "><a title="打开游戏" href="/game/gandengyan/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-gamepad2 lucide-gamepad-2" aria-hidden="true"><line x1="6" x2="10" y1="11" y2="11"></line><line x1="8" x2="8" y1="9" y2="13"></line><line x1="15" x2="15.01" y1="12" y2="12"></line><line x1="18" x2="18.01" y1="10" y2="10"></line><path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"></path></svg></div><div class="portal-card-title">游戏</div><div class="portal-card-subtitle">P2P 牌桌</div><div class="ui-badge portal-card-status checking"><span class="status-dot checking"></span>检测中</div></button><button class="portal-card "><a title="打开Web3" href="/web3/" class="btn btn-icon portal-card-open-btn"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-right" aria-hidden="true"><path d="M7 7h10v10"></path><path d="M7 17 17 7"></path></svg></a><div class="portal-card-icon"><svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-wallet" aria-hidden="true"><path d="M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1"></path><path d="M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4"></path></svg></div><div class="portal-card-title">Web3</div><div class="portal-card-subtitle">账户工具箱</div><div class="ui-badge portal-card-status ready"><span class="status-dot ready"></span>已就绪</div></button></div><div class="portal-node-actions" aria-label="节点入口"><button class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-server" aria-hidden="true"><rect width="20" height="8" x="2" y="2" rx="2" ry="2"></rect><rect width="20" height="8" x="2" y="14" rx="2" ry="2"></rect><line x1="6" x2="6.01" y1="6" y2="6"></line><line x1="6" x2="6.01" y1="18" y2="18"></line></svg>Web 连接节点</button><a href="/admin/" class="btn btn-secondary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hard-drive" aria-hidden="true"><path d="M10 16h.01"></path><path d="M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path><path d="M21.946 12.013H2.054"></path><path d="M6 16h.01"></path></svg>节点管理</a></div></div></section><section class="portal-marketing"><div class="mkt-container"><div class="portal-marketing-inner"><div class="portal-marketing-header"><h2>P2P 文件分享,无需注册</h2><p>基于 Hyperswarm 的去中心化文件传输,让文件分享回归点对点。MostBox 不是云盘;链接来自 CID,可用性来自当前在线种子。当前 MVP 优先使用桌面客户端。</p></div><div class="portal-marketing-features"><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>无需云端账号,使用本地身份隔离数据</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Hyperswarm P2P 直连传输</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>GB 级大文件流式处理</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相同文件 = 相同 CID,链接可反复校验</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>下载完成后默认继续做种</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>相比微信、QQ 或网盘,不依赖中心化账号和云端托管</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>Web 端只连接已有节点,桌面端提供完整 P2P 能力</span></div><div class="portal-feature-item"><span class="portal-feature-icon"><svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check" aria-hidden="true"><path d="M20 6 9 17l-5-5"></path></svg></span><span>MIT 开源,自托管,数据完全自主掌控</span></div></div><div class="portal-marketing-steps"><div class="portal-step"><span class="portal-step-num">1</span><div class="portal-step-content"><strong>下载客户端</strong><p>支持 Windows、macOS 和 Linux,桌面端提供完整的 P2P 能力。</p><p class="portal-step-link"><a href="/download/">前往下载页<!-- --> <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-external-link" aria-hidden="true"><path d="M15 3h6v6"></path><path d="M10 14 21 3"></path><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path></svg></a></p></div></div><div class="portal-step"><span class="portal-step-num">2</span><div class="portal-step-content"><strong>安装并运行</strong><p>安装后打开应用,无需单独安装 Node.js。</p></div></div><div class="portal-step"><span class="portal-step-num">3</span><div class="portal-step-content"><strong>开始分享</strong><p>发布文件生成 most:// 链接,朋友下载校验通过后也会成为新的种子。</p></div></div></div><div class="portal-actions"><a href="/app/" class="btn btn-primary">进入 MostBox<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-right" aria-hidden="true"><path d="M5 12h14"></path><path d="m12 5 7 7-7 7"></path></svg></a></div></div></div></section></div></main><footer class="mkt-footer"><div class="mkt-container"><div class="mkt-footer-inner"><div class="mkt-footer-links"><a class="active" href="/" data-status="active" aria-current="page">关于</a><a href="/ping/">网络</a><a href="https://github.com/most-people/most" target="_blank" rel="noopener noreferrer">GitHub</a></div><span class="mkt-footer-copy">© <!-- -->2026<!-- --> MOST PEOPLE · MIT License</span><span class="mkt-footer-build" translate="no">v<!-- -->0.2.5</span></div></div></footer></div><script>(function(a,f){let l;try{l=JSON.parse(sessionStorage.getItem(a)||"{}")}catch{return}const n=l?.[f||history.state?.__TSR_key];let c=!1;for(const t in n){const e=n[t],o=e?.scrollX,s=e?.scrollY;if(Number.isFinite(o)&&Number.isFinite(s)){if(t==="window")scrollTo(o,s),c=!0;else if(t)try{const r=document.querySelector(t);r&&(r.scrollLeft=o,r.scrollTop=s)}catch{}}}if(c)return;const i=location.hash.slice(1);if(i){const t=history.state?.__hashScrollIntoViewOptions??!0;if(t){const e=document.getElementById(i);e&&e.scrollIntoView(t)}return}scrollTo(0,0)})("tsr-scroll-restoration-v1_3");document.currentScript.remove()</script><!--/$--><script class="$tsr" id="$tsr-stream-barrier">(self.$R=self.$R||{})["tsr"]=[];self.$_TSR={h(){this.hydrated=!0,this.c()},e(){this.streamEnded=!0,this.c()},c(){this.hydrated&&this.streamEnded&&(delete self.$_TSR,delete self.$R.tsr)},p(e){this.initialized?e():this.buffer.push(e)},buffer:[]};$_TSR.router=($R=>$R[0]={manifest:$R[1]={routes:$R[2]={__root__:$R[3]={preloads:$R[4]=["/assets/index--p9MKNEl.js","/assets/jsx-runtime-Bt-cYkS5.js","/assets/userStore-q0BBZsIV.js","/assets/useNavigate-DWlBD_-b.js"],scripts:$R[5]=[$R[6]={attrs:$R[7]={type:"module",async:!0,src:"/assets/index--p9MKNEl.js"}}],css:$R[8]=["/assets/index-DEu4udaa.css"]}}},matches:$R[9]=[$R[10]={i:"__root__",u:1781690061490,s:"success",ssr:!0},$R[11]={i:"",u:1781690061675,s:"success",ssr:!0}],lastMatchId:""})($R["tsr"]);$_TSR.e();document.currentScript.remove()</script><script type="module" async="" src="/assets/index--p9MKNEl.js"></script></body></html>
Binary file