An open-source, self-hosted system for apps built with web technologies.
Show spinner while a Program closes
zohayrslileh0cc5217ffc6a
diff --git a/source/client/view/desktop/window-manager/process-window.tsx b/source/client/view/desktop/window-manager/process-window.tsxindex 9be2735..76a37f7 100644--- a/source/client/view/desktop/window-manager/process-window.tsx+++ b/source/client/view/desktop/window-manager/process-window.tsx@@ -5,6 +5,7 @@ import { type LocalAnimation, type LocalSurfaceState } from "../client-host/locaimport { type LocalGeometryReader } from "./local-windows"import { type ProgramAccess } from "../program-access"import { type Position, type Size } from "@phreshos/core"+import Spinner from "../../components/spinner"import Window from "./window"import ProgramFrame, { programFrameSource } from "../program-frame"import { memo, type SyntheticEvent, useCallback, useEffect, useState } from "react"@@ -168,6 +169,18 @@ export default memo(function ({ identity, record, client, title, icon, position,/>}+ {/* Closing is not document loading. The iframe is already absent;+ only termination progress remains, without painting a backdrop. */}+ {!bare && (stopping || closing) && <div className="pointer-events-none absolute inset-0 z-10 grid rounded-[inherit]">++ <Spinner className="m-auto size-6 text-slate-700">++ <span className="sr-only">Closing</span>++ </Spinner>++ </div>}+{/* First press focuses an inactive window before its program canreceive input. Bare layers have no system click-catcher. */}{!bare && !active && <div className="absolute inset-0" />}