a send form for SendOff, and no receiving one
/sendoff — pick files, pick one of your own machines or a person who has allowed you, send. The consent list sits on the same screen rather than in settings, because the two questions arrive together: the first time somebody opens this and finds nobody to send to, the reason is that consent runs the other way, and the answer has to be visible where the question was asked. There is deliberately no received view. Files land in Documents/SendOff/ inside the recipient's own tree, so the file browser already IS the inbox — a second view of the same directory would be a worse copy of one that works, kept in sync by hand. Two details worth keeping. The file input resets its value after every pick, or choosing the same file twice in a row does nothing, because `change` does not fire on an unchanged value. And a send clears the files but keeps the target, since several batches to the same place is the common second action and re-picking it each time is the sort of small tax that stops somebody using a thing. The multipart goes through `client.post`, which already recognises a FormData and drops the JSON content-type so the browser picks the boundary. That was the only thing making this look like it needed a raw fetch, and a raw fetch would have carried its own copy of the token resolution — which is a chain of seven sources. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,7 @@ export function App() {
|
||||
{/* TEMPORARY / EXPERIMENTAL — offline file transfer over animated QR codes */}
|
||||
<Route path="/qr-transfer" element={<Dashboard.QrTransferScreen />} />
|
||||
<Route path="/minesweeper" element={<Dashboard.MinesweeperScreen />} />
|
||||
<Route path="/sendoff" element={<Dashboard.SendOffScreen />} />
|
||||
<Route path="/activity" element={<Dashboard.ActivityScreen />} />
|
||||
<Route path="/activity/:id" element={<Dashboard.ActivityScreen />} />
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@ import {
|
||||
Store,
|
||||
Puzzle,
|
||||
Radar,
|
||||
Send,
|
||||
} from 'lucide-react';
|
||||
|
||||
/**
|
||||
@@ -180,6 +181,10 @@ export const CORE_DOCK_ITEMS: DockItem[] = [
|
||||
{ label: 'Monitor', to: '/system-monitor', icon: Activity, color: '#0ea5e9' },
|
||||
{ label: 'Activity', to: '/activity', icon: Radio, color: '#f59e0b' },
|
||||
{ label: 'Dashboards', to: '/dashboards', icon: LayoutGrid, color: '#8b5cf6' },
|
||||
// Core because it is the door into another account's filesystem, and the permission that gates it is
|
||||
// `kind: 'app'` — so `canVisit()` hides the tile from anyone not granted it, which is the same treatment
|
||||
// every other grantable tile here gets.
|
||||
{ label: 'SendOff', to: '/sendoff', icon: Send, color: '#22d3ee' },
|
||||
// Core since 2026-08-19. These were contributed by the app-store `caldav` entry until calendar and
|
||||
// contacts became core, and deleting that entry took their tiles with it — the routes kept working
|
||||
// while the dock and the settings list went silent about them, which is exactly the shape of failure
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import type { LayoutNode } from 'officerdev';
|
||||
import { WorkspaceView } from 'officerdev';
|
||||
import { useDashboardState } from 'state/useDashboardState';
|
||||
import { defaultLayout } from './defaultLayout';
|
||||
|
||||
// /sendoff — pick files, pick a machine of your own or a person who has allowed you, send.
|
||||
//
|
||||
// There is no receiving half. Files land in `Documents/SendOff/` inside the recipient's own tree, so the
|
||||
// file browser already IS the inbox — and a second view of the same directory would be a worse copy of
|
||||
// one that already works, kept in sync by hand.
|
||||
|
||||
export const SendOffScreen = () => {
|
||||
const workspace = useDashboardState<LayoutNode>('screens/sendoff', defaultLayout);
|
||||
|
||||
return <WorkspaceView workspace={workspace} locked appTypes={{ allowed: ['sendoff'], fallback: 'sendoff' }} />;
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
import type { LayoutNode } from 'officerdev';
|
||||
|
||||
// One panel. The form is a column and there is nothing to put beside it — receiving already has a UI,
|
||||
// which is the file browser.
|
||||
export const defaultLayout: LayoutNode = {
|
||||
type: 'panel',
|
||||
id: 'sendoff',
|
||||
appType: 'sendoff',
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
export * from './SendOffScreen';
|
||||
@@ -23,3 +23,4 @@ export * from './Terminal';
|
||||
export * from './Jobs';
|
||||
export * from './QrTransfer';
|
||||
export * from './Minesweeper';
|
||||
export * from './SendOff';
|
||||
|
||||
Reference in New Issue
Block a user