Skip to content

Commit

Permalink
gray out tentative events
Browse files Browse the repository at this point in the history
  • Loading branch information
dtinth committed Aug 11, 2023
1 parent e443091 commit a5efe14
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion web/src/modules/event/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,21 @@
export let item: GoogleCalendarItem
export let dayDiff: number
$: tentative = (summary => {
if (summary.includes('tba')) return 'tba'
if (summary.includes('tbc')) return 'tbc'
if (summary.includes('tbd')) return 'tbd'
if (summary.includes('tentative')) return 'tentative'
if (summary.includes('[duplicate]')) return 'duplicate'
})(item.summary.toLowerCase())
$: captureHighlighted = $captureEvent?.id === item.id
$: color = captureHighlighted
? 'bg-yellow-200 text-yellow-950 border-orange-500'
: tentative
? `border-neutral-950 text-neutral-950 dark:text-neutral-50 dark:border-neutral-400 bg-neutral-100 dark:bg-neutral-500/40`
: `border-blue-950 text-blue-950 dark:text-blue-50 dark:border-blue-400 bg-blue-100 dark:bg-blue-500/40`
$: opacity = dayDiff < 0 ? 'opacity-50' : ''
$: opacity = dayDiff < 0 ? 'opacity-50' : tentative ? 'opacity-75' : ''
let onOpen = () => {
activeEvent.set(item)
Expand Down

0 comments on commit a5efe14

Please sign in to comment.