@hot-updater/console 1.2.0-rc.13 → 1.2.0-rc.14
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-DC2PutLU.js → -native-builds-search-OlRj4Jz0.js} +1 -1
- package/.output/public/assets/BundleIdDisplay-CP6rsdFO.js +1 -0
- package/.output/public/assets/{ConsoleFeatureUnavailable-oMmbaqF6.js → ConsoleFeatureUnavailable-DUqlpHCp.js} +1 -1
- package/.output/public/assets/EventDetails-Dcpdu7re.js +1 -0
- package/.output/public/assets/HashValueDisplay-MoZMmTeP.js +1 -0
- package/.output/public/assets/{InsightsPageHeader-q2FgL8xS.js → InsightsPageHeader-CSas9gM0.js} +1 -1
- package/.output/public/assets/{PlatformIcon-DCTtCP5t.js → PlatformIcon-CJ69KopR.js} +1 -1
- package/.output/public/assets/RelativeTime-CiZ7yXNJ.js +1 -0
- package/.output/public/assets/RolloutPercentageBadge-D-tZKnX7.js +1 -0
- package/.output/public/assets/StoreSubmission-F00RL5rI.js +1 -0
- package/.output/public/assets/TargetDisplay-CoYY8Fs4.js +1 -0
- package/.output/public/assets/api-keys-3IL4dIHe.js +1 -0
- package/.output/public/assets/api-keys-4w2-ofii.js +1 -0
- package/.output/public/assets/badge-laIuYW1U.js +1 -0
- package/.output/public/assets/card-ulgg5xHn.js +1 -0
- package/.output/public/assets/{index-t0CToN0S.js → index-Cde2QQJq.js} +3 -3
- package/.output/public/assets/insights-0TUItqwh.js +1 -0
- package/.output/public/assets/insights-DDRfERph.js +2 -0
- package/.output/public/assets/insights-_6iMn8GR.js +42 -0
- package/.output/public/assets/{insights-search-B5cZsP6C.js → insights-search-CYPrQVUC.js} +1 -1
- package/.output/public/assets/{insights-usage-rpc-zut_JaSS.js → insights-usage-rpc-BbFllvi_.js} +1 -1
- package/.output/public/assets/insights_.distribution-AZcfvK7x.js +1 -0
- package/.output/public/assets/insights_.distribution-BGAqgPi0.js +1 -0
- package/.output/public/assets/insights_.distribution-CjYkDRA4.js +2 -0
- package/.output/public/assets/installations-Ap2G2tDs.js +1 -0
- package/.output/public/assets/{installations-BRS-vuRJ.js → installations-CSZfo1rG.js} +2 -2
- package/.output/public/assets/installations-CwQYwQ6K.js +1 -0
- package/.output/public/assets/native-builds-cT9Ha-jZ.js +1 -0
- package/.output/public/assets/native-builds-v5wez34c.js +2 -0
- package/.output/public/assets/native-builds_._buildId-BBwE8Pcc.js +2 -0
- package/.output/public/assets/native-builds_._buildId-DZPcR_up.js +1 -0
- package/.output/public/assets/package-ytYrywZH.js +1 -0
- package/.output/public/assets/remote-config-CIAEArwq.js +1 -0
- package/.output/public/assets/{remote-config-DQguWTMa.js → remote-config-Dwdc-sij.js} +1 -1
- package/.output/public/assets/remote-config-ZJ_IRSKE.js +6 -0
- package/.output/public/assets/routes-BUWLcUqW.js +1 -0
- package/.output/public/assets/routes-Rtz-KcQO.js +2 -0
- package/.output/public/assets/styles-bNNic0NS.css +2 -0
- package/.output/public/assets/valueToPercent-B6X9rUJM.js +1 -0
- package/.output/server/{__23tanstack-start-server-fn-resolver-DI0OnlQe.mjs → __23tanstack-start-server-fn-resolver-BD3yIgQW.mjs} +49 -49
- package/.output/server/_libs/_.mjs +1 -1
- package/.output/server/_libs/lucide-react.mjs +1 -27
- package/.output/server/_ssr/{BundleIdDisplay-SAvC-NlE.mjs → BundleIdDisplay-Di0dxxxD.mjs} +2 -2
- package/.output/server/_ssr/{ConsoleFeatureUnavailable-BgHEoZ36.mjs → ConsoleFeatureUnavailable-BJM23Zg6.mjs} +6 -6
- package/.output/server/_ssr/{EventDetails-VaS25yjE.mjs → EventDetails-BatEDlOf.mjs} +7 -7
- package/.output/server/_ssr/{HashValueDisplay-BGc-x_l8.mjs → HashValueDisplay-DoVLNSRc.mjs} +6 -6
- package/.output/server/_ssr/{InsightsPageHeader-gMuNJt-f.mjs → InsightsPageHeader--Lsgjvy7.mjs} +6 -6
- package/.output/server/_ssr/{NotFoundPage-DsRI-J4h.mjs → NotFoundPage-DsX6EelI.mjs} +2 -2
- package/.output/server/_ssr/{PlatformIcon-BsU0d0jN.mjs → PlatformIcon-Cuhy0CIO.mjs} +12 -2
- package/.output/server/_ssr/RelativeTime-BVQMmkQi.mjs +209 -0
- package/.output/server/_ssr/{git-WSg7LY17.mjs → RolloutPercentageBadge-B5_ASwiR.mjs} +18 -2
- package/.output/server/_ssr/StoreSubmission-B-oliflh.mjs +65 -0
- package/.output/server/_ssr/TargetDisplay-Zy7Xom4-.mjs +100 -0
- package/.output/server/_ssr/{alert-dialog-lury59vV.mjs → alert-dialog-C4wLRSPA.mjs} +1 -1
- package/.output/server/_ssr/{api-BQ8ztUgU.mjs → api-B9fz7k5l.mjs} +4 -4
- package/.output/server/_ssr/{api-keys-CHATVpa9.mjs → api-keys-CWRy6qIm.mjs} +2 -2
- package/.output/server/_ssr/{api-keys-DVChzF3r.mjs → api-keys-DSBFZRhe.mjs} +10 -9
- package/.output/server/_ssr/{api-keys-rpc-DXPJTfdr.mjs → api-keys-rpc-CWXJDGcR.mjs} +3 -3
- package/.output/server/_ssr/{api-rpc-BexxmTM9.mjs → api-rpc-DFAKchn0.mjs} +10 -10
- package/.output/server/_ssr/{auth-rpc-BgNCvy2L.mjs → auth-rpc-CCrZswwU.mjs} +4 -4
- package/.output/server/_ssr/{auth.server-43UW34Rd.mjs → auth.server-B_NFqTVL.mjs} +2 -2
- package/.output/server/_ssr/{badge-BYB825vl.mjs → badge-CrneyinM.mjs} +2 -44
- package/.output/server/_ssr/card-uJiVh8Ex.mjs +49 -0
- package/.output/server/_ssr/{config.server-QRTmD4Hf.mjs → config.server-DegewTDN.mjs} +3 -3
- package/.output/server/_ssr/{console-access-E91fYTIB.mjs → console-access-Dn2nyMoy.mjs} +2 -2
- package/.output/server/_ssr/{console-features-api-CLRjxvy2.mjs → console-features-api-XvLDCadj.mjs} +3 -3
- package/.output/server/_ssr/{console-features-rpc-C2rJ0u6i.mjs → console-features-rpc-BGj3a9MK.mjs} +3 -3
- package/.output/server/_ssr/{dialog-CcF1pxfR.mjs → dialog-Bd8rq2D6.mjs} +1 -1
- package/.output/server/_ssr/{empty-DkiJ7nWt.mjs → empty-CxQ3tY82.mjs} +2 -2
- package/.output/server/_ssr/{field-CHlDI06h.mjs → field-BO99RT90.mjs} +2 -2
- package/.output/server/_ssr/{input-group-BPZ4UtB5.mjs → input-group-DTHYcd9a.mjs} +1 -1
- package/.output/server/_ssr/{insights-B3YetvBK.mjs → insights-2DKWoVb_.mjs} +5 -5
- package/.output/server/_ssr/{insights-Dn32lJ18.mjs → insights-B7__SQut.mjs} +2 -2
- package/.output/server/_ssr/{insights-CEABWFk4.mjs → insights-BxElDwIK.mjs} +21 -20
- package/.output/server/_ssr/{insights-api-CYPf5853.mjs → insights-api-BJcM3WZe.mjs} +3 -3
- package/.output/server/_ssr/{insights-failures-rpc-CxPpBR1K.mjs → insights-failures-rpc-Waj0XZKw.mjs} +4 -4
- package/.output/server/_ssr/{insights-recovery-rpc-CwnQMTE3.mjs → insights-recovery-rpc-DrPel0ob.mjs} +3 -3
- package/.output/server/_ssr/{insights-rpc-CKd5ATFI.mjs → insights-rpc-ETBGnpx2.mjs} +3 -3
- package/.output/server/_ssr/{insights-search-B_92_iEj.mjs → insights-search-Dm005qPB.mjs} +2 -2
- package/.output/server/_ssr/{insights-usage-rpc-RIMNhPtj.mjs → insights-usage-rpc-DLReOGQK.mjs} +3 -3
- package/.output/server/_ssr/{insights-usage-rpc-D90uHpJJ.mjs → insights-usage-rpc-SqWTs_Dy.mjs} +3 -3
- package/.output/server/_ssr/{insights_.distribution-D4QWsHNo.mjs → insights_.distribution-BEUt7pIk.mjs} +5 -5
- package/.output/server/_ssr/{insights_.distribution-D42mHSe0.mjs → insights_.distribution-B_FxGnXR.mjs} +15 -14
- package/.output/server/_ssr/{insights_.distribution-DwjIdjQi.mjs → insights_.distribution-CCxFQ1g_.mjs} +2 -2
- package/.output/server/_ssr/{installations-BIu66J6Q.mjs → installations-Bphhuxoy.mjs} +2 -2
- package/.output/server/_ssr/{installations-DyzKzWuv.mjs → installations-C9cYjLEo.mjs} +12 -12
- package/.output/server/_ssr/{installations-CfmO_V_R.mjs → installations-ChnSJFAp.mjs} +4 -4
- package/.output/server/_ssr/{native-builds-BCp8ICrn.mjs → native-builds-CCLcEAUo.mjs} +2 -2
- package/.output/server/_ssr/{native-builds-qj346atQ.mjs → native-builds-CWA9Y__P.mjs} +11 -10
- package/.output/server/_ssr/native-builds-vEUV8Jcd.mjs +548 -0
- package/.output/server/_ssr/{native-builds_._buildId-C8gsW-Rh.mjs → native-builds_._buildId-C-AS0ccm.mjs} +2 -2
- package/.output/server/_ssr/{native-builds_._buildId-BAxkkEFo.mjs → native-builds_._buildId-CDnSyuLI.mjs} +107 -58
- package/.output/server/_ssr/{nativeBuildDevice-nU480p5A.mjs → nativeBuildDevice-Dn16gNmZ.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildDownloadLink-c3tcq3G5.mjs → nativeBuildDownloadLink-XqrSsk2n.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuildInstall-B-_lHDsS.mjs → nativeBuildInstall-DqyrDtdY.mjs} +4 -4
- package/.output/server/_ssr/{nativeBuildQr-C5AFtpmE.mjs → nativeBuildQr-P9qKcI7l.mjs} +2 -2
- package/.output/server/_ssr/{nativeBuilds-CbxOJDhO.mjs → nativeBuilds-ByQdDnHG.mjs} +2 -2
- package/.output/server/_ssr/{release-adoption-rpc-BBwJO2hu.mjs → release-adoption-rpc-DUnqLbyh.mjs} +5 -5
- package/.output/server/_ssr/{remote-config-B1g7vrQD.mjs → remote-config-DC9HsCJa.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-BDijmvj1.mjs → remote-config-Db3pXNkQ.mjs} +2 -2
- package/.output/server/_ssr/{remote-config-DjeXVIcr.mjs → remote-config-jOKasCsC.mjs} +19 -18
- package/.output/server/_ssr/{remote-config-rpc-B7bzKw4N.mjs → remote-config-rpc-D4rLBAC7.mjs} +3 -3
- package/.output/server/_ssr/{router-DhxgFNWn.mjs → router-B3iMYd1N.mjs} +28 -28
- package/.output/server/_ssr/{routes-BC-rBuu_.mjs → routes-BHhqwGpi.mjs} +254 -377
- package/.output/server/_ssr/{routes-BDriEBtF.mjs → routes-Bpb4VcCf.mjs} +10 -14
- package/.output/server/_ssr/{schema-migration-rpc-CNMqY0RE.mjs → schema-migration-rpc-BY84M6ZD.mjs} +3 -3
- package/.output/server/_ssr/{select-hFD2e3Bh.mjs → select-C_ARCTCI.mjs} +2 -2
- package/.output/server/_ssr/{server-D_hG9iIq.mjs → server-yFcuyI0b.mjs} +4 -4
- package/.output/server/_ssr/{sidebar-Dmq4j1qr.mjs → sidebar-CFRWCQFu.mjs} +2 -2
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/{start-RjhaPVFE.mjs → start-C0XSSCq4.mjs} +1 -1
- package/.output/server/_ssr/{switch-CkNsEp9k.mjs → switch-DS2sIZvU.mjs} +2 -2
- package/.output/server/_ssr/{table-CTtXogFJ.mjs → table-C4kXCYKR.mjs} +1 -1
- package/.output/server/_ssr/{tabs-BTKDM4AJ.mjs → tabs-DxOJdu7O.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-AYP07Vaf.mjs +194 -0
- package/.output/server/index.mjs +305 -284
- package/package.json +7 -7
- package/src/components/ChannelBadge.tsx +9 -9
- package/src/components/DataTable.tsx +303 -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/TargetDisplay.tsx +69 -0
- package/src/components/features/channels/ChannelManagementDialog.tsx +3 -8
- package/src/components/features/insights/ReleaseActivity.tsx +1 -1
- package/src/components/features/native-builds/BuiltInBundleCard.tsx +29 -28
- package/src/components/features/native-builds/CommitLink.tsx +1 -1
- package/src/components/features/native-builds/ImportBuild.tsx +1 -1
- package/src/components/features/native-builds/NativeBuildDetailPage.tsx +4 -1
- package/src/components/features/native-builds/NativeBuildsPage.tsx +63 -76
- package/src/components/features/native-builds/NativeBuildsTable.tsx +435 -317
- package/src/components/features/native-builds/ShortHash.tsx +1 -1
- package/src/components/features/native-builds/StoreSubmission.tsx +11 -2
- package/src/lib/native-builds.ts +22 -6
- package/src/routes/index.tsx +290 -429
- package/src/styles.css +16 -0
- package/.output/public/assets/EventDetails-ly7ygfdH.js +0 -1
- package/.output/public/assets/HashValueDisplay-BNoXZADg.js +0 -1
- package/.output/public/assets/RolloutPercentageBadge-frllRncE.js +0 -1
- package/.output/public/assets/StoreSubmission-D8BGGGgn.js +0 -1
- package/.output/public/assets/api-keys-B0N3SixL.js +0 -1
- package/.output/public/assets/api-keys-DFAOfU4U.js +0 -1
- package/.output/public/assets/badge-UNnTz4Dl.js +0 -1
- package/.output/public/assets/download-Cf24LBde.js +0 -1
- package/.output/public/assets/insights-B0_8xNxr.js +0 -1
- package/.output/public/assets/insights-BbIzm_QG.js +0 -42
- package/.output/public/assets/insights-BtmYg4vg.js +0 -2
- package/.output/public/assets/insights_.distribution-DLxq-IKU.js +0 -1
- package/.output/public/assets/insights_.distribution-izFBYfJL.js +0 -2
- package/.output/public/assets/insights_.distribution-rdeyNhH2.js +0 -1
- package/.output/public/assets/installations-CWx7vYY5.js +0 -1
- package/.output/public/assets/installations-Ce_dTa35.js +0 -1
- package/.output/public/assets/native-builds-Br0onFRc.js +0 -2
- package/.output/public/assets/native-builds-CDYL3y0I.js +0 -1
- package/.output/public/assets/native-builds-DEWHul-_.js +0 -1
- package/.output/public/assets/native-builds_._buildId-D1XEPQ-V.js +0 -1
- package/.output/public/assets/native-builds_._buildId-x-uu1Vbr.js +0 -2
- package/.output/public/assets/remote-config-Bw6sErCV.js +0 -6
- package/.output/public/assets/remote-config-S3xj8r3x.js +0 -1
- package/.output/public/assets/routes-Dw8zgqXz.js +0 -2
- package/.output/public/assets/routes-nKCEKnhh.js +0 -1
- package/.output/public/assets/styles-uK-0vUMk.css +0 -2
- package/.output/public/assets/valueToPercent-DRLgSP0P.js +0 -1
- package/.output/server/_ssr/RolloutPercentageBadge-axz7VuIZ.mjs +0 -21
- package/.output/server/_ssr/StoreSubmission-BqXKtpqW.mjs +0 -139
- package/.output/server/_ssr/native-builds-CqFeXByK.mjs +0 -514
- package/.output/server/_tanstack-start-manifest_v-BuGAtKIu.mjs +0 -189
- /package/.output/public/assets/{NotFoundPage-fiaucvsO.js → NotFoundPage-Ckb5GMhh.js} +0 -0
- /package/.output/public/assets/{alert-dialog-Z_RNBrFc.js → alert-dialog-DiRLrFVe.js} +0 -0
- /package/.output/public/assets/{api-BEEYDSCX.js → api-LQJH44FU.js} +0 -0
- /package/.output/public/assets/{dialog-C2U9bINi.js → dialog-CLIaC82_.js} +0 -0
- /package/.output/public/assets/{dist-UQUhRoJi.js → dist-Bf1BPKMs.js} +0 -0
- /package/.output/public/assets/{empty-PAp07lsC.js → empty-Bhlj8PEo.js} +0 -0
- /package/.output/public/assets/{field-DhKRWFG5.js → field-q4sTYzNU.js} +0 -0
- /package/.output/public/assets/{input-group-BJfBVqeI.js → input-group-D_NfhUbX.js} +0 -0
- /package/.output/public/assets/{refresh-cw-C6svDMfM.js → refresh-cw-C-tvoCcE.js} +0 -0
- /package/.output/public/assets/{relativeTime-BscR0TsX.js → relativeTime-DvyxGIsm.js} +0 -0
- /package/.output/public/assets/{rotate-cw-CxFW64IG.js → rotate-cw-Clk5xTeE.js} +0 -0
- /package/.output/public/assets/{search-bIYGuFCt.js → search-nnvSOTEB.js} +0 -0
- /package/.output/public/assets/{smartphone-Bn5FtEwt.js → smartphone-r0rRdPas.js} +0 -0
- /package/.output/public/assets/{switch-DtUu1RCw.js → switch-CP6GsHmN.js} +0 -0
- /package/.output/public/assets/{table-B22H8-RL.js → table-TUtVz-2l.js} +0 -0
- /package/.output/public/assets/{tabs-Fgz3sA51.js → tabs-CP3CSmtI.js} +0 -0
- /package/.output/public/assets/{undo-2-7gOxArtb.js → undo-2-Bt0YXG26.js} +0 -0
- /package/.output/public/assets/{uuidv7-BLyD3pAM.js → uuidv7-cI6C63Fm.js} +0 -0
|
@@ -1,17 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
extractTimestampFromUUIDv7,
|
|
3
|
+
type NativeBuildRow,
|
|
4
|
+
} from "@hot-updater/plugin-core";
|
|
2
5
|
import { Link, useNavigate } from "@tanstack/react-router";
|
|
3
6
|
import {
|
|
4
7
|
AlertTriangle,
|
|
5
8
|
ArrowUpRight,
|
|
6
|
-
ChevronLeft,
|
|
7
|
-
ChevronRight,
|
|
8
9
|
Download,
|
|
9
|
-
|
|
10
|
+
HardDrive,
|
|
10
11
|
RefreshCw,
|
|
11
12
|
} from "lucide-react";
|
|
12
13
|
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
14
|
+
import { ChannelBadge } from "@/components/ChannelBadge";
|
|
15
|
+
import {
|
|
16
|
+
DataCard,
|
|
17
|
+
DataCardSkeletons,
|
|
18
|
+
DataCardsEmpty,
|
|
19
|
+
DataTable,
|
|
20
|
+
DataTableEmpty,
|
|
21
|
+
DataTableFrame,
|
|
22
|
+
DataTableFullRow,
|
|
23
|
+
DataTablePagination,
|
|
24
|
+
DataTableRow,
|
|
25
|
+
DataTableSkeletonRows,
|
|
26
|
+
openOutsideControls,
|
|
27
|
+
} from "@/components/DataTable";
|
|
28
|
+
import { PlatformIcon, PlatformLabel } from "@/components/PlatformIcon";
|
|
29
|
+
import { RelativeTime } from "@/components/RelativeTime";
|
|
30
|
+
import {
|
|
31
|
+
BuildKeyDisplay,
|
|
32
|
+
NoValue,
|
|
33
|
+
TargetDisplay,
|
|
34
|
+
} from "@/components/TargetDisplay";
|
|
15
35
|
import {
|
|
16
36
|
Alert,
|
|
17
37
|
AlertAction,
|
|
@@ -20,163 +40,221 @@ import {
|
|
|
20
40
|
} from "@/components/ui/alert";
|
|
21
41
|
import { Badge } from "@/components/ui/badge";
|
|
22
42
|
import { Button, buttonVariants } from "@/components/ui/button";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
Table,
|
|
26
|
-
TableBody,
|
|
27
|
-
TableCell,
|
|
28
|
-
TableHead,
|
|
29
|
-
TableHeader,
|
|
30
|
-
TableRow,
|
|
31
|
-
} from "@/components/ui/table";
|
|
43
|
+
import { TableCell, TableHead } from "@/components/ui/table";
|
|
44
|
+
import { useIsMobile } from "@/hooks/use-mobile";
|
|
32
45
|
import {
|
|
33
46
|
formatByteSize,
|
|
34
47
|
nativeBuildArtifacts,
|
|
35
48
|
nativeBuildChannel,
|
|
36
49
|
nativeBuildDownloadPath,
|
|
37
50
|
nativeBuildFileName,
|
|
38
|
-
nativeBuildTarget,
|
|
39
51
|
platformLabel,
|
|
40
52
|
} from "@/lib/native-builds";
|
|
41
53
|
import type { NativeBuildListResult } from "@/lib/server/nativeBuilds";
|
|
42
54
|
|
|
43
|
-
import { CommitLink } from "./CommitLink";
|
|
44
55
|
import { CopyableText } from "./CopyableText";
|
|
45
56
|
import { IMPORT_COMMAND, IMPORT_GUIDE_URL } from "./ImportBuild";
|
|
46
|
-
import {
|
|
47
|
-
import { StoreSubmissionBadge } from "./StoreSubmission";
|
|
57
|
+
import { isSubmitted, StoreSubmissionBadge } from "./StoreSubmission";
|
|
48
58
|
|
|
49
59
|
export const NATIVE_BUILD_GUIDE_URL =
|
|
50
60
|
"https://hot-updater.dev/docs/guides/native-build#how-a-build-is-tracked";
|
|
51
61
|
|
|
52
|
-
const COLUMNS =
|
|
62
|
+
const COLUMNS = 10;
|
|
63
|
+
|
|
64
|
+
/** The page of the list that shows `channel`'s builds, or every build. */
|
|
65
|
+
const channelSearch = (channel: string | undefined) =>
|
|
66
|
+
channel === undefined ? {} : { channel };
|
|
53
67
|
|
|
54
|
-
function
|
|
68
|
+
function EmptyState({
|
|
55
69
|
channel,
|
|
56
70
|
paged,
|
|
57
71
|
onClearChannel,
|
|
58
|
-
onNewest,
|
|
59
72
|
}: {
|
|
60
73
|
readonly channel: string | undefined;
|
|
61
74
|
readonly paged: boolean;
|
|
62
75
|
readonly onClearChannel: () => void;
|
|
63
|
-
readonly onNewest: () => void;
|
|
64
76
|
}) {
|
|
77
|
+
if (paged) {
|
|
78
|
+
return (
|
|
79
|
+
<DataTableEmpty icon={HardDrive} title="No more native builds">
|
|
80
|
+
<Link
|
|
81
|
+
className={buttonVariants({
|
|
82
|
+
className: "mt-1 min-h-11 sm:min-h-8",
|
|
83
|
+
variant: "outline",
|
|
84
|
+
})}
|
|
85
|
+
search={channelSearch(channel)}
|
|
86
|
+
to="/native-builds"
|
|
87
|
+
>
|
|
88
|
+
Show the newest builds
|
|
89
|
+
</Link>
|
|
90
|
+
</DataTableEmpty>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
if (channel !== undefined) {
|
|
94
|
+
return (
|
|
95
|
+
<DataTableEmpty
|
|
96
|
+
icon={HardDrive}
|
|
97
|
+
title={
|
|
98
|
+
<>
|
|
99
|
+
No native build embeds <span translate="no">{channel}</span>
|
|
100
|
+
</>
|
|
101
|
+
}
|
|
102
|
+
>
|
|
103
|
+
<p>
|
|
104
|
+
A build embeds the channel it was built on. Build one on this channel,
|
|
105
|
+
or list every channel's builds.
|
|
106
|
+
</p>
|
|
107
|
+
<Button
|
|
108
|
+
className="mt-1 min-h-11 sm:min-h-8"
|
|
109
|
+
onClick={onClearChannel}
|
|
110
|
+
variant="outline"
|
|
111
|
+
>
|
|
112
|
+
Show all channels
|
|
113
|
+
</Button>
|
|
114
|
+
</DataTableEmpty>
|
|
115
|
+
);
|
|
116
|
+
}
|
|
65
117
|
return (
|
|
66
|
-
<
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
118
|
+
<DataTableEmpty icon={HardDrive} title="No native builds">
|
|
119
|
+
<p>
|
|
120
|
+
Build one with{" "}
|
|
121
|
+
<code className="font-mono text-xs">native-build android</code> or{" "}
|
|
122
|
+
<code className="font-mono text-xs">native-build ios</code>, or import
|
|
123
|
+
one built elsewhere:
|
|
124
|
+
</p>
|
|
125
|
+
<div className="w-full text-left">
|
|
126
|
+
<CopyableText label="the import command" value={IMPORT_COMMAND} wrap />
|
|
127
|
+
</div>
|
|
128
|
+
<a
|
|
129
|
+
className={buttonVariants({
|
|
130
|
+
className: "mt-1 min-h-11 sm:min-h-8",
|
|
131
|
+
variant: "outline",
|
|
132
|
+
})}
|
|
133
|
+
href={NATIVE_BUILD_GUIDE_URL}
|
|
134
|
+
rel="noreferrer"
|
|
135
|
+
target="_blank"
|
|
70
136
|
>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<>
|
|
88
|
-
<p className="font-medium text-foreground">
|
|
89
|
-
No native build embeds <span translate="no">{channel}</span>
|
|
90
|
-
</p>
|
|
91
|
-
<p>
|
|
92
|
-
A build embeds the channel it was built on. Build one on this
|
|
93
|
-
channel, or list every channel's builds.
|
|
94
|
-
</p>
|
|
95
|
-
<Button
|
|
96
|
-
className="mt-1 min-h-11 sm:min-h-8"
|
|
97
|
-
onClick={onClearChannel}
|
|
98
|
-
variant="outline"
|
|
99
|
-
>
|
|
100
|
-
Show all channels
|
|
101
|
-
</Button>
|
|
102
|
-
</>
|
|
103
|
-
) : (
|
|
104
|
-
<>
|
|
105
|
-
<p className="font-medium text-foreground">No native builds</p>
|
|
106
|
-
<p>
|
|
107
|
-
Build one with{" "}
|
|
108
|
-
<code className="font-mono text-xs">native-build android</code>{" "}
|
|
109
|
-
or <code className="font-mono text-xs">native-build ios</code>,
|
|
110
|
-
or import one built elsewhere:
|
|
111
|
-
</p>
|
|
112
|
-
<div className="w-full text-left">
|
|
113
|
-
<CopyableText
|
|
114
|
-
label="the import command"
|
|
115
|
-
value={IMPORT_COMMAND}
|
|
116
|
-
wrap
|
|
117
|
-
/>
|
|
118
|
-
</div>
|
|
119
|
-
<a
|
|
120
|
-
className={buttonVariants({
|
|
121
|
-
className: "mt-1 min-h-11 sm:min-h-8",
|
|
122
|
-
variant: "outline",
|
|
123
|
-
})}
|
|
124
|
-
href={NATIVE_BUILD_GUIDE_URL}
|
|
125
|
-
rel="noreferrer"
|
|
126
|
-
target="_blank"
|
|
127
|
-
>
|
|
128
|
-
Native build guide
|
|
129
|
-
<ArrowUpRight data-icon="inline-end" />
|
|
130
|
-
</a>
|
|
131
|
-
<a
|
|
132
|
-
className={buttonVariants({
|
|
133
|
-
className: "min-h-11 sm:min-h-8",
|
|
134
|
-
variant: "outline",
|
|
135
|
-
})}
|
|
136
|
-
href={IMPORT_GUIDE_URL}
|
|
137
|
-
rel="noreferrer"
|
|
138
|
-
target="_blank"
|
|
139
|
-
>
|
|
140
|
-
Import guide
|
|
141
|
-
<ArrowUpRight data-icon="inline-end" />
|
|
142
|
-
</a>
|
|
143
|
-
</>
|
|
144
|
-
)}
|
|
145
|
-
</div>
|
|
146
|
-
</TableCell>
|
|
147
|
-
</TableRow>
|
|
137
|
+
Native build guide
|
|
138
|
+
<ArrowUpRight data-icon="inline-end" />
|
|
139
|
+
</a>
|
|
140
|
+
<a
|
|
141
|
+
className={buttonVariants({
|
|
142
|
+
className: "min-h-11 sm:min-h-8",
|
|
143
|
+
variant: "outline",
|
|
144
|
+
})}
|
|
145
|
+
href={IMPORT_GUIDE_URL}
|
|
146
|
+
rel="noreferrer"
|
|
147
|
+
target="_blank"
|
|
148
|
+
>
|
|
149
|
+
Import guide
|
|
150
|
+
<ArrowUpRight data-icon="inline-end" />
|
|
151
|
+
</a>
|
|
152
|
+
</DataTableEmpty>
|
|
148
153
|
);
|
|
149
154
|
}
|
|
150
155
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
156
|
+
/** What a build is: its platform's name and artifact kind, such as "Android APK". */
|
|
157
|
+
const buildTitle = (build: NativeBuildRow) =>
|
|
158
|
+
`${platformLabel(build.platform)} ${nativeBuildArtifacts[build.artifact_kind].label}`;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The build's artifact kind, such as "IPA", linking to its page. The Platform
|
|
162
|
+
* beside it names the platform; the link's name is the whole build.
|
|
163
|
+
*/
|
|
164
|
+
function BuildLink({ build }: { readonly build: NativeBuildRow }) {
|
|
165
|
+
return (
|
|
166
|
+
<Link
|
|
167
|
+
aria-label={buildTitle(build)}
|
|
168
|
+
className="relative rounded-sm font-medium whitespace-nowrap text-foreground transition-colors underline-offset-4 after:absolute after:-inset-x-[10px] after:-inset-y-[10px] hover:text-primary hover:underline focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden"
|
|
169
|
+
params={{ buildId: build.id }}
|
|
170
|
+
to="/native-builds/$buildId"
|
|
171
|
+
>
|
|
172
|
+
{nativeBuildArtifacts[build.artifact_kind].label}
|
|
173
|
+
</Link>
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** The channel the build embeds; a click lists that channel's builds. */
|
|
178
|
+
function ChannelFilterButton({
|
|
179
|
+
channel,
|
|
180
|
+
onChannel,
|
|
181
|
+
}: {
|
|
182
|
+
readonly channel: string;
|
|
183
|
+
readonly onChannel: (channel: string) => void;
|
|
184
|
+
}) {
|
|
185
|
+
return (
|
|
186
|
+
<button
|
|
187
|
+
aria-label={`Show the builds that embed ${channel}`}
|
|
188
|
+
className="relative rounded-md text-left after:absolute after:inset-x-0 after:-inset-y-[11px] focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none sm:after:hidden"
|
|
189
|
+
onClick={() => onChannel(channel)}
|
|
190
|
+
type="button"
|
|
191
|
+
>
|
|
192
|
+
<ChannelBadge channel={channel} className="whitespace-nowrap" />
|
|
193
|
+
</button>
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* The store track a build went to, and under it the store build mark, so a
|
|
199
|
+
* build with both stays one badge wide.
|
|
200
|
+
*/
|
|
201
|
+
function StoreCell({ build }: { readonly build: NativeBuildRow }) {
|
|
202
|
+
if (!isSubmitted(build) && build.store_build !== true) return <NoValue />;
|
|
203
|
+
return (
|
|
204
|
+
<StoreBadges build={build} className="flex flex-col items-start gap-1" />
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** The store badges, laid out by the caller. */
|
|
209
|
+
function StoreBadges({
|
|
210
|
+
build,
|
|
211
|
+
className,
|
|
212
|
+
}: {
|
|
213
|
+
readonly build: NativeBuildRow;
|
|
214
|
+
readonly className: string;
|
|
215
|
+
}) {
|
|
216
|
+
return (
|
|
217
|
+
<span className={className}>
|
|
218
|
+
<StoreSubmissionBadge build={build} />
|
|
219
|
+
{build.store_build === true ? (
|
|
220
|
+
<Badge variant="secondary">Store build</Badge>
|
|
221
|
+
) : null}
|
|
222
|
+
</span>
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
function DownloadButton({ build }: { readonly build: NativeBuildRow }) {
|
|
227
|
+
return (
|
|
228
|
+
<a
|
|
229
|
+
aria-label={`Download ${nativeBuildFileName(build)}`}
|
|
230
|
+
className={buttonVariants({
|
|
231
|
+
className: "min-h-11 sm:min-h-8",
|
|
232
|
+
size: "sm",
|
|
233
|
+
variant: "outline",
|
|
234
|
+
})}
|
|
235
|
+
download
|
|
236
|
+
href={nativeBuildDownloadPath(build.id)}
|
|
237
|
+
>
|
|
238
|
+
<Download data-icon="inline-start" />
|
|
239
|
+
Download
|
|
240
|
+
</a>
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function BuildNumber({ build }: { readonly build: NativeBuildRow }) {
|
|
245
|
+
return build.build_number ? (
|
|
246
|
+
<span className="font-mono tabular-nums" translate="no">
|
|
247
|
+
{build.build_number}
|
|
248
|
+
</span>
|
|
249
|
+
) : (
|
|
250
|
+
<NoValue />
|
|
251
|
+
);
|
|
178
252
|
}
|
|
179
253
|
|
|
254
|
+
/** When the build was registered, from its ID. */
|
|
255
|
+
const createdAt = (build: NativeBuildRow) =>
|
|
256
|
+
extractTimestampFromUUIDv7(build.id);
|
|
257
|
+
|
|
180
258
|
function BuildRow({
|
|
181
259
|
build,
|
|
182
260
|
onChannel,
|
|
@@ -185,140 +263,144 @@ function BuildRow({
|
|
|
185
263
|
readonly onChannel: (channel: string) => void;
|
|
186
264
|
}) {
|
|
187
265
|
const navigate = useNavigate();
|
|
188
|
-
const target = nativeBuildTarget(build);
|
|
189
266
|
const channel = nativeBuildChannel(build);
|
|
190
|
-
const title = `${platformLabel(build.platform)} ${nativeBuildArtifacts[build.artifact_kind].label}`;
|
|
191
267
|
return (
|
|
192
|
-
<
|
|
193
|
-
|
|
194
|
-
|
|
268
|
+
<DataTableRow
|
|
269
|
+
aria-label={`Open native build ${build.id}`}
|
|
270
|
+
onOpen={() =>
|
|
195
271
|
void navigate({
|
|
196
272
|
to: "/native-builds/$buildId",
|
|
197
273
|
params: { buildId: build.id },
|
|
198
274
|
})
|
|
199
275
|
}
|
|
200
276
|
>
|
|
201
|
-
<TableCell
|
|
202
|
-
<
|
|
203
|
-
<div className="flex flex-wrap items-center gap-1.5">
|
|
204
|
-
<PlatformIcon
|
|
205
|
-
className="size-3.5 shrink-0 text-muted-foreground"
|
|
206
|
-
platform={build.platform}
|
|
207
|
-
/>
|
|
208
|
-
<Link
|
|
209
|
-
className="font-medium underline-offset-4 hover:underline"
|
|
210
|
-
onClick={(event) => event.stopPropagation()}
|
|
211
|
-
params={{ buildId: build.id }}
|
|
212
|
-
to="/native-builds/$buildId"
|
|
213
|
-
>
|
|
214
|
-
{title}
|
|
215
|
-
</Link>
|
|
216
|
-
<span className="text-xs text-muted-foreground tabular-nums">
|
|
217
|
-
{formatByteSize(build.byte_size)}
|
|
218
|
-
</span>
|
|
219
|
-
<StoreSubmissionBadge build={build} withTime />
|
|
220
|
-
{build.store_build === true ? (
|
|
221
|
-
<Badge variant="secondary">Store build</Badge>
|
|
222
|
-
) : null}
|
|
223
|
-
</div>
|
|
224
|
-
<div className="flex min-w-0 flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground">
|
|
225
|
-
<span>{target.label}</span>
|
|
226
|
-
{build.fingerprint_hash === null ? (
|
|
227
|
-
<span className="font-mono text-foreground" translate="no">
|
|
228
|
-
{target.value}
|
|
229
|
-
</span>
|
|
230
|
-
) : (
|
|
231
|
-
<ShortHash
|
|
232
|
-
label="fingerprint"
|
|
233
|
-
length={12}
|
|
234
|
-
value={build.fingerprint_hash}
|
|
235
|
-
/>
|
|
236
|
-
)}
|
|
237
|
-
{!build.build_number ? null : (
|
|
238
|
-
<span className="tabular-nums" translate="no">
|
|
239
|
-
· build {build.build_number}
|
|
240
|
-
</span>
|
|
241
|
-
)}
|
|
242
|
-
<span className="md:hidden" translate="no">
|
|
243
|
-
· {channel}
|
|
244
|
-
</span>
|
|
245
|
-
{build.git_commit_hash === null ? null : (
|
|
246
|
-
<span className="inline-flex items-center gap-1 xl:hidden">
|
|
247
|
-
· commit <CommitLink hash={build.git_commit_hash} />
|
|
248
|
-
</span>
|
|
249
|
-
)}
|
|
250
|
-
</div>
|
|
251
|
-
{/* Below xl the column hides, so the whole ID shows here. */}
|
|
252
|
-
<div className="text-xs text-muted-foreground xl:hidden">
|
|
253
|
-
Built-in bundle{" "}
|
|
254
|
-
<span
|
|
255
|
-
className="font-mono [overflow-wrap:anywhere] text-foreground"
|
|
256
|
-
translate="no"
|
|
257
|
-
>
|
|
258
|
-
{build.min_bundle_id}
|
|
259
|
-
</span>
|
|
260
|
-
</div>
|
|
261
|
-
</div>
|
|
277
|
+
<TableCell>
|
|
278
|
+
<BuildLink build={build} />
|
|
262
279
|
</TableCell>
|
|
263
|
-
<TableCell
|
|
264
|
-
<
|
|
265
|
-
aria-label={`Show the builds that embed ${channel}`}
|
|
266
|
-
className="rounded-md text-left focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none"
|
|
267
|
-
onClick={(event) => {
|
|
268
|
-
event.stopPropagation();
|
|
269
|
-
onChannel(channel);
|
|
270
|
-
}}
|
|
271
|
-
type="button"
|
|
272
|
-
>
|
|
273
|
-
<Badge className="whitespace-nowrap" translate="no" variant="outline">
|
|
274
|
-
{channel}
|
|
275
|
-
</Badge>
|
|
276
|
-
</button>
|
|
280
|
+
<TableCell>
|
|
281
|
+
<ChannelFilterButton channel={channel} onChannel={onChannel} />
|
|
277
282
|
</TableCell>
|
|
278
|
-
<TableCell className="
|
|
279
|
-
<
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
{build.min_bundle_id}
|
|
284
|
-
</span>
|
|
283
|
+
<TableCell className="whitespace-nowrap">
|
|
284
|
+
<PlatformLabel platform={build.platform} />
|
|
285
|
+
</TableCell>
|
|
286
|
+
<TableCell>
|
|
287
|
+
<BuildNumber build={build} />
|
|
285
288
|
</TableCell>
|
|
286
|
-
<TableCell
|
|
287
|
-
<
|
|
289
|
+
<TableCell>
|
|
290
|
+
<TargetDisplay
|
|
291
|
+
appVersion={build.app_version}
|
|
292
|
+
fingerprintHash={build.fingerprint_hash}
|
|
293
|
+
/>
|
|
288
294
|
</TableCell>
|
|
289
|
-
<TableCell
|
|
290
|
-
<
|
|
295
|
+
<TableCell>
|
|
296
|
+
<BuildKeyDisplay value={build.build_key} />
|
|
297
|
+
</TableCell>
|
|
298
|
+
<TableCell>
|
|
299
|
+
<StoreCell build={build} />
|
|
300
|
+
</TableCell>
|
|
301
|
+
<TableCell className="whitespace-nowrap text-muted-foreground tabular-nums">
|
|
302
|
+
{formatByteSize(build.byte_size)}
|
|
303
|
+
</TableCell>
|
|
304
|
+
<TableCell className="text-xs text-muted-foreground">
|
|
305
|
+
<RelativeTime ms={createdAt(build)} />
|
|
291
306
|
</TableCell>
|
|
292
307
|
<TableCell className="text-right">
|
|
293
|
-
<
|
|
294
|
-
aria-label={`Download ${nativeBuildFileName(build)}`}
|
|
295
|
-
className={buttonVariants({
|
|
296
|
-
className: "min-h-11 sm:min-h-7",
|
|
297
|
-
size: "sm",
|
|
298
|
-
variant: "outline",
|
|
299
|
-
})}
|
|
300
|
-
download
|
|
301
|
-
href={nativeBuildDownloadPath(build.id)}
|
|
302
|
-
onClick={(event) => event.stopPropagation()}
|
|
303
|
-
>
|
|
304
|
-
<Download data-icon="inline-start" />
|
|
305
|
-
Download
|
|
306
|
-
</a>
|
|
308
|
+
<DownloadButton build={build} />
|
|
307
309
|
</TableCell>
|
|
308
|
-
</
|
|
310
|
+
</DataTableRow>
|
|
309
311
|
);
|
|
310
312
|
}
|
|
311
313
|
|
|
312
314
|
/**
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
+
* A build's card on a narrow screen, scannable a few to a screen: what it is
|
|
316
|
+
* and where, then when, then its target and build key, then its store. Every
|
|
317
|
+
* value of the row is on it, and a tap opens the build's page.
|
|
318
|
+
*/
|
|
319
|
+
function BuildCard({
|
|
320
|
+
build,
|
|
321
|
+
onChannel,
|
|
322
|
+
}: {
|
|
323
|
+
readonly build: NativeBuildRow;
|
|
324
|
+
readonly onChannel: (channel: string) => void;
|
|
325
|
+
}) {
|
|
326
|
+
const navigate = useNavigate();
|
|
327
|
+
const channel = nativeBuildChannel(build);
|
|
328
|
+
const stored = isSubmitted(build) || build.store_build === true;
|
|
329
|
+
return (
|
|
330
|
+
<DataCard
|
|
331
|
+
aria-label={`Native build ${buildTitle(build)} ${build.id}`}
|
|
332
|
+
className="gap-3 border-b-0"
|
|
333
|
+
onClick={openOutsideControls(
|
|
334
|
+
() =>
|
|
335
|
+
void navigate({
|
|
336
|
+
to: "/native-builds/$buildId",
|
|
337
|
+
params: { buildId: build.id },
|
|
338
|
+
}),
|
|
339
|
+
)}
|
|
340
|
+
>
|
|
341
|
+
<div className="flex items-center justify-between gap-3">
|
|
342
|
+
<div className="flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1">
|
|
343
|
+
<PlatformIcon
|
|
344
|
+
className="size-4 shrink-0 text-muted-foreground"
|
|
345
|
+
platform={build.platform}
|
|
346
|
+
/>
|
|
347
|
+
<BuildLink build={build} />
|
|
348
|
+
<ChannelFilterButton channel={channel} onChannel={onChannel} />
|
|
349
|
+
</div>
|
|
350
|
+
<DownloadButton build={build} />
|
|
351
|
+
</div>
|
|
352
|
+
<p className="flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground">
|
|
353
|
+
<span className="sr-only">{platformLabel(build.platform)}</span>
|
|
354
|
+
{build.build_number ? (
|
|
355
|
+
<>
|
|
356
|
+
<span translate="no">
|
|
357
|
+
Build{" "}
|
|
358
|
+
<span className="font-mono tabular-nums text-foreground">
|
|
359
|
+
{build.build_number}
|
|
360
|
+
</span>
|
|
361
|
+
</span>
|
|
362
|
+
<span aria-hidden="true">·</span>
|
|
363
|
+
</>
|
|
364
|
+
) : null}
|
|
365
|
+
<span className="tabular-nums">{formatByteSize(build.byte_size)}</span>
|
|
366
|
+
<span aria-hidden="true">·</span>
|
|
367
|
+
<RelativeTime ms={createdAt(build)} />
|
|
368
|
+
</p>
|
|
369
|
+
<div className="flex flex-wrap items-center gap-x-4 gap-y-3 text-xs">
|
|
370
|
+
<span className="flex items-center">
|
|
371
|
+
<span className="sr-only">Target </span>
|
|
372
|
+
<TargetDisplay
|
|
373
|
+
appVersion={build.app_version}
|
|
374
|
+
fingerprintHash={build.fingerprint_hash}
|
|
375
|
+
/>
|
|
376
|
+
</span>
|
|
377
|
+
{build.build_key ? (
|
|
378
|
+
<span className="flex items-center">
|
|
379
|
+
<span className="sr-only">Build key </span>
|
|
380
|
+
<BuildKeyDisplay value={build.build_key} />
|
|
381
|
+
</span>
|
|
382
|
+
) : null}
|
|
383
|
+
</div>
|
|
384
|
+
{stored ? (
|
|
385
|
+
<StoreBadges
|
|
386
|
+
build={build}
|
|
387
|
+
className="flex flex-wrap items-center gap-1.5"
|
|
388
|
+
/>
|
|
389
|
+
) : null}
|
|
390
|
+
</DataCard>
|
|
391
|
+
);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* The registered native builds, newest first, one page at a time, as a
|
|
396
|
+
* column table like Bundles' on wide screens and cards on narrow ones. A
|
|
397
|
+
* row opens the build's page; its channel filters the list by that channel.
|
|
315
398
|
*/
|
|
316
399
|
export function NativeBuildsTable({
|
|
317
400
|
builds,
|
|
318
401
|
channel,
|
|
319
402
|
paged,
|
|
320
403
|
onChannel,
|
|
321
|
-
onPage,
|
|
322
404
|
}: {
|
|
323
405
|
readonly builds: {
|
|
324
406
|
readonly data: NativeBuildListResult | undefined;
|
|
@@ -332,96 +414,132 @@ export function NativeBuildsTable({
|
|
|
332
414
|
/** Whether the list shows a page other than the newest. */
|
|
333
415
|
readonly paged: boolean;
|
|
334
416
|
readonly onChannel: (channel: string | undefined) => void;
|
|
335
|
-
readonly onPage: (page: { before?: string; after?: string }) => void;
|
|
336
417
|
}) {
|
|
418
|
+
const isMobile = useIsMobile();
|
|
337
419
|
const rows = builds.data?.data;
|
|
338
420
|
const { next, previous } = builds.data ?? {};
|
|
339
421
|
|
|
340
422
|
if (builds.isError) {
|
|
341
423
|
return (
|
|
342
|
-
<
|
|
343
|
-
<
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
<
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
</Alert>
|
|
360
|
-
</div>
|
|
424
|
+
<Alert variant="destructive">
|
|
425
|
+
<AlertTriangle />
|
|
426
|
+
<AlertTitle>Native builds couldn't be loaded</AlertTitle>
|
|
427
|
+
<AlertDescription>
|
|
428
|
+
Check your connection and try again.
|
|
429
|
+
</AlertDescription>
|
|
430
|
+
<AlertAction>
|
|
431
|
+
<Button
|
|
432
|
+
onClick={() => void builds.refetch()}
|
|
433
|
+
size="xs"
|
|
434
|
+
variant="outline"
|
|
435
|
+
>
|
|
436
|
+
<RefreshCw data-icon="inline-start" />
|
|
437
|
+
Retry
|
|
438
|
+
</Button>
|
|
439
|
+
</AlertAction>
|
|
440
|
+
</Alert>
|
|
361
441
|
);
|
|
362
442
|
}
|
|
363
443
|
|
|
444
|
+
const empty = (
|
|
445
|
+
<EmptyState
|
|
446
|
+
channel={channel}
|
|
447
|
+
onClearChannel={() => onChannel(undefined)}
|
|
448
|
+
paged={paged}
|
|
449
|
+
/>
|
|
450
|
+
);
|
|
451
|
+
|
|
364
452
|
return (
|
|
365
453
|
<>
|
|
366
|
-
<
|
|
367
|
-
|
|
368
|
-
<
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
</TableHead>
|
|
374
|
-
<TableHead className="hidden xl:table-cell">Commit</TableHead>
|
|
375
|
-
<TableHead className="hidden sm:table-cell">Created</TableHead>
|
|
376
|
-
<TableHead className="text-right">
|
|
377
|
-
<span className="sr-only">Actions</span>
|
|
378
|
-
</TableHead>
|
|
379
|
-
</TableRow>
|
|
380
|
-
</TableHeader>
|
|
381
|
-
<TableBody>
|
|
382
|
-
{builds.isLoading ? (
|
|
383
|
-
<LoadingRows />
|
|
384
|
-
) : rows?.length === 0 ? (
|
|
385
|
-
<EmptyRow
|
|
386
|
-
channel={channel}
|
|
387
|
-
onClearChannel={() => onChannel(undefined)}
|
|
388
|
-
onNewest={() => onPage({})}
|
|
389
|
-
paged={paged}
|
|
390
|
-
/>
|
|
391
|
-
) : (
|
|
392
|
-
rows?.map((build) => (
|
|
393
|
-
<BuildRow build={build} key={build.id} onChannel={onChannel} />
|
|
394
|
-
))
|
|
395
|
-
)}
|
|
396
|
-
</TableBody>
|
|
397
|
-
</Table>
|
|
398
|
-
{next !== undefined || previous !== undefined ? (
|
|
399
|
-
<nav
|
|
400
|
-
aria-label="Native build pages"
|
|
401
|
-
className="flex items-center justify-end gap-2 border-t px-4 py-2"
|
|
402
|
-
>
|
|
403
|
-
<Button
|
|
404
|
-
className="min-h-11 sm:min-h-7"
|
|
405
|
-
disabled={previous === undefined || builds.isPlaceholderData}
|
|
406
|
-
onClick={() => onPage({ after: previous })}
|
|
407
|
-
size="sm"
|
|
408
|
-
variant="ghost"
|
|
454
|
+
<DataTableFrame>
|
|
455
|
+
{isMobile ? (
|
|
456
|
+
<div
|
|
457
|
+
aria-busy={builds.isPlaceholderData}
|
|
458
|
+
aria-label="Native builds"
|
|
459
|
+
className="h-full overflow-y-auto aria-busy:opacity-60"
|
|
460
|
+
role="list"
|
|
409
461
|
>
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
462
|
+
{builds.isLoading ? (
|
|
463
|
+
<DataCardSkeletons label="Loading native builds" />
|
|
464
|
+
) : rows?.length === 0 ? (
|
|
465
|
+
<DataCardsEmpty>{empty}</DataCardsEmpty>
|
|
466
|
+
) : (
|
|
467
|
+
rows?.map((build) => (
|
|
468
|
+
<div
|
|
469
|
+
className="border-b last:border-b-0"
|
|
470
|
+
key={build.id}
|
|
471
|
+
role="listitem"
|
|
472
|
+
>
|
|
473
|
+
<BuildCard build={build} onChannel={onChannel} />
|
|
474
|
+
</div>
|
|
475
|
+
))
|
|
476
|
+
)}
|
|
477
|
+
</div>
|
|
478
|
+
) : (
|
|
479
|
+
<DataTable
|
|
480
|
+
aria-busy={builds.isPlaceholderData}
|
|
481
|
+
aria-label="Native builds"
|
|
482
|
+
className="aria-busy:opacity-60"
|
|
483
|
+
header={
|
|
484
|
+
<>
|
|
485
|
+
<TableHead>Artifact</TableHead>
|
|
486
|
+
<TableHead>Channel</TableHead>
|
|
487
|
+
<TableHead>Platform</TableHead>
|
|
488
|
+
<TableHead>Build</TableHead>
|
|
489
|
+
<TableHead>Target</TableHead>
|
|
490
|
+
<TableHead>Build key</TableHead>
|
|
491
|
+
<TableHead>Store</TableHead>
|
|
492
|
+
<TableHead>Size</TableHead>
|
|
493
|
+
<TableHead>Created</TableHead>
|
|
494
|
+
<TableHead className="text-right">
|
|
495
|
+
<span className="sr-only">Actions</span>
|
|
496
|
+
</TableHead>
|
|
497
|
+
</>
|
|
498
|
+
}
|
|
419
499
|
>
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
500
|
+
{builds.isLoading ? (
|
|
501
|
+
<DataTableSkeletonRows
|
|
502
|
+
columns={COLUMNS}
|
|
503
|
+
label="Loading native builds"
|
|
504
|
+
/>
|
|
505
|
+
) : rows?.length === 0 ? (
|
|
506
|
+
<DataTableFullRow columns={COLUMNS}>{empty}</DataTableFullRow>
|
|
507
|
+
) : (
|
|
508
|
+
rows?.map((build) => (
|
|
509
|
+
<BuildRow build={build} key={build.id} onChannel={onChannel} />
|
|
510
|
+
))
|
|
511
|
+
)}
|
|
512
|
+
</DataTable>
|
|
513
|
+
)}
|
|
514
|
+
</DataTableFrame>
|
|
515
|
+
{builds.isLoading || rows === undefined ? null : (
|
|
516
|
+
<DataTablePagination
|
|
517
|
+
count={rows.length}
|
|
518
|
+
label="Native build pages"
|
|
519
|
+
pending={builds.isPlaceholderData}
|
|
520
|
+
newest={
|
|
521
|
+
paged
|
|
522
|
+
? { search: channelSearch(channel), to: "/native-builds" }
|
|
523
|
+
: undefined
|
|
524
|
+
}
|
|
525
|
+
next={
|
|
526
|
+
next === undefined
|
|
527
|
+
? undefined
|
|
528
|
+
: {
|
|
529
|
+
search: { ...channelSearch(channel), before: next },
|
|
530
|
+
to: "/native-builds",
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
previous={
|
|
534
|
+
previous === undefined
|
|
535
|
+
? undefined
|
|
536
|
+
: {
|
|
537
|
+
search: { ...channelSearch(channel), after: previous },
|
|
538
|
+
to: "/native-builds",
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
/>
|
|
542
|
+
)}
|
|
425
543
|
</>
|
|
426
544
|
);
|
|
427
545
|
}
|