);
}
@@ -112,25 +127,20 @@ function usePoppedOut(id: string) {
}
/**
- * Sits over the top-right of the picture. A link, so it still opens a tab if popups are
- * blocked; with JavaScript it opens a popup window sized to the main stream. Icon-only, so
- * it carries a name that says what it does (pri-8ev5m89).
+ * Opens the camera's own page, where its settings and login live. Icon-only, so it carries
+ * a name saying what it does and to which camera (pri-8ev5m89).
*/
-function PopoutLink({ cam, intervalMs, aspect }: { cam: CameraSummary; intervalMs: number; aspect?: number }) {
+function EditLink({ cam }: { cam: CameraSummary }) {
const name = cam.name ?? cam.host;
return (
- {
- if (openPopout(cam.id, intervalMs, aspect)) e.preventDefault();
- }}
- aria-label={`Pop out ${name}`}
- title={`Pop out ${name}`}
+
-
-
+
+
);
}
diff --git a/src/app/icons.test.tsx b/src/app/icons.test.tsx
index 408f158..0a4ebef 100644
--- a/src/app/icons.test.tsx
+++ b/src/app/icons.test.tsx
@@ -65,7 +65,7 @@ beforeEach(() => {
});
describe("camera card", () => {
- it("marks the status badge and the pop-out icon, the only controls left on a card", async () => {
+ it("marks the settings icon, the only icon control left on a card", async () => {
stubFetch({
[`GET ${base}/info`]: () => json(info),
[`GET ${base}/snapshot`]: () => new Response(new Blob(["x"])),
@@ -73,9 +73,9 @@ describe("camera card", () => {
renderWithQuery();
// Icon-only, so its name has to say what it does and to which camera (pri-8ev5m89).
- const popout = await screen.findByRole("link", { name: "Pop out Porch" });
- expect(iconIn(popout)).toContain("external-link");
- allIconsDecorative(popout);
+ const settings = await screen.findByRole("link", { name: "Settings for Porch" });
+ expect(iconIn(settings)).toContain("pencil");
+ allIconsDecorative(settings);
});
it("marks the login form: title, Save, Forget, and errors", async () => {