@fungi.computer/tourtois 0.20.13 → 0.20.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/dist/AppPane.js
CHANGED
|
@@ -88,7 +88,7 @@ function WindowFailure({ projection, onReopen, }) {
|
|
|
88
88
|
const lost = projection.error instanceof AppError &&
|
|
89
89
|
projection.error.code === "DISCONNECTED";
|
|
90
90
|
const described = describeAppError(projection.error);
|
|
91
|
-
return (_jsx(ResultState, { className: "tourtois-window-failure", tone: "failed", headingLevel: 3, title: lost ? "This App lost its connection" : described.title, description: _jsxs(_Fragment, { children: [lost ? `${appTitle} stopped answering.` : described.message, _jsx("span", { className: "tourtois-window-failure-note", children: "A request may have finished even if its reply did not arrive, so check before repeating it." })] }), actions: _jsxs(_Fragment, { children: [_jsxs(Button, { type: "button", variant: "primary", onClick: onReopen, children: ["Reopen ", appTitle] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
91
|
+
return (_jsx(ResultState, { className: "tourtois-window-failure", role: "alert", tone: "failed", headingLevel: 3, title: lost ? "This App lost its connection" : described.title, description: _jsxs(_Fragment, { children: [lost ? `${appTitle} stopped answering.` : described.message, _jsx("span", { className: "tourtois-window-failure-note", children: "A request may have finished even if its reply did not arrive, so check before repeating it." })] }), actions: _jsxs(_Fragment, { children: [_jsxs(Button, { type: "button", variant: "primary", onClick: onReopen, children: ["Reopen ", appTitle] }), _jsx(Button, { type: "button", variant: "outline", onClick: () => {
|
|
92
92
|
window.location.reload();
|
|
93
93
|
}, children: "Reload workspace" })] }) }));
|
|
94
94
|
}
|
package/dist/desktop/Desktop.js
CHANGED
|
@@ -90,7 +90,6 @@ function ArrangedDesktop({ owner, ...props }) {
|
|
|
90
90
|
const visibleItems = availableDesktopLayout(snapshot.layout, catalog).items;
|
|
91
91
|
const { editing, onEditingChange } = props;
|
|
92
92
|
const [configuration, setConfiguration] = useState(null);
|
|
93
|
-
const [error, setError] = useState(null);
|
|
94
93
|
const [saving, setSaving] = useState(false);
|
|
95
94
|
const [saved, setSaved] = useState(false);
|
|
96
95
|
const stage = useRef(null);
|
|
@@ -132,6 +131,11 @@ function ArrangedDesktop({ owner, ...props }) {
|
|
|
132
131
|
: cell;
|
|
133
132
|
});
|
|
134
133
|
const placements = arrangeBento(projected, columns);
|
|
134
|
+
// Each failure is reported once, as a toast; nothing renders above the stage.
|
|
135
|
+
const reportFailure = (message) => {
|
|
136
|
+
setSaved(false);
|
|
137
|
+
toast.error(message, { toasterId: WORKBENCH_NOTICES });
|
|
138
|
+
};
|
|
135
139
|
const save = async (method, input, scope = "member") => {
|
|
136
140
|
setSaving(true);
|
|
137
141
|
try {
|
|
@@ -142,14 +146,16 @@ function ArrangedDesktop({ owner, ...props }) {
|
|
|
142
146
|
});
|
|
143
147
|
if (result.kind !== "accepted")
|
|
144
148
|
console.error("Desktop change refused", result.code);
|
|
145
|
-
|
|
146
|
-
if (result.kind === "accepted")
|
|
149
|
+
if (result.kind === "accepted") {
|
|
147
150
|
setSaved(true);
|
|
148
|
-
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
reportFailure(refusalMessage(result.code));
|
|
154
|
+
return false;
|
|
149
155
|
}
|
|
150
156
|
catch (cause) {
|
|
151
157
|
console.error("Desktop arrangement update failed", cause);
|
|
152
|
-
|
|
158
|
+
reportFailure("Your desktop change could not be confirmed.");
|
|
153
159
|
return false;
|
|
154
160
|
}
|
|
155
161
|
finally {
|
|
@@ -267,7 +273,7 @@ function ArrangedDesktop({ owner, ...props }) {
|
|
|
267
273
|
onEditingChange(false);
|
|
268
274
|
};
|
|
269
275
|
const longPress = useRef(undefined);
|
|
270
|
-
return (_jsxs(_Fragment, { children: [snapshot.refreshFailure ? (_jsx(Alert, { tone: "warning", description: snapshot.refreshFailure.message })) : null, editing ? (_jsx(ArrangeToolbar, { phone: props.phone, status: saving ? "saving" : saved ? "saved" : "idle",
|
|
276
|
+
return (_jsxs(_Fragment, { children: [snapshot.refreshFailure ? (_jsx(Alert, { tone: "warning", description: snapshot.refreshFailure.message })) : null, editing ? (_jsx(ArrangeToolbar, { phone: props.phone, status: saving ? "saving" : saved ? "saved" : "idle", canWriteTeam: snapshot.canWriteTeam, choices: choices, saving: saving, onChoose: addWidget, onReset: async () => {
|
|
271
277
|
if (!(await save("layout.reset", {})))
|
|
272
278
|
throw new Error("The layout was not reset");
|
|
273
279
|
}, onSaveTeam: () => {
|
|
@@ -306,7 +312,7 @@ function ArrangedDesktop({ owner, ...props }) {
|
|
|
306
312
|
});
|
|
307
313
|
else
|
|
308
314
|
void save("layout.reset", {});
|
|
309
|
-
}, children: "Restore Launcher" }) }) })) : null,
|
|
315
|
+
}, children: "Restore Launcher" }) }) })) : null, _jsx("div", { ref: stage, className: "tourtois-desktop-stage", style: { height }, "data-desktop-columns": columns, "data-preview": binding.preview, "data-arranging": editing ? "" : undefined, children: visibleItems.map((item) => {
|
|
310
316
|
const frame = binding.frames.get(item.id);
|
|
311
317
|
const gill = catalog.find((gill) => gill.surfaceId === item.surfaceId && gill.gillId === item.gillId);
|
|
312
318
|
if (!frame || !gill)
|
|
@@ -5,10 +5,9 @@ export type ArrangeStatus = "idle" | "saving" | "saved";
|
|
|
5
5
|
* Arrange's floating controls. They live in the chrome layer, take no flow
|
|
6
6
|
* space, and stay above every window.
|
|
7
7
|
*/
|
|
8
|
-
export declare function ArrangeToolbar({ phone, status,
|
|
8
|
+
export declare function ArrangeToolbar({ phone, status, canWriteTeam, choices, saving, onChoose, onReset, onSaveTeam, onDone, }: {
|
|
9
9
|
phone: boolean;
|
|
10
10
|
status: ArrangeStatus;
|
|
11
|
-
error: string | null;
|
|
12
11
|
canWriteTeam: boolean;
|
|
13
12
|
choices: readonly WidgetChoice[];
|
|
14
13
|
saving: boolean;
|
|
@@ -25,7 +25,7 @@ function restoreFocus(origin) {
|
|
|
25
25
|
* Arrange's floating controls. They live in the chrome layer, take no flow
|
|
26
26
|
* space, and stay above every window.
|
|
27
27
|
*/
|
|
28
|
-
export function ArrangeToolbar({ phone, status,
|
|
28
|
+
export function ArrangeToolbar({ phone, status, canWriteTeam, choices, saving, onChoose, onReset, onSaveTeam, onDone, }) {
|
|
29
29
|
const chrome = useLayer("chrome");
|
|
30
30
|
const [pickerOpen, setPickerOpen] = useState(false);
|
|
31
31
|
const [resetOpen, setResetOpen] = useState(false);
|
|
@@ -56,7 +56,7 @@ export function ArrangeToolbar({ phone, status, error, canWriteTeam, choices, sa
|
|
|
56
56
|
setPickerOpen(!pickerOpen);
|
|
57
57
|
}, children: [_jsx(Plus, { "aria-hidden": "true", size: 16 }), phone ? "Add" : "Add widget"] })] }), _jsxs(DropdownMenu, { modal: false, children: [_jsx(DropdownMenuTrigger, { render: _jsx(IconButton, { size: "sm", variant: "ghost", icon: _jsx(MoreHorizontal, {}), "aria-label": "More layout actions", title: "More layout actions" }) }), _jsxs(DropdownMenuContent, { container: chrome, align: "end", side: "top", children: [_jsx(DropdownMenuItem, { onSelect: () => {
|
|
58
58
|
setResetOpen(true);
|
|
59
|
-
}, children: "Reset layout\u2026" }), canWriteTeam ? (_jsx(DropdownMenuItem, { onSelect: onSaveTeam, children: "Save as Team default" })) : null] })] }), _jsx("span", { className: "tourtois-arrange-state", role: "status", "data-empty":
|
|
59
|
+
}, children: "Reset layout\u2026" }), canWriteTeam ? (_jsx(DropdownMenuItem, { onSelect: onSaveTeam, children: "Save as Team default" })) : null] })] }), _jsx("span", { className: "tourtois-arrange-state", role: "status", "data-empty": status !== "idle" ? undefined : "", children: status === "saving" ? (_jsx(Status, { glyph: "arc", tone: "info", label: "Saving\u2026" })) : status === "saved" ? (_jsx(Status, { glyph: "check", tone: "success", label: "Saved" })) : null }), _jsx(Button, { size: "sm", variant: "primary", "aria-label": "Done arranging", onClick: onDone, children: "Done" }), _jsx(Dialog, { open: resetOpen, onOpenChange: setResetOpen, children: _jsxs(DialogContent, { children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Reset layout" }), _jsx(DialogDescription, { children: "Your widgets go back to the default desktop." })] }), _jsx(ConfirmAction, { mode: "hold", label: "Reset layout", confirmLabel: "Hold to reset the layout", onConfirm: async () => {
|
|
60
60
|
await onReset();
|
|
61
61
|
setResetOpen(false);
|
|
62
62
|
} })] }) })] }), chrome);
|
|
@@ -21,7 +21,8 @@ function shellOverlays() {
|
|
|
21
21
|
const find = (name) => document.querySelector(`[data-maosaico-layer="${name}"]`) ??
|
|
22
22
|
document.body;
|
|
23
23
|
return {
|
|
24
|
-
|
|
24
|
+
// Settings are dialogs: their menus and pickers must paint above them.
|
|
25
|
+
popover: find("dialog"),
|
|
25
26
|
dialog: find("dialog"),
|
|
26
27
|
toast: find("toast"),
|
|
27
28
|
tooltip: find("tooltip"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/tourtois",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.14",
|
|
4
4
|
"author": "Levi <levi@technomancy.dev>",
|
|
5
5
|
"description": "Tourtois: the trusted desktop shell for Oyster and Fungi, with host-supplied Settings sections",
|
|
6
6
|
"type": "module",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@fungi.computer/ear-tag": "0.1.0",
|
|
84
84
|
"@fungi.computer/gills": "0.3.0",
|
|
85
85
|
"@fungi.computer/maosaico": "0.1.2",
|
|
86
|
-
"@fungi.computer/parakeet": "0.
|
|
86
|
+
"@fungi.computer/parakeet": "0.12.0",
|
|
87
87
|
"@fungi.computer/puffball": "0.9.0",
|
|
88
88
|
"@fungi.computer/shiitake": "0.18.2",
|
|
89
89
|
"@fungi.computer/sigils": "0.3.2",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"react": "^18.3.1 || ^19.2.0"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@fungi.computer/oyster": "0.
|
|
109
|
+
"@fungi.computer/oyster": "0.32.0",
|
|
110
110
|
"@cloudflare/workers-types": "5.20260828.1",
|
|
111
111
|
"@fungi.computer/forage": "0.3.9",
|
|
112
112
|
"@fungi.computer/mycelium": "0.4.0",
|