@industry-theme/github-panels 0.1.46 → 0.1.47
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":"GitHubMessagesPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitHubMessagesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAqBnD,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"GitHubMessagesPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitHubMessagesPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAqBnD,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,UAAU,CAAC;AAymCvE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAE7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;CAQvC,CAAC"}
|
package/dist/panels.bundle.js
CHANGED
|
@@ -47600,25 +47600,10 @@ const TimelineEventRenderer = ({ event }) => {
|
|
|
47600
47600
|
};
|
|
47601
47601
|
const GitHubMessagesPanelContent = ({ context, events }) => {
|
|
47602
47602
|
const { theme: theme2 } = useTheme();
|
|
47603
|
-
const
|
|
47604
|
-
|
|
47605
|
-
|
|
47606
|
-
|
|
47607
|
-
const sliceData = (_a = context.getSlice) == null ? void 0 : _a.call(context, "github-messages");
|
|
47608
|
-
if (sliceData) {
|
|
47609
|
-
setMessagesData(sliceData);
|
|
47610
|
-
}
|
|
47611
|
-
}, [context]);
|
|
47612
|
-
useEffect(() => {
|
|
47613
|
-
if (!events) return;
|
|
47614
|
-
const handleMessagesData = (event) => {
|
|
47615
|
-
setMessagesData(event.payload);
|
|
47616
|
-
};
|
|
47617
|
-
const unsubData = events.on("github-messages:data", handleMessagesData);
|
|
47618
|
-
return () => {
|
|
47619
|
-
if (typeof unsubData === "function") unsubData();
|
|
47620
|
-
};
|
|
47621
|
-
}, [events]);
|
|
47603
|
+
const messagesSlice = context.getSlice("github-messages");
|
|
47604
|
+
const isLoading = context.isSliceLoading("github-messages");
|
|
47605
|
+
const hasData = context.hasSlice("github-messages");
|
|
47606
|
+
const messagesData = messagesSlice == null ? void 0 : messagesSlice.data;
|
|
47622
47607
|
useEffect(() => {
|
|
47623
47608
|
if (!events) return;
|
|
47624
47609
|
const handleIssueSelected = (event) => {
|
|
@@ -47661,6 +47646,21 @@ const GitHubMessagesPanelContent = ({ context, events }) => {
|
|
|
47661
47646
|
backgroundColor: theme2.colors.background,
|
|
47662
47647
|
overflow: "hidden"
|
|
47663
47648
|
};
|
|
47649
|
+
if (isLoading && !hasData) {
|
|
47650
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsx(
|
|
47651
|
+
"div",
|
|
47652
|
+
{
|
|
47653
|
+
style: {
|
|
47654
|
+
flex: 1,
|
|
47655
|
+
display: "flex",
|
|
47656
|
+
alignItems: "center",
|
|
47657
|
+
justifyContent: "center",
|
|
47658
|
+
color: theme2.colors.textSecondary
|
|
47659
|
+
},
|
|
47660
|
+
children: "Loading conversation..."
|
|
47661
|
+
}
|
|
47662
|
+
) });
|
|
47663
|
+
}
|
|
47664
47664
|
if (!messagesData || !messagesData.target) {
|
|
47665
47665
|
return /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxs(
|
|
47666
47666
|
"div",
|
|
@@ -47710,21 +47710,6 @@ const GitHubMessagesPanelContent = ({ context, events }) => {
|
|
|
47710
47710
|
}
|
|
47711
47711
|
) });
|
|
47712
47712
|
}
|
|
47713
|
-
if (messagesData.loading) {
|
|
47714
|
-
return /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsx(
|
|
47715
|
-
"div",
|
|
47716
|
-
{
|
|
47717
|
-
style: {
|
|
47718
|
-
flex: 1,
|
|
47719
|
-
display: "flex",
|
|
47720
|
-
alignItems: "center",
|
|
47721
|
-
justifyContent: "center",
|
|
47722
|
-
color: theme2.colors.textSecondary
|
|
47723
|
-
},
|
|
47724
|
-
children: "Loading conversation..."
|
|
47725
|
-
}
|
|
47726
|
-
) });
|
|
47727
|
-
}
|
|
47728
47713
|
if (messagesData.error) {
|
|
47729
47714
|
return /* @__PURE__ */ jsx("div", { style: containerStyle, children: /* @__PURE__ */ jsxs(
|
|
47730
47715
|
"div",
|