@agimon-ai/po-template-advanced 0.0.0-alpha.80 → 0.0.0-alpha.82
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensions/native.mjs +22 -6
- package/dist/extensions/native.mjs.map +1 -1
- package/dist/extensions/web.mjs +17 -6
- package/dist/extensions/web.mjs.map +1 -1
- package/dist/webClient.cjs +16 -5
- package/dist/webClient.cjs.map +1 -1
- package/dist/webClient.mjs +17 -6
- package/dist/webClient.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -1289,7 +1289,7 @@ function SessionCard({ session, onOpen, onMenu, onSetupMenu, hostLabel, stale =
|
|
|
1289
1289
|
]
|
|
1290
1290
|
}, setup.id))] });
|
|
1291
1291
|
}
|
|
1292
|
-
function WorkspaceHeader({ workspace, actions, onWorkspaceMenu, onCreate, merged = false, stale = false }) {
|
|
1292
|
+
function WorkspaceHeader({ workspace, actions, onWorkspaceMenu, onCreate, onOpen, merged = false, stale = false }) {
|
|
1293
1293
|
return /* @__PURE__ */ jsxs(View, {
|
|
1294
1294
|
style: styles.group,
|
|
1295
1295
|
children: [
|
|
@@ -1301,8 +1301,12 @@ function WorkspaceHeader({ workspace, actions, onWorkspaceMenu, onCreate, merged
|
|
|
1301
1301
|
size: 16,
|
|
1302
1302
|
color: "dim"
|
|
1303
1303
|
}),
|
|
1304
|
-
/* @__PURE__ */ jsxs(
|
|
1305
|
-
style: styles.groupText,
|
|
1304
|
+
/* @__PURE__ */ jsxs(Pressable, {
|
|
1305
|
+
style: [styles.groupText, styles.workspaceLink],
|
|
1306
|
+
accessibilityRole: onOpen ? "button" : "header",
|
|
1307
|
+
accessibilityLabel: onOpen ? `Open ${workspace.name} workspace` : workspace.name,
|
|
1308
|
+
disabled: !onOpen,
|
|
1309
|
+
onPress: onOpen,
|
|
1306
1310
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
1307
1311
|
style: styles.groupName,
|
|
1308
1312
|
numberOfLines: 1,
|
|
@@ -1393,7 +1397,7 @@ function SessionCreateMenu({ onCreateWorkspace, onCreateSession, workspaceDisabl
|
|
|
1393
1397
|
});
|
|
1394
1398
|
}
|
|
1395
1399
|
/** The cockpit's workspace groups, with computers as a display filter rather than separate rails. */
|
|
1396
|
-
function AdvancedSessions({ workspaces, openSession, actions, setHeaderAction, hostPresentation }) {
|
|
1400
|
+
function AdvancedSessions({ workspaces, openSession, openWorkspace, actions, setHeaderAction, hostPresentation }) {
|
|
1397
1401
|
const [selectedHost, setSelectedHost] = useState(hostPresentation?.initialHostId ?? null);
|
|
1398
1402
|
const selected = hostPresentation?.hosts.some(({ id }) => id === selectedHost) ? selectedHost : null;
|
|
1399
1403
|
if (selectedHost !== selected) setSelectedHost(selected);
|
|
@@ -1490,6 +1494,13 @@ function AdvancedSessions({ workspaces, openSession, actions, setHeaderAction, h
|
|
|
1490
1494
|
renderSectionHeader: ({ section }) => section.workspace.kind === "session" ? null : /* @__PURE__ */ jsx(WorkspaceHeader, {
|
|
1491
1495
|
workspace: section.workspace,
|
|
1492
1496
|
actions,
|
|
1497
|
+
onOpen: openWorkspace && !section.workspace.legacy ? () => {
|
|
1498
|
+
const members = workspaces.filter((entry) => !entry.legacy && entry.name === section.workspace.name);
|
|
1499
|
+
if (hosts.length > 1 && members.length > 1) {
|
|
1500
|
+
setChooseAction("open");
|
|
1501
|
+
setChoosing(members);
|
|
1502
|
+
} else openWorkspace(section.workspace.id);
|
|
1503
|
+
} : void 0,
|
|
1493
1504
|
onWorkspaceMenu: (entry) => {
|
|
1494
1505
|
const members = workspaces.filter((workspace) => !workspace.legacy && workspace.name === entry.name);
|
|
1495
1506
|
if (hosts.length > 1 && members.length > 1) {
|
|
@@ -1590,10 +1601,11 @@ function AdvancedSessions({ workspaces, openSession, actions, setHeaderAction, h
|
|
|
1590
1601
|
children: [host.label, host.status !== "connected" ? " · Unavailable" : ""]
|
|
1591
1602
|
}, host.id)) : choosing?.map((workspace) => /* @__PURE__ */ jsxs(Button, {
|
|
1592
1603
|
variant: "ghost",
|
|
1593
|
-
disabled: stale(workspace.id) || !workspace.available,
|
|
1604
|
+
disabled: chooseAction !== "open" && (stale(workspace.id) || !workspace.available),
|
|
1594
1605
|
onPress: () => {
|
|
1595
1606
|
setChoosing(null);
|
|
1596
|
-
if (chooseAction === "
|
|
1607
|
+
if (chooseAction === "open") openWorkspace?.(workspace.id);
|
|
1608
|
+
else if (chooseAction === "menu") setWorkspaceMenu(workspace.id);
|
|
1597
1609
|
else actions.createSession(workspace.id);
|
|
1598
1610
|
},
|
|
1599
1611
|
children: [
|
|
@@ -1681,6 +1693,10 @@ const styles = StyleSheet.create((theme) => {
|
|
|
1681
1693
|
flex: 1,
|
|
1682
1694
|
minWidth: 0
|
|
1683
1695
|
},
|
|
1696
|
+
workspaceLink: {
|
|
1697
|
+
minHeight: 44,
|
|
1698
|
+
justifyContent: "center"
|
|
1699
|
+
},
|
|
1684
1700
|
groupName: {
|
|
1685
1701
|
...text("base", theme.colors.hi),
|
|
1686
1702
|
fontWeight: theme.fontWeight.semibold,
|