An open-source, self-hosted system for apps built with web technologies.
Derive desktop text from foreground
zohayrslileh98c44cad1ea3
diff --git a/source/client/view/structure/desktop/desktop.tsx b/source/client/view/structure/desktop/desktop.tsxindex 4719769..de5278d 100644--- a/source/client/view/structure/desktop/desktop.tsx+++ b/source/client/view/structure/desktop/desktop.tsx@@ -25,7 +25,11 @@ export default function Workspace() {const authManager = AuthManagerContext.useValue()- const desktopWallpaper = useResolveTheme(useAppearance().desktopWallpaper)+ const appearance = useAppearance()++ const desktopWallpaper = useResolveTheme(appearance.desktopWallpaper)++ const foreground = useResolveTheme(appearance.foreground)const theme = useTheme()@@ -214,7 +218,7 @@ export default function Workspace() {const wallpaper = <WallpaperBackground file={desktopWallpaper} onReady={fileWallpaperLoaded} />- return <div ref={desktop} tabIndex={-1} aria-label="Desktop" onFocusCapture={focus.remember} className="relative isolate grid min-h-0 grid-cols-1 grid-rows-1 outline-none">+ return <div ref={desktop} tabIndex={-1} aria-label="Desktop" onFocusCapture={focus.remember} className="relative isolate grid min-h-0 grid-cols-1 grid-rows-1 outline-none" style={{ color: foreground }}><ProgramAccessProbe door={application.doors.program} setAccess={setProgramAccess} />diff --git a/source/client/view/structure/desktop/taskbar/launcher/launcher-item.tsx b/source/client/view/structure/desktop/taskbar/launcher/launcher-item.tsxindex 01139ce..50a6507 100644--- a/source/client/view/structure/desktop/taskbar/launcher/launcher-item.tsx+++ b/source/client/view/structure/desktop/taskbar/launcher/launcher-item.tsx@@ -13,7 +13,7 @@ export default function ({ icon, label, description, children, className, ...pro>- <span className="grid size-9 place-items-center overflow-hidden rounded-xl border border-white/55 bg-white/25 text-base font-semibold text-slate-700 shadow-launcher-icon">+ <span className="grid size-9 place-items-center overflow-hidden rounded-xl border border-white/55 bg-white/25 text-base font-semibold shadow-launcher-icon"><img src={icon} alt="" draggable={false} className="size-full object-contain p-1" />@@ -23,7 +23,7 @@ export default function ({ icon, label, description, children, className, ...pro<span className="block truncate text-sm font-medium">{children}</span>- {description && <span className="block truncate text-xs text-slate-600/80">{description}</span>}+ {description && <span className="block truncate text-xs opacity-60">{description}</span>}</span>diff --git a/source/client/view/structure/desktop/taskbar/launcher/programs-section.tsx b/source/client/view/structure/desktop/taskbar/launcher/programs-section.tsxindex 0414ea1..53b0de2 100644--- a/source/client/view/structure/desktop/taskbar/launcher/programs-section.tsx+++ b/source/client/view/structure/desktop/taskbar/launcher/programs-section.tsx@@ -34,7 +34,7 @@ export default function ProgramsSection({ onChoose }: ProgramsSectionProps) {/>)- : <p className="px-3 py-8 text-center text-sm text-slate-600">No installed programs</p>}+ : <p className="px-3 py-8 text-center text-sm opacity-60">No installed programs</p>}</div>}diff --git a/source/client/view/structure/desktop/taskbar/programs/overflow-row.tsx b/source/client/view/structure/desktop/taskbar/programs/overflow-row.tsxindex 34df720..cbc2cf0 100644--- a/source/client/view/structure/desktop/taskbar/programs/overflow-row.tsx+++ b/source/client/view/structure/desktop/taskbar/programs/overflow-row.tsx@@ -112,7 +112,7 @@ function ScrollButton({ label, controls, direction, disabled, reducedMotion, onConClick={onClick}- className={`grid size-7 shrink-0 place-items-center rounded-lg border border-white/45 bg-white/55 text-slate-700 shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-white disabled:opacity-35 ${reducedMotion ? "" : "transition-colors hover:bg-white/80 active:scale-95"}`}+ className={`grid size-7 shrink-0 place-items-center rounded-lg border border-white/45 bg-white/55 shadow-sm outline-none focus-visible:ring-2 focus-visible:ring-white disabled:opacity-35 ${reducedMotion ? "" : "transition-colors hover:bg-white/80 active:scale-95"}`}>diff --git a/source/client/view/structure/desktop/taskbar/programs/taskbar-item.tsx b/source/client/view/structure/desktop/taskbar/programs/taskbar-item.tsxindex 2f86d31..68900c6 100644--- a/source/client/view/structure/desktop/taskbar/programs/taskbar-item.tsx+++ b/source/client/view/structure/desktop/taskbar/programs/taskbar-item.tsx@@ -10,9 +10,9 @@ export default function ({ active = false, icon, children, className, ...props }const surface = active- ? "border-white/75 bg-gradient-to-b from-white/70 to-white/40 text-slate-900 shadow-taskbar-item-active"+ ? "border-white/75 bg-gradient-to-b from-white/70 to-white/40 shadow-taskbar-item-active"- : "border-white/35 bg-white/20 text-slate-800 shadow-taskbar-item hover:border-white/55 hover:bg-white/40"+ : "border-white/35 bg-white/20 shadow-taskbar-item hover:border-white/55 hover:bg-white/40"return <button@@ -26,7 +26,7 @@ export default function ({ active = false, icon, children, className, ...props }<img src={icon} alt="" draggable={false} className="size-4 shrink-0 rounded-sm object-contain" />- <span className="truncate">{children}</span>+ <span className={`truncate ${active ? "" : "opacity-80"}`}>{children}</span>{active && <span aria-hidden="true" className="absolute inset-x-3 bottom-0 h-0.5 rounded-full bg-sky-500 shadow-taskbar-indicator" />}diff --git a/source/client/view/structure/desktop/taskbar/system/system-dialogs.tsx b/source/client/view/structure/desktop/taskbar/system/system-dialogs.tsxindex 7378c22..1875c9b 100644--- a/source/client/view/structure/desktop/taskbar/system/system-dialogs.tsx+++ b/source/client/view/structure/desktop/taskbar/system/system-dialogs.tsx@@ -99,13 +99,13 @@ function PermissionRequest({ dialog, description, decide }: PermissionRequestPro<div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-3">- <span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-sky-600/25 bg-sky-500/15 text-sm font-medium text-sky-800">?</span>+ <span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-sky-600/25 bg-sky-500/15 text-sm font-medium">?</span><div className="grid gap-1">- <h3 className="text-base font-medium text-slate-900">{dialog.program.name} needs permission</h3>+ <h3 className="text-base font-medium">{dialog.program.name} needs permission</h3>- <p id={description} className="text-sm leading-6 text-slate-600">{permissionDescription(dialog)}</p>+ <p id={description} className="text-sm leading-6 opacity-60">{permissionDescription(dialog)}</p></div>@@ -136,13 +136,13 @@ function CrashReport({ dialog, description, acknowledge }: CrashReportProps) {<div className="grid grid-cols-[auto_minmax(0,1fr)] items-start gap-3">- <span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-rose-600/25 bg-rose-500/15 text-lg font-medium text-rose-700">!</span>+ <span aria-hidden="true" className="grid size-8 place-items-center rounded-full border border-rose-600/25 bg-rose-500/15 text-lg font-medium">!</span><div className="grid gap-1">- <h3 className="text-base font-medium text-slate-900">Server endpoint crashed</h3>+ <h3 className="text-base font-medium">Server endpoint crashed</h3>- <p id={description} className="text-sm leading-6 text-slate-600">{crashDescription(dialog)}</p>+ <p id={description} className="text-sm leading-6 opacity-60">{crashDescription(dialog)}</p></div>diff --git a/source/client/view/structure/desktop/taskbar/taskbar-button.tsx b/source/client/view/structure/desktop/taskbar/taskbar-button.tsxindex 1ead124..eb411b7 100644--- a/source/client/view/structure/desktop/taskbar/taskbar-button.tsx+++ b/source/client/view/structure/desktop/taskbar/taskbar-button.tsx@@ -10,7 +10,7 @@ export default function TaskbarButton({ small = false, className, ...props }: Tatype="button"- className={`grid shrink-0 cursor-pointer select-none grid-flow-col auto-cols-max place-items-center rounded-lg border border-white/45 bg-white/30 text-slate-800 shadow-taskbar-control outline-none hover:bg-white/50 focus-visible:ring-2 focus-visible:ring-white/85 ${small ? "h-7 gap-1 px-2 text-xs" : "h-8 gap-1.5 px-2"} ${reducedMotion ? "" : "transition-colors duration-100 active:scale-95"} ${className ?? ""}`}+ className={`grid shrink-0 cursor-pointer select-none grid-flow-col auto-cols-max place-items-center rounded-lg border border-white/45 bg-white/30 shadow-taskbar-control outline-none hover:bg-white/50 focus-visible:ring-2 focus-visible:ring-white/85 ${small ? "h-7 gap-1 px-2 text-xs" : "h-8 gap-1.5 px-2"} ${reducedMotion ? "" : "transition-colors duration-100 active:scale-95"} ${className ?? ""}`}{...props}diff --git a/source/client/view/structure/desktop/windows/process-window.tsx b/source/client/view/structure/desktop/windows/process-window.tsxindex d135906..0ba22b3 100644--- a/source/client/view/structure/desktop/windows/process-window.tsx+++ b/source/client/view/structure/desktop/windows/process-window.tsx@@ -175,7 +175,7 @@ export default memo(function ({ identity, record, client, title, icon, position,ordinary Window UI, with no backdrop or Surface behind it. */}{!bare && frameLoading && !stopping && !closing && <div className="pointer-events-none absolute inset-0 z-10 grid rounded-[inherit]">- <Spinner className="m-auto size-6 text-slate-700">+ <Spinner className="m-auto size-6"><span className="sr-only">Loading</span>@@ -187,7 +187,7 @@ export default memo(function ({ identity, record, client, title, icon, position,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">+ <Spinner className="m-auto size-6"><span className="sr-only">Closing</span>diff --git a/source/client/view/structure/desktop/windows/window-header.tsx b/source/client/view/structure/desktop/windows/window-header.tsxindex b19c9d4..3cceb87 100644--- a/source/client/view/structure/desktop/windows/window-header.tsx+++ b/source/client/view/structure/desktop/windows/window-header.tsx@@ -7,11 +7,6 @@ const control = {danger: { borderColor: "rgba(253, 164, 175, 0.7)", backgroundColor: "#f43f5e", color: "#ffffff", scale: 1 }}-const focus = {- active: { opacity: 1, color: "#1e293b" },- inactive: { opacity: 0.6, color: "#64748b" }-}-/** The visible chrome above an ordinary window's content. */export default function WindowHeader({ title, icon, active, whole, reducedMotion, stopping, onGrab, onMinimize, onMaximize, onClose }: WindowHeaderProps) {@@ -26,14 +21,13 @@ export default function WindowHeader({ title, icon, active, whole, reducedMotionif (!icon || !title || renderedActive === active) return- const target = active ? focus.active : focus.inactive+ const opacity = active ? 1 : 0.6gsap.killTweensOf([icon, title])if (reducedMotion) {- gsap.set(icon, { opacity: target.opacity })- gsap.set(title, { color: target.color })+ gsap.set([icon, title], { opacity })setRenderedActive(active)return@@ -48,8 +42,7 @@ export default function WindowHeader({ title, icon, active, whole, reducedMotiononComplete: () => setRenderedActive(active)})- timeline.to(icon, { opacity: target.opacity }, 0)- timeline.to(title, { color: target.color }, 0)+ timeline.to([icon, title], { opacity }, 0)return () => { timeline.kill() }@@ -88,7 +81,7 @@ export default function WindowHeader({ title, icon, active, whole, reducedMotion<spanref={titleElement}className="truncate text-window-title font-medium"- style={{ color: renderedActive ? "#1e293b" : "#64748b" }}+ style={{ opacity: renderedActive ? 1 : 0.6 }}>{title}</span></div>@@ -214,7 +207,7 @@ function Control({ label, danger = false, focusOnPointerDown = true, reducedMotiif (event.detail === 0) onClick?.()}}- className="grid size-6 place-items-center rounded-md border border-transparent bg-white/15 text-slate-600 outline-none shadow-sm disabled:pointer-events-none disabled:opacity-40 focus-visible:relative focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-sky-500"+ className="grid size-6 place-items-center rounded-md border border-transparent bg-white/15 outline-none shadow-sm disabled:pointer-events-none disabled:opacity-40 focus-visible:relative focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-sky-500">