@saluzi/saluzi-edu 0.2.60 → 0.2.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +273 -49
- package/dist/parade/web/cube.js +33 -2
- package/dist/parade/web/menu.html +243 -0
- package/dist/rcs-web/assets/{AdminPanel-BMgxq2d0.js → AdminPanel-Xlza8Stt.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/Claim-DRJ_CmK0.js → dist/rcs-web/assets/Claim-BMWwu213.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/Dashboard-CablTsf3.js → dist/rcs-web/assets/Dashboard-D5awDzM3.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/Join-a80j0Uiw.js → dist/rcs-web/assets/Join-ok37ggfZ.js} +1 -1
- package/dist/rcs-web/assets/{Login-DclVxA4Q.js → Login-5qo97rq-.js} +1 -1
- package/dist/rcs-web/assets/{Register-DizfWHKb.js → Register-D_UOG8ar.js} +1 -1
- package/dist/rcs-web/assets/SessionDetail-BbHrR4Qu.js +65 -0
- package/dist/rcs-web/assets/{SessionVisibilityBadge-Bp4kZdZ4.js → SessionVisibilityBadge-Dy4FwTzo.js} +1 -1
- package/dist/rcs-web/assets/{Setup-DIw3Qc5x.js → Setup-GnPeNyH9.js} +1 -1
- package/dist/rcs-web/assets/{ShareLanding-CmyujISc.js → ShareLanding-CUjQydLL.js} +1 -1
- package/dist/rcs-web/assets/{TeamCreate-fq5PdqO_.js → TeamCreate-Ck2fEoUW.js} +1 -1
- package/dist/rcs-web/assets/{TeamDetail-haFVDL0P.js → TeamDetail-De6EPND0.js} +1 -1
- package/dist/rcs-web/assets/{TeamList-CR63fSv_.js → TeamList-C-0LJRxd.js} +1 -1
- package/dist/rcs-web/assets/{TeamSettings-BlXY05zK.js → TeamSettings-BszOrXVW.js} +1 -1
- package/dist/rcs-web/assets/{UserSearchInput-Cpg_A_Py.js → UserSearchInput-CyQWtLL-.js} +1 -1
- package/dist/rcs-web/assets/{UserSettings-BzHH2wQ6.js → UserSettings-DgyYp-1y.js} +1 -1
- package/dist/rcs-web/assets/{arc-cULKnhNn.js → arc-BaOPt7k-.js} +1 -1
- package/dist/rcs-web/assets/{architectureDiagram-3BPJPVTR-CXLnNGBR.js → architectureDiagram-3BPJPVTR-SvIakXbT.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-BPQU9CvK.js → dist/rcs-web/assets/blockDiagram-GPEHLZMM-CiDp9J7i.js} +1 -1
- package/dist/rcs-web/assets/{c4Diagram-AAUBKEIU-x76XWolr.js → c4Diagram-AAUBKEIU-D9wzA9ur.js} +1 -1
- package/dist/rcs-web/assets/channel-CirgRB_G.js +1 -0
- package/dist/rcs-web/assets/{chunk-2J33WTMH-C2xuSz2p.js → chunk-2J33WTMH-qfYueRAP.js} +1 -1
- package/dist/rcs-web/assets/{chunk-4BX2VUAB-BPsGJ9Ky.js → chunk-4BX2VUAB-D1V_UCiK.js} +1 -1
- package/dist/rcs-web/assets/{chunk-55IACEB6-DV5Xxy86.js → chunk-55IACEB6-C67QiGmo.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/chunk-727SXJPM-dwWMJ2pm.js → dist/rcs-web/assets/chunk-727SXJPM-D2Wln4TT.js} +1 -1
- package/dist/rcs-web/assets/{chunk-AQP2D5EJ-CkxHIiMh.js → chunk-AQP2D5EJ-03h8hZhw.js} +1 -1
- package/dist/rcs-web/assets/{chunk-FMBD7UC4-CyuNPJ-2.js → chunk-FMBD7UC4-7zas8pDp.js} +1 -1
- package/dist/rcs-web/assets/{chunk-ND2GUHAM-L7in2-8e.js → chunk-ND2GUHAM-PUXucyY6.js} +1 -1
- package/dist/rcs-web/assets/{chunk-QZHKN3VN-xFEPbqY9.js → chunk-QZHKN3VN-M3U5l4yW.js} +1 -1
- package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-Cq12UEz9.js +1 -0
- package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-Cq12UEz9.js +1 -0
- package/dist/rcs-web/assets/{code-block-IT6T5CEO-hkRn_BN_.js → code-block-IT6T5CEO-BgUazuuS.js} +1 -1
- package/dist/rcs-web/assets/{copy-B8rXAtFb.js → copy-DjaSB1Rw.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/cose-bilkent-S5V4N54A-DSZFWhhn.js → dist/rcs-web/assets/cose-bilkent-S5V4N54A-zPupX74N.js} +1 -1
- package/dist/rcs-web/assets/{dagre-BM42HDAG-B5wjmFJL.js → dagre-BM42HDAG-B_EJ050J.js} +1 -1
- package/dist/rcs-web/assets/{diagram-2AECGRRQ-CGeTqGVq.js → diagram-2AECGRRQ-dnnxPH7w.js} +1 -1
- package/dist/rcs-web/assets/{diagram-5GNKFQAL-B9-2D-Y8.js → diagram-5GNKFQAL-CLEOqCLZ.js} +1 -1
- package/dist/rcs-web/assets/{diagram-KO2AKTUF-BVCQ5UyX.js → diagram-KO2AKTUF-DKBGpiRW.js} +1 -1
- package/dist/rcs-web/assets/{diagram-LMA3HP47-Cj4gFMtD.js → diagram-LMA3HP47-BAilhXiA.js} +1 -1
- package/dist/rcs-web/assets/{diagram-OG6HWLK6-BBpaH0il.js → diagram-OG6HWLK6-C3CdmOxC.js} +1 -1
- package/dist/rcs-web/assets/{erDiagram-TEJ5UH35-DS19qy_q.js → erDiagram-TEJ5UH35-D1yv-3Jv.js} +1 -1
- package/dist/rcs-web/assets/{flowDiagram-I6XJVG4X-D9WY3n6O.js → flowDiagram-I6XJVG4X-DpW11XWj.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-BNOSopT7.js → dist/rcs-web/assets/ganttDiagram-6RSMTGT7-CWr8suZm.js} +1 -1
- package/dist/rcs-web/assets/{gitGraphDiagram-PVQCEYII-WBmYjFoA.js → gitGraphDiagram-PVQCEYII-BspxLSNV.js} +1 -1
- package/dist/rcs-web/assets/{infoDiagram-5YYISTIA-D3l4nC2Y.js → infoDiagram-5YYISTIA-Bow20s-Q.js} +1 -1
- package/dist/rcs-web/assets/{ishikawaDiagram-YF4QCWOH-BYDxMH9Q.js → ishikawaDiagram-YF4QCWOH-BESvGYGI.js} +1 -1
- package/dist/rcs-web/assets/{journeyDiagram-JHISSGLW-BSD6AEvb.js → journeyDiagram-JHISSGLW-DZ6gzC7H.js} +1 -1
- package/dist/rcs-web/assets/{kanban-definition-UN3LZRKU-DtqGr_PI.js → kanban-definition-UN3LZRKU-DIQo2GiM.js} +1 -1
- package/dist/rcs-web/assets/{linear-CaKAAJC6.js → linear-CdXALiZ8.js} +1 -1
- package/dist/rcs-web/assets/{main-Dk8hyS_b.js → main-CwLwGVDc.js} +3 -3
- package/dist/rcs-web/assets/{mermaid-VLURNSYL-f6St46tQ.js → mermaid-VLURNSYL-C0ZKM74W.js} +4 -4
- package/dist/rcs-web/assets/{mermaid.core-DWc0M-5V.js → mermaid.core-eEtoQhrQ.js} +5 -5
- package/dist/rcs-web/assets/{mindmap-definition-RKZ34NQL-D0RkeEqx.js → mindmap-definition-RKZ34NQL-CcW3H_cH.js} +1 -1
- package/dist/rcs-web/assets/{pieDiagram-4H26LBE5-YlDnS5wa.js → pieDiagram-4H26LBE5-DpXUpJMl.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/quadrantDiagram-W4KKPZXB-CZcVTIBE.js → dist/rcs-web/assets/quadrantDiagram-W4KKPZXB-DOwMRzzP.js} +1 -1
- package/dist/rcs-web/assets/{requirementDiagram-4Y6WPE33-BUn0r08O.js → requirementDiagram-4Y6WPE33-CBi_6NcW.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-Dr_ywHhs.js → dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-CKbAoTHm.js} +1 -1
- package/dist/rcs-web/assets/{sequenceDiagram-3UESZ5HK-Bts1oven.js → sequenceDiagram-3UESZ5HK-a3rYCe-w.js} +1 -1
- package/dist/rcs-web/assets/{stateDiagram-AJRCARHV-DFbylE7U.js → stateDiagram-AJRCARHV-B6R_Dt84.js} +1 -1
- package/dist/rcs-web/assets/{stateDiagram-v2-BHNVJYJU-Bzl4YDMv.js → stateDiagram-v2-BHNVJYJU-Cq935fvz.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-BtqngM31.js → dist/rcs-web/assets/timeline-definition-PNZ67QCA-8DXPKq1k.js} +1 -1
- package/dist/rcs-web/assets/{vennDiagram-CIIHVFJN-D1hGAcgx.js → vennDiagram-CIIHVFJN-BfDEkku5.js} +1 -1
- package/dist/rcs-web/assets/{wardleyDiagram-YWT4CUSO-Cf3_zw3F.js → wardleyDiagram-YWT4CUSO-Dvp2XZVf.js} +1 -1
- package/{packages/remote-control-server/web/dist/assets/xychartDiagram-2RQKCTM6-BuQiwlY7.js → dist/rcs-web/assets/xychartDiagram-2RQKCTM6-DiPjQLUx.js} +1 -1
- package/dist/rcs-web/index.html +1 -1
- package/package.json +1 -1
- package/packages/remote-control-server/src/__tests__/models-state-snapshot.test.ts +216 -0
- package/packages/remote-control-server/src/__tests__/routes.test.ts +15 -5
- package/packages/remote-control-server/src/__tests__/turn-end-status.test.ts +205 -0
- package/packages/remote-control-server/src/routes/v2/worker-events.ts +22 -0
- package/packages/remote-control-server/src/routes/web/sessions.ts +33 -0
- package/packages/remote-control-server/src/services/transport.ts +12 -0
- package/packages/remote-control-server/src/transport/event-bus.ts +10 -0
- package/packages/remote-control-server/web/dist/assets/{AdminPanel-BMgxq2d0.js → AdminPanel-Xlza8Stt.js} +1 -1
- package/{dist/rcs-web/assets/Claim-DRJ_CmK0.js → packages/remote-control-server/web/dist/assets/Claim-BMWwu213.js} +1 -1
- package/{dist/rcs-web/assets/Dashboard-CablTsf3.js → packages/remote-control-server/web/dist/assets/Dashboard-D5awDzM3.js} +1 -1
- package/{dist/rcs-web/assets/Join-a80j0Uiw.js → packages/remote-control-server/web/dist/assets/Join-ok37ggfZ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Login-DclVxA4Q.js → Login-5qo97rq-.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Register-DizfWHKb.js → Register-D_UOG8ar.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/SessionDetail-BbHrR4Qu.js +65 -0
- package/packages/remote-control-server/web/dist/assets/{SessionVisibilityBadge-Bp4kZdZ4.js → SessionVisibilityBadge-Dy4FwTzo.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{Setup-DIw3Qc5x.js → Setup-GnPeNyH9.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{ShareLanding-CmyujISc.js → ShareLanding-CUjQydLL.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamCreate-fq5PdqO_.js → TeamCreate-Ck2fEoUW.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamDetail-haFVDL0P.js → TeamDetail-De6EPND0.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamList-CR63fSv_.js → TeamList-C-0LJRxd.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{TeamSettings-BlXY05zK.js → TeamSettings-BszOrXVW.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{UserSearchInput-Cpg_A_Py.js → UserSearchInput-CyQWtLL-.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{UserSettings-BzHH2wQ6.js → UserSettings-DgyYp-1y.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{arc-cULKnhNn.js → arc-BaOPt7k-.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{architectureDiagram-3BPJPVTR-CXLnNGBR.js → architectureDiagram-3BPJPVTR-SvIakXbT.js} +1 -1
- package/{dist/rcs-web/assets/blockDiagram-GPEHLZMM-BPQU9CvK.js → packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-CiDp9J7i.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{c4Diagram-AAUBKEIU-x76XWolr.js → c4Diagram-AAUBKEIU-D9wzA9ur.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/channel-CirgRB_G.js +1 -0
- package/packages/remote-control-server/web/dist/assets/{chunk-2J33WTMH-C2xuSz2p.js → chunk-2J33WTMH-qfYueRAP.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-4BX2VUAB-BPsGJ9Ky.js → chunk-4BX2VUAB-D1V_UCiK.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-55IACEB6-DV5Xxy86.js → chunk-55IACEB6-C67QiGmo.js} +1 -1
- package/{dist/rcs-web/assets/chunk-727SXJPM-dwWMJ2pm.js → packages/remote-control-server/web/dist/assets/chunk-727SXJPM-D2Wln4TT.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-AQP2D5EJ-CkxHIiMh.js → chunk-AQP2D5EJ-03h8hZhw.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-FMBD7UC4-CyuNPJ-2.js → chunk-FMBD7UC4-7zas8pDp.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-ND2GUHAM-L7in2-8e.js → chunk-ND2GUHAM-PUXucyY6.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{chunk-QZHKN3VN-xFEPbqY9.js → chunk-QZHKN3VN-M3U5l4yW.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-Cq12UEz9.js +1 -0
- package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-Cq12UEz9.js +1 -0
- package/packages/remote-control-server/web/dist/assets/{code-block-IT6T5CEO-hkRn_BN_.js → code-block-IT6T5CEO-BgUazuuS.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{copy-B8rXAtFb.js → copy-DjaSB1Rw.js} +1 -1
- package/{dist/rcs-web/assets/cose-bilkent-S5V4N54A-DSZFWhhn.js → packages/remote-control-server/web/dist/assets/cose-bilkent-S5V4N54A-zPupX74N.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{dagre-BM42HDAG-B5wjmFJL.js → dagre-BM42HDAG-B_EJ050J.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-2AECGRRQ-CGeTqGVq.js → diagram-2AECGRRQ-dnnxPH7w.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-5GNKFQAL-B9-2D-Y8.js → diagram-5GNKFQAL-CLEOqCLZ.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-KO2AKTUF-BVCQ5UyX.js → diagram-KO2AKTUF-DKBGpiRW.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-LMA3HP47-Cj4gFMtD.js → diagram-LMA3HP47-BAilhXiA.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{diagram-OG6HWLK6-BBpaH0il.js → diagram-OG6HWLK6-C3CdmOxC.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{erDiagram-TEJ5UH35-DS19qy_q.js → erDiagram-TEJ5UH35-D1yv-3Jv.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{flowDiagram-I6XJVG4X-D9WY3n6O.js → flowDiagram-I6XJVG4X-DpW11XWj.js} +1 -1
- package/{dist/rcs-web/assets/ganttDiagram-6RSMTGT7-BNOSopT7.js → packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-CWr8suZm.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{gitGraphDiagram-PVQCEYII-WBmYjFoA.js → gitGraphDiagram-PVQCEYII-BspxLSNV.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{infoDiagram-5YYISTIA-D3l4nC2Y.js → infoDiagram-5YYISTIA-Bow20s-Q.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{ishikawaDiagram-YF4QCWOH-BYDxMH9Q.js → ishikawaDiagram-YF4QCWOH-BESvGYGI.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{journeyDiagram-JHISSGLW-BSD6AEvb.js → journeyDiagram-JHISSGLW-DZ6gzC7H.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{kanban-definition-UN3LZRKU-DtqGr_PI.js → kanban-definition-UN3LZRKU-DIQo2GiM.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{linear-CaKAAJC6.js → linear-CdXALiZ8.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{main-Dk8hyS_b.js → main-CwLwGVDc.js} +3 -3
- package/packages/remote-control-server/web/dist/assets/{mermaid-VLURNSYL-f6St46tQ.js → mermaid-VLURNSYL-C0ZKM74W.js} +4 -4
- package/packages/remote-control-server/web/dist/assets/{mermaid.core-DWc0M-5V.js → mermaid.core-eEtoQhrQ.js} +5 -5
- package/packages/remote-control-server/web/dist/assets/{mindmap-definition-RKZ34NQL-D0RkeEqx.js → mindmap-definition-RKZ34NQL-CcW3H_cH.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{pieDiagram-4H26LBE5-YlDnS5wa.js → pieDiagram-4H26LBE5-DpXUpJMl.js} +1 -1
- package/{dist/rcs-web/assets/quadrantDiagram-W4KKPZXB-CZcVTIBE.js → packages/remote-control-server/web/dist/assets/quadrantDiagram-W4KKPZXB-DOwMRzzP.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{requirementDiagram-4Y6WPE33-BUn0r08O.js → requirementDiagram-4Y6WPE33-CBi_6NcW.js} +1 -1
- package/{dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-Dr_ywHhs.js → packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-CKbAoTHm.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{sequenceDiagram-3UESZ5HK-Bts1oven.js → sequenceDiagram-3UESZ5HK-a3rYCe-w.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{stateDiagram-AJRCARHV-DFbylE7U.js → stateDiagram-AJRCARHV-B6R_Dt84.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{stateDiagram-v2-BHNVJYJU-Bzl4YDMv.js → stateDiagram-v2-BHNVJYJU-Cq935fvz.js} +1 -1
- package/{dist/rcs-web/assets/timeline-definition-PNZ67QCA-BtqngM31.js → packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-8DXPKq1k.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{vennDiagram-CIIHVFJN-D1hGAcgx.js → vennDiagram-CIIHVFJN-BfDEkku5.js} +1 -1
- package/packages/remote-control-server/web/dist/assets/{wardleyDiagram-YWT4CUSO-Cf3_zw3F.js → wardleyDiagram-YWT4CUSO-Dvp2XZVf.js} +1 -1
- package/{dist/rcs-web/assets/xychartDiagram-2RQKCTM6-BuQiwlY7.js → packages/remote-control-server/web/dist/assets/xychartDiagram-2RQKCTM6-DiPjQLUx.js} +1 -1
- package/packages/remote-control-server/web/dist/index.html +1 -1
- package/dist/rcs-web/assets/SessionDetail-CJoBz0DU.js +0 -65
- package/dist/rcs-web/assets/channel-DVf9sV9K.js +0 -1
- package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-DfHzlu2X.js +0 -1
- package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-DfHzlu2X.js +0 -1
- package/packages/remote-control-server/web/dist/assets/SessionDetail-CJoBz0DU.js +0 -65
- package/packages/remote-control-server/web/dist/assets/channel-DVf9sV9K.js +0 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-DfHzlu2X.js +0 -1
- package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-DfHzlu2X.js +0 -1
package/dist/parade/web/cube.js
CHANGED
|
@@ -610,6 +610,17 @@ function sendFocus(pid, row) {
|
|
|
610
610
|
|
|
611
611
|
document.addEventListener('contextmenu', function (e) {
|
|
612
612
|
e.preventDefault()
|
|
613
|
+
// Electron bridge: the menu opens as its own cursor-anchored popup window
|
|
614
|
+
// (see paradeWindow.ts 'parade-open-menu'), so it can extend beyond this
|
|
615
|
+
// window's bounds — the in-page fallback below is clipped by them, which
|
|
616
|
+
// truncated the menu on the small logo/mini modes.
|
|
617
|
+
if (window.parade && typeof window.parade.openMenu === 'function') {
|
|
618
|
+
window.parade.openMenu({ mode: displayMode, rot: cubeMode })
|
|
619
|
+
return
|
|
620
|
+
}
|
|
621
|
+
// Fallback (bridge missing — e.g. debugging the UI in a regular browser
|
|
622
|
+
// tab): show the in-page menu with flip/clamp positioning, accepting that
|
|
623
|
+
// it cannot leave the window.
|
|
613
624
|
updateModeLabel()
|
|
614
625
|
updateViewMenu()
|
|
615
626
|
ctxMenu.style.display = 'block'
|
|
@@ -625,6 +636,20 @@ document.addEventListener('contextmenu', function (e) {
|
|
|
625
636
|
ctxMenu.style.top = y + 'px'
|
|
626
637
|
})
|
|
627
638
|
|
|
639
|
+
// Actions arriving from the popup menu window (relayed via the main process).
|
|
640
|
+
// The parade window stays the source of truth — the popup only reports what
|
|
641
|
+
// was clicked, this side applies and persists it.
|
|
642
|
+
if (window.parade && typeof window.parade.onMenuAction === 'function') {
|
|
643
|
+
window.parade.onMenuAction(function (action) {
|
|
644
|
+
if (!action || typeof action !== 'object') return
|
|
645
|
+
if (action.type === 'view' && MODES[action.value]) {
|
|
646
|
+
setMode(action.value)
|
|
647
|
+
} else if (action.type === 'rotation') {
|
|
648
|
+
toggleRotationMode()
|
|
649
|
+
}
|
|
650
|
+
})
|
|
651
|
+
}
|
|
652
|
+
|
|
628
653
|
// Frameless window drag + corner resize via IPC (Electron). Left-click on
|
|
629
654
|
// the body starts a move-drag; left-click on a .corner-handle starts a
|
|
630
655
|
// proportional resize. The main process polls the cursor and moves/resizes
|
|
@@ -722,8 +747,8 @@ function updateModeLabel() {
|
|
|
722
747
|
'Rotation: ' + (cubeMode === 'dynamic' ? 'Dynamic' : 'Static')
|
|
723
748
|
}
|
|
724
749
|
|
|
725
|
-
|
|
726
|
-
|
|
750
|
+
// Shared by the in-page menu (fallback) and the popup menu action relay.
|
|
751
|
+
function toggleRotationMode() {
|
|
727
752
|
cubeMode = cubeMode === 'dynamic' ? 'static' : 'dynamic'
|
|
728
753
|
try {
|
|
729
754
|
localStorage.setItem('parade-cube-mode', cubeMode)
|
|
@@ -732,6 +757,12 @@ ctxMode.addEventListener('click', function () {
|
|
|
732
757
|
}
|
|
733
758
|
updateModeLabel()
|
|
734
759
|
updateCubeRotation()
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
ctxMode.addEventListener('click', function (e) {
|
|
763
|
+
e.stopPropagation()
|
|
764
|
+
ctxMenu.style.display = 'none'
|
|
765
|
+
toggleRotationMode()
|
|
735
766
|
})
|
|
736
767
|
|
|
737
768
|
updateModeLabel()
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<title>Parade Menu</title>
|
|
6
|
+
<!--
|
|
7
|
+
Standalone host for the parade right-click context menu.
|
|
8
|
+
|
|
9
|
+
Why a separate page: the menu used to be a DOM element inside index.html,
|
|
10
|
+
but a page can never paint outside its own window — and the parade window
|
|
11
|
+
can be as small as 100x80 (logo mode), so the menu was truncated. The
|
|
12
|
+
electron main script (paradeWindow.ts) opens this page in a second
|
|
13
|
+
frameless, transparent, always-on-top popup window anchored at the OS
|
|
14
|
+
cursor, so the menu can extend beyond the parade window.
|
|
15
|
+
|
|
16
|
+
Contract with the electron main script:
|
|
17
|
+
- Window: one PRE-WARMED frameless transparent popup, created hidden at
|
|
18
|
+
startup and REUSED for every right-click (hide/show, never recreated —
|
|
19
|
+
recreating a renderer process per open read as a laggy menu). Main
|
|
20
|
+
re-anchors it via setBounds at the OS cursor and sizes it
|
|
21
|
+
MENU_W x MENU_H design px x unitScale — the constants in paradeWindow.ts
|
|
22
|
+
MUST match the locked layout below.
|
|
23
|
+
- State: pushed per open over IPC parade-menu-state {mode, rot}; the page
|
|
24
|
+
applies it and acks via paradeMenu.ready(), then main shows the window
|
|
25
|
+
(no stale highlight). The ?mode/&rot/&zoom=<dpiScale> query params are
|
|
26
|
+
only the initial-load fallback / browser-debugging path. zoom is applied
|
|
27
|
+
identically to index.html (physical px compensation on
|
|
28
|
+
--force-device-scale-factor=1 Win11; multiply window size by unitScale).
|
|
29
|
+
- Selections: window.paradeMenu.action({type:'view', value}) or
|
|
30
|
+
({type:'rotation'}) → IPC parade-menu-action → relayed to the parade
|
|
31
|
+
window renderer, which stays the single source of truth for mode state.
|
|
32
|
+
Escape dismisses via window.paradeMenu.dismiss() (hide, not close —
|
|
33
|
+
the window is reused).
|
|
34
|
+
-->
|
|
35
|
+
<style>
|
|
36
|
+
:root {
|
|
37
|
+
/* Same design tokens as index.html — keep in sync. */
|
|
38
|
+
--bg-elev: #1d1830;
|
|
39
|
+
--border: rgba(139, 92, 246, 0.18);
|
|
40
|
+
--purple: #8B5CF6;
|
|
41
|
+
--purple-soft: #a78bfa;
|
|
42
|
+
--text: #e7e3f4;
|
|
43
|
+
--text-faint: #5c5575;
|
|
44
|
+
}
|
|
45
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
46
|
+
html, body {
|
|
47
|
+
width: 100%; height: 100%; overflow: hidden;
|
|
48
|
+
/* Transparent so the popup window shows only the menu card. */
|
|
49
|
+
background: transparent;
|
|
50
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
|
51
|
+
color: var(--text);
|
|
52
|
+
user-select: none;
|
|
53
|
+
-webkit-font-smoothing: antialiased;
|
|
54
|
+
}
|
|
55
|
+
/* Same card as index.html's #ctx-menu — keep in sync. Line-heights and
|
|
56
|
+
paddings are locked so the total height is exactly 147px regardless of
|
|
57
|
+
system font metrics:
|
|
58
|
+
border 2 + padding 6 + label 17 + 4 items x 23 + sep 7 + item 23 */
|
|
59
|
+
#menu {
|
|
60
|
+
display: block;
|
|
61
|
+
position: fixed;
|
|
62
|
+
top: 0;
|
|
63
|
+
left: 0;
|
|
64
|
+
width: 158px;
|
|
65
|
+
background: var(--bg-elev);
|
|
66
|
+
border: 1px solid var(--border);
|
|
67
|
+
border-radius: 6px;
|
|
68
|
+
padding: 3px;
|
|
69
|
+
box-shadow: 0 4px 16px rgba(0,0,0,0.5);
|
|
70
|
+
transform-origin: top left;
|
|
71
|
+
animation: menu-in 0.12s ease;
|
|
72
|
+
}
|
|
73
|
+
@keyframes menu-in {
|
|
74
|
+
from { opacity: 0; transform: scale(0.96); }
|
|
75
|
+
}
|
|
76
|
+
#menu .ctx-label {
|
|
77
|
+
padding: 4px 12px 2px;
|
|
78
|
+
font-size: 9px;
|
|
79
|
+
line-height: 11px;
|
|
80
|
+
letter-spacing: 1px;
|
|
81
|
+
text-transform: uppercase;
|
|
82
|
+
color: var(--text-faint);
|
|
83
|
+
cursor: default;
|
|
84
|
+
}
|
|
85
|
+
#menu .ctx-item {
|
|
86
|
+
padding: 5px 12px;
|
|
87
|
+
font-size: 11px;
|
|
88
|
+
line-height: 13px;
|
|
89
|
+
color: var(--text);
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
border-radius: 4px;
|
|
92
|
+
transition: background 0.1s;
|
|
93
|
+
}
|
|
94
|
+
#menu .ctx-item:hover {
|
|
95
|
+
background: var(--purple);
|
|
96
|
+
color: #fff;
|
|
97
|
+
}
|
|
98
|
+
#menu .ctx-sep {
|
|
99
|
+
height: 1px;
|
|
100
|
+
background: var(--border);
|
|
101
|
+
margin: 3px 6px;
|
|
102
|
+
}
|
|
103
|
+
/* View-mode radio bullets — same as index.html */
|
|
104
|
+
#menu .ctx-view::before {
|
|
105
|
+
content: '';
|
|
106
|
+
display: inline-block;
|
|
107
|
+
width: 9px; height: 9px;
|
|
108
|
+
border-radius: 50%;
|
|
109
|
+
border: 1px solid var(--text-faint);
|
|
110
|
+
margin-right: 7px;
|
|
111
|
+
vertical-align: -1px;
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
}
|
|
114
|
+
#menu .ctx-view.active::before {
|
|
115
|
+
border-color: var(--purple);
|
|
116
|
+
background: var(--purple);
|
|
117
|
+
box-shadow: inset 0 0 0 2px var(--bg-elev);
|
|
118
|
+
}
|
|
119
|
+
#menu .ctx-view.active {
|
|
120
|
+
color: var(--purple-soft);
|
|
121
|
+
}
|
|
122
|
+
#menu .ctx-view.active:hover { color: #fff; }
|
|
123
|
+
</style>
|
|
124
|
+
</head>
|
|
125
|
+
<body>
|
|
126
|
+
<div id="menu">
|
|
127
|
+
<div class="ctx-label">View</div>
|
|
128
|
+
<div class="ctx-item ctx-view" data-view="logo">Cube only</div>
|
|
129
|
+
<div class="ctx-item ctx-view" data-view="mini">Cube + counts</div>
|
|
130
|
+
<div class="ctx-item ctx-view" data-view="standard">Standard</div>
|
|
131
|
+
<div class="ctx-item ctx-view" data-view="detail">Detail</div>
|
|
132
|
+
<div class="ctx-sep"></div>
|
|
133
|
+
<div class="ctx-item" id="ctx-mode">Rotation: Dynamic</div>
|
|
134
|
+
</div>
|
|
135
|
+
<script>
|
|
136
|
+
// ---- State application ----
|
|
137
|
+
// The electron main process pre-warms this page and reuses its window for
|
|
138
|
+
// every right-click: each open pushes the parade window's current state via
|
|
139
|
+
// the parade-menu-state IPC; the query params below are only the initial
|
|
140
|
+
// fallback / browser-debugging path. applyState() must therefore REMOVE the
|
|
141
|
+
// previous open's active marks, not just add new ones.
|
|
142
|
+
function applyState(state) {
|
|
143
|
+
state = (state && typeof state === 'object') ? state : {}
|
|
144
|
+
var mode = String(state.mode || '')
|
|
145
|
+
var views = document.querySelectorAll('.ctx-view')
|
|
146
|
+
for (let i = 0; i < views.length; i++) {
|
|
147
|
+
if (views[i].getAttribute('data-view') === mode) {
|
|
148
|
+
views[i].classList.add('active')
|
|
149
|
+
} else {
|
|
150
|
+
views[i].classList.remove('active')
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
var rot = state.rot === 'static' ? 'static' : 'dynamic'
|
|
154
|
+
var modeEl = document.getElementById('ctx-mode')
|
|
155
|
+
if (modeEl) {
|
|
156
|
+
modeEl.textContent = 'Rotation: ' + (rot === 'dynamic' ? 'Dynamic' : 'Static')
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// The page itself is reused across opens, so the load-time #menu animation
|
|
161
|
+
// would only ever play once — replay it on every state push (i.e. every open).
|
|
162
|
+
function replayOpenAnimation() {
|
|
163
|
+
var menuEl = document.getElementById('menu')
|
|
164
|
+
if (!menuEl) return
|
|
165
|
+
menuEl.style.animation = 'none'
|
|
166
|
+
void menuEl.offsetWidth // force reflow so the animation restarts
|
|
167
|
+
menuEl.style.animation = ''
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Initial state via query string (fallback / browser debugging).
|
|
171
|
+
;(function () {
|
|
172
|
+
var q = new URLSearchParams(window.location.search)
|
|
173
|
+
|
|
174
|
+
// DPI compensation — identical mechanism to index.html/cube.js: the main
|
|
175
|
+
// process forces 1 CSS px = 1 physical px on Win11, then we CSS-zoom the
|
|
176
|
+
// content by the OS DPI factor so physical size matches intent. Applied at
|
|
177
|
+
// parse time; the window was sized as design px x unitScale by main.
|
|
178
|
+
var zoom = parseFloat(q.get('zoom')) || 0
|
|
179
|
+
if (zoom > 1) document.documentElement.style.zoom = String(zoom)
|
|
180
|
+
|
|
181
|
+
applyState({ mode: q.get('mode') || '', rot: q.get('rot') || '' })
|
|
182
|
+
})()
|
|
183
|
+
|
|
184
|
+
// Per-open state push: apply, replay the open animation, then ack so main
|
|
185
|
+
// shows the window with the highlight already up to date.
|
|
186
|
+
if (window.paradeMenu && typeof window.paradeMenu.onState === 'function') {
|
|
187
|
+
window.paradeMenu.onState(function (state) {
|
|
188
|
+
applyState(state)
|
|
189
|
+
replayOpenAnimation()
|
|
190
|
+
if (typeof window.paradeMenu.ready === 'function') {
|
|
191
|
+
window.paradeMenu.ready()
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Report a selection to the electron main process, which hides the popup and
|
|
197
|
+
// relays the action to the parade window renderer.
|
|
198
|
+
function reportAction(action) {
|
|
199
|
+
if (window.paradeMenu && typeof window.paradeMenu.action === 'function') {
|
|
200
|
+
window.paradeMenu.action(action)
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// View-mode radio items.
|
|
205
|
+
var viewItems = document.querySelectorAll('.ctx-view')
|
|
206
|
+
for (let i = 0; i < viewItems.length; i++) {
|
|
207
|
+
;(function (el) {
|
|
208
|
+
el.addEventListener('click', function () {
|
|
209
|
+
reportAction({ type: 'view', value: el.getAttribute('data-view') })
|
|
210
|
+
})
|
|
211
|
+
})(viewItems[i])
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Rotation toggle — the parade window applies and persists the new mode.
|
|
215
|
+
var modeEl = document.getElementById('ctx-mode')
|
|
216
|
+
if (modeEl) {
|
|
217
|
+
modeEl.addEventListener('click', function () {
|
|
218
|
+
reportAction({ type: 'rotation' })
|
|
219
|
+
})
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// Escape dismisses (native-menu parity). The popup window is reused, so the
|
|
223
|
+
// page must NOT window.close() itself (that would destroy the prewarmed
|
|
224
|
+
// renderer) — it asks main to hide it instead. window.close() stays as the
|
|
225
|
+
// browser-debugging fallback where the bridge is missing.
|
|
226
|
+
document.addEventListener('keydown', function (e) {
|
|
227
|
+
if (e.key === 'Escape') {
|
|
228
|
+
if (window.paradeMenu && typeof window.paradeMenu.dismiss === 'function') {
|
|
229
|
+
window.paradeMenu.dismiss()
|
|
230
|
+
} else {
|
|
231
|
+
try { window.close() } catch (_) { /* ignore */ }
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
// Right-click inside the menu: swallow it (prevents Electron/browser default
|
|
237
|
+
// menus); the parade window's own right-click re-anchors a fresh menu.
|
|
238
|
+
document.addEventListener('contextmenu', function (e) {
|
|
239
|
+
e.preventDefault()
|
|
240
|
+
})
|
|
241
|
+
</script>
|
|
242
|
+
</body>
|
|
243
|
+
</html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{ak as c,al as o,J as m,af as s,a8 as l,x as u}from"./main-
|
|
1
|
+
import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{ak as c,al as o,J as m,af as s,a8 as l,x as u}from"./main-CwLwGVDc.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){c();const[a,i]=d.useState([]),{myTeams:r,isLoading:x}=o(),n=d.useCallback(async()=>{try{const t=await m();i(t||[])}catch(t){console.error("Admin: failed to load sessions",t)}},[]);return d.useEffect(()=>{n()},[n]),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-8",children:[e.jsx("h1",{className:"mb-6 font-display text-2xl font-semibold text-text-primary",children:s("admin.title")}),e.jsxs("section",{className:"mb-10",children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.teams")," (",r.length,")"]}),x?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("common.loading")}):r.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noTeams")}):e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("a",{href:`/teams/${t.slug}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-medium text-text-primary",children:t.name}),e.jsx("span",{className:"ml-2 text-xs text-text-muted",children:t.slug})]}),e.jsx("span",{className:"text-xs text-text-muted",children:l(new Date(t.created_at).getTime()/1e3)})]},t.id))})]}),e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.sessions")," (",a.length,")"]}),a.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noSessions")}):e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("a",{href:`/code/${t.id}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),e.jsx("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-muted",children:t.source||"unknown"})]}),e.jsx("div",{className:"truncate text-xs text-text-muted",children:t.id})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[e.jsx(u,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:l(t.updated_at||t.created_at)})]})]},t.id))})]})]})})}export{j as AdminPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{E as u,J as f}from"./main-
|
|
1
|
+
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{E as u,J as f}from"./main-CwLwGVDc.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";const v=2e3,N=3e4;function E(){const c=window.location.pathname.split("/"),i=c[c.length-1]||"",[s,n]=r.useState("idle"),[m,l]=r.useState(null),[a,d]=r.useState(null);return r.useEffect(()=>{if(!i||!i.startsWith("clm_")){l("Invalid claim token"),n("error");return}n("claiming"),u(i).then(t=>{d(t.environment_id),n("waiting")}).catch(t=>{l(t instanceof Error?t.message:"Claim failed"),n("error")})},[i]),r.useEffect(()=>{if(s!=="waiting"||!a)return;let t=!1;const x=Date.now(),o=setInterval(()=>{if(Date.now()-x>N){clearInterval(o),t||n("timeout");return}f().then(h=>{t||(h||[]).some(p=>p.environment_id===a)&&(clearInterval(o),window.location.href="/code/")}).catch(()=>{})},v);return()=>{t=!0,clearInterval(o)}},[s,a]),s==="claiming"?e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})}):s==="error"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsx("a",{href:"/code",className:"mt-4 inline-block text-accent hover:underline",children:"Back to dashboard"})]}):s==="waiting"||s==="timeout"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-10",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:"Environment claimed"}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"You are now the owner of this environment."})]}),e.jsxs("div",{className:"space-y-4",children:[a&&e.jsx("p",{className:"font-mono text-xs text-text-muted",children:a}),s==="waiting"?e.jsxs("p",{className:"text-sm text-text-muted",children:["Waiting for the worker to create a session",e.jsx("span",{className:"animate-pulse",children:"…"})]}):e.jsx("p",{className:"text-sm text-text-muted",children:"The worker has not created a session yet — it may be offline or stopped. The session will appear on the dashboard once the worker connects."}),e.jsx("a",{href:"/code",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:"Go to dashboard"})]})]}):e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})})}export{E as Claim};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,e as o}from"./vendor-DE_-CLIE.js";import{a5 as O,a4 as _,al as E,aj as T,x as F,ak as L,af as a,a8 as A,q as $,s as W,e as H,r as V,d as P,ab as q,G,J,K,I as R}from"./main-
|
|
1
|
+
import{j as e,e as o}from"./vendor-DE_-CLIE.js";import{a5 as O,a4 as _,al as E,aj as T,x as F,ak as L,af as a,a8 as A,q as $,s as W,e as H,r as V,d as P,ab as q,G,J,K,I as R}from"./main-CwLwGVDc.js";import{g as D}from"./workerType-Bd-zteMi.js";import{S as U,D as Z,a as z,c as Q,d as X,b as Y}from"./SessionVisibilityBadge-Dy4FwTzo.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
|
|
2
2
|
* @license lucide-react v0.555.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as v,af as t}from"./main-
|
|
1
|
+
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as v,af as t}from"./main-CwLwGVDc.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function E({onSuccess:b,onInvalidInvite:l}){const{join:f}=v(),[u,h]=r.useState(""),[d,j]=r.useState(""),[o,w]=r.useState(""),[c,g]=r.useState(""),[m,n]=r.useState(""),[x,p]=r.useState(!1);r.useEffect(()=>{const a=new URLSearchParams(window.location.search).get("invite");a?h(a):l()},[l]);const y=async s=>{if(s.preventDefault(),n(""),o.length<8){n(t("auth.setup.passwordTooShort"));return}if(o!==c){n(t("auth.setup.passwordMismatch"));return}p(!0);try{await f(u,d,o),b()}catch(a){const i=a instanceof Error?a.message:"Join failed";if(i.includes("Invalid invitation")||i.includes("expired")||i.includes("already used")){l();return}n(i)}finally{p(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.join.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.join.welcome")}),e.jsx("p",{className:"mt-1 text-sm text-text-muted",children:t("auth.join.description")})]}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.username")}),e.jsx("input",{type:"text",value:d,onChange:s=>j(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>w(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>g(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),m&&e.jsx("p",{className:"text-sm text-status-error",children:m}),e.jsx("button",{type:"submit",disabled:x||!u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{E as Join};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as f,af as t}from"./main-
|
|
1
|
+
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as f,af as t}from"./main-CwLwGVDc.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function N({onSuccess:d,onNavigateRegister:c}){const{login:m,registrationAllowed:x}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[l,n]=r.useState(""),[i,u]=r.useState(!1),h=async s=>{s.preventDefault(),n(""),u(!0);try{await m(a,o),d()}catch{n(t("auth.login.failed"))}finally{u(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.login.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.login.description")})]}),e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:a,onChange:s=>p(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>b(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),l&&e.jsx("p",{className:"text-sm text-status-error",children:l}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:i?t("common.loading"):t("auth.login.submit")})]}),x&&e.jsx("button",{type:"button",onClick:c,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{N as Login};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as y,af as t}from"./main-
|
|
1
|
+
import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as y,af as t}from"./main-CwLwGVDc.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:m,onBack:x}){const{register:p}=y(),[n,b]=r.useState(""),[a,h]=r.useState(""),[l,f]=r.useState(""),[i,o]=r.useState(""),[u,d]=r.useState(!1),g=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==l){o(t("auth.setup.passwordMismatch"));return}d(!0);try{await p(n,a),m()}catch(c){o(c instanceof Error?c.message:t("auth.register.failed"))}finally{d(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.register.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.register.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:n,onChange:s=>b(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>h(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>f(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:u?t("common.loading"):t("auth.register.submit")})]}),e.jsx("button",{type:"button",onClick:x,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.register.backToLogin")})]})})}export{S as Register};
|