Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/desktop/scripts/connection-progress-smoke.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ try {
app.exit = () => {};
});
const pairingWindow = await firstApp.firstWindow({ timeout: 15_000 });
await pairingWindow.getByRole("heading", { name: "Connect this computer." }).waitFor();
await pairingWindow.getByRole("heading", { name: "Connect this computer to mdbase" }).waitFor();
await pairingWindow.getByText("Use another Connect server", { exact: true }).click();
await pairingWindow.getByLabel("Server address").fill(portalUrl);
await pairingWindow.getByLabel("Computer name").fill("Progress test computer");
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/scripts/docker-server-e2e.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ try {
});
const pairingWindow = await pairingApp.firstWindow({ timeout: 30_000 });
pairingWindow.setDefaultTimeout(30_000);
await waitForDesktopHeading(pairingWindow, "Connect this computer.");
await waitForDesktopHeading(pairingWindow, "Connect this computer to mdbase");
await pairingWindow
.getByText("Use another Connect server", { exact: true })
.click();
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/scripts/electron-smoke.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ try {
if (screenshot) await window.screenshot({ path: screenshot, animations: "disabled" });
await window.getByRole("button", { name: "Cancel" }).click();
await window.getByRole("button", { name: /App access/ }).click();
await window.getByRole("heading", { name: "Connect this computer." }).waitFor();
await window.getByRole("heading", { name: "Connect this computer to mdbase" }).waitFor();
await window.getByRole("button", { name: /Overview/ }).click();
const title = await window.title();
if (title !== "mdbase connect") throw new Error(`Unexpected window title: ${title}`);
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/main/deep-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function routeForDeepLink(value: string | undefined): string | null {
const collectionId = url.searchParams.get("collection");
return collectionId ? `collections:mirror:${collectionId}` : "collections";
}
if (url.hostname === "paired") return "overview";
if (url.hostname === "paired") return "paired";
} catch {
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions apps/desktop/src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ function registerIpc(): void {
server_url: string | null;
}>("account.configuration");
if (!configuration.configured || !configuration.server_url) {
throw new Error("Connect this computer to a portal first.");
throw new Error("Connect this computer to your mdbase account first.");
}
const accountUrl = new URL("/account", validateServerUrl(configuration.server_url));
await shell.openExternal(accountUrl.href);
Expand All @@ -380,7 +380,7 @@ function registerIpc(): void {
server_url: string | null;
}>("account.configuration");
if (!configuration.configured || !configuration.server_url) {
throw new Error("Connect this computer to a portal first.");
throw new Error("Connect this computer to your mdbase account first.");
}
const authorizationUrl = new URL(
`/authorize/${encodeURIComponent(requestId)}`,
Expand Down
35 changes: 35 additions & 0 deletions apps/desktop/src/renderer/authority-transfer-receipt.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from "react";
import type { AuthorityTransferReceipt as Receipt } from "./onboarding-state.mjs";

export function AuthorityTransferReceipt({ receipt, onOpen, onReconnect, onViewDetails, onDismiss }: {
receipt: Receipt;
onOpen(): void;
onReconnect(): void;
onViewDetails(): void;
onDismiss(): void;
}) {
const local = receipt.direction === "hosted_to_local";
return <section className="completion-receipt transfer-receipt" aria-labelledby="transfer-receipt-title">
<div className="completion-receipt-heading">
<div>
<p className="eyebrow">Main copy moved</p>
<h2 id="transfer-receipt-title">{receipt.collectionName} has a new main copy.</h2>
</div>
<button className="quiet-action" onClick={onDismiss}>Done</button>
</div>
<dl className="completion-receipt-facts">
<div><dt>New main copy</dt><dd>{receipt.newMainCopy}</dd></div>
<div><dt>Previous authority</dt><dd>{receipt.oldAuthority}</dd></div>
<div><dt>Completed</dt><dd>{new Date(receipt.completedAt).toLocaleString()}</dd></div>
</dl>
<div className="transfer-impact-summary">
<p><strong>{receipt.applications.length}</strong> {receipt.applications.length === 1 ? "application needs" : "applications need"} fresh access{receipt.applications.length ? `: ${receipt.applications.join(", ")}` : "."}</p>
<p><strong>{receipt.replicas.length}</strong> {receipt.replicas.length === 1 ? "synced folder was" : "synced folders were"} retired{receipt.replicas.length ? `: ${receipt.replicas.join(", ")}` : "."}</p>
</div>
<div className="completion-receipt-actions" aria-label="Next actions">
<button className="button primary" onClick={onOpen}>{local ? "Open folder" : "Open collection"}</button>
{receipt.applications.length > 0 && <button className="button secondary" onClick={onReconnect}>Reconnect applications</button>}
<button className="quiet-action" onClick={onViewDetails}>View history and recovery</button>
</div>
</section>;
}
Loading
Loading