@industry-theme/git-panels 0.1.2 → 0.1.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitPullRequestsPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitPullRequestsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAa5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"GitPullRequestsPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitPullRequestsPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAa5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAMpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAyS9D,CAAC;AA2MF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAkE/C,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -107,40 +107,48 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
109
|
*/
|
|
110
|
-
const __iconNode$
|
|
110
|
+
const __iconNode$l = [
|
|
111
111
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
112
112
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
113
113
|
];
|
|
114
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$
|
|
114
|
+
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$l);
|
|
115
115
|
/**
|
|
116
116
|
* @license lucide-react v0.552.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
120
|
*/
|
|
121
|
-
const __iconNode$
|
|
121
|
+
const __iconNode$k = [
|
|
122
122
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
123
123
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
124
124
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
125
125
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
126
126
|
];
|
|
127
|
-
const Calendar = createLucideIcon("calendar", __iconNode$
|
|
127
|
+
const Calendar = createLucideIcon("calendar", __iconNode$k);
|
|
128
128
|
/**
|
|
129
129
|
* @license lucide-react v0.552.0 - ISC
|
|
130
130
|
*
|
|
131
131
|
* This source code is licensed under the ISC license.
|
|
132
132
|
* See the LICENSE file in the root directory of this source tree.
|
|
133
133
|
*/
|
|
134
|
-
const __iconNode$
|
|
135
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
134
|
+
const __iconNode$j = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
135
|
+
const Check = createLucideIcon("check", __iconNode$j);
|
|
136
136
|
/**
|
|
137
137
|
* @license lucide-react v0.552.0 - ISC
|
|
138
138
|
*
|
|
139
139
|
* This source code is licensed under the ISC license.
|
|
140
140
|
* See the LICENSE file in the root directory of this source tree.
|
|
141
141
|
*/
|
|
142
|
-
const __iconNode$
|
|
143
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
142
|
+
const __iconNode$i = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
143
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$i);
|
|
144
|
+
/**
|
|
145
|
+
* @license lucide-react v0.552.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/
|
|
150
|
+
const __iconNode$h = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
151
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$h);
|
|
144
152
|
/**
|
|
145
153
|
* @license lucide-react v0.552.0 - ISC
|
|
146
154
|
*
|
|
@@ -930,15 +938,13 @@ const GitPullRequestsPanel = ({
|
|
|
930
938
|
context,
|
|
931
939
|
events
|
|
932
940
|
}) => {
|
|
933
|
-
var _a
|
|
941
|
+
var _a;
|
|
934
942
|
const { theme: theme2 } = useTheme();
|
|
935
943
|
const [filter, setFilter] = useState("open");
|
|
936
944
|
const prSlice = context.getSlice("pullRequests");
|
|
937
945
|
const hasPRs = context.hasSlice("pullRequests");
|
|
938
946
|
const isLoading = context.isSliceLoading("pullRequests");
|
|
939
947
|
const pullRequests = ((_a = prSlice == null ? void 0 : prSlice.data) == null ? void 0 : _a.pullRequests) ?? [];
|
|
940
|
-
const owner = (_b = prSlice == null ? void 0 : prSlice.data) == null ? void 0 : _b.owner;
|
|
941
|
-
const repo = (_c = prSlice == null ? void 0 : prSlice.data) == null ? void 0 : _c.repo;
|
|
942
948
|
useEffect(() => {
|
|
943
949
|
const unsubscribers = [
|
|
944
950
|
// Tool: refresh pull requests
|
|
@@ -953,7 +959,7 @@ const GitPullRequestsPanel = ({
|
|
|
953
959
|
events.on("git-panels.pull-requests:set-filter", (event) => {
|
|
954
960
|
var _a2;
|
|
955
961
|
const newFilter = (_a2 = event.payload) == null ? void 0 : _a2.filter;
|
|
956
|
-
if (newFilter && ["
|
|
962
|
+
if (newFilter && ["open", "closed"].includes(newFilter)) {
|
|
957
963
|
setFilter(newFilter);
|
|
958
964
|
}
|
|
959
965
|
})
|
|
@@ -961,15 +967,12 @@ const GitPullRequestsPanel = ({
|
|
|
961
967
|
return () => unsubscribers.forEach((unsub) => unsub());
|
|
962
968
|
}, [events, context]);
|
|
963
969
|
const filteredPullRequests = useMemo(() => {
|
|
964
|
-
if (filter === "all") {
|
|
965
|
-
return pullRequests;
|
|
966
|
-
}
|
|
967
970
|
return pullRequests.filter((pr) => pr.state === filter);
|
|
968
971
|
}, [filter, pullRequests]);
|
|
969
972
|
const counts = useMemo(() => {
|
|
970
973
|
const open = pullRequests.filter((pr) => pr.state === "open").length;
|
|
971
974
|
const closed = pullRequests.filter((pr) => pr.state === "closed").length;
|
|
972
|
-
return { open, closed
|
|
975
|
+
return { open, closed };
|
|
973
976
|
}, [pullRequests]);
|
|
974
977
|
const handleRefresh = async () => {
|
|
975
978
|
try {
|
|
@@ -990,7 +993,7 @@ const GitPullRequestsPanel = ({
|
|
|
990
993
|
display: "flex",
|
|
991
994
|
flexDirection: "column",
|
|
992
995
|
height: "100%",
|
|
993
|
-
backgroundColor: theme2.colors.
|
|
996
|
+
backgroundColor: theme2.colors.background,
|
|
994
997
|
overflow: "hidden"
|
|
995
998
|
};
|
|
996
999
|
const renderState = (icon, title, description) => /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsx(
|
|
@@ -1080,7 +1083,7 @@ const GitPullRequestsPanel = ({
|
|
|
1080
1083
|
minHeight: "40px",
|
|
1081
1084
|
padding: "0 12px",
|
|
1082
1085
|
borderBottom: `1px solid ${theme2.colors.border}`,
|
|
1083
|
-
backgroundColor: theme2.colors.
|
|
1086
|
+
backgroundColor: theme2.colors.background,
|
|
1084
1087
|
display: "flex",
|
|
1085
1088
|
alignItems: "center",
|
|
1086
1089
|
justifyContent: "space-between",
|
|
@@ -1102,23 +1105,7 @@ const GitPullRequestsPanel = ({
|
|
|
1102
1105
|
},
|
|
1103
1106
|
children: [
|
|
1104
1107
|
/* @__PURE__ */ jsx(GitPullRequest, { size: 14 }),
|
|
1105
|
-
"Pull Requests"
|
|
1106
|
-
owner && repo && /* @__PURE__ */ jsxs(
|
|
1107
|
-
"span",
|
|
1108
|
-
{
|
|
1109
|
-
style: {
|
|
1110
|
-
fontWeight: 400,
|
|
1111
|
-
textTransform: "none",
|
|
1112
|
-
opacity: 0.7
|
|
1113
|
-
},
|
|
1114
|
-
children: [
|
|
1115
|
-
"· ",
|
|
1116
|
-
owner,
|
|
1117
|
-
"/",
|
|
1118
|
-
repo
|
|
1119
|
-
]
|
|
1120
|
-
}
|
|
1121
|
-
)
|
|
1108
|
+
"Pull Requests"
|
|
1122
1109
|
]
|
|
1123
1110
|
}
|
|
1124
1111
|
),
|
|
@@ -1159,9 +1146,9 @@ const GitPullRequestsPanel = ({
|
|
|
1159
1146
|
display: "flex",
|
|
1160
1147
|
borderBottom: `1px solid ${theme2.colors.border}`
|
|
1161
1148
|
},
|
|
1162
|
-
children: ["open", "closed"
|
|
1149
|
+
children: ["open", "closed"].map((value) => {
|
|
1163
1150
|
const isActive = filter === value;
|
|
1164
|
-
const label = value === "open" ? "Open" :
|
|
1151
|
+
const label = value === "open" ? "Open" : "Closed";
|
|
1165
1152
|
return /* @__PURE__ */ jsxs(
|
|
1166
1153
|
"button",
|
|
1167
1154
|
{
|
|
@@ -1223,8 +1210,8 @@ const GitPullRequestsPanel = ({
|
|
|
1223
1210
|
/* @__PURE__ */ jsx("div", { style: { fontFamily: theme2.fonts.heading, fontSize: theme2.fontSizes[1], fontWeight: 600 }, children: "No pull requests found" }),
|
|
1224
1211
|
/* @__PURE__ */ jsxs("div", { style: { marginTop: "4px", fontSize: theme2.fontSizes[0] }, children: [
|
|
1225
1212
|
"There are no ",
|
|
1226
|
-
filter
|
|
1227
|
-
"pull requests to display."
|
|
1213
|
+
filter,
|
|
1214
|
+
" pull requests to display."
|
|
1228
1215
|
] })
|
|
1229
1216
|
]
|
|
1230
1217
|
}
|
|
@@ -1234,11 +1221,10 @@ const GitPullRequestsPanel = ({
|
|
|
1234
1221
|
] });
|
|
1235
1222
|
};
|
|
1236
1223
|
const PullRequestCard = ({ pr, theme: theme2, onClick }) => {
|
|
1237
|
-
var _a, _b, _c
|
|
1224
|
+
var _a, _b, _c;
|
|
1225
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
1238
1226
|
const isMerged = pr.merged_at !== null;
|
|
1239
1227
|
const isOpen = pr.state === "open";
|
|
1240
|
-
const badgeColor = isOpen ? theme2.colors.success || "#22c55e" : isMerged ? theme2.colors.primary : theme2.colors.error || "#ef4444";
|
|
1241
|
-
const badgeBg = `${badgeColor}22`;
|
|
1242
1228
|
const totalComments = (pr.comments || 0) + (pr.review_comments || 0);
|
|
1243
1229
|
return /* @__PURE__ */ jsxs(
|
|
1244
1230
|
"div",
|
|
@@ -1256,12 +1242,13 @@ const PullRequestCard = ({ pr, theme: theme2, onClick }) => {
|
|
|
1256
1242
|
border: `1px solid ${theme2.colors.border}`,
|
|
1257
1243
|
borderRadius: "12px",
|
|
1258
1244
|
padding: "16px",
|
|
1259
|
-
backgroundColor: theme2.colors.
|
|
1245
|
+
backgroundColor: theme2.colors.backgroundSecondary,
|
|
1260
1246
|
display: "flex",
|
|
1261
1247
|
flexDirection: "column",
|
|
1262
1248
|
gap: "10px",
|
|
1263
1249
|
cursor: onClick ? "pointer" : "default",
|
|
1264
|
-
transition: "border-color 0.15s ease"
|
|
1250
|
+
transition: "border-color 0.15s ease",
|
|
1251
|
+
minWidth: 0
|
|
1265
1252
|
},
|
|
1266
1253
|
children: [
|
|
1267
1254
|
/* @__PURE__ */ jsxs(
|
|
@@ -1269,254 +1256,192 @@ const PullRequestCard = ({ pr, theme: theme2, onClick }) => {
|
|
|
1269
1256
|
{
|
|
1270
1257
|
style: {
|
|
1271
1258
|
display: "flex",
|
|
1272
|
-
alignItems: "
|
|
1273
|
-
|
|
1274
|
-
|
|
1259
|
+
alignItems: "center",
|
|
1260
|
+
gap: "8px",
|
|
1261
|
+
minWidth: 0,
|
|
1262
|
+
overflow: "hidden"
|
|
1275
1263
|
},
|
|
1276
1264
|
children: [
|
|
1277
1265
|
/* @__PURE__ */ jsxs(
|
|
1278
|
-
"
|
|
1266
|
+
"span",
|
|
1279
1267
|
{
|
|
1280
1268
|
style: {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1269
|
+
fontFamily: theme2.fonts.heading,
|
|
1270
|
+
fontSize: theme2.fontSizes[1],
|
|
1271
|
+
fontWeight: 600,
|
|
1272
|
+
color: theme2.colors.textSecondary,
|
|
1273
|
+
flexShrink: 0
|
|
1285
1274
|
},
|
|
1286
1275
|
children: [
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
{
|
|
1290
|
-
style: {
|
|
1291
|
-
display: "flex",
|
|
1292
|
-
alignItems: "center",
|
|
1293
|
-
gap: "10px",
|
|
1294
|
-
flexWrap: "wrap"
|
|
1295
|
-
},
|
|
1296
|
-
children: [
|
|
1297
|
-
/* @__PURE__ */ jsxs(
|
|
1298
|
-
"span",
|
|
1299
|
-
{
|
|
1300
|
-
style: {
|
|
1301
|
-
display: "inline-flex",
|
|
1302
|
-
alignItems: "center",
|
|
1303
|
-
gap: "6px",
|
|
1304
|
-
padding: "4px 10px",
|
|
1305
|
-
borderRadius: "999px",
|
|
1306
|
-
backgroundColor: badgeBg,
|
|
1307
|
-
color: badgeColor,
|
|
1308
|
-
fontFamily: theme2.fonts.heading,
|
|
1309
|
-
fontSize: theme2.fontSizes[0],
|
|
1310
|
-
fontWeight: 600,
|
|
1311
|
-
textTransform: "uppercase",
|
|
1312
|
-
letterSpacing: "0.02em"
|
|
1313
|
-
},
|
|
1314
|
-
children: [
|
|
1315
|
-
isOpen ? "Open" : isMerged ? "Merged" : "Closed",
|
|
1316
|
-
pr.draft && /* @__PURE__ */ jsx(
|
|
1317
|
-
"span",
|
|
1318
|
-
{
|
|
1319
|
-
style: {
|
|
1320
|
-
marginLeft: "6px",
|
|
1321
|
-
padding: "2px 6px",
|
|
1322
|
-
borderRadius: "8px",
|
|
1323
|
-
backgroundColor: theme2.colors.backgroundSecondary,
|
|
1324
|
-
color: theme2.colors.textSecondary,
|
|
1325
|
-
fontFamily: theme2.fonts.body,
|
|
1326
|
-
fontSize: theme2.fontSizes[0],
|
|
1327
|
-
fontWeight: 500,
|
|
1328
|
-
textTransform: "capitalize"
|
|
1329
|
-
},
|
|
1330
|
-
children: "Draft"
|
|
1331
|
-
}
|
|
1332
|
-
)
|
|
1333
|
-
]
|
|
1334
|
-
}
|
|
1335
|
-
),
|
|
1336
|
-
/* @__PURE__ */ jsxs(
|
|
1337
|
-
"span",
|
|
1338
|
-
{
|
|
1339
|
-
style: {
|
|
1340
|
-
fontFamily: theme2.fonts.heading,
|
|
1341
|
-
fontSize: theme2.fontSizes[2],
|
|
1342
|
-
fontWeight: 600,
|
|
1343
|
-
color: theme2.colors.text,
|
|
1344
|
-
display: "inline-flex",
|
|
1345
|
-
alignItems: "center",
|
|
1346
|
-
gap: "8px"
|
|
1347
|
-
},
|
|
1348
|
-
children: [
|
|
1349
|
-
"#",
|
|
1350
|
-
pr.number,
|
|
1351
|
-
" ",
|
|
1352
|
-
pr.title
|
|
1353
|
-
]
|
|
1354
|
-
}
|
|
1355
|
-
)
|
|
1356
|
-
]
|
|
1357
|
-
}
|
|
1358
|
-
),
|
|
1359
|
-
/* @__PURE__ */ jsxs(
|
|
1360
|
-
"div",
|
|
1361
|
-
{
|
|
1362
|
-
style: {
|
|
1363
|
-
display: "flex",
|
|
1364
|
-
alignItems: "center",
|
|
1365
|
-
gap: "12px",
|
|
1366
|
-
flexWrap: "wrap",
|
|
1367
|
-
color: theme2.colors.textSecondary,
|
|
1368
|
-
fontFamily: theme2.fonts.body,
|
|
1369
|
-
fontSize: theme2.fontSizes[0]
|
|
1370
|
-
},
|
|
1371
|
-
children: [
|
|
1372
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
1373
|
-
"by ",
|
|
1374
|
-
((_a = pr.user) == null ? void 0 : _a.login) ?? "unknown"
|
|
1375
|
-
] }),
|
|
1376
|
-
/* @__PURE__ */ jsxs(
|
|
1377
|
-
"span",
|
|
1378
|
-
{
|
|
1379
|
-
style: {
|
|
1380
|
-
display: "inline-flex",
|
|
1381
|
-
alignItems: "center",
|
|
1382
|
-
gap: "4px"
|
|
1383
|
-
},
|
|
1384
|
-
children: [
|
|
1385
|
-
/* @__PURE__ */ jsx(Calendar, { size: 12 }),
|
|
1386
|
-
" Opened ",
|
|
1387
|
-
formatDate(pr.created_at)
|
|
1388
|
-
]
|
|
1389
|
-
}
|
|
1390
|
-
),
|
|
1391
|
-
!isOpen && /* @__PURE__ */ jsxs(
|
|
1392
|
-
"span",
|
|
1393
|
-
{
|
|
1394
|
-
style: {
|
|
1395
|
-
display: "inline-flex",
|
|
1396
|
-
alignItems: "center",
|
|
1397
|
-
gap: "4px"
|
|
1398
|
-
},
|
|
1399
|
-
children: [
|
|
1400
|
-
isMerged ? "Merged" : "Closed",
|
|
1401
|
-
" ",
|
|
1402
|
-
formatDate(pr.merged_at || pr.updated_at)
|
|
1403
|
-
]
|
|
1404
|
-
}
|
|
1405
|
-
),
|
|
1406
|
-
totalComments > 0 && /* @__PURE__ */ jsxs(
|
|
1407
|
-
"span",
|
|
1408
|
-
{
|
|
1409
|
-
style: {
|
|
1410
|
-
display: "inline-flex",
|
|
1411
|
-
alignItems: "center",
|
|
1412
|
-
gap: "4px"
|
|
1413
|
-
},
|
|
1414
|
-
children: [
|
|
1415
|
-
/* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
|
|
1416
|
-
" ",
|
|
1417
|
-
totalComments,
|
|
1418
|
-
" comment",
|
|
1419
|
-
totalComments === 1 ? "" : "s"
|
|
1420
|
-
]
|
|
1421
|
-
}
|
|
1422
|
-
)
|
|
1423
|
-
]
|
|
1424
|
-
}
|
|
1425
|
-
),
|
|
1426
|
-
/* @__PURE__ */ jsxs(
|
|
1427
|
-
"div",
|
|
1428
|
-
{
|
|
1429
|
-
style: {
|
|
1430
|
-
display: "flex",
|
|
1431
|
-
alignItems: "center",
|
|
1432
|
-
gap: "8px",
|
|
1433
|
-
color: theme2.colors.textSecondary,
|
|
1434
|
-
fontFamily: theme2.fonts.monospace,
|
|
1435
|
-
fontSize: theme2.fontSizes[0]
|
|
1436
|
-
},
|
|
1437
|
-
children: [
|
|
1438
|
-
/* @__PURE__ */ jsx(GitBranch, { size: 14 }),
|
|
1439
|
-
/* @__PURE__ */ jsxs("span", { children: [
|
|
1440
|
-
((_b = pr.base) == null ? void 0 : _b.ref) ?? "unknown",
|
|
1441
|
-
" ",
|
|
1442
|
-
/* @__PURE__ */ jsx("span", { style: { opacity: 0.6 }, children: "←" }),
|
|
1443
|
-
" ",
|
|
1444
|
-
((_c = pr.head) == null ? void 0 : _c.ref) ?? "unknown"
|
|
1445
|
-
] })
|
|
1446
|
-
]
|
|
1447
|
-
}
|
|
1448
|
-
),
|
|
1449
|
-
pr.body && /* @__PURE__ */ jsx(
|
|
1450
|
-
"div",
|
|
1451
|
-
{
|
|
1452
|
-
style: {
|
|
1453
|
-
marginTop: "4px",
|
|
1454
|
-
color: theme2.colors.textSecondary,
|
|
1455
|
-
fontFamily: theme2.fonts.body,
|
|
1456
|
-
fontSize: theme2.fontSizes[1],
|
|
1457
|
-
lineHeight: 1.5,
|
|
1458
|
-
maxHeight: "72px",
|
|
1459
|
-
overflow: "hidden",
|
|
1460
|
-
textOverflow: "ellipsis"
|
|
1461
|
-
},
|
|
1462
|
-
children: pr.body
|
|
1463
|
-
}
|
|
1464
|
-
)
|
|
1276
|
+
"#",
|
|
1277
|
+
pr.number
|
|
1465
1278
|
]
|
|
1466
1279
|
}
|
|
1467
1280
|
),
|
|
1281
|
+
pr.draft && /* @__PURE__ */ jsx(
|
|
1282
|
+
"span",
|
|
1283
|
+
{
|
|
1284
|
+
style: {
|
|
1285
|
+
padding: "4px 10px",
|
|
1286
|
+
borderRadius: "999px",
|
|
1287
|
+
backgroundColor: theme2.colors.background,
|
|
1288
|
+
color: theme2.colors.textSecondary,
|
|
1289
|
+
fontFamily: theme2.fonts.heading,
|
|
1290
|
+
fontSize: theme2.fontSizes[0],
|
|
1291
|
+
fontWeight: 600,
|
|
1292
|
+
textTransform: "uppercase",
|
|
1293
|
+
letterSpacing: "0.02em",
|
|
1294
|
+
flexShrink: 0
|
|
1295
|
+
},
|
|
1296
|
+
children: "Draft"
|
|
1297
|
+
}
|
|
1298
|
+
),
|
|
1468
1299
|
/* @__PURE__ */ jsxs(
|
|
1469
|
-
"
|
|
1300
|
+
"span",
|
|
1470
1301
|
{
|
|
1471
|
-
href: pr.html_url,
|
|
1472
|
-
target: "_blank",
|
|
1473
|
-
rel: "noreferrer",
|
|
1474
|
-
onClick: (e) => e.stopPropagation(),
|
|
1475
1302
|
style: {
|
|
1476
1303
|
display: "inline-flex",
|
|
1477
1304
|
alignItems: "center",
|
|
1478
1305
|
gap: "6px",
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
fontSize: theme2.fontSizes[1],
|
|
1487
|
-
fontWeight: 600,
|
|
1488
|
-
whiteSpace: "nowrap"
|
|
1306
|
+
color: theme2.colors.textSecondary,
|
|
1307
|
+
fontFamily: theme2.fonts.monospace,
|
|
1308
|
+
fontSize: theme2.fontSizes[0],
|
|
1309
|
+
overflow: "hidden",
|
|
1310
|
+
textOverflow: "ellipsis",
|
|
1311
|
+
whiteSpace: "nowrap",
|
|
1312
|
+
minWidth: 0
|
|
1489
1313
|
},
|
|
1490
1314
|
children: [
|
|
1491
|
-
|
|
1492
|
-
|
|
1315
|
+
/* @__PURE__ */ jsx(GitBranch, { size: 14, style: { flexShrink: 0 } }),
|
|
1316
|
+
((_a = pr.head) == null ? void 0 : _a.ref) ?? "unknown",
|
|
1317
|
+
" → ",
|
|
1318
|
+
((_b = pr.base) == null ? void 0 : _b.ref) ?? "unknown"
|
|
1493
1319
|
]
|
|
1494
1320
|
}
|
|
1495
1321
|
)
|
|
1496
1322
|
]
|
|
1497
1323
|
}
|
|
1498
1324
|
),
|
|
1499
|
-
|
|
1325
|
+
/* @__PURE__ */ jsx(
|
|
1326
|
+
"div",
|
|
1327
|
+
{
|
|
1328
|
+
style: {
|
|
1329
|
+
fontFamily: theme2.fonts.heading,
|
|
1330
|
+
fontSize: theme2.fontSizes[2],
|
|
1331
|
+
fontWeight: 600,
|
|
1332
|
+
color: theme2.colors.text,
|
|
1333
|
+
lineHeight: 1.3,
|
|
1334
|
+
wordBreak: "break-word"
|
|
1335
|
+
},
|
|
1336
|
+
children: pr.title
|
|
1337
|
+
}
|
|
1338
|
+
),
|
|
1339
|
+
/* @__PURE__ */ jsxs(
|
|
1500
1340
|
"div",
|
|
1501
1341
|
{
|
|
1502
1342
|
style: {
|
|
1503
1343
|
display: "flex",
|
|
1504
1344
|
alignItems: "center",
|
|
1505
|
-
gap: "
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1345
|
+
gap: "8px 12px",
|
|
1346
|
+
flexWrap: "wrap",
|
|
1347
|
+
color: theme2.colors.textSecondary,
|
|
1348
|
+
fontFamily: theme2.fonts.body,
|
|
1349
|
+
fontSize: theme2.fontSizes[0]
|
|
1509
1350
|
},
|
|
1510
1351
|
children: [
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1352
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
1353
|
+
"by ",
|
|
1354
|
+
((_c = pr.user) == null ? void 0 : _c.login) ?? "unknown"
|
|
1355
|
+
] }),
|
|
1356
|
+
/* @__PURE__ */ jsxs(
|
|
1357
|
+
"span",
|
|
1358
|
+
{
|
|
1359
|
+
style: {
|
|
1360
|
+
display: "inline-flex",
|
|
1361
|
+
alignItems: "center",
|
|
1362
|
+
gap: "4px"
|
|
1363
|
+
},
|
|
1364
|
+
children: [
|
|
1365
|
+
/* @__PURE__ */ jsx(Calendar, { size: 12 }),
|
|
1366
|
+
" ",
|
|
1367
|
+
formatDate(pr.created_at)
|
|
1368
|
+
]
|
|
1369
|
+
}
|
|
1370
|
+
),
|
|
1371
|
+
!isOpen && /* @__PURE__ */ jsxs(
|
|
1372
|
+
"span",
|
|
1373
|
+
{
|
|
1374
|
+
style: {
|
|
1375
|
+
display: "inline-flex",
|
|
1376
|
+
alignItems: "center",
|
|
1377
|
+
gap: "4px"
|
|
1378
|
+
},
|
|
1379
|
+
children: [
|
|
1380
|
+
isMerged ? "Merged" : "Closed",
|
|
1381
|
+
" ",
|
|
1382
|
+
formatDate(pr.merged_at || pr.updated_at)
|
|
1383
|
+
]
|
|
1384
|
+
}
|
|
1385
|
+
),
|
|
1386
|
+
totalComments > 0 && /* @__PURE__ */ jsxs(
|
|
1387
|
+
"span",
|
|
1388
|
+
{
|
|
1389
|
+
style: {
|
|
1390
|
+
display: "inline-flex",
|
|
1391
|
+
alignItems: "center",
|
|
1392
|
+
gap: "4px"
|
|
1393
|
+
},
|
|
1394
|
+
children: [
|
|
1395
|
+
/* @__PURE__ */ jsx(MessageSquare, { size: 12 }),
|
|
1396
|
+
" ",
|
|
1397
|
+
totalComments
|
|
1398
|
+
]
|
|
1399
|
+
}
|
|
1400
|
+
)
|
|
1517
1401
|
]
|
|
1518
1402
|
}
|
|
1519
|
-
)
|
|
1403
|
+
),
|
|
1404
|
+
pr.body && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1405
|
+
/* @__PURE__ */ jsxs(
|
|
1406
|
+
"button",
|
|
1407
|
+
{
|
|
1408
|
+
type: "button",
|
|
1409
|
+
onClick: (e) => {
|
|
1410
|
+
e.stopPropagation();
|
|
1411
|
+
setIsExpanded(!isExpanded);
|
|
1412
|
+
},
|
|
1413
|
+
style: {
|
|
1414
|
+
display: "inline-flex",
|
|
1415
|
+
alignItems: "center",
|
|
1416
|
+
gap: "4px",
|
|
1417
|
+
padding: 0,
|
|
1418
|
+
border: "none",
|
|
1419
|
+
backgroundColor: "transparent",
|
|
1420
|
+
color: theme2.colors.textSecondary,
|
|
1421
|
+
fontFamily: theme2.fonts.body,
|
|
1422
|
+
fontSize: theme2.fontSizes[0],
|
|
1423
|
+
cursor: "pointer"
|
|
1424
|
+
},
|
|
1425
|
+
children: [
|
|
1426
|
+
isExpanded ? /* @__PURE__ */ jsx(ChevronUp, { size: 14 }) : /* @__PURE__ */ jsx(ChevronDown, { size: 14 }),
|
|
1427
|
+
isExpanded ? "Collapse" : "Expand"
|
|
1428
|
+
]
|
|
1429
|
+
}
|
|
1430
|
+
),
|
|
1431
|
+
isExpanded && /* @__PURE__ */ jsx(
|
|
1432
|
+
"div",
|
|
1433
|
+
{
|
|
1434
|
+
style: {
|
|
1435
|
+
color: theme2.colors.textSecondary,
|
|
1436
|
+
fontFamily: theme2.fonts.body,
|
|
1437
|
+
fontSize: theme2.fontSizes[1],
|
|
1438
|
+
lineHeight: 1.5,
|
|
1439
|
+
wordBreak: "break-word"
|
|
1440
|
+
},
|
|
1441
|
+
children: pr.body
|
|
1442
|
+
}
|
|
1443
|
+
)
|
|
1444
|
+
] })
|
|
1520
1445
|
]
|
|
1521
1446
|
}
|
|
1522
1447
|
);
|