An open-source, self-hosted system for apps built with web technologies.
Share inner Surface across Desktop content
zohayrslileh3879f73e4ba7
diff --git a/source/client/view/structure/desktop/taskbar/launcher/launcher.tsx b/source/client/view/structure/desktop/taskbar/launcher/launcher.tsxindex 60816e7..99eff3a 100644--- a/source/client/view/structure/desktop/taskbar/launcher/launcher.tsx+++ b/source/client/view/structure/desktop/taskbar/launcher/launcher.tsx@@ -1,7 +1,7 @@import { ReactNode, useCallback, useEffect, useId, useRef, useState } from "react"import { enterSurface, prepareSurfaceEntrance, restSurface } from "../../../../appearance/surface-presence"import { useReducedMotion } from "@libs/react-motion"-import { Surface, useAppearance, useResolveTheme, useScale, type SurfaceProps } from "@phreshos/react-ui"+import { useAppearance, useResolveTheme, useScale, type SurfaceProps } from "@phreshos/react-ui"import TaskbarSurface, { taskbarSurfaceClassName } from "../taskbar-surface"import TaskbarButton from "../taskbar-button"@@ -124,11 +124,7 @@ export default function ({ label, trigger, children, className, style, ...props>- <Surface opacity="small" className="min-h-0 max-h-[inherit] rounded-[inherit]">-- {children(close)}-- </Surface>+ {children(close)}</TaskbarSurface>diff --git a/source/client/view/structure/desktop/taskbar/taskbar-surface.tsx b/source/client/view/structure/desktop/taskbar/taskbar-surface.tsxindex 94ccad8..0dfd2f5 100644--- a/source/client/view/structure/desktop/taskbar/taskbar-surface.tsx+++ b/source/client/view/structure/desktop/taskbar/taskbar-surface.tsx@@ -4,7 +4,7 @@ import { Surface, useAppearance, useResolveTheme, useScale, type SurfaceProps }/** The window-material shell shared by surfaces opened from the taskbar. */export const taskbarSurfaceClassName = "m-0 isolate border-0 bg-transparent p-0 shadow-window-active outline-none"-export default forwardRef<HTMLDivElement, TaskbarSurfaceProps>(function TaskbarSurface({ label, labelId, contentClassName = "bg-white/25 shadow-window-content", className, children, ...props }, ref) {+export default forwardRef<HTMLDivElement, TaskbarSurfaceProps>(function TaskbarSurface({ label, labelId, contentClassName = "shadow-window-content", className, children, ...props }, ref) {const contentRadius = useScale(useResolveTheme(useAppearance().radius)).medium@@ -12,11 +12,11 @@ export default forwardRef<HTMLDivElement, TaskbarSurfaceProps>(function TaskbarS<h2 id={labelId} className="relative grid h-10 items-center px-3.5 text-window-title font-medium select-none">{label}</h2>- <div style={{ borderRadius: contentRadius }} className={`relative m-1.5 mt-0 min-h-0 overflow-hidden ${contentClassName}`}>+ <Surface opacity="small" style={{ borderRadius: contentRadius }} className={`relative m-1.5 mt-0 min-h-0 overflow-hidden ${contentClassName}`}>{children}- </div>+ </Surface></Surface>})diff --git a/source/client/view/structure/desktop/windows/window.tsx b/source/client/view/structure/desktop/windows/window.tsxindex e6ef653..b24bbd2 100644--- a/source/client/view/structure/desktop/windows/window.tsx+++ b/source/client/view/structure/desktop/windows/window.tsx@@ -800,11 +800,19 @@ export default function ({ title, icon, children, onClose, onClosed, onMinimize,{/* Where the program is. Bare, it is the whole of thebox and wears none of the system's own edges. */}- <div data-window-content style={bare ? undefined : { borderRadius: innerRadius }} className={bare ? "relative min-h-0" : "relative m-1.5 mt-0 min-h-0 overflow-hidden bg-white/25 shadow-window-content"}>+ {bare- {children}+ ? <div data-window-content className="relative min-h-0">- </div>+ {children}++ </div>++ : <Surface data-window-content opacity="small" style={{ borderRadius: innerRadius }} className="relative m-1.5 mt-0 min-h-0 overflow-hidden p-px shadow-window-content">++ {children}++ </Surface>}</div>