feat(vacay): make the toolbar show the marker it places (#1074)

The half-day button carried a ½ glyph and comp/flex a clock, neither of which
appears anywhere on the calendar. Both now show what a click actually puts on
the day: the orange dot for a half day, a hatched disc in the selected person's
colour for comp.

The digit on an all-comp cell also needed help. The hatch lets the surface
through between its stripes, so a white number sank into it — a shadow carries
the contrast now and every logged day keeps the same digit colour. Mixed days
still have a solid segment under the number and get none.
This commit is contained in:
Maurice
2026-07-25 11:50:51 +02:00
committed by Maurice
parent f1d520bbc2
commit b37996ec39
2 changed files with 9 additions and 1 deletions
@@ -147,6 +147,13 @@ export default function VacayMonthCard({
if (hasEntries) numColor = '#fff'
else if (publicHoliday) numColor = publicHoliday.color
else if (weekend) numColor = 'var(--vg-ink3)'
// An all-comp cell is hatched, so the card surface shows through between
// the stripes and would swallow the white digit. A shadow carries the
// contrast instead, which keeps every logged day's number white (#1074).
// A mixed day still has a solid segment under the number and needs none.
const numShadow = hasEntries && dayEntries.every(e => e.kind === 'comp')
? '0 1px 2px rgba(0,0,0,0.85), 0 0 3px rgba(0,0,0,0.5)'
: undefined
return (
<div
@@ -223,6 +230,7 @@ export default function VacayMonthCard({
fontSize: 12,
fontWeight: (hasEntries || isToday) ? 700 : 500,
color: numColor,
textShadow: numShadow,
}}>
{day}
</span>
@@ -43,7 +43,7 @@ export default function MVacayMonth({
className={`relative flex aspect-square items-center justify-center font-geist font-bold ${
mini ? 'rounded-[6px] text-[0.53125rem]' : 'rounded-lg text-[0.75rem]'
}`}
style={{ background: visual.background, color: visual.numColor, boxShadow: visual.boxShadow }}
style={{ background: visual.background, color: visual.numColor, boxShadow: visual.boxShadow, textShadow: visual.textShadow }}
>
{/* 2+ people: equal-width segment overlays, each solid (vacation) or hatched (comp) (#1074). */}
{visual.segments && visual.segments.length > 1 && (