@hot-updater/console 1.2.0-rc.4 → 1.2.0-rc.41
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/.output/nitro.json +1 -1
- package/.output/public/assets/-native-builds-search-BFcW2mlI.js +1 -0
- package/.output/public/assets/BundleIdDisplay-C0X-k49t.js +1 -0
- package/.output/public/assets/ChannelBadge-BgVCJfJs.js +1 -0
- package/.output/public/assets/ChannelPicker-BQKoyxnf.js +1 -0
- package/.output/public/assets/CompositeItem-B7uxFM46.js +1 -0
- package/.output/public/assets/{ConsoleFeatureUnavailable-CUtcXuY2.js → ConsoleFeatureUnavailable-B3VCINom.js} +1 -1
- package/.output/public/assets/EventDetails-CWiI1CXb.js +1 -0
- package/.output/public/assets/HashValueDisplay-DvwvQchI.js +1 -0
- package/.output/public/assets/InsightsPageHeader-BjUAikRe.js +1 -0
- package/.output/public/assets/IosInstall-B5IdjCP2.js +1 -0
- package/.output/public/assets/NativeBuildsNav-BKdnlKMN.js +1 -0
- package/.output/public/assets/{NotFoundPage-DZ3DxyRA.js → NotFoundPage-BEpesHEm.js} +1 -1
- package/.output/public/assets/{PlatformIcon-BBWQlWm9.js → PlatformIcon-D4KPXCHL.js} +1 -1
- package/.output/public/assets/QrCode-BFSCkbPj.js +1 -0
- package/.output/public/assets/RelativeTime-5ZP9WlQ6.js +1 -0
- package/.output/public/assets/RolloutPercentageBadge-DCtG7c1o.js +1 -0
- package/.output/public/assets/RowReason-CXMCJ-Jc.js +1 -0
- package/.output/public/assets/SandboxBadge-PM92jCk6.js +1 -0
- package/.output/public/assets/TargetDisplay-DG_I3qln.js +1 -0
- package/.output/public/assets/alert-dialog-DGPqJBCk.js +1 -0
- package/.output/public/assets/api-eO-sq3Jd.js +1 -0
- package/.output/public/assets/api-keys-CAVLgicI.js +1 -0
- package/.output/public/assets/api-keys-ztwXoKcj.js +1 -0
- package/.output/public/assets/arrow-left-68S4uy4I.js +1 -0
- package/.output/public/assets/arrow-right-DjRwIoF1.js +1 -0
- package/.output/public/assets/arrow-up-right-C_1ALUCD.js +1 -0
- package/.output/public/assets/badge-zMibJGR5.js +1 -0
- package/.output/public/assets/card-BAs80yql.js +1 -0
- package/.output/public/assets/check-C3VCvMOV.js +1 -0
- package/.output/public/assets/chevron-right-RAuPv9r1.js +1 -0
- package/.output/public/assets/{circle-off-C7Muo0ss.js → circle-off-DvYMC5yF.js} +1 -1
- package/.output/public/assets/{clipboard-DQbOcrL7.js → clipboard-D0JWZ1KF.js} +1 -1
- package/.output/public/assets/{console-features-api-DEXSwFtc.js → console-features-api-CtbGqKyr.js} +1 -1
- package/.output/public/assets/{uuidv7-zXMtwR9Q.js → constants-C5gi7fdZ.js} +1 -1
- package/.output/public/assets/{copy-DsuLj3oj.js → copy-BjVLMKbo.js} +1 -1
- package/.output/public/assets/dialog-BvZDZzdQ.js +1 -0
- package/.output/public/assets/dist-BEmib-ZM.js +1 -0
- package/.output/public/assets/{download-Cf24LBde.js → download-CgpaZb23.js} +1 -1
- package/.output/public/assets/empty-C5GqArX9.js +1 -0
- package/.output/public/assets/field-DInLQ5oV.js +1 -0
- package/.output/public/assets/git-branch-BGatQV8Q.js +1 -0
- package/.output/public/assets/history-Ci4dhphE.js +1 -0
- package/.output/public/assets/index-Ck4fZq4M.js +10 -0
- package/.output/public/assets/input-group-CIjTdxCW.js +1 -0
- package/.output/public/assets/insights-V3D8tYPQ.js +1 -0
- package/.output/public/assets/insights-api-D4-FZeEI.js +1 -0
- package/.output/public/assets/insights-fSY6n4k3.js +42 -0
- package/.output/public/assets/insights-osTmFzzR.js +2 -0
- package/.output/public/assets/insights-search-CZtvD-Vf.js +1 -0
- package/.output/public/assets/insights-usage-rpc-Dw5_pmRH.js +1 -0
- package/.output/public/assets/insights_.distribution-Cws8lYLC.js +1 -0
- package/.output/public/assets/insights_.distribution-DpppHhaU.js +2 -0
- package/.output/public/assets/insights_.distribution-oIFSv2TC.js +1 -0
- package/.output/public/assets/installations-Byojb0Rv.js +2 -0
- package/.output/public/assets/installations-CFGDrY-W.js +1 -0
- package/.output/public/assets/installations-CcPrSZwW.js +1 -0
- package/.output/public/assets/{key-round-DwNKkHhy.js → key-round-BkeLvA1m.js} +1 -1
- package/.output/public/assets/{link-DTEyW70e.js → link-CRMwpc7-.js} +2 -2
- package/.output/public/assets/{list--NIee1FZ.js → list-DQ9YBIDW.js} +1 -1
- package/.output/public/assets/loader-circle-8lunBReu.js +1 -0
- package/.output/public/assets/native-builds-C4u6JvxV.js +2 -0
- package/.output/public/assets/native-builds-D9hoJd6W.js +1 -0
- package/.output/public/assets/native-builds-zwqucwx2.js +1 -0
- package/.output/public/assets/native-builds_._buildId-CXx2xjoI.js +1 -0
- package/.output/public/assets/native-builds_._buildId-DymsEZlO.js +2 -0
- package/.output/public/assets/native-builds_.devices-DF3g--dt.js +1 -0
- package/.output/public/assets/native-builds_.devices-QToUV8FB.js +2 -0
- package/.output/public/assets/plus-DztQIXYL.js +1 -0
- package/.output/public/assets/preload-helper-CE9OukVC.js +1 -0
- package/.output/public/assets/{relativeTime-YQt84dYr.js → relativeTime-RUNbaMyO.js} +1 -1
- package/.output/public/assets/remote-config-BIIj0Faf.js +1 -0
- package/.output/public/assets/remote-config-BJJAxy_g.js +6 -0
- package/.output/public/assets/remote-config-Dm1MCHDN.js +1 -0
- package/.output/public/assets/rotate-ccw-tITIe0Bd.js +1 -0
- package/.output/public/assets/{rotate-cw-Cv2aVbYr.js → rotate-cw-BFQcpUTO.js} +1 -1
- package/.output/public/assets/routes-9gxYg__u.js +1 -0
- package/.output/public/assets/routes-CUsayL0T.js +2 -0
- package/.output/public/assets/search-BfEqtE64.js +1 -0
- package/.output/public/assets/select-Bk52fOVX.js +1 -0
- package/.output/public/assets/sidebar-BmzmPGuv.js +3 -0
- package/.output/public/assets/smartphone-Dy13ukaU.js +1 -0
- package/.output/public/assets/styles-C1iqL6CR.css +2 -0
- package/.output/public/assets/switch-CI393qIT.js +1 -0
- package/.output/public/assets/table-DbZPkzdz.js +1 -0
- package/.output/public/assets/tabs-BnpNC0zf.js +1 -0
- package/.output/public/assets/trash-2-DI0biNI-.js +1 -0
- package/.output/public/assets/{undo-2-CUX96_BG.js → undo-2-CxhBbgJw.js} +1 -1
- package/.output/public/assets/useAnchoredPopupScrollLock-Cvx6CdPD.js +1 -0
- package/.output/public/assets/{useCompositeListItem-JmyDfo3-.js → useCompositeListItem-Cbk_weKW.js} +1 -1
- package/.output/public/assets/{useMutation-DbYw7boA.js → useMutation-D7IuoOLE.js} +1 -1
- package/.output/public/assets/valueToPercent-Db73Kirz.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-X9YQcrQI.mjs → __23tanstack-start-server-fn-resolver-76SKGuoc.mjs} +94 -46
- package/.output/server/_chunks/ssr-renderer.mjs +2 -2
- package/.output/server/_libs/@base-ui/react+[...].mjs +4436 -3131
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +1 -1
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +2 -2
- package/.output/server/_libs/_.mjs +2 -0
- package/.output/server/_libs/lucide-react.mjs +34 -28
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +1 -1
- package/.output/server/_libs/recharts+[...].mjs +1 -1
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__react-query.mjs +1 -1
- package/.output/server/_ssr/-native-builds-search-Bwt8tQzp.mjs +55 -0
- package/.output/server/_ssr/{BundleIdDisplay-BVrZXzTm.mjs → BundleIdDisplay-By3CbbRM.mjs} +3 -3
- package/.output/server/_ssr/ChannelBadge-CDup7l56.mjs +23 -0
- package/.output/server/_ssr/ChannelPicker-Du2TmP3P.mjs +251 -0
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-CULyV3nR.mjs → ConsoleFeatureUnavailable-C6aGoKDE.mjs} +8 -8
- package/.output/server/_ssr/{EventDetails-DeI1rOQc.mjs → EventDetails-VbcnMnSs.mjs} +9 -9
- package/.output/server/_ssr/{HashValueDisplay-DpnPD3U2.mjs → HashValueDisplay-CnC2fHER.mjs} +7 -7
- package/.output/server/_ssr/{InsightsPageHeader-Dwmdtelg.mjs → InsightsPageHeader-BuOanVZL.mjs} +13 -13
- package/.output/server/_ssr/IosInstall-BAFhW7Q9.mjs +751 -0
- package/.output/server/_ssr/NativeBuildsNav-BoTu4aLF.mjs +38 -0
- package/.output/server/_ssr/{NotFoundPage-Dddp1HSc.mjs → NotFoundPage-Bz05xF5Q.mjs} +3 -3
- package/.output/server/_ssr/{PlatformIcon-CFLiTjh1.mjs → PlatformIcon-C22qEcwo.mjs} +13 -3
- package/.output/server/_ssr/QrCode-DWshAW81.mjs +50 -0
- package/.output/server/_ssr/RelativeTime-D5kDQVn1.mjs +242 -0
- package/.output/server/_ssr/{git-CTA8Aqr0.mjs → RolloutPercentageBadge-Dwx7dEeQ.mjs} +20 -4
- package/.output/server/_ssr/RowReason-pVOWQ7t5.mjs +186 -0
- package/.output/server/_ssr/SandboxBadge-DFbUYwhO.mjs +85 -0
- package/.output/server/_ssr/TargetDisplay-BtE5vntq.mjs +105 -0
- package/.output/server/_ssr/{alert-dialog-ei2c1b6A.mjs → alert-dialog-tcfkkNUX.mjs} +4 -4
- package/.output/server/_ssr/{api-keys-CVi7E0qS.mjs → api-keys-12_U0SQM.mjs} +14 -11
- package/.output/server/_ssr/{api-keys-BLHCygD_.mjs → api-keys-Bm8uDp2u.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-rpc-CLZsTwih.mjs → api-keys-rpc-BxkfToWI.mjs} +4 -4
- package/.output/server/_ssr/{api-rpc-p-7EhGIG.mjs → api-rpc-TSnLWB7e.mjs} +83 -35
- package/.output/server/_ssr/{api-CvwqILEx.mjs → api-xOHZxbzu.mjs} +174 -37
- package/.output/server/_ssr/{auth-rpc-B1W4-hxa.mjs → auth-rpc-D3w54vsW.mjs} +5 -5
- package/.output/server/_ssr/{auth.server-CVKs7SWJ.mjs → auth.server-a2eP6q5P.mjs} +952 -186
- package/.output/server/_ssr/{badge-nS9EbEA0.mjs → badge-DrfbN1n0.mjs} +4 -45
- package/.output/server/_ssr/{bundleActivity-MLrjNJCT.mjs → bundleActivity-a-pEDiqu.mjs} +1 -1
- package/.output/server/_ssr/card-DEItjgKG.mjs +49 -0
- package/.output/server/_ssr/{config.server-BAdvotbH.mjs → config.server-K8dd4dRv.mjs} +4 -4
- package/.output/server/_ssr/{console-access-BiuC2QFp.mjs → console-access-D-DHU4YH.mjs} +2 -2
- package/.output/server/_ssr/{console-features-BTV-XuhQ.mjs → console-features-DTYyXrWO.mjs} +1 -1
- package/.output/server/_ssr/{console-features-api-FvbqhbTg.mjs → console-features-api-Chy2PrzZ.mjs} +5 -5
- package/.output/server/_ssr/{console-features-rpc-Cl3J66aP.mjs → console-features-rpc-_31L0k1i.mjs} +4 -4
- package/.output/server/_ssr/constants-BjsJZqaU.mjs +10 -0
- package/.output/server/_ssr/{createServerRpc-BVvRVOz5.mjs → createServerRpc-DJZel12M.mjs} +1 -1
- package/.output/server/_ssr/{databaseConfig-B_Bg7qS5.mjs → databaseConfig-B56IJxlu.mjs} +1 -1
- package/.output/server/_ssr/{databaseJsonValue-kS7cvEtz.mjs → databaseJsonValue-DuUoft8j.mjs} +1 -1
- package/.output/server/_ssr/{databaseRows-B6H8Cmgq.mjs → databaseRows-BZMFl5QV.mjs} +3 -3
- package/.output/server/_ssr/deviceProfileToken-xzDLfE0T.mjs +98 -0
- package/.output/server/_ssr/{dialog-GmTPeUS4.mjs → dialog-SAl1vP74.mjs} +5 -5
- package/.output/server/_ssr/dist-CiOq3ygH.mjs +148 -0
- package/.output/server/_ssr/{downloadBundle-DCmr7vsj.mjs → downloadBundle-C1KOnpiF.mjs} +1 -1
- package/.output/server/_ssr/{empty-CXWKv24M.mjs → empty-opJc9Fjw.mjs} +3 -3
- package/.output/server/_ssr/{empty-plugin-adapters-zrZ0xs6n.mjs → empty-plugin-adapters-BYBYBaxo.mjs} +1 -1
- package/.output/server/_ssr/{failureReports-Cn_zU9S8.mjs → failureReports-BVufgM3l.mjs} +3 -3
- package/.output/server/_ssr/{field-lwIHAwLc.mjs → field-D6Y7zDZd.mjs} +3 -3
- package/.output/server/_ssr/foldedPage-CUjJqtlF.mjs +176 -0
- package/.output/server/_ssr/{getBundleChildren-rtkEEJw5.mjs → getBundleChildren-CnOf4Frp.mjs} +2 -2
- package/.output/server/_ssr/{input-group-Dgr4DNbE.mjs → input-group-D2PvPRdm.mjs} +3 -3
- package/.output/server/_ssr/{insights-BxtyBLt0.mjs → insights-Cro4cYp7.mjs} +2 -2
- package/.output/server/_ssr/{insights-api-PN_9ilr8.mjs → insights-api-BPyvQert.mjs} +5 -5
- package/.output/server/_ssr/{insights-DSnQTQw1.mjs → insights-dWeLneo1.mjs} +45 -191
- package/.output/server/_ssr/{insights-errors-7BCwFybo.mjs → insights-errors-DwUaDs0Z.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-B9VPkzZE.mjs → insights-failures-DGO2_3Vx.mjs} +2 -2
- package/.output/server/_ssr/{insights-failures-rpc-Cxu3UtyB.mjs → insights-failures-rpc-D7M8-Et9.mjs} +11 -11
- package/.output/server/_ssr/{insights-recovery-BtXVU3ro.mjs → insights-recovery-Cdg3Msrj.mjs} +1 -1
- package/.output/server/_ssr/{insights-recovery-rpc--c6kBp3k.mjs → insights-recovery-rpc-BUMK4m4H.mjs} +7 -7
- package/.output/server/_ssr/{insights-rpc-oTMaAqc1.mjs → insights-rpc-BZZ4U2Ll.mjs} +4 -4
- package/.output/server/_ssr/{insights-search-r-Z50f0Y.mjs → insights-search-Czi553oN.mjs} +6 -8
- package/.output/server/_ssr/{insights-usage-DiGnuxW8.mjs → insights-usage-BVm7CDw9.mjs} +1 -1
- package/.output/server/_ssr/{insights-usage-rpc-DoElOI5b.mjs → insights-usage-rpc-BXvUr-z6.mjs} +7 -7
- package/.output/server/_ssr/{insights-usage-rpc-B00vjt0a.mjs → insights-usage-rpc-HOr6mniz.mjs} +5 -5
- package/.output/server/_ssr/{insights-B9NvjAWc.mjs → insights-vmCmvfXx.mjs} +5 -5
- package/.output/server/_ssr/{insightsUsage-ClAmoUz8.mjs → insightsUsage-lPKyRC2o.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-CnYddZ2Y.mjs → insights_.distribution-B2dxcCd_.mjs} +2 -2
- package/.output/server/_ssr/{insights_.distribution-mpZ0wS_R.mjs → insights_.distribution-B5V_NbK4.mjs} +17 -16
- package/.output/server/_ssr/{insights_.distribution-B8AMBp-Q.mjs → insights_.distribution-DongF2jp.mjs} +5 -5
- package/.output/server/_ssr/{installations-BfhcY_XQ.mjs → installations-B7w4LGJp.mjs} +4 -4
- package/.output/server/_ssr/{installations-CWTRzcR7.mjs → installations-B84kSetd.mjs} +2 -2
- package/.output/server/_ssr/{installations-O6Jzc5PO.mjs → installations-bieZA3xt.mjs} +13 -13
- package/.output/server/_ssr/ios-devices-rpc-DOQg4dpb.mjs +137 -0
- package/.output/server/_ssr/iosDeviceCookie-DhWNFpC6.mjs +155 -0
- package/.output/server/_ssr/iosDeviceProfile-jC8w4zEF.mjs +176 -0
- package/.output/server/_ssr/iosDevices-B4kQLURA.mjs +113 -0
- package/.output/server/_ssr/listReleases-QF91GLE7.mjs +94 -0
- package/.output/server/_ssr/{request-guard-CPdRBuGW.mjs → local-console-Dtxlsav0.mjs} +2 -9
- package/.output/server/_ssr/native-artifact-D4ZISXRZ.mjs +1517 -0
- package/.output/server/_ssr/native-builds-BU9Njiwm.mjs +696 -0
- package/.output/server/_ssr/native-builds-lEyKQemV.mjs +262 -0
- package/.output/server/_ssr/{native-builds-UIgRLMb8.mjs → native-builds-zpCsEYyA.mjs} +3 -3
- package/.output/server/_ssr/{native-builds_._buildId-DjUqI5sa.mjs → native-builds_._buildId-BJ4R32fq.mjs} +3 -3
- package/.output/server/_ssr/native-builds_._buildId-RHUotAYb.mjs +1148 -0
- package/.output/server/_ssr/native-builds_.devices-C0IlQkLv.mjs +10 -0
- package/.output/server/_ssr/native-builds_.devices-D1Ke-Fc-.mjs +820 -0
- package/.output/server/_ssr/nativeBuildDownloadLink-MCd5xUqP.mjs +96 -0
- package/.output/server/_ssr/nativeBuildInstall-DcsqDS-O.mjs +253 -0
- package/.output/server/_ssr/nativeBuilds-CRa36wNn.mjs +287 -0
- package/.output/server/_ssr/plistText-DkzlCfPI.mjs +15 -0
- package/.output/server/_ssr/{plugins-RIryUNWj.mjs → plugins-D9CCkDjn.mjs} +7 -6
- package/.output/server/_ssr/publicConsoleBase-wTKw3_iB.mjs +15 -0
- package/.output/server/_ssr/{release-adoption-DoAtNPED.mjs → release-adoption-gfhE5tz5.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-PLyiDnas.mjs → release-adoption-rpc-C4G_d8qK.mjs} +9 -9
- package/.output/server/_ssr/{releaseAdoption-a2byXMfz.mjs → releaseAdoption-DfEYq7I4.mjs} +4 -4
- package/.output/server/_ssr/{releaseCatalogCompiler-DLcean2k.mjs → releaseCatalogCompiler-CJ2Shida.mjs} +4 -3
- package/.output/server/_ssr/{releaseManagement-DHUux2az.mjs → releaseManagement-CqIc-SDE.mjs} +1 -1
- package/.output/server/_ssr/{releaseReachability-DZOK_dH-.mjs → releaseReachability-Ch1JpJkY.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-C5j4CfGa.mjs → remote-config-1QZ0HgEu.mjs} +3 -3
- package/.output/server/_ssr/{remote-config-eNxv5Kzc.mjs → remote-config-CsbpqWAR.mjs} +24 -23
- package/.output/server/_ssr/{remote-config-tOdzsFMi.mjs → remote-config-DkgBxBka.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-rpc-Cy4VwdMt.mjs → remote-config-rpc-KjJA9DC-.mjs} +5 -5
- package/.output/server/_ssr/request-guard-BPLyogIN.mjs +11 -0
- package/.output/server/_ssr/{router-DaQ6OkIp.mjs → router-Dy3fmb8q.mjs} +137 -64
- package/.output/server/_ssr/{routes-Drni4c1E.mjs → routes-68rZQGee.mjs} +470 -474
- package/.output/server/_ssr/{routes-BYmUIYfN.mjs → routes-Ug9uqzob.mjs} +50 -18
- package/.output/server/_ssr/{runtime.server-BdMY1blX.mjs → runtime.server-BUbb281Z.mjs} +4 -4
- package/.output/server/_ssr/{schema-ChlRtZIo.mjs → schema-CaIuQCXb.mjs} +1 -1
- package/.output/server/_ssr/{schema-migration-rpc-mZ_19Wt_.mjs → schema-migration-rpc-kntY9oPm.mjs} +4 -4
- package/.output/server/_ssr/{select-Cjrp1Sl9.mjs → select-BOKFFr_G.mjs} +12 -10
- package/.output/server/_ssr/{server-y3KoaSil.mjs → server-DetMvRBJ.mjs} +7 -7
- package/.output/server/_ssr/{sidebar-tRHVNWpo.mjs → sidebar-B46houn0.mjs} +17 -10
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-BvDsQehg.mjs → start-BSkL2B6C.mjs} +2 -2
- package/.output/server/_ssr/{switch-YrqCYfP-.mjs → switch-BMYzd71j.mjs} +4 -4
- package/.output/server/_ssr/{table-NHakBPSp.mjs → table-DWrYwJ_a.mjs} +2 -2
- package/.output/server/_ssr/tabs-DusHAcYy.mjs +45 -0
- package/.output/server/_ssr/{updateFailures-n-tGv90S.mjs → updateFailures-BwDwIoNu.mjs} +3 -3
- package/.output/server/_ssr/{dist-TEpM_UAD.mjs → uuid-kZvLA0Ly-DNL0qBSj.mjs} +2 -147
- package/.output/server/_ssr/{uuidv7-BIF4nb_q.mjs → uuidv7-C0jNe2Om.mjs} +2 -2
- package/.output/server/_ssr/{version-CQ98ZBpL-CWSkTT9J.mjs → version-CQ98ZBpL-zW2fpHOZ.mjs} +1 -1
- package/.output/server/_tanstack-start-manifest_v-CD1q5k0m.mjs +228 -0
- package/.output/server/index.mjs +503 -391
- package/lib/index.d.mts +9 -0
- package/package.json +7 -30
- package/src/components/AppSidebar.tsx +11 -2
- package/src/components/ChannelBadge.tsx +9 -9
- package/src/components/ChannelPicker.tsx +227 -0
- package/src/components/DataTable.tsx +363 -0
- package/src/components/FoldedRows.tsx +219 -0
- package/src/components/HashValueDisplay.tsx +6 -3
- package/src/components/PlatformIcon.tsx +10 -0
- package/src/components/RelativeTime.tsx +31 -0
- package/src/components/RowReason.tsx +56 -0
- package/src/components/TargetDisplay.tsx +95 -0
- package/src/components/ThemeProvider.tsx +11 -2
- package/src/components/features/api-keys/ApiKeysPage.tsx +5 -3
- package/src/components/features/bundles/BundleMetadata.tsx +1 -1
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +8 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +10 -11
- package/src/components/features/insights/AppUsage.tsx +3 -5
- package/src/components/features/insights/FailureReports.tsx +3 -2
- package/src/components/features/insights/InsightsControls.tsx +10 -69
- package/src/components/features/insights/InsightsOverview.tsx +7 -1
- package/src/components/features/insights/InsightsPageHeader.tsx +10 -15
- package/src/components/features/insights/ReleaseActivity.tsx +6 -2
- package/src/components/features/insights/ReleaseCombobox.tsx +1 -1
- package/src/components/features/insights/UpdateFailures.tsx +1 -0
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +122 -61
- package/src/components/features/native-builds/CommitLink.tsx +3 -2
- package/src/components/features/native-builds/ImportBuild.tsx +1 -1
- package/src/components/features/native-builds/InstallCard.tsx +316 -91
- package/src/components/features/native-builds/IosDevicesPage.tsx +1100 -0
- package/src/components/features/native-builds/IosInstall.tsx +732 -0
- package/src/components/features/native-builds/IpaDevicesCard.tsx +111 -0
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +30 -6
- package/src/components/features/native-builds/NativeBuildsNav.tsx +44 -0
- package/src/components/features/native-builds/NativeBuildsPage.tsx +94 -108
- package/src/components/features/native-builds/NativeBuildsTable.tsx +649 -323
- package/src/components/features/native-builds/OlderBuildLabel.tsx +61 -0
- package/src/components/features/native-builds/PatchesCard.tsx +28 -19
- package/src/components/features/native-builds/ReleaseNativeBuildLink.tsx +5 -5
- package/src/components/features/native-builds/SandboxBadge.tsx +21 -0
- package/src/components/features/native-builds/ServedNowCard.tsx +33 -1
- package/src/components/features/native-builds/ShortHash.tsx +6 -3
- package/src/components/features/native-builds/StoreSubmission.tsx +18 -12
- package/src/components/features/native-builds/playTracks.ts +7 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +8 -6
- package/src/components/features/remote-config/PublishDialog.tsx +4 -1
- package/src/components/features/remote-config/VersionsCard.tsx +5 -2
- package/src/components/ui/alert-dialog.tsx +2 -2
- package/src/components/ui/badge.tsx +2 -0
- package/src/components/ui/button.tsx +11 -2
- package/src/components/ui/combobox.tsx +2 -2
- package/src/components/ui/dialog.tsx +3 -3
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/select.tsx +15 -7
- package/src/components/ui/sheet.tsx +1 -1
- package/src/components/ui/sidebar.tsx +2 -2
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/sonner.tsx +3 -1
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/index.ts +9 -0
- package/src/lib/api-rpc.ts +125 -35
- package/src/lib/api.ts +160 -16
- package/src/lib/constants.ts +15 -0
- package/src/lib/insights-search.ts +0 -3
- package/src/lib/ios-devices-api.ts +290 -0
- package/src/lib/ios-devices-rpc.ts +188 -0
- package/src/lib/native-builds.ts +261 -20
- package/src/lib/server/console-runtime.server.ts +9 -2
- package/src/lib/server/deviceProfileToken.ts +221 -0
- package/src/lib/server/foldedPage.ts +360 -0
- package/src/lib/server/iosDeviceCookie.ts +239 -0
- package/src/lib/server/iosDeviceProfile.ts +232 -0
- package/src/lib/server/iosDevices.ts +193 -0
- package/src/lib/server/listReleases.ts +101 -62
- package/src/lib/server/local-console.ts +1 -1
- package/src/lib/server/nativeBuildDownloadLink.ts +193 -0
- package/src/lib/server/nativeBuildInstall.ts +502 -0
- package/src/lib/server/nativeBuilds.ts +314 -58
- package/src/lib/server/plistText.ts +17 -0
- package/src/lib/server/publicConsoleBase.ts +17 -0
- package/src/routeTree.gen.ts +129 -18
- package/src/routes/-native-builds-search.ts +52 -4
- package/src/routes/-releases-search.ts +63 -2
- package/src/routes/[_]hot-updater/devices/device-response.ts +21 -0
- package/src/routes/[_]hot-updater/devices/device[.]mobileconfig.ts +17 -0
- package/src/routes/[_]hot-updater/devices/receipt.ts +28 -0
- package/src/routes/[_]hot-updater/devices/request.ts +28 -0
- package/src/routes/[_]hot-updater/native-builds/$buildId/manifest[.]plist.ts +22 -0
- package/src/routes/api/native-builds/$buildId/download.ts +22 -1
- package/src/routes/index.tsx +657 -577
- package/src/routes/insights.tsx +3 -5
- package/src/routes/insights_.distribution.tsx +2 -2
- package/src/routes/native-builds_.devices.tsx +21 -0
- package/src/styles.css +24 -0
- package/.output/public/assets/-native-builds-search-C-TGpFAm.js +0 -1
- package/.output/public/assets/EventDetails-Dl2RvPAk.js +0 -1
- package/.output/public/assets/HashValueDisplay-6lNRxDJX.js +0 -1
- package/.output/public/assets/InsightsPageHeader-DHhqY3DT.js +0 -1
- package/.output/public/assets/RolloutPercentageBadge-Cxogpi8F.js +0 -1
- package/.output/public/assets/StoreSubmission-ViTkW4eJ.js +0 -1
- package/.output/public/assets/alert-dialog-BqYScr9y.js +0 -1
- package/.output/public/assets/api-P2g8dCNg.js +0 -1
- package/.output/public/assets/api-keys-DWQC2q6y.js +0 -1
- package/.output/public/assets/api-keys-FueRkF9q.js +0 -1
- package/.output/public/assets/arrow-left-g9cKqXuC.js +0 -1
- package/.output/public/assets/arrow-right-CNII8TYn.js +0 -1
- package/.output/public/assets/arrow-up-right-DK8Zdg40.js +0 -1
- package/.output/public/assets/badge-DWFcDWho.js +0 -1
- package/.output/public/assets/check-CXVR3s3X.js +0 -1
- package/.output/public/assets/chevron-right-BoUXo82O.js +0 -1
- package/.output/public/assets/dialog-CNUPxNxH.js +0 -1
- package/.output/public/assets/dist-CPlO6ko9.js +0 -1
- package/.output/public/assets/empty-B3Uwdd6k.js +0 -1
- package/.output/public/assets/field-D-2-mnNh.js +0 -1
- package/.output/public/assets/history-DqHlgSuV.js +0 -1
- package/.output/public/assets/index-CqP5HPV6.js +0 -10
- package/.output/public/assets/input-group-D3OUBk4n.js +0 -1
- package/.output/public/assets/insights-B-0odqpt.js +0 -42
- package/.output/public/assets/insights-BSVGfxSL.js +0 -1
- package/.output/public/assets/insights-NK5B6ReS.js +0 -2
- package/.output/public/assets/insights-api-BVCXJsoV.js +0 -1
- package/.output/public/assets/insights-search-DghCbEnk.js +0 -1
- package/.output/public/assets/insights-usage-rpc-CKQH0pUS.js +0 -1
- package/.output/public/assets/insights_.distribution-CJvgwcVZ.js +0 -2
- package/.output/public/assets/insights_.distribution-DblZM0mO.js +0 -1
- package/.output/public/assets/insights_.distribution-dvk6vYDM.js +0 -1
- package/.output/public/assets/installations-B674P5Z5.js +0 -2
- package/.output/public/assets/installations-BWxczZ2t.js +0 -1
- package/.output/public/assets/installations-Dv4kWQYz.js +0 -1
- package/.output/public/assets/native-builds-BOC71grI.js +0 -1
- package/.output/public/assets/native-builds-D6rldpSh.js +0 -2
- package/.output/public/assets/native-builds-DAy2678K.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DD58_Phd.js +0 -1
- package/.output/public/assets/native-builds_._buildId-DvQDKnUQ.js +0 -2
- package/.output/public/assets/plus-BReVKct-.js +0 -1
- package/.output/public/assets/preload-helper-B44EvKhG.js +0 -1
- package/.output/public/assets/refresh-cw-B9HHjLej.js +0 -1
- package/.output/public/assets/remote-config-B7ujqhLa.js +0 -6
- package/.output/public/assets/remote-config-WjpozBG5.js +0 -1
- package/.output/public/assets/remote-config-gXeH6PBW.js +0 -1
- package/.output/public/assets/routes-BDdBIxYS.js +0 -1
- package/.output/public/assets/routes-CCD33Azv.js +0 -2
- package/.output/public/assets/search-BCel4Oy6.js +0 -1
- package/.output/public/assets/select-CBIU0_M1.js +0 -1
- package/.output/public/assets/sidebar-Di9SN47G.js +0 -3
- package/.output/public/assets/smartphone-CMaSy_ir.js +0 -1
- package/.output/public/assets/styles-uK-0vUMk.css +0 -2
- package/.output/public/assets/switch-BpdiHL_t.js +0 -1
- package/.output/public/assets/table-Bpy3SvSo.js +0 -1
- package/.output/public/assets/tabs-Xmt7tZeG.js +0 -1
- package/.output/public/assets/useInfiniteQuery-DX4WpBRG.js +0 -1
- package/.output/public/assets/valueToPercent-BLwGy_xK.js +0 -1
- package/.output/server/_ssr/-native-builds-search-CwNcoXf4.mjs +0 -37
- package/.output/server/_ssr/RolloutPercentageBadge-CoBhJtv9.mjs +0 -21
- package/.output/server/_ssr/StoreSubmission-CPg_Rn5E.mjs +0 -139
- package/.output/server/_ssr/listReleases-D_GY00SQ.mjs +0 -79
- package/.output/server/_ssr/native-builds-BDcOlKnd.mjs +0 -510
- package/.output/server/_ssr/native-builds-DhXL5zf_.mjs +0 -137
- package/.output/server/_ssr/native-builds_._buildId-BjsdQO93.mjs +0 -813
- package/.output/server/_ssr/nativeBuildQr-84cnFQPX.mjs +0 -59
- package/.output/server/_ssr/nativeBuilds-B_7BPjt_.mjs +0 -133
- package/.output/server/_ssr/qr-code-C7kNRIDX.mjs +0 -22
- package/.output/server/_ssr/tabs-BgTTFotk.mjs +0 -45
- package/.output/server/_tanstack-start-manifest_v-B5nsO5L4.mjs +0 -184
- package/src/lib/server/nativeBuildQr.ts +0 -73
- package/src/routes/[_]hot-updater/native-builds/qr.ts +0 -14
|
@@ -0,0 +1,1100 @@
|
|
|
1
|
+
import {
|
|
2
|
+
extractTimestampFromUUIDv7,
|
|
3
|
+
type IosDeviceRow,
|
|
4
|
+
type IosDeviceStatus,
|
|
5
|
+
} from "@hot-updater/plugin-core";
|
|
6
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
7
|
+
import { Link } from "@tanstack/react-router";
|
|
8
|
+
import dayjs from "dayjs";
|
|
9
|
+
import {
|
|
10
|
+
AlertTriangle,
|
|
11
|
+
Check,
|
|
12
|
+
HardDrive,
|
|
13
|
+
Loader2,
|
|
14
|
+
MoreHorizontal,
|
|
15
|
+
Pencil,
|
|
16
|
+
RefreshCw,
|
|
17
|
+
Smartphone,
|
|
18
|
+
Trash2,
|
|
19
|
+
} from "lucide-react";
|
|
20
|
+
import { type FormEvent, useEffect, useRef, useState } from "react";
|
|
21
|
+
|
|
22
|
+
import {
|
|
23
|
+
DataCard,
|
|
24
|
+
DataCardSkeletons,
|
|
25
|
+
DataCardsEmpty,
|
|
26
|
+
DataTable,
|
|
27
|
+
DataTableEmpty,
|
|
28
|
+
DataTableFrame,
|
|
29
|
+
DataTableFullRow,
|
|
30
|
+
DataTableSkeletonRows,
|
|
31
|
+
} from "@/components/DataTable";
|
|
32
|
+
import { QrCode } from "@/components/QrCode";
|
|
33
|
+
import { RelativeTime } from "@/components/RelativeTime";
|
|
34
|
+
import { NoValue } from "@/components/TargetDisplay";
|
|
35
|
+
import {
|
|
36
|
+
Alert,
|
|
37
|
+
AlertAction,
|
|
38
|
+
AlertDescription,
|
|
39
|
+
AlertTitle,
|
|
40
|
+
} from "@/components/ui/alert";
|
|
41
|
+
import {
|
|
42
|
+
AlertDialog,
|
|
43
|
+
AlertDialogAction,
|
|
44
|
+
AlertDialogCancel,
|
|
45
|
+
AlertDialogContent,
|
|
46
|
+
AlertDialogDescription,
|
|
47
|
+
AlertDialogFooter,
|
|
48
|
+
AlertDialogHeader,
|
|
49
|
+
AlertDialogTitle,
|
|
50
|
+
} from "@/components/ui/alert-dialog";
|
|
51
|
+
import { Badge } from "@/components/ui/badge";
|
|
52
|
+
import { Button, buttonVariants } from "@/components/ui/button";
|
|
53
|
+
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
54
|
+
import {
|
|
55
|
+
Dialog,
|
|
56
|
+
DialogContent,
|
|
57
|
+
DialogDescription,
|
|
58
|
+
DialogFooter,
|
|
59
|
+
DialogHeader,
|
|
60
|
+
DialogTitle,
|
|
61
|
+
} from "@/components/ui/dialog";
|
|
62
|
+
import {
|
|
63
|
+
DropdownMenu,
|
|
64
|
+
DropdownMenuContent,
|
|
65
|
+
DropdownMenuItem,
|
|
66
|
+
DropdownMenuSeparator,
|
|
67
|
+
DropdownMenuTrigger,
|
|
68
|
+
} from "@/components/ui/dropdown-menu";
|
|
69
|
+
import {
|
|
70
|
+
Field,
|
|
71
|
+
FieldDescription,
|
|
72
|
+
FieldError,
|
|
73
|
+
FieldGroup,
|
|
74
|
+
FieldLabel,
|
|
75
|
+
} from "@/components/ui/field";
|
|
76
|
+
import { Input } from "@/components/ui/input";
|
|
77
|
+
import {
|
|
78
|
+
Select,
|
|
79
|
+
SelectContent,
|
|
80
|
+
SelectGroup,
|
|
81
|
+
SelectItem,
|
|
82
|
+
SelectTrigger,
|
|
83
|
+
SelectValue,
|
|
84
|
+
} from "@/components/ui/select";
|
|
85
|
+
import { SidebarTrigger } from "@/components/ui/sidebar";
|
|
86
|
+
import { Skeleton } from "@/components/ui/skeleton";
|
|
87
|
+
import { TableCell, TableHead, TableRow } from "@/components/ui/table";
|
|
88
|
+
import { useIsMobile } from "@/hooks/use-mobile";
|
|
89
|
+
import {
|
|
90
|
+
iosDeviceKeys,
|
|
91
|
+
useApproveIosDeviceMutation,
|
|
92
|
+
keptIsThisIphone,
|
|
93
|
+
useIosDeviceProfileLinkQuery,
|
|
94
|
+
useIosDeviceQuery,
|
|
95
|
+
useKeptIosDeviceQuery,
|
|
96
|
+
useRequestThisIphoneMutation,
|
|
97
|
+
useIosDevicesQuery,
|
|
98
|
+
useRemoveIosDeviceMutation,
|
|
99
|
+
useRenameIosDeviceMutation,
|
|
100
|
+
} from "@/lib/ios-devices-api";
|
|
101
|
+
import type { IosDevicesView } from "@/lib/ios-devices-rpc";
|
|
102
|
+
import {
|
|
103
|
+
consolePathOf,
|
|
104
|
+
IOS_DEVICES_ADD_COMMAND,
|
|
105
|
+
IOS_DEVICES_PATH,
|
|
106
|
+
iosDeviceProfileUrl,
|
|
107
|
+
maskIosUdid,
|
|
108
|
+
} from "@/lib/native-builds";
|
|
109
|
+
import type { IosDevicesSearch } from "@/routes/-native-builds-search";
|
|
110
|
+
|
|
111
|
+
import { CopyableText } from "./CopyableText";
|
|
112
|
+
import {
|
|
113
|
+
AppleRefusal,
|
|
114
|
+
type IosDevice,
|
|
115
|
+
useAdoptKeptIosDevice,
|
|
116
|
+
useIosDevice,
|
|
117
|
+
} from "./IosInstall";
|
|
118
|
+
import { NativeBuildsNav } from "./NativeBuildsNav";
|
|
119
|
+
|
|
120
|
+
const STATUS_LABELS: Record<IosDeviceStatus, string> = {
|
|
121
|
+
pending: "Requested",
|
|
122
|
+
approved: "Approved",
|
|
123
|
+
registered: "Registered",
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Only a request waits on someone, so only it takes a status color; the
|
|
128
|
+
* other states are the normal course and stay neutral.
|
|
129
|
+
*/
|
|
130
|
+
const STATUS_BADGES: Record<
|
|
131
|
+
IosDeviceStatus,
|
|
132
|
+
"warning" | "secondary" | "muted"
|
|
133
|
+
> = {
|
|
134
|
+
pending: "warning",
|
|
135
|
+
approved: "secondary",
|
|
136
|
+
registered: "muted",
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
const ALL = "all";
|
|
140
|
+
const COLUMNS = 6;
|
|
141
|
+
|
|
142
|
+
type Viewer = IosDevicesView["viewer"];
|
|
143
|
+
|
|
144
|
+
/** The Console's path from this page, so links work under a base path. */
|
|
145
|
+
const consolePath = () =>
|
|
146
|
+
window.location.pathname.endsWith(IOS_DEVICES_PATH)
|
|
147
|
+
? window.location.pathname.slice(0, -IOS_DEVICES_PATH.length)
|
|
148
|
+
: consolePathOf(window.location, "");
|
|
149
|
+
|
|
150
|
+
/** Who may act on a row, decided again on the server. */
|
|
151
|
+
const actionsFor = (device: IosDeviceRow, viewer: Viewer) => ({
|
|
152
|
+
approve: viewer.canApprove && device.status === "pending",
|
|
153
|
+
rename: viewer.canApprove,
|
|
154
|
+
remove: viewer.canApprove,
|
|
155
|
+
withdraw:
|
|
156
|
+
!viewer.canApprove &&
|
|
157
|
+
device.status === "pending" &&
|
|
158
|
+
device.requested_by === viewer.email,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Apple's refusal of an approved device is the row an approver acts on, so it
|
|
163
|
+
* takes the warning in place of Approved; the other states stay neutral.
|
|
164
|
+
*/
|
|
165
|
+
const appleRefused = (device: IosDeviceRow) =>
|
|
166
|
+
device.status === "approved" && device.apple_error !== null;
|
|
167
|
+
|
|
168
|
+
/** Who asked for a device: a person, or a terminal for one the CLI added. */
|
|
169
|
+
const requesterOf = (device: IosDeviceRow) =>
|
|
170
|
+
device.requested_by ?? "Added from a terminal";
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Apple's reason. In a table cell it wraps at most two lines in a narrow
|
|
174
|
+
* column, the full text on hover and to a screen reader, so a long reason
|
|
175
|
+
* never widens the table past its frame; a card shows all of it.
|
|
176
|
+
*/
|
|
177
|
+
function AppleError({
|
|
178
|
+
device,
|
|
179
|
+
inTable = false,
|
|
180
|
+
}: {
|
|
181
|
+
readonly device: IosDeviceRow;
|
|
182
|
+
readonly inTable?: boolean;
|
|
183
|
+
}) {
|
|
184
|
+
if (device.apple_error === null) return null;
|
|
185
|
+
return inTable ? (
|
|
186
|
+
<span
|
|
187
|
+
className="line-clamp-2 max-w-48 text-xs whitespace-normal text-muted-foreground"
|
|
188
|
+
title={device.apple_error}
|
|
189
|
+
>
|
|
190
|
+
{device.apple_error}
|
|
191
|
+
</span>
|
|
192
|
+
) : (
|
|
193
|
+
<span className="max-w-64 text-xs whitespace-normal text-muted-foreground">
|
|
194
|
+
{device.apple_error}
|
|
195
|
+
</span>
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function DeviceStatus({
|
|
200
|
+
device,
|
|
201
|
+
withError = true,
|
|
202
|
+
}: {
|
|
203
|
+
readonly device: IosDeviceRow;
|
|
204
|
+
/** Apple's reason under the badge; a card shows it on its own line. */
|
|
205
|
+
readonly withError?: boolean;
|
|
206
|
+
}) {
|
|
207
|
+
return (
|
|
208
|
+
<div className="flex min-w-0 shrink-0 flex-col items-start gap-1">
|
|
209
|
+
{appleRefused(device) ? (
|
|
210
|
+
<Badge variant="warning">Apple refused</Badge>
|
|
211
|
+
) : (
|
|
212
|
+
<Badge variant={STATUS_BADGES[device.status]}>
|
|
213
|
+
{STATUS_LABELS[device.status]}
|
|
214
|
+
</Badge>
|
|
215
|
+
)}
|
|
216
|
+
{withError ? <AppleError device={device} inTable /> : null}
|
|
217
|
+
</div>
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function DeviceBuild({ device }: { readonly device: IosDeviceRow }) {
|
|
222
|
+
if (device.build_id === null) {
|
|
223
|
+
return <NoValue />;
|
|
224
|
+
}
|
|
225
|
+
let label = "A build";
|
|
226
|
+
try {
|
|
227
|
+
label = `Build of ${dayjs(extractTimestampFromUUIDv7(device.build_id)).format("MMM D")}`;
|
|
228
|
+
} catch {
|
|
229
|
+
// An ID that isn't a UUIDv7 keeps the plain label.
|
|
230
|
+
}
|
|
231
|
+
return (
|
|
232
|
+
<Link
|
|
233
|
+
className="text-xs font-medium underline-offset-4 hover:underline"
|
|
234
|
+
params={{ buildId: device.build_id }}
|
|
235
|
+
to="/native-builds/$buildId"
|
|
236
|
+
>
|
|
237
|
+
{label}
|
|
238
|
+
</Link>
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
type NameTarget = {
|
|
243
|
+
readonly kind: "approve" | "rename";
|
|
244
|
+
readonly device: IosDeviceRow;
|
|
245
|
+
};
|
|
246
|
+
type DialogTarget =
|
|
247
|
+
| NameTarget
|
|
248
|
+
| { readonly kind: "remove"; readonly device: IosDeviceRow }
|
|
249
|
+
| null;
|
|
250
|
+
|
|
251
|
+
function DeviceActions({
|
|
252
|
+
device,
|
|
253
|
+
viewer,
|
|
254
|
+
onOpen,
|
|
255
|
+
}: {
|
|
256
|
+
readonly device: IosDeviceRow;
|
|
257
|
+
readonly viewer: Viewer;
|
|
258
|
+
readonly onOpen: (target: DialogTarget) => void;
|
|
259
|
+
}) {
|
|
260
|
+
const can = actionsFor(device, viewer);
|
|
261
|
+
if (!can.approve && !can.rename && !can.remove && !can.withdraw) return null;
|
|
262
|
+
return (
|
|
263
|
+
<div className="flex items-center justify-end gap-1">
|
|
264
|
+
{can.approve ? (
|
|
265
|
+
<Button
|
|
266
|
+
className="h-11 sm:h-8"
|
|
267
|
+
onClick={() => onOpen({ kind: "approve", device })}
|
|
268
|
+
size="sm"
|
|
269
|
+
>
|
|
270
|
+
<Check data-icon="inline-start" />
|
|
271
|
+
Approve
|
|
272
|
+
</Button>
|
|
273
|
+
) : null}
|
|
274
|
+
{can.withdraw ? (
|
|
275
|
+
<Button
|
|
276
|
+
className="h-11 sm:h-8"
|
|
277
|
+
onClick={() => onOpen({ kind: "remove", device })}
|
|
278
|
+
size="sm"
|
|
279
|
+
variant="outline"
|
|
280
|
+
>
|
|
281
|
+
Withdraw
|
|
282
|
+
</Button>
|
|
283
|
+
) : null}
|
|
284
|
+
{can.rename || can.remove ? (
|
|
285
|
+
<DropdownMenu>
|
|
286
|
+
<DropdownMenuTrigger
|
|
287
|
+
render={
|
|
288
|
+
<Button
|
|
289
|
+
aria-label={`More actions for ${device.name}`}
|
|
290
|
+
className="size-11 sm:size-8"
|
|
291
|
+
size="icon-sm"
|
|
292
|
+
variant="ghost"
|
|
293
|
+
/>
|
|
294
|
+
}
|
|
295
|
+
>
|
|
296
|
+
<MoreHorizontal aria-hidden="true" />
|
|
297
|
+
</DropdownMenuTrigger>
|
|
298
|
+
<DropdownMenuContent align="end">
|
|
299
|
+
<DropdownMenuItem
|
|
300
|
+
onClick={() => onOpen({ kind: "rename", device })}
|
|
301
|
+
>
|
|
302
|
+
<Pencil aria-hidden="true" />
|
|
303
|
+
Rename
|
|
304
|
+
</DropdownMenuItem>
|
|
305
|
+
<DropdownMenuSeparator />
|
|
306
|
+
<DropdownMenuItem
|
|
307
|
+
onClick={() => onOpen({ kind: "remove", device })}
|
|
308
|
+
variant="destructive"
|
|
309
|
+
>
|
|
310
|
+
<Trash2 aria-hidden="true" />
|
|
311
|
+
{device.status === "pending" ? "Decline" : "Remove"}
|
|
312
|
+
</DropdownMenuItem>
|
|
313
|
+
</DropdownMenuContent>
|
|
314
|
+
</DropdownMenu>
|
|
315
|
+
) : null}
|
|
316
|
+
</div>
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* "This iPhone" on the row of the iPhone this page is open on: a quiet tag,
|
|
322
|
+
* as "Sandbox" is on a build, so its actions are found where every row's are.
|
|
323
|
+
*/
|
|
324
|
+
function ThisIphoneTag() {
|
|
325
|
+
return (
|
|
326
|
+
<Badge className="shrink-0 px-1.5" variant="muted">
|
|
327
|
+
This iPhone
|
|
328
|
+
</Badge>
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
function DeviceRow({
|
|
333
|
+
device,
|
|
334
|
+
viewer,
|
|
335
|
+
onOpen,
|
|
336
|
+
isThisIphone,
|
|
337
|
+
}: {
|
|
338
|
+
readonly device: IosDeviceRow;
|
|
339
|
+
readonly viewer: Viewer;
|
|
340
|
+
readonly onOpen: (target: DialogTarget) => void;
|
|
341
|
+
readonly isThisIphone: boolean;
|
|
342
|
+
}) {
|
|
343
|
+
return (
|
|
344
|
+
<TableRow>
|
|
345
|
+
<TableCell className="font-medium">
|
|
346
|
+
<span className="flex items-center gap-1.5">
|
|
347
|
+
{device.name}
|
|
348
|
+
{isThisIphone ? <ThisIphoneTag /> : null}
|
|
349
|
+
</span>
|
|
350
|
+
</TableCell>
|
|
351
|
+
<TableCell>
|
|
352
|
+
<span className="font-mono text-xs" title={device.udid} translate="no">
|
|
353
|
+
{maskIosUdid(device.udid)}
|
|
354
|
+
</span>
|
|
355
|
+
</TableCell>
|
|
356
|
+
<TableCell className="text-xs">
|
|
357
|
+
{device.requested_by ?? (
|
|
358
|
+
<span className="text-muted-foreground">{requesterOf(device)}</span>
|
|
359
|
+
)}
|
|
360
|
+
</TableCell>
|
|
361
|
+
<TableCell>
|
|
362
|
+
<DeviceStatus device={device} />
|
|
363
|
+
</TableCell>
|
|
364
|
+
<TableCell className="text-xs">
|
|
365
|
+
<RelativeTime ms={device.created_at_ms} />
|
|
366
|
+
</TableCell>
|
|
367
|
+
<TableCell>
|
|
368
|
+
<DeviceBuild device={device} />
|
|
369
|
+
</TableCell>
|
|
370
|
+
<TableCell className="text-right">
|
|
371
|
+
<DeviceActions device={device} onOpen={onOpen} viewer={viewer} />
|
|
372
|
+
</TableCell>
|
|
373
|
+
</TableRow>
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
function DeviceCard({
|
|
378
|
+
device,
|
|
379
|
+
viewer,
|
|
380
|
+
onOpen,
|
|
381
|
+
isThisIphone,
|
|
382
|
+
}: {
|
|
383
|
+
readonly device: IosDeviceRow;
|
|
384
|
+
readonly viewer: Viewer;
|
|
385
|
+
readonly onOpen: (target: DialogTarget) => void;
|
|
386
|
+
readonly isThisIphone: boolean;
|
|
387
|
+
}) {
|
|
388
|
+
return (
|
|
389
|
+
<DataCard className="cursor-default gap-3">
|
|
390
|
+
<div className="flex min-w-0 items-start justify-between gap-3">
|
|
391
|
+
<div className="flex min-w-0 flex-col gap-0.5">
|
|
392
|
+
<p className="flex min-w-0 items-center gap-1.5 text-sm font-medium">
|
|
393
|
+
<span className="truncate">{device.name}</span>
|
|
394
|
+
{isThisIphone ? <ThisIphoneTag /> : null}
|
|
395
|
+
</p>
|
|
396
|
+
<p className="font-mono text-xs text-muted-foreground" translate="no">
|
|
397
|
+
{maskIosUdid(device.udid)}
|
|
398
|
+
</p>
|
|
399
|
+
</div>
|
|
400
|
+
<DeviceStatus device={device} withError={false} />
|
|
401
|
+
</div>
|
|
402
|
+
<AppleError device={device} />
|
|
403
|
+
<p className="flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground">
|
|
404
|
+
<span>{requesterOf(device)}</span>
|
|
405
|
+
<span aria-hidden="true">·</span>
|
|
406
|
+
<RelativeTime ms={device.created_at_ms} />
|
|
407
|
+
{device.build_id === null ? null : (
|
|
408
|
+
<>
|
|
409
|
+
<span aria-hidden="true">·</span>
|
|
410
|
+
<DeviceBuild device={device} />
|
|
411
|
+
</>
|
|
412
|
+
)}
|
|
413
|
+
</p>
|
|
414
|
+
<DeviceActions device={device} onOpen={onOpen} viewer={viewer} />
|
|
415
|
+
</DataCard>
|
|
416
|
+
);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/** Name a device: approving a request, or renaming any device. */
|
|
420
|
+
function NameDialog({
|
|
421
|
+
target,
|
|
422
|
+
onClose,
|
|
423
|
+
}: {
|
|
424
|
+
readonly target: NameTarget;
|
|
425
|
+
readonly onClose: () => void;
|
|
426
|
+
}) {
|
|
427
|
+
const approve = useApproveIosDeviceMutation();
|
|
428
|
+
const rename = useRenameIosDeviceMutation();
|
|
429
|
+
const mutation = target.kind === "approve" ? approve : rename;
|
|
430
|
+
const [name, setName] = useState(target.device.name);
|
|
431
|
+
const trimmed = name.trim();
|
|
432
|
+
const submit = (event: FormEvent) => {
|
|
433
|
+
event.preventDefault();
|
|
434
|
+
if (trimmed === "") return;
|
|
435
|
+
mutation.mutate(
|
|
436
|
+
{ id: target.device.id, name: trimmed },
|
|
437
|
+
{ onSuccess: onClose },
|
|
438
|
+
);
|
|
439
|
+
};
|
|
440
|
+
return (
|
|
441
|
+
<Dialog onOpenChange={(open) => (open ? null : onClose())} open>
|
|
442
|
+
<DialogContent>
|
|
443
|
+
<DialogHeader>
|
|
444
|
+
<DialogTitle>
|
|
445
|
+
{target.kind === "approve"
|
|
446
|
+
? `Approve ${target.device.name}?`
|
|
447
|
+
: `Rename ${target.device.name}`}
|
|
448
|
+
</DialogTitle>
|
|
449
|
+
<DialogDescription>
|
|
450
|
+
{target.kind === "approve"
|
|
451
|
+
? "The next ad hoc build registers this iPhone with your Apple account. Each new iPhone uses one of the account's 100 a year, and removing it never gives the slot back."
|
|
452
|
+
: "The registry shows this name. The next ad hoc build doesn't rename it at Apple."}
|
|
453
|
+
</DialogDescription>
|
|
454
|
+
</DialogHeader>
|
|
455
|
+
<form onSubmit={submit}>
|
|
456
|
+
<FieldGroup>
|
|
457
|
+
{target.kind === "approve" ? (
|
|
458
|
+
<dl className="grid grid-cols-[auto_minmax(0,1fr)] gap-x-4 gap-y-1 text-sm">
|
|
459
|
+
<dt className="text-muted-foreground">Requested by</dt>
|
|
460
|
+
<dd className="truncate">
|
|
461
|
+
{target.device.requested_by ?? "Terminal (CLI)"}
|
|
462
|
+
</dd>
|
|
463
|
+
<dt className="text-muted-foreground">UDID</dt>
|
|
464
|
+
{/* All of it, to check against Finder: a phone has no hover. */}
|
|
465
|
+
<dd
|
|
466
|
+
className="font-mono text-xs break-all select-all"
|
|
467
|
+
translate="no"
|
|
468
|
+
>
|
|
469
|
+
{target.device.udid}
|
|
470
|
+
</dd>
|
|
471
|
+
</dl>
|
|
472
|
+
) : null}
|
|
473
|
+
<Field data-invalid={mutation.isError || undefined}>
|
|
474
|
+
<FieldLabel htmlFor="ios-device-dialog-name">Name</FieldLabel>
|
|
475
|
+
<Input
|
|
476
|
+
autoComplete="off"
|
|
477
|
+
id="ios-device-dialog-name"
|
|
478
|
+
maxLength={100}
|
|
479
|
+
onChange={(event) => setName(event.target.value)}
|
|
480
|
+
value={name}
|
|
481
|
+
/>
|
|
482
|
+
{target.kind === "approve" ? (
|
|
483
|
+
<FieldDescription>
|
|
484
|
+
The iPhone's ID comes from the person who asked. Approve
|
|
485
|
+
devices you recognize.
|
|
486
|
+
</FieldDescription>
|
|
487
|
+
) : null}
|
|
488
|
+
<FieldError>
|
|
489
|
+
{mutation.isError
|
|
490
|
+
? `Couldn't ${target.kind === "approve" ? "approve" : "rename"} ${target.device.name}. Check your connection and try again.`
|
|
491
|
+
: null}
|
|
492
|
+
</FieldError>
|
|
493
|
+
</Field>
|
|
494
|
+
</FieldGroup>
|
|
495
|
+
<DialogFooter className="mt-4">
|
|
496
|
+
<Button
|
|
497
|
+
className="h-11 sm:h-8"
|
|
498
|
+
disabled={trimmed === "" || mutation.isPending}
|
|
499
|
+
type="submit"
|
|
500
|
+
>
|
|
501
|
+
{mutation.isPending ? (
|
|
502
|
+
<Loader2
|
|
503
|
+
className="animate-spin motion-reduce:animate-none"
|
|
504
|
+
data-icon="inline-start"
|
|
505
|
+
/>
|
|
506
|
+
) : (
|
|
507
|
+
<Check data-icon="inline-start" />
|
|
508
|
+
)}
|
|
509
|
+
{target.kind === "approve" ? "Approve" : "Rename"}
|
|
510
|
+
</Button>
|
|
511
|
+
</DialogFooter>
|
|
512
|
+
</form>
|
|
513
|
+
</DialogContent>
|
|
514
|
+
</Dialog>
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
function RemoveDialog({
|
|
519
|
+
device,
|
|
520
|
+
viewer,
|
|
521
|
+
onClose,
|
|
522
|
+
}: {
|
|
523
|
+
readonly device: IosDeviceRow;
|
|
524
|
+
readonly viewer: Viewer;
|
|
525
|
+
readonly onClose: () => void;
|
|
526
|
+
}) {
|
|
527
|
+
const remove = useRemoveIosDeviceMutation();
|
|
528
|
+
const withdraw = !viewer.canApprove;
|
|
529
|
+
const decline = device.status === "pending";
|
|
530
|
+
return (
|
|
531
|
+
<AlertDialog onOpenChange={(open) => (open ? null : onClose())} open>
|
|
532
|
+
<AlertDialogContent>
|
|
533
|
+
<AlertDialogHeader>
|
|
534
|
+
<AlertDialogTitle>
|
|
535
|
+
{withdraw
|
|
536
|
+
? `Withdraw ${device.name}?`
|
|
537
|
+
: decline
|
|
538
|
+
? `Decline ${device.name}?`
|
|
539
|
+
: `Remove ${device.name}?`}
|
|
540
|
+
</AlertDialogTitle>
|
|
541
|
+
<AlertDialogDescription>
|
|
542
|
+
{decline
|
|
543
|
+
? "It leaves the list. Its owner can request it again."
|
|
544
|
+
: "It leaves the list. New ad hoc builds keep it until it's disabled at Apple."}
|
|
545
|
+
</AlertDialogDescription>
|
|
546
|
+
</AlertDialogHeader>
|
|
547
|
+
{remove.isError ? (
|
|
548
|
+
<p className="text-xs text-destructive" role="alert">
|
|
549
|
+
Couldn't {withdraw ? "withdraw" : decline ? "decline" : "remove"}{" "}
|
|
550
|
+
{device.name}. Check your connection and try again.
|
|
551
|
+
</p>
|
|
552
|
+
) : null}
|
|
553
|
+
<AlertDialogFooter>
|
|
554
|
+
<AlertDialogCancel disabled={remove.isPending}>
|
|
555
|
+
Cancel
|
|
556
|
+
</AlertDialogCancel>
|
|
557
|
+
<AlertDialogAction
|
|
558
|
+
disabled={remove.isPending}
|
|
559
|
+
onClick={(event) => {
|
|
560
|
+
event.preventDefault();
|
|
561
|
+
remove.mutate({ udid: device.udid }, { onSuccess: onClose });
|
|
562
|
+
}}
|
|
563
|
+
variant="destructive"
|
|
564
|
+
>
|
|
565
|
+
{remove.isPending ? (
|
|
566
|
+
<Loader2
|
|
567
|
+
className="animate-spin motion-reduce:animate-none"
|
|
568
|
+
data-icon="inline-start"
|
|
569
|
+
/>
|
|
570
|
+
) : null}
|
|
571
|
+
{withdraw ? "Withdraw" : decline ? "Decline" : "Remove"}
|
|
572
|
+
</AlertDialogAction>
|
|
573
|
+
</AlertDialogFooter>
|
|
574
|
+
</AlertDialogContent>
|
|
575
|
+
</AlertDialog>
|
|
576
|
+
);
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Where this iPhone stands, once its profile has answered: its row's name,
|
|
581
|
+
* status, and what happens next, in place of the form that registered it.
|
|
582
|
+
* It has no actions: they are on its row in the list, tagged "This iPhone",
|
|
583
|
+
* as every row's are. Apple's refusal reads as on a build's page.
|
|
584
|
+
*/
|
|
585
|
+
function ThisIphone({
|
|
586
|
+
device,
|
|
587
|
+
viewer,
|
|
588
|
+
}: {
|
|
589
|
+
readonly device: IosDeviceRow;
|
|
590
|
+
/** Unknown until the list loads. */
|
|
591
|
+
readonly viewer: Viewer | undefined;
|
|
592
|
+
}) {
|
|
593
|
+
const canApprove = viewer?.canApprove === true;
|
|
594
|
+
if (device.apple_error !== null) {
|
|
595
|
+
return (
|
|
596
|
+
<AppleRefusal canApprove={canApprove} device={device} onDevicesPage />
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
return (
|
|
600
|
+
<div className="flex min-w-0 flex-col gap-3">
|
|
601
|
+
<div className="flex min-w-0 items-start justify-between gap-3">
|
|
602
|
+
<div className="flex min-w-0 flex-col gap-0.5">
|
|
603
|
+
<p className="truncate text-sm font-medium">{device.name}</p>
|
|
604
|
+
<p className="font-mono text-xs text-muted-foreground" translate="no">
|
|
605
|
+
{maskIosUdid(device.udid)}
|
|
606
|
+
</p>
|
|
607
|
+
</div>
|
|
608
|
+
<DeviceStatus device={device} withError={false} />
|
|
609
|
+
</div>
|
|
610
|
+
<p className="text-xs text-muted-foreground" role="status">
|
|
611
|
+
{device.status === "pending"
|
|
612
|
+
? canApprove
|
|
613
|
+
? "Approve it below, and it joins the next ad hoc build."
|
|
614
|
+
: "A maintainer approves it next."
|
|
615
|
+
: device.status === "approved"
|
|
616
|
+
? "It joins the next ad hoc build."
|
|
617
|
+
: "New ad hoc builds install on it."}
|
|
618
|
+
</p>
|
|
619
|
+
</div>
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** Why iPhones can't register through this Console. */
|
|
624
|
+
function RegistrationNotice({
|
|
625
|
+
status,
|
|
626
|
+
secretName,
|
|
627
|
+
}: {
|
|
628
|
+
readonly status: "local-console" | "no-secret";
|
|
629
|
+
/** The secret to set, for `no-secret`. */
|
|
630
|
+
readonly secretName?: string;
|
|
631
|
+
}) {
|
|
632
|
+
return (
|
|
633
|
+
<p className="text-xs text-muted-foreground" role="status">
|
|
634
|
+
{status === "local-console"
|
|
635
|
+
? "iPhones register through your hosted Console: an iPhone can't reach this computer's."
|
|
636
|
+
: `Set ${secretName} on this Console to register iPhones.`}
|
|
637
|
+
</p>
|
|
638
|
+
);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Where an iPhone joins the list: on a computer, a QR code of this page; on
|
|
643
|
+
* the iPhone, its name and the profile that reads its UDID, signed for the
|
|
644
|
+
* person who is signed in.
|
|
645
|
+
*/
|
|
646
|
+
function RegisterCard({
|
|
647
|
+
view,
|
|
648
|
+
phone,
|
|
649
|
+
}: {
|
|
650
|
+
readonly view: IosDevicesView | undefined;
|
|
651
|
+
/** This iPhone as `useIosDevice` reads it, null until the page mounts. */
|
|
652
|
+
readonly phone: IosDevice | null;
|
|
653
|
+
}) {
|
|
654
|
+
const [name, setName] = useState<string | null>(null);
|
|
655
|
+
const typed = name ?? view?.defaultName ?? "";
|
|
656
|
+
// The link is signed for the name as typed; a pause before signing again.
|
|
657
|
+
const [signed, setSigned] = useState(typed);
|
|
658
|
+
useEffect(() => {
|
|
659
|
+
const timer = setTimeout(() => setSigned(typed.trim()), 400);
|
|
660
|
+
return () => clearTimeout(timer);
|
|
661
|
+
}, [typed]);
|
|
662
|
+
const onPhone = phone?.ios === true;
|
|
663
|
+
const link = useIosDeviceProfileLinkQuery(
|
|
664
|
+
{ mode: "register", name: signed || "iPhone" },
|
|
665
|
+
onPhone && view?.registration === "ready",
|
|
666
|
+
);
|
|
667
|
+
const https = phone === null || window.location.protocol === "https:";
|
|
668
|
+
// Once its profile has answered, this iPhone's own row, whatever the list
|
|
669
|
+
// shows: after a reload, or in the tab Safari came back to.
|
|
670
|
+
const udid = onPhone ? phone.udid : null;
|
|
671
|
+
const mine = useIosDeviceQuery(udid);
|
|
672
|
+
// A new answer with the same UDID, such as a removed iPhone registering
|
|
673
|
+
// again, reads its row again: the key didn't change, so nothing else would.
|
|
674
|
+
// A new UDID changes the key, which reads it; a computer reads nothing.
|
|
675
|
+
const answers = phone?.answers ?? 0;
|
|
676
|
+
const { refetch } = mine;
|
|
677
|
+
const seen = useRef({ udid, answers });
|
|
678
|
+
useEffect(() => {
|
|
679
|
+
const before = seen.current;
|
|
680
|
+
seen.current = { udid, answers };
|
|
681
|
+
if (udid !== null && udid === before.udid && answers > before.answers) {
|
|
682
|
+
void refetch();
|
|
683
|
+
}
|
|
684
|
+
}, [udid, answers, refetch]);
|
|
685
|
+
// This Safari's proof of the iPhone, an HttpOnly cookie: the register
|
|
686
|
+
// answer's fresh receipt is traded for it, and a phone with no row requests
|
|
687
|
+
// itself again with it, without the profile, for the same person only.
|
|
688
|
+
const path = phone === null ? "" : consolePath();
|
|
689
|
+
// Also the identity of a phone whose storage Safari wiped: the cookie
|
|
690
|
+
// names it, once, and the page adopts it.
|
|
691
|
+
const kept = useKeptIosDeviceQuery(
|
|
692
|
+
path,
|
|
693
|
+
phone?.receipt ?? null,
|
|
694
|
+
onPhone &&
|
|
695
|
+
view?.registration === "ready" &&
|
|
696
|
+
(udid === null || phone.receipt !== null || mine.data === null),
|
|
697
|
+
);
|
|
698
|
+
useAdoptKeptIosDevice(phone, kept.data?.udid);
|
|
699
|
+
const again = useRequestThisIphoneMutation(path);
|
|
700
|
+
const proved = onPhone && keptIsThisIphone(kept.data?.udid, phone.udid);
|
|
701
|
+
|
|
702
|
+
const body = (() => {
|
|
703
|
+
// The server renders this without a browser: where it is and what it is
|
|
704
|
+
// are read once the page mounts.
|
|
705
|
+
if (phone === null) {
|
|
706
|
+
return <Skeleton aria-label="Loading" className="h-36 w-full" />;
|
|
707
|
+
}
|
|
708
|
+
if (onPhone && phone.udid !== null && mine.isPending) {
|
|
709
|
+
return <Skeleton aria-label="Loading" className="h-36 w-full" />;
|
|
710
|
+
}
|
|
711
|
+
if (onPhone && mine.data) {
|
|
712
|
+
return <ThisIphone device={mine.data} viewer={view?.viewer} />;
|
|
713
|
+
}
|
|
714
|
+
if (
|
|
715
|
+
view !== undefined &&
|
|
716
|
+
(view.registration === "local-console" ||
|
|
717
|
+
view.registration === "no-secret")
|
|
718
|
+
) {
|
|
719
|
+
return (
|
|
720
|
+
<RegistrationNotice
|
|
721
|
+
secretName={view.secretName}
|
|
722
|
+
status={view.registration}
|
|
723
|
+
/>
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
if (!onPhone) {
|
|
727
|
+
return (
|
|
728
|
+
<div className="flex flex-col items-start gap-4 sm:flex-row sm:items-center">
|
|
729
|
+
<QrCode
|
|
730
|
+
className="size-36 shrink-0"
|
|
731
|
+
label="Open this page on an iPhone"
|
|
732
|
+
value={`${window.location.origin}${consolePath()}${IOS_DEVICES_PATH}`}
|
|
733
|
+
/>
|
|
734
|
+
<div className="flex min-w-0 flex-col gap-1">
|
|
735
|
+
<p className="text-sm font-medium">
|
|
736
|
+
Open this page on the iPhone, in Safari.
|
|
737
|
+
</p>
|
|
738
|
+
<p className="text-xs text-muted-foreground">
|
|
739
|
+
It installs a profile that reads the iPhone's ID, then lists the
|
|
740
|
+
iPhone here as requested. Nothing stays installed.
|
|
741
|
+
</p>
|
|
742
|
+
</div>
|
|
743
|
+
</div>
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
if (!https) {
|
|
747
|
+
return (
|
|
748
|
+
<p className="text-xs text-muted-foreground" role="status">
|
|
749
|
+
iPhones need this Console on HTTPS.
|
|
750
|
+
</p>
|
|
751
|
+
);
|
|
752
|
+
}
|
|
753
|
+
if (mine.data === null && kept.isFetching && !proved) {
|
|
754
|
+
return <Skeleton aria-label="Loading" className="h-36 w-full" />;
|
|
755
|
+
}
|
|
756
|
+
if (proved) {
|
|
757
|
+
const trimmed = typed.trim();
|
|
758
|
+
return (
|
|
759
|
+
<form
|
|
760
|
+
className="flex min-w-0 flex-col gap-3"
|
|
761
|
+
onSubmit={(event) => {
|
|
762
|
+
event.preventDefault();
|
|
763
|
+
if (trimmed === "") return;
|
|
764
|
+
again.mutate({ name: trimmed, receipt: phone.receipt });
|
|
765
|
+
}}
|
|
766
|
+
>
|
|
767
|
+
<Field data-invalid={again.isError || undefined}>
|
|
768
|
+
<FieldLabel htmlFor="ios-device-register-name">
|
|
769
|
+
This iPhone's name
|
|
770
|
+
</FieldLabel>
|
|
771
|
+
<Input
|
|
772
|
+
autoComplete="off"
|
|
773
|
+
className="h-11"
|
|
774
|
+
id="ios-device-register-name"
|
|
775
|
+
maxLength={100}
|
|
776
|
+
onChange={(event) => setName(event.target.value)}
|
|
777
|
+
value={typed}
|
|
778
|
+
/>
|
|
779
|
+
<FieldDescription>
|
|
780
|
+
This Safari checked it before, so no profile is needed.
|
|
781
|
+
</FieldDescription>
|
|
782
|
+
<FieldError>
|
|
783
|
+
{again.isError
|
|
784
|
+
? "The request didn't go through. Try again."
|
|
785
|
+
: null}
|
|
786
|
+
</FieldError>
|
|
787
|
+
</Field>
|
|
788
|
+
<Button
|
|
789
|
+
className="h-11 w-full"
|
|
790
|
+
disabled={trimmed === "" || again.isPending}
|
|
791
|
+
type="submit"
|
|
792
|
+
>
|
|
793
|
+
{again.isPending ? (
|
|
794
|
+
<Loader2
|
|
795
|
+
className="animate-spin motion-reduce:animate-none"
|
|
796
|
+
data-icon="inline-start"
|
|
797
|
+
/>
|
|
798
|
+
) : (
|
|
799
|
+
<Smartphone data-icon="inline-start" />
|
|
800
|
+
)}
|
|
801
|
+
Request this iPhone
|
|
802
|
+
</Button>
|
|
803
|
+
</form>
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
if (link.data?.status === "local-console") {
|
|
807
|
+
return <RegistrationNotice status="local-console" />;
|
|
808
|
+
}
|
|
809
|
+
if (link.data?.status === "no-secret") {
|
|
810
|
+
return (
|
|
811
|
+
<RegistrationNotice
|
|
812
|
+
secretName={link.data.secretName}
|
|
813
|
+
status="no-secret"
|
|
814
|
+
/>
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
return (
|
|
818
|
+
<div className="flex min-w-0 flex-col gap-3">
|
|
819
|
+
<Field>
|
|
820
|
+
<FieldLabel htmlFor="ios-device-register-name">
|
|
821
|
+
This iPhone's name
|
|
822
|
+
</FieldLabel>
|
|
823
|
+
<Input
|
|
824
|
+
autoComplete="off"
|
|
825
|
+
className="h-11"
|
|
826
|
+
id="ios-device-register-name"
|
|
827
|
+
maxLength={100}
|
|
828
|
+
onChange={(event) => setName(event.target.value)}
|
|
829
|
+
value={typed}
|
|
830
|
+
/>
|
|
831
|
+
</Field>
|
|
832
|
+
{link.data?.status === "issued" && signed === typed.trim() ? (
|
|
833
|
+
<a
|
|
834
|
+
className={buttonVariants({
|
|
835
|
+
className: "h-auto min-h-11 w-full whitespace-normal",
|
|
836
|
+
})}
|
|
837
|
+
href={iosDeviceProfileUrl(consolePath(), link.data.token)}
|
|
838
|
+
>
|
|
839
|
+
<Smartphone data-icon="inline-start" />
|
|
840
|
+
Install profile
|
|
841
|
+
</a>
|
|
842
|
+
) : (
|
|
843
|
+
<Skeleton
|
|
844
|
+
aria-label="Preparing the profile"
|
|
845
|
+
className="h-11 w-full"
|
|
846
|
+
/>
|
|
847
|
+
)}
|
|
848
|
+
<p className="text-xs text-muted-foreground">
|
|
849
|
+
Safari only. Allow the download, then install it in Settings, where
|
|
850
|
+
iOS calls it not signed. Safari comes back here, and nothing stays
|
|
851
|
+
installed.
|
|
852
|
+
</p>
|
|
853
|
+
</div>
|
|
854
|
+
);
|
|
855
|
+
})();
|
|
856
|
+
|
|
857
|
+
return (
|
|
858
|
+
<Card className="shadow-sm">
|
|
859
|
+
<CardHeader className="border-b px-4 py-3">
|
|
860
|
+
<CardTitle className="text-sm">
|
|
861
|
+
<h2>Register an iPhone</h2>
|
|
862
|
+
</CardTitle>
|
|
863
|
+
</CardHeader>
|
|
864
|
+
<CardContent className="p-4 sm:p-6">{body}</CardContent>
|
|
865
|
+
</Card>
|
|
866
|
+
);
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* The iOS device registry inside Native builds: the iPhones and iPads a team
|
|
871
|
+
* asked to install ad hoc builds on. Testers register from an iPhone,
|
|
872
|
+
* approvers approve, rename, and remove, and the next ad hoc build registers
|
|
873
|
+
* what was approved with Apple. Android builds need none of this.
|
|
874
|
+
*/
|
|
875
|
+
export function IosDevicesPage({
|
|
876
|
+
search,
|
|
877
|
+
onSearchChange,
|
|
878
|
+
}: {
|
|
879
|
+
readonly search: IosDevicesSearch;
|
|
880
|
+
readonly onSearchChange: (search: IosDevicesSearch) => void;
|
|
881
|
+
}) {
|
|
882
|
+
const isMobile = useIsMobile();
|
|
883
|
+
const query = useIosDevicesQuery(search.status);
|
|
884
|
+
const view = query.data;
|
|
885
|
+
const rows = view?.devices;
|
|
886
|
+
const queryClient = useQueryClient();
|
|
887
|
+
// Refresh and Retry read every registry query the page shows: the list,
|
|
888
|
+
// and this iPhone's own row on a phone. A disabled read, such as the row
|
|
889
|
+
// on a computer, stays unread.
|
|
890
|
+
const refresh = () =>
|
|
891
|
+
void queryClient.invalidateQueries({ queryKey: iosDeviceKeys.all });
|
|
892
|
+
const [dialog, setDialog] = useState<DialogTarget>(null);
|
|
893
|
+
const phone = useIosDevice();
|
|
894
|
+
// The row of the iPhone this page is open on, tagged where its actions are.
|
|
895
|
+
const thisUdid =
|
|
896
|
+
phone?.ios === true ? (phone.udid?.toLowerCase() ?? null) : null;
|
|
897
|
+
const close = () => setDialog(null);
|
|
898
|
+
|
|
899
|
+
const empty = (
|
|
900
|
+
<DataTableEmpty
|
|
901
|
+
icon={Smartphone}
|
|
902
|
+
title={
|
|
903
|
+
search.status === undefined
|
|
904
|
+
? "No iPhones yet"
|
|
905
|
+
: `No ${STATUS_LABELS[search.status].toLowerCase()} iPhones`
|
|
906
|
+
}
|
|
907
|
+
>
|
|
908
|
+
{search.status === undefined ? (
|
|
909
|
+
<p>Open this page on an iPhone to register it.</p>
|
|
910
|
+
) : (
|
|
911
|
+
<Button
|
|
912
|
+
className="h-11 sm:h-8"
|
|
913
|
+
onClick={() => onSearchChange({})}
|
|
914
|
+
size="sm"
|
|
915
|
+
variant="outline"
|
|
916
|
+
>
|
|
917
|
+
Show all
|
|
918
|
+
</Button>
|
|
919
|
+
)}
|
|
920
|
+
</DataTableEmpty>
|
|
921
|
+
);
|
|
922
|
+
|
|
923
|
+
return (
|
|
924
|
+
<div className="flex h-svh min-h-0 min-w-0 flex-col">
|
|
925
|
+
<header className="sticky top-0 z-10 flex shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b bg-background px-3 py-3 sm:min-h-12 sm:flex-nowrap sm:bg-card/70 sm:px-4 sm:backdrop-blur-sm">
|
|
926
|
+
<SidebarTrigger className="-ml-1 size-11 lg:size-7" />
|
|
927
|
+
<div className="flex items-center gap-1.5">
|
|
928
|
+
<HardDrive
|
|
929
|
+
aria-hidden="true"
|
|
930
|
+
className="size-3.5 text-muted-foreground"
|
|
931
|
+
/>
|
|
932
|
+
<h1 className="text-sm font-medium">Native builds</h1>
|
|
933
|
+
</div>
|
|
934
|
+
<p className="basis-full pl-12 text-xs text-muted-foreground sm:basis-auto sm:pl-0">
|
|
935
|
+
The iPhones and iPads ad hoc builds install on. Android needs none.
|
|
936
|
+
</p>
|
|
937
|
+
</header>
|
|
938
|
+
|
|
939
|
+
<div className="flex min-h-0 min-w-0 flex-1 flex-col gap-4 overflow-y-auto bg-muted/5 p-3 sm:p-6">
|
|
940
|
+
<NativeBuildsNav current="devices" />
|
|
941
|
+
<RegisterCard phone={phone} view={view} />
|
|
942
|
+
{view !== undefined && !view.viewer.approversConfigured ? (
|
|
943
|
+
<div className="flex min-w-0 flex-col gap-1.5 text-xs text-muted-foreground">
|
|
944
|
+
<p>Nobody approves in this Console. Approve from a terminal:</p>
|
|
945
|
+
<CopyableText
|
|
946
|
+
label="the approve command"
|
|
947
|
+
value={IOS_DEVICES_ADD_COMMAND}
|
|
948
|
+
/>
|
|
949
|
+
</div>
|
|
950
|
+
) : null}
|
|
951
|
+
<div className="flex items-center gap-2">
|
|
952
|
+
<Select
|
|
953
|
+
items={[
|
|
954
|
+
{ label: "All statuses", value: ALL },
|
|
955
|
+
...(Object.keys(STATUS_LABELS) as IosDeviceStatus[]).map(
|
|
956
|
+
(status) => ({ label: STATUS_LABELS[status], value: status }),
|
|
957
|
+
),
|
|
958
|
+
]}
|
|
959
|
+
onValueChange={(value) =>
|
|
960
|
+
onSearchChange(
|
|
961
|
+
value === null || value === ALL
|
|
962
|
+
? {}
|
|
963
|
+
: { status: value as IosDeviceStatus },
|
|
964
|
+
)
|
|
965
|
+
}
|
|
966
|
+
value={search.status ?? ALL}
|
|
967
|
+
>
|
|
968
|
+
<SelectTrigger
|
|
969
|
+
aria-label="Status"
|
|
970
|
+
className="min-w-0 flex-1 text-xs data-[size=default]:h-11 sm:w-44 sm:flex-none sm:data-[size=default]:h-8"
|
|
971
|
+
>
|
|
972
|
+
<SelectValue />
|
|
973
|
+
</SelectTrigger>
|
|
974
|
+
<SelectContent>
|
|
975
|
+
<SelectGroup>
|
|
976
|
+
<SelectItem value={ALL}>All statuses</SelectItem>
|
|
977
|
+
{(Object.keys(STATUS_LABELS) as IosDeviceStatus[]).map(
|
|
978
|
+
(status) => (
|
|
979
|
+
<SelectItem key={status} value={status}>
|
|
980
|
+
{STATUS_LABELS[status]}
|
|
981
|
+
</SelectItem>
|
|
982
|
+
),
|
|
983
|
+
)}
|
|
984
|
+
</SelectGroup>
|
|
985
|
+
</SelectContent>
|
|
986
|
+
</Select>
|
|
987
|
+
<Button
|
|
988
|
+
aria-label="Refresh iOS devices"
|
|
989
|
+
className="ml-auto size-11 sm:size-7"
|
|
990
|
+
disabled={query.isFetching}
|
|
991
|
+
onClick={refresh}
|
|
992
|
+
size="icon-sm"
|
|
993
|
+
variant="ghost"
|
|
994
|
+
>
|
|
995
|
+
<RefreshCw aria-hidden="true" />
|
|
996
|
+
</Button>
|
|
997
|
+
</div>
|
|
998
|
+
{query.isError ? (
|
|
999
|
+
<Alert variant="destructive">
|
|
1000
|
+
<AlertTriangle />
|
|
1001
|
+
<AlertTitle>iOS devices couldn't be loaded</AlertTitle>
|
|
1002
|
+
<AlertDescription>
|
|
1003
|
+
Check your connection and try again.
|
|
1004
|
+
</AlertDescription>
|
|
1005
|
+
<AlertAction>
|
|
1006
|
+
<Button onClick={refresh} size="xs" variant="outline">
|
|
1007
|
+
<RefreshCw data-icon="inline-start" />
|
|
1008
|
+
Retry
|
|
1009
|
+
</Button>
|
|
1010
|
+
</AlertAction>
|
|
1011
|
+
</Alert>
|
|
1012
|
+
) : (
|
|
1013
|
+
// The page scrolls as a whole, the Register card above the list.
|
|
1014
|
+
<DataTableFrame className="flex-none">
|
|
1015
|
+
{isMobile ? (
|
|
1016
|
+
<div
|
|
1017
|
+
aria-busy={query.isPlaceholderData}
|
|
1018
|
+
aria-label="iOS devices"
|
|
1019
|
+
className="aria-busy:opacity-60"
|
|
1020
|
+
role="list"
|
|
1021
|
+
>
|
|
1022
|
+
{query.isLoading ? (
|
|
1023
|
+
<DataCardSkeletons label="Loading iOS devices" />
|
|
1024
|
+
) : rows?.length === 0 ? (
|
|
1025
|
+
<DataCardsEmpty>{empty}</DataCardsEmpty>
|
|
1026
|
+
) : (
|
|
1027
|
+
rows?.map((device) => (
|
|
1028
|
+
<div
|
|
1029
|
+
className="border-b last:border-b-0"
|
|
1030
|
+
key={device.id}
|
|
1031
|
+
role="listitem"
|
|
1032
|
+
>
|
|
1033
|
+
<DeviceCard
|
|
1034
|
+
device={device}
|
|
1035
|
+
isThisIphone={device.udid === thisUdid}
|
|
1036
|
+
onOpen={setDialog}
|
|
1037
|
+
viewer={view!.viewer}
|
|
1038
|
+
/>
|
|
1039
|
+
</div>
|
|
1040
|
+
))
|
|
1041
|
+
)}
|
|
1042
|
+
</div>
|
|
1043
|
+
) : (
|
|
1044
|
+
<DataTable
|
|
1045
|
+
aria-busy={query.isPlaceholderData}
|
|
1046
|
+
aria-label="iOS devices"
|
|
1047
|
+
className="aria-busy:opacity-60"
|
|
1048
|
+
header={
|
|
1049
|
+
<>
|
|
1050
|
+
<TableHead>Name</TableHead>
|
|
1051
|
+
<TableHead>UDID</TableHead>
|
|
1052
|
+
<TableHead>Requested by</TableHead>
|
|
1053
|
+
<TableHead>Status</TableHead>
|
|
1054
|
+
<TableHead>Added</TableHead>
|
|
1055
|
+
<TableHead>Build</TableHead>
|
|
1056
|
+
<TableHead className="text-right">
|
|
1057
|
+
<span className="sr-only">Actions</span>
|
|
1058
|
+
</TableHead>
|
|
1059
|
+
</>
|
|
1060
|
+
}
|
|
1061
|
+
>
|
|
1062
|
+
{query.isLoading ? (
|
|
1063
|
+
<DataTableSkeletonRows
|
|
1064
|
+
columns={COLUMNS + 1}
|
|
1065
|
+
label="Loading iOS devices"
|
|
1066
|
+
/>
|
|
1067
|
+
) : rows?.length === 0 ? (
|
|
1068
|
+
<DataTableFullRow columns={COLUMNS + 1}>
|
|
1069
|
+
{empty}
|
|
1070
|
+
</DataTableFullRow>
|
|
1071
|
+
) : (
|
|
1072
|
+
rows?.map((device) => (
|
|
1073
|
+
<DeviceRow
|
|
1074
|
+
device={device}
|
|
1075
|
+
isThisIphone={device.udid === thisUdid}
|
|
1076
|
+
key={device.id}
|
|
1077
|
+
onOpen={setDialog}
|
|
1078
|
+
viewer={view!.viewer}
|
|
1079
|
+
/>
|
|
1080
|
+
))
|
|
1081
|
+
)}
|
|
1082
|
+
</DataTable>
|
|
1083
|
+
)}
|
|
1084
|
+
</DataTableFrame>
|
|
1085
|
+
)}
|
|
1086
|
+
</div>
|
|
1087
|
+
{dialog !== null && dialog.kind !== "remove" ? (
|
|
1088
|
+
<NameDialog key={dialog.device.id} onClose={close} target={dialog} />
|
|
1089
|
+
) : null}
|
|
1090
|
+
{dialog?.kind === "remove" && view !== undefined ? (
|
|
1091
|
+
<RemoveDialog
|
|
1092
|
+
device={dialog.device}
|
|
1093
|
+
key={dialog.device.id}
|
|
1094
|
+
onClose={close}
|
|
1095
|
+
viewer={view.viewer}
|
|
1096
|
+
/>
|
|
1097
|
+
) : null}
|
|
1098
|
+
</div>
|
|
1099
|
+
);
|
|
1100
|
+
}
|