@hanzo/rooms 0.1.87 → 0.1.88
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/Orgs.js +8 -10
- package/package.json +1 -1
package/dist/Orgs.js
CHANGED
|
@@ -584,7 +584,7 @@ function Pick({ members, current, onPick, onClose, }) {
|
|
|
584
584
|
e.preventDefault();
|
|
585
585
|
if (shown[0])
|
|
586
586
|
onPick(shown[0].name);
|
|
587
|
-
}, children: _jsx(SearchInput, { name: "organizations", value: q, onChange: setQ, placeholder: sudo ? 'Search every organization' : 'Find an organization', actions: sudo ? null : (_jsxs(Button, { type: "button", onClick: () => setFounding(true), children: [_jsx(Plus, { size: 16, "aria-hidden": true }), "New organization"] })) }) }), _jsx(YStack, { render: "ul", "aria-label": "Your organizations", m: 0, p: 0, mt: 14, gap: 8, children: shown.map((o) => (_jsx(Choice, { org: o, current: o.name === current, onPress: () => onPick(o.name) }, o.name))) }), shown.length === 0 ? (_jsxs(Text, { render: "p", mt: 14, fontSize: "$3", color: "$soft", children: ["None of yours matches \u201C", q.trim(), "\u201D."] })) : null, sudo ? _jsx(Everyone, { q: q, skip: members }) : null] }), founding ? _jsx(Found, { onClose: () => setFounding(false)
|
|
587
|
+
}, children: _jsx(SearchInput, { name: "organizations", value: q, onChange: setQ, placeholder: sudo ? 'Search every organization' : 'Find an organization', actions: sudo ? null : (_jsxs(Button, { type: "button", onClick: () => setFounding(true), children: [_jsx(Plus, { size: 16, "aria-hidden": true }), "New organization"] })) }) }), _jsx(YStack, { render: "ul", "aria-label": "Your organizations", m: 0, p: 0, mt: 14, gap: 8, children: shown.map((o) => (_jsx(Choice, { org: o, current: o.name === current, onPress: () => onPick(o.name) }, o.name))) }), shown.length === 0 ? (_jsxs(Text, { render: "p", mt: 14, fontSize: "$3", color: "$soft", children: ["None of yours matches \u201C", q.trim(), "\u201D."] })) : null, sudo ? _jsx(Everyone, { q: q, skip: members }) : null] }), founding ? _jsx(Found, { onClose: () => setFounding(false) }) : null] }));
|
|
588
588
|
}
|
|
589
589
|
/**
|
|
590
590
|
* EVERY ORGANIZATION, for a SuperAdmin to step into.
|
|
@@ -656,9 +656,12 @@ function Everyone({ q, skip }) {
|
|
|
656
656
|
* re-keys the session (cloud cors_origin.go `sessionRoutes`). It is sent the
|
|
657
657
|
* name when the name makes the slug, and the slug when the slug was typed, the
|
|
658
658
|
* display name then written on the row (lib/invite.ts `setOrganizationProfile`).
|
|
659
|
-
* The token in hand predates it, so it is refreshed
|
|
659
|
+
* The token in hand predates it, so it is refreshed, and the organization opens on
|
|
660
|
+
* a load: @hanzo/iam's `useOrganizations` reads the token once per mount, and an
|
|
661
|
+
* instance the room mounts on the old token writes its home (the token's first
|
|
662
|
+
* org) back over the pick, which left the room unscoped after one request.
|
|
660
663
|
*/
|
|
661
|
-
function Found({ onClose
|
|
664
|
+
function Found({ onClose }) {
|
|
662
665
|
const { sdk } = useIam();
|
|
663
666
|
const [name, setName] = useState('');
|
|
664
667
|
const [typed, setTyped] = useState(null);
|
|
@@ -695,13 +698,8 @@ function Found({ onClose, onMade }) {
|
|
|
695
698
|
throw new Error(`${made} is made, and it is still called ${made}: ${say(err)}`);
|
|
696
699
|
});
|
|
697
700
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
pick(made);
|
|
701
|
-
window.location.reload();
|
|
702
|
-
return;
|
|
703
|
-
}
|
|
704
|
-
onMade(made);
|
|
701
|
+
pick(made);
|
|
702
|
+
window.location.reload();
|
|
705
703
|
}
|
|
706
704
|
catch (err) {
|
|
707
705
|
setRefused(say(err));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/rooms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.88",
|
|
4
4
|
"description": "The workspace rooms — Home, Chat, Inbox, Contacts, Meet, Cal, Drive, Board, Work, Bots — and the frame that holds them, once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|