|
2 | 2 | <!-- SPDX-License-Identifier: MIT --> |
3 | 3 |
|
4 | 4 | <!-- Card wrapper with border and shadow --> |
5 | | -<div class="bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-shadow" data-testid="dashboard-meeting-card"> |
| 5 | +<div class="bg-white rounded-xl border border-gray-200 shadow-sm hover:shadow-md transition-shadow relative" data-testid="dashboard-meeting-card"> |
| 6 | + <!-- Colored left border overlay --> |
| 7 | + <div aria-hidden="true" class="absolute border border-l-4 border-solid inset-0 pointer-events-none rounded-xl" [ngClass]="borderColorClass()"></div> |
6 | 8 | <div class="p-4 space-y-3"> |
7 | | - <!-- Header with meeting type and feature icons --> |
| 9 | + <!-- Header with meeting type and project badges --> |
| 10 | + <div class="flex items-center gap-2 flex-wrap"> |
| 11 | + <span class="text-xs px-2 py-1 font-medium rounded" [ngClass]="meetingTypeInfo().className" data-testid="dashboard-meeting-card-type-badge"> |
| 12 | + {{ meetingTypeInfo().label }} |
| 13 | + </span> |
| 14 | + </div> |
| 15 | + |
| 16 | + <!-- Meeting title with file icons --> |
8 | 17 | <div class="flex items-start justify-between gap-2"> |
9 | | - <div class="flex items-center gap-2 flex-wrap"> |
10 | | - <span [class]="meetingTypeInfo().className + ' text-xs px-2 py-1 font-medium rounded'" data-testid="dashboard-meeting-card-type-badge"> |
11 | | - {{ meetingTypeInfo().label }} |
12 | | - </span> |
13 | | - @if (meeting().project_name) { |
14 | | - <span class="border border-gray-300 bg-white text-gray-700 text-xs px-2 py-1 font-medium rounded" data-testid="dashboard-meeting-card-project-badge"> |
15 | | - {{ meeting().project_name }} |
| 18 | + <div class="flex flex-col gap-1"> |
| 19 | + <h4 class="line-clamp-2 text-sm leading-tight font-medium text-gray-900" data-testid="dashboard-meeting-card-title"> |
| 20 | + {{ meetingTitle() }} |
| 21 | + </h4> |
| 22 | + <!-- Date/time with feature icons - directly under title --> |
| 23 | + <div class="flex items-center gap-2 flex-wrap mt-0.5"> |
| 24 | + <span class="text-xs text-gray-600 whitespace-nowrap" data-testid="dashboard-meeting-card-time"> |
| 25 | + {{ formattedTime() }} |
16 | 26 | </span> |
17 | | - } |
18 | | - </div> |
19 | | - <div class="flex items-center gap-1"> |
20 | | - @if (hasYoutubeUploads()) { |
21 | | - <div |
22 | | - class="w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center" |
23 | | - pTooltip="YouTube Auto-Upload Enabled" |
24 | | - tooltipPosition="top" |
25 | | - data-testid="dashboard-meeting-card-youtube-icon"> |
26 | | - <i class="fa-light fa-upload text-xs text-gray-800"></i> |
27 | | - </div> |
28 | | - } |
29 | | - @if (hasRecording()) { |
30 | | - <div |
31 | | - class="w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center" |
32 | | - pTooltip="Recording Enabled" |
33 | | - tooltipPosition="top" |
34 | | - data-testid="dashboard-meeting-card-recording-icon"> |
35 | | - <i class="fa-light fa-video text-xs text-gray-800"></i> |
36 | | - </div> |
37 | | - } |
38 | | - @if (hasTranscripts()) { |
39 | | - <div |
40 | | - class="w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center" |
41 | | - pTooltip="Transcripts Enabled" |
42 | | - tooltipPosition="top" |
43 | | - data-testid="dashboard-meeting-card-transcript-icon"> |
44 | | - <i class="fa-light fa-file-lines text-xs text-gray-800"></i> |
45 | | - </div> |
46 | | - } |
47 | | - @if (hasAiSummary()) { |
48 | | - <div |
49 | | - class="w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center" |
50 | | - pTooltip="AI Summary Enabled" |
51 | | - tooltipPosition="top" |
52 | | - data-testid="dashboard-meeting-card-ai-icon"> |
53 | | - <i class="fa-light fa-sparkles text-xs text-gray-800"></i> |
| 27 | + <div class="flex items-center gap-1"> |
| 28 | + @if (hasYoutubeUploads()) { |
| 29 | + <div |
| 30 | + class="flex p-1 hover:bg-gray-100 rounded transition-colors" |
| 31 | + pTooltip="YouTube Auto-Upload Enabled" |
| 32 | + tooltipPosition="top" |
| 33 | + data-testid="dashboard-meeting-card-youtube-icon"> |
| 34 | + <i class="fa-light fa-upload text-xs text-gray-700"></i> |
| 35 | + </div> |
| 36 | + } |
| 37 | + @if (hasRecording()) { |
| 38 | + <div |
| 39 | + class="flex p-1 hover:bg-gray-100 rounded transition-colors" |
| 40 | + pTooltip="Recording Enabled" |
| 41 | + tooltipPosition="top" |
| 42 | + data-testid="dashboard-meeting-card-recording-icon"> |
| 43 | + <i class="fa-light fa-video text-xs text-gray-700"></i> |
| 44 | + </div> |
| 45 | + } |
| 46 | + @if (hasTranscripts()) { |
| 47 | + <div |
| 48 | + class="flex p-1 hover:bg-gray-100 rounded transition-colors" |
| 49 | + pTooltip="Transcripts Enabled" |
| 50 | + tooltipPosition="top" |
| 51 | + data-testid="dashboard-meeting-card-transcript-icon"> |
| 52 | + <i class="fa-light fa-file-lines text-xs text-gray-700"></i> |
| 53 | + </div> |
| 54 | + } |
| 55 | + @if (hasAiSummary()) { |
| 56 | + <div |
| 57 | + class="flex p-1 hover:bg-gray-100 rounded transition-colors" |
| 58 | + pTooltip="AI Summary Enabled" |
| 59 | + tooltipPosition="top" |
| 60 | + data-testid="dashboard-meeting-card-ai-icon"> |
| 61 | + <i class="fa-light fa-sparkles text-xs text-gray-700"></i> |
| 62 | + </div> |
| 63 | + } |
| 64 | + @if (!isPrivate()) { |
| 65 | + <div |
| 66 | + class="flex p-1 hover:bg-gray-100 rounded transition-colors" |
| 67 | + pTooltip="Public Meeting" |
| 68 | + tooltipPosition="top" |
| 69 | + data-testid="dashboard-meeting-card-public-icon"> |
| 70 | + <i class="fa-light fa-users text-xs text-gray-700"></i> |
| 71 | + </div> |
| 72 | + } |
54 | 73 | </div> |
55 | | - } |
56 | | - @if (!isPrivate()) { |
57 | | - <div |
58 | | - class="w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center" |
59 | | - pTooltip="Public Meeting" |
60 | | - tooltipPosition="top" |
61 | | - data-testid="dashboard-meeting-card-public-icon"> |
62 | | - <i class="fa-light fa-users text-xs text-gray-800"></i> |
63 | | - </div> |
64 | | - } |
| 74 | + </div> |
65 | 75 | </div> |
66 | | - </div> |
67 | | - |
68 | | - <!-- Meeting title --> |
69 | | - <div class="flex items-start justify-between gap-2"> |
70 | | - <h4 class="line-clamp-2 text-sm leading-5 flex-1 font-medium text-gray-900" data-testid="dashboard-meeting-card-title"> |
71 | | - {{ meetingTitle() }} |
72 | | - </h4> |
73 | 76 | @if (attachments().length > 0) { |
74 | 77 | <div class="flex items-center gap-1 flex-shrink-0 mt-0.5"> |
75 | 78 | @for (attachment of attachments(); track attachment.id; let index = $index) { |
76 | 79 | <a |
77 | 80 | [href]="attachment.file_url" |
78 | 81 | target="_blank" |
79 | 82 | rel="noopener noreferrer" |
80 | | - class="w-6 h-6 rounded bg-gray-100 flex items-center justify-center hover:bg-gray-200 transition-colors" |
| 83 | + class="w-6 h-6 rounded bg-blue-50 flex items-center justify-center hover:bg-blue-100 transition-colors cursor-pointer" |
81 | 84 | [attr.data-testid]="'dashboard-meeting-card-file-icon-' + (index + 1)" |
82 | 85 | [pTooltip]="attachment.file_name" |
83 | 86 | tooltipPosition="top"> |
84 | | - <i [class]="(attachment.mime_type || '' | fileTypeIcon) + ' text-xs text-gray-500'"></i> |
| 87 | + <i class="text-xs text-primary" [ngClass]="attachment.mime_type || '' | fileTypeIcon"></i> |
85 | 88 | </a> |
86 | 89 | } |
87 | 90 | </div> |
88 | 91 | } |
89 | 92 | </div> |
90 | 93 |
|
91 | | - <!-- Meeting time and actions --> |
92 | | - <div class="space-y-2"> |
93 | | - <div class="flex items-center justify-between"> |
94 | | - <div class="flex items-center gap-1 text-gray-600" data-testid="dashboard-meeting-card-time"> |
95 | | - <i class="fa-light fa-clock text-xs"></i> |
96 | | - <span class="text-xs">{{ formattedTime() }}</span> |
97 | | - </div> |
98 | | - <lfx-button |
99 | | - label="See Meeting" |
100 | | - icon="fa-light fa-arrow-right" |
101 | | - iconPos="right" |
102 | | - (onClick)="handleSeeMeeting()" |
103 | | - styleClass="text-[#0094FF] hover:text-[#0094FF] hover:bg-blue-50 !h-7 !px-2 !text-xs !font-normal" |
104 | | - [text]="true" |
105 | | - data-testid="dashboard-meeting-card-see-button" /> |
106 | | - </div> |
| 94 | + <!-- Action buttons --> |
| 95 | + <div class="flex gap-2"> |
| 96 | + <!-- See Meeting button - full width when alone, flex-1 when both buttons present --> |
| 97 | + <lfx-button |
| 98 | + class="w-full" |
| 99 | + label="See Meeting Details" |
| 100 | + [routerLink]="['/meetings', meeting().uid]" |
| 101 | + [queryParams]="{ password: meeting().password || '' }" |
| 102 | + target="_blank" |
| 103 | + type="button" |
| 104 | + rel="noopener noreferrer" |
| 105 | + [styleClass]="'border border-gray-300 text-gray-900 hover:bg-gray-50 h-8 text-sm font-medium w-full'" |
| 106 | + [outlined]="true" |
| 107 | + icon="fa-light fa-up-right-from-square text-xs" |
| 108 | + data-testid="dashboard-meeting-card-see-button" /> |
107 | 109 |
|
108 | | - <!-- Join Meeting button for today's meetings --> |
| 110 | + <!-- Join Meeting button - right side when present --> |
109 | 111 | @if (isTodayMeeting()) { |
110 | | - <lfx-button |
111 | | - label="Join Meeting" |
112 | | - [routerLink]="['/meetings', meeting().uid]" |
113 | | - [queryParams]="{ password: meeting().password || '' }" |
114 | | - target="_blank" |
115 | | - type="button" |
116 | | - rel="noopener noreferrer" |
117 | | - styleClass="w-full mt-1 bg-emerald-500 hover:bg-emerald-600 text-white h-7 text-xs font-semibold" |
118 | | - data-testid="dashboard-meeting-card-join-button" /> |
| 112 | + @if (joinUrl()) { |
| 113 | + <!-- Direct join URL available --> |
| 114 | + <lfx-button |
| 115 | + class="w-full" |
| 116 | + size="small" |
| 117 | + label="Join Meeting" |
| 118 | + [href]="joinUrl()!" |
| 119 | + target="_blank" |
| 120 | + type="button" |
| 121 | + rel="noopener noreferrer" |
| 122 | + icon="fa-light fa-video" |
| 123 | + styleClass="w-full bg-emerald-500 hover:bg-emerald-600 text-white h-8 text-sm font-semibold" |
| 124 | + data-testid="dashboard-meeting-card-join-button" /> |
| 125 | + } @else { |
| 126 | + <!-- Fallback: redirect to join page --> |
| 127 | + <lfx-button |
| 128 | + type="button" |
| 129 | + size="small" |
| 130 | + class="w-full" |
| 131 | + label="Join Meeting" |
| 132 | + [routerLink]="['/meetings', meeting().uid]" |
| 133 | + [queryParams]="{ password: meeting().password || '' }" |
| 134 | + target="_blank" |
| 135 | + type="button" |
| 136 | + type="button" |
| 137 | + rel="noopener noreferrer" |
| 138 | + icon="fa-light fa-video" |
| 139 | + styleClass="w-full bg-emerald-500 hover:bg-emerald-600 text-white h-8 text-sm font-semibold" |
| 140 | + data-testid="dashboard-meeting-card-join-button" /> |
| 141 | + } |
119 | 142 | } |
120 | 143 | </div> |
121 | 144 | </div> |
|
0 commit comments