Skip to content

feat(calendar): show Google logo for events synced from Google Calendar #2658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 4, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added apps/web/public/media/google-calendar-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@
)}
onClick={() => openModal(event.id, 'all-day')}
>
{typeof event.google_event_id === 'string' && event.google_event_id.trim() !== '' && (
<img
src="/media/google-calendar-icon.png"
alt="Google Calendar"
className="inline-block h-[1.25em] w-[1.25em] mr-1 align-middle opacity-80 dark:opacity-90"
title="Synced from Google Calendar"
data-testid="google-calendar-logo"
/>

Check warning on line 105 in packages/ui/src/components/ui/legacy/calendar/AllDayEventBar.tsx

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/components/ui/legacy/calendar/AllDayEventBar.tsx#L98-L105

Added lines #L98 - L105 were not covered by tests
)}
{event.title}
</div>
);
Expand Down
9 changes: 9 additions & 0 deletions packages/ui/src/components/ui/legacy/calendar/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,15 @@
aria-label="Event locked"
/>
)}
{typeof localEvent.google_event_id === 'string' && localEvent.google_event_id.trim() !== '' && (
<img
src="/media/google-calendar-icon.png"
alt="Google Calendar"
className="inline-block h-[1.25em] w-[1.25em] mr-1 align-middle opacity-80 dark:opacity-90"
title="Synced from Google Calendar"
data-testid="google-calendar-logo"
/>

Check warning on line 1024 in packages/ui/src/components/ui/legacy/calendar/EventCard.tsx

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/components/ui/legacy/calendar/EventCard.tsx#L1017-L1024

Added lines #L1017 - L1024 were not covered by tests
)}
<span className="min-w-0 overflow-hidden text-ellipsis">
{localEvent.title || 'Untitled event'}
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,20 @@
<Dialog open={isModalOpen} onOpenChange={(open) => !open && closeModal()}>
<DialogContent className="max-h-[90vh] max-w-3xl overflow-hidden p-0">
<DialogHeader className="border-b px-6 pb-4 pt-6">
<DialogTitle className="text-xl font-semibold">
{isEditing ? 'Edit Event' : 'Create Event'}
<DialogTitle className="text-xl font-semibold flex items-center gap-2">
<span>{isEditing ? 'Edit Event' : 'Create Event'}</span>
{event.google_event_id && typeof event.google_event_id === 'string' && event.google_event_id.trim() !== '' && (
<div className="flex items-center gap-2 border rounded-md bg-blue-50 dark:bg-blue-950/30 px-3 py-1 text-sm ml-3">
<img
src="/media/google-calendar-icon.png"
alt="Google Calendar"
className="inline-block h-[18px] w-[18px] align-middle"
title="Synced from Google Calendar"
data-testid="google-calendar-logo"
/>
<span className="text-xs font-medium">Google Calendar</span>
</div>

Check warning on line 867 in packages/ui/src/components/ui/legacy/calendar/UnifiedEventModal.tsx

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/components/ui/legacy/calendar/UnifiedEventModal.tsx#L855-L867

Added lines #L855 - L867 were not covered by tests
)}
</DialogTitle>
<DialogDescription>
{isEditing
Expand Down
Loading