The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Sign out: the browser's other tabs stop showing the account at once
Adarsh714da93d8465
diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsxindex a7516a8f..4ad6bd75 100644--- a/src/components/app-sidebar.tsx+++ b/src/components/app-sidebar.tsx@@ -40,7 +40,7 @@ import { IntentLink } from "@/components/intent-link";import { JobNotifications } from "@/components/job-notifications";import { NAV, type NavGroupDef } from "@/components/nav-items";import { SkillBuilderProvider } from "@/components/skills/skill-builder-provider";-import { CONNECT_GPU_EVENT, signInHref, useEngineMode, useHydrated, useStatus, useViewer, type StatusInfo } from "@/lib/api";+import { CONNECT_GPU_EVENT, signInHref, signOut, useEngineMode, useHydrated, useStatus, useViewer, type StatusInfo } from "@/lib/api";import { deviceLabel } from "@/lib/gpu/readiness";import { useModKey } from "@/lib/keys";import { fullScreenStudio, groupId, NAV_CLOSED_KEY, navActive, NEW_CREATION_HREF, parseClosed, scrollFades, sidebarCookie, SIDEBAR_STATE_SCRIPT, sidebarOpenFromCookie } from "@/lib/nav";@@ -511,12 +511,7 @@ function AccountRow() {</IntentLink></DropdownMenuItem><DropdownMenuSeparator />- <DropdownMenuItem- onSelect={async () => {- await fetch("/api/auth/logout", { method: "POST" });- window.location.reload();- }}- >+ <DropdownMenuItem onSelect={() => void signOut()}><LogOut /> Sign out</DropdownMenuItem></DropdownMenuContent>diff --git a/src/components/owner-settings.tsx b/src/components/owner-settings.tsxindex c1594ec4..5e8a22eb 100644--- a/src/components/owner-settings.tsx+++ b/src/components/owner-settings.tsx@@ -8,7 +8,7 @@ import { Button } from "@/components/ui/button";import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } from "@/components/ui/dialog";import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";-import { signInHref, signOut, useHydrated, useViewer } from "@/lib/api";+import { announceAuthChange, signInHref, signOut, useHydrated, useViewer } from "@/lib/api";import { cn } from "@/lib/utils";/** Settings' line under its title: what this viewer finds on the page. Nothing until the viewer is known (as below). */@@ -100,7 +100,8 @@ function AccountSection({ email }: { email: string }) {try {const res = await fetch("/api/auth/me", { method: "DELETE", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ password }) });if (res.status === 204) {- // A full load: the page and every cached answer were the account's.+ // This browser's other tabs hear it, then a full load: the page and every cached answer were the account's.+ announceAuthChange();window.location.replace(window.location.origin);return;}diff --git a/src/components/security-settings.tsx b/src/components/security-settings.tsxindex edc80100..0d8153bf 100644--- a/src/components/security-settings.tsx+++ b/src/components/security-settings.tsx@@ -20,6 +20,7 @@ import { Checkbox } from "@/components/ui/checkbox";import { Input } from "@/components/ui/input";import { Label } from "@/components/ui/label";import { Switch } from "@/components/ui/switch";+import { announceAuthChange } from "@/lib/api";import { copyWithToast } from "@/lib/clipboard";import { timeAgo } from "@/lib/format";import { responseError, toastError } from "@/lib/refusals";@@ -332,6 +333,8 @@ export function SecuritySettings() {className="-my-1 h-7"onClick={async () => {await fetch("/api/auth/logout", { method: "POST" });+ // This browser's other tabs stop going on as the owner.+ announceAuthChange();router.replace("/login");}}>