@@ -7,12 +7,12 @@ import type { UpdateStatus } from "@/common/orpc/types";
77import { Download , Loader2 , RefreshCw } from "lucide-react" ;
88
99import { useTutorial } from "@/browser/contexts/TutorialContext" ;
10- import MuxLogoDark from "@/browser/assets/logos/mux-logo-dark.svg?react" ;
11- import MuxLogoLight from "@/browser/assets/logos/mux-logo-light.svg?react" ;
12- import { useTheme } from "@/browser/contexts/ThemeContext" ;
13-
1410import { useAPI } from "@/browser/contexts/API" ;
15- import { isDesktopMode , getTitlebarLeftInset } from "@/browser/hooks/useDesktopTitlebar" ;
11+ import {
12+ isDesktopMode ,
13+ getTitlebarLeftInset ,
14+ DESKTOP_TITLEBAR_HEIGHT_CLASS ,
15+ } from "@/browser/hooks/useDesktopTitlebar" ;
1616
1717// Update check intervals
1818const UPDATE_CHECK_INTERVAL_MS = 4 * 60 * 60 * 1000 ; // 4 hours
@@ -75,11 +75,8 @@ function parseBuildInfo(version: unknown) {
7575
7676export function TitleBar ( ) {
7777 const { api } = useAPI ( ) ;
78- const { extendedTimestamp, gitDescribe } = parseBuildInfo ( VERSION satisfies unknown ) ;
78+ const { buildDate , extendedTimestamp, gitDescribe } = parseBuildInfo ( VERSION satisfies unknown ) ;
7979 const [ updateStatus , setUpdateStatus ] = useState < UpdateStatus > ( { type : "idle" } ) ;
80-
81- const { theme } = useTheme ( ) ;
82- const MuxLogo = theme === "dark" || theme === "solarized-dark" ? MuxLogoDark : MuxLogoLight ;
8380 const [ isCheckingOnHover , setIsCheckingOnHover ] = useState ( false ) ;
8481 const lastHoverCheckTime = useRef < number > ( 0 ) ;
8582
@@ -175,7 +172,11 @@ export function TitleBar() {
175172
176173 const getUpdateTooltip = ( ) => {
177174 const currentVersion = gitDescribe ?? "dev" ;
178- const lines : React . ReactNode [ ] = [ `Current: ${ currentVersion } ` ] ;
175+ const lines : React . ReactNode [ ] = [
176+ `Current: ${ currentVersion } ` ,
177+ `Built: ${ buildDate } ` ,
178+ `Built at: ${ extendedTimestamp } ` ,
179+ ] ;
179180
180181 if ( ! window . api ) {
181182 lines . push ( "Desktop updates are available in the Electron app only." ) ;
@@ -223,8 +224,6 @@ export function TitleBar() {
223224 ) ;
224225 } ;
225226
226- const showUpdateShimmer = updateStatus . type === "available" ;
227-
228227 const updateBadgeIcon = ( ( ) => {
229228 if ( updateStatus . type === "available" ) {
230229 return < Download className = "size-3.5" /> ;
@@ -256,7 +255,7 @@ export function TitleBar() {
256255 < div
257256 className = { cn (
258257 "bg-sidebar border-border-light font-primary text-muted flex shrink-0 items-center justify-between border-b px-4 text-[11px] select-none" ,
259- isDesktop ? "h-10" : "h-8" ,
258+ isDesktop ? DESKTOP_TITLEBAR_HEIGHT_CLASS : "h-8" ,
260259 // In desktop mode, make header draggable for window movement
261260 isDesktop && "titlebar-drag"
262261 ) }
@@ -273,63 +272,31 @@ export function TitleBar() {
273272 < TooltipTrigger asChild >
274273 < div
275274 className = { cn (
276- "flex items-center gap-1" ,
275+ "flex items-center gap-1.5 " ,
277276 isUpdateActionable ? "cursor-pointer hover:opacity-70" : "cursor-default"
278277 ) }
279278 onClick = { handleUpdateClick }
280279 onMouseEnter = { handleIndicatorHover }
281280 >
282281 < div
283282 className = { cn (
284- "relative overflow-hidden" ,
285- leftInset > 0 ? "h-3 w-[26px]" : "h-4 w-[35px]"
286- ) }
287- >
288- < MuxLogo
289- className = { cn ( "block h-full w-full" , leftInset > 0 || "-translate-y-px" ) }
290- />
291- { showUpdateShimmer && (
292- < div
293- className = "pointer-events-none absolute inset-0 animate-[shimmer-slide_2.5s_infinite_linear]"
294- data-chromatic = "ignore"
295- style = { {
296- background :
297- "linear-gradient(90deg, transparent 0%, transparent 40%, color-mix(in srgb, var(--color-accent) 35%, transparent) 50%, transparent 60%, transparent 100%)" ,
298- width : "300%" ,
299- marginLeft : "-180%" ,
300- } }
301- />
302- ) }
303- </ div >
304- < div
305- className = { cn (
306- "text-accent flex items-center justify-center" ,
307- leftInset > 0 ? "h-3 w-3" : "h-3.5 w-3.5"
283+ "min-w-0 cursor-text truncate font-normal tracking-wider select-text" ,
284+ leftInset > 0 ? "text-[10px]" : "text-xs"
308285 ) }
309286 >
310- { updateBadgeIcon }
287+ { gitDescribe ?? "(dev)" }
311288 </ div >
289+ { updateBadgeIcon && (
290+ < div className = "text-accent flex h-3.5 w-3.5 items-center justify-center" >
291+ { updateBadgeIcon }
292+ </ div >
293+ ) }
312294 </ div >
313295 </ TooltipTrigger >
314296 < TooltipContent align = "start" className = "pointer-events-auto" >
315297 { getUpdateTooltip ( ) }
316298 </ TooltipContent >
317299 </ Tooltip >
318- < Tooltip >
319- < TooltipTrigger asChild >
320- < div
321- className = { cn (
322- "min-w-0 cursor-text truncate font-normal tracking-wider select-text" ,
323- leftInset > 0 ? "text-[10px]" : "text-xs"
324- ) }
325- >
326- { gitDescribe ?? "(dev)" }
327- </ div >
328- </ TooltipTrigger >
329- < TooltipContent side = "bottom" align = "start" >
330- Built at { extendedTimestamp }
331- </ TooltipContent >
332- </ Tooltip >
333300 </ div >
334301 { isDesktop ? (
335302 < div className = "titlebar-no-drag" >
0 commit comments