mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 01:28:55 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user