✨ right panel messages updates, icon fixes, and backdrop blur
Browse files at this commit15cde3344c34ee1457d2ae7f8f0b5e6fe102db2aParent: 12aead7- feat
- ✨ right panel messages updates, icon fixes, and backdrop blur
6 changed files +807 -9
- src/components/layout/app-shell.tsx +7 -3
- src/components/layout/nav-items.ts +1 -5
- src/components/layout/right-nav.tsx +766 -0
- src/components/ui/icons.tsx +11 -0
- src/i18n/messages.ts +21 -0
- src/pages/questions-page.tsx +1 -1
src/components/layout/app-shell.tsxmodified+7 -3
| @@ -1,11 +1,11 @@ | ||
| 1 | -import type { ParentProps } from "solid-js"; | |
| 1 | +import { Show, createMemo, createSignal, type ParentProps } from "solid-js"; | |
| 2 | 2 | import { Link, useLocation, useNavigate } from "@tanstack/solid-router"; |
| 3 | 3 | import { AccountProfileDialog } from "@/components/users/account-profile-dialog"; |
| 4 | 4 | import { CelebiPanel } from "@/components/layout/celebi-panel"; |
| 5 | -import { Show, createMemo, createSignal } from "solid-js"; | |
| 6 | 5 | import { CommandPalette } from "@/components/layout/command-palette"; |
| 7 | 6 | import { MobileTabBar } from "@/components/layout/mobile-tab-bar"; |
| 8 | 7 | import { NavBar } from "@/components/layout/nav-bar"; |
| 8 | +import { RightNav } from "@/components/layout/right-nav"; | |
| 9 | 9 | import { SideNav } from "@/components/layout/side-nav"; |
| 10 | 10 | import { SidebarAccount } from "@/components/layout/sidebar-account"; |
| 11 | 11 | import { Button } from "@/components/ui/button"; |
| @@ -72,7 +72,7 @@ export function AppShell(props: ParentProps) { | ||
| 72 | 72 | </Show> |
| 73 | 73 | <div class="flex w-full"> |
| 74 | 74 | <Show when={auth.user() && !fullScreen()}> |
| 75 | - <aside | |
| 75 | + <aside | |
| 76 | 76 | class={cn( |
| 77 | 77 | "sticky top-0 z-30 hidden h-screen shrink-0 border-r border-black/[0.06] bg-sidebar/95 text-sidebar-foreground backdrop-blur-md transition-[width] duration-200 ease-out dark:border-white/[0.08] dark:bg-[#070707] dark:text-white lg:flex lg:flex-col", |
| 78 | 78 | collapsed() ? SIDEBAR_COLLAPSED : SIDEBAR_EXPANDED, |
| @@ -194,6 +194,10 @@ export function AppShell(props: ParentProps) { | ||
| 194 | 194 | {props.children} |
| 195 | 195 | </div> |
| 196 | 196 | </main> |
| 197 | + | |
| 198 | + <Show when={auth.user() && !fullScreen()}> | |
| 199 | + <RightNav /> | |
| 200 | + </Show> | |
| 197 | 201 | </div> |
| 198 | 202 | <Show when={auth.user() && !wide()}> |
| 199 | 203 | <MobileTabBar onMenu={() => setMobileOpen(true)} /> |
src/components/layout/nav-items.tsmodified+1 -5
| @@ -13,7 +13,6 @@ import { | ||
| 13 | 13 | IconHelpCircle, |
| 14 | 14 | IconHomework, |
| 15 | 15 | IconHome, |
| 16 | - IconMessage, | |
| 17 | 16 | IconNote, |
| 18 | 17 | IconReportAnalytics, |
| 19 | 18 | IconSchool, |
| @@ -57,7 +56,6 @@ const NAV_GROUPS: NavGroup[] = [ | ||
| 57 | 56 | { to: "/homework", labelKey: "nav.homework", Icon: IconHomework }, |
| 58 | 57 | { to: "/exams", labelKey: "nav.exams", Icon: IconExam }, |
| 59 | 58 | { to: "/events", labelKey: "nav.events", Icon: IconCalendar }, |
| 60 | - { to: "/calendar", labelKey: "nav.calendar", Icon: IconCalendarDays }, | |
| 61 | 59 | { to: "/marks", labelKey: "nav.marks", Icon: IconChart, exactRole: "student" }, |
| 62 | 60 | { to: "/attendance", labelKey: "nav.attendance", Icon: IconClipboardCheck, exactRole: "student" }, |
| 63 | 61 | { to: "/pomodoro", labelKey: "nav.pomodoro", Icon: IconClock, exactRole: "student" }, |
| @@ -85,7 +83,6 @@ const NAV_GROUPS: NavGroup[] = [ | ||
| 85 | 83 | labelKey: "nav.group.community", |
| 86 | 84 | Icon: IconGlobe, |
| 87 | 85 | items: [ |
| 88 | - { to: "/messages", labelKey: "nav.messages", Icon: IconMessage }, | |
| 89 | 86 | { to: "/questions", labelKey: "nav.questions", Icon: IconHelpCircle }, |
| 90 | 87 | ], |
| 91 | 88 | }, |
| @@ -137,12 +134,11 @@ const PARENT_GROUP: NavGroup = { | ||
| 137 | 134 | exactRole: "parent", |
| 138 | 135 | items: [ |
| 139 | 136 | { to: "/students", labelKey: "nav.myStudents", Icon: IconUsers, exactRole: "parent" }, |
| 140 | - { to: "/messages", labelKey: "nav.messages", Icon: IconMessage, exactRole: "parent" }, | |
| 141 | 137 | ], |
| 142 | 138 | }; |
| 143 | 139 | |
| 144 | 140 | function itemVisible(item: NavItem, role: Role | undefined) { |
| 145 | - if (role === "parent") return item.to === "/students" || item.to === "/messages"; | |
| 141 | + if (role === "parent") return item.to === "/students"; | |
| 146 | 142 | if (item.exactRole) return hasExactRole(role, item.exactRole); |
| 147 | 143 | if (item.minRole || item.maxRole) return roleInRange(role, item.minRole, item.maxRole); |
| 148 | 144 | return true; |
src/components/layout/right-nav.tsxadded+766 -0
| @@ -0,0 +1,766 @@ | ||
| 1 | +import { For, Show, Suspense, createMemo, createResource, createSignal } from "solid-js"; | |
| 2 | +import { useNavigate } from "@tanstack/solid-router"; | |
| 3 | +import { getEvents } from "@/api/events"; | |
| 4 | +import { getExams } from "@/api/exams"; | |
| 5 | +import { getMessages, patchMessageById } from "@/api/messages"; | |
| 6 | +import type { Event, Exam, Message } from "@/api/client"; | |
| 7 | +import { Badge } from "@/components/ui/badge"; | |
| 8 | +import { Button } from "@/components/ui/button"; | |
| 9 | +import { PageSpinner } from "@/components/ui/page-spinner"; | |
| 10 | +import { PaginationControls } from "@/components/ui/pagination-controls"; | |
| 11 | +import { | |
| 12 | + IconCalendarDays, | |
| 13 | + IconChevronLeft, | |
| 14 | + IconChevronRight, | |
| 15 | + IconClock, | |
| 16 | + IconExternalLink, | |
| 17 | + IconMessage, | |
| 18 | + IconX, | |
| 19 | +} from "@/components/ui/icons"; | |
| 20 | +import { cn } from "@/lib/cn"; | |
| 21 | +import { personLabel } from "@/lib/person"; | |
| 22 | +import { usePreferences, useT } from "@/stores/preferences-context"; | |
| 23 | + | |
| 24 | +type ActiveTab = "messages" | "calendar" | null; | |
| 25 | +type CalendarItemRef = { type: "event"; data: Event } | { type: "exam"; data: Exam }; | |
| 26 | + | |
| 27 | +const PAGE_SIZE = 5; | |
| 28 | + | |
| 29 | +export function RightNav() { | |
| 30 | + const t = useT(); | |
| 31 | + const navigate = useNavigate(); | |
| 32 | + const { locale } = usePreferences(); | |
| 33 | + | |
| 34 | + // Active drawer tab | |
| 35 | + const [activeTab, setActiveTab] = createSignal<ActiveTab>(null); | |
| 36 | + | |
| 37 | + // Messages drawer state | |
| 38 | + const [unreadOnly, setUnreadOnly] = createSignal(false); | |
| 39 | + const [selectedMessage, setSelectedMessage] = createSignal<Message | null>(null); | |
| 40 | + | |
| 41 | + // Calendar drawer state | |
| 42 | + const [calPage, setCalPage] = createSignal(0); | |
| 43 | + const [calFilter, setCalFilter] = createSignal<"all" | "events" | "exams">("all"); | |
| 44 | + const [selectedCalItem, setSelectedCalItem] = createSignal<CalendarItemRef | null>(null); | |
| 45 | + | |
| 46 | + // Fetch inbox messages | |
| 47 | + const [messagesRes, { refetch: refetchMessages }] = createResource( | |
| 48 | + async () => { | |
| 49 | + try { | |
| 50 | + return await getMessages("inbox", { limit: 100 }); | |
| 51 | + } catch { | |
| 52 | + return { items: [], total: 0, limit: 100, offset: 0 }; | |
| 53 | + } | |
| 54 | + }, | |
| 55 | + { initialValue: { items: [], total: 0, limit: 100, offset: 0 } } | |
| 56 | + ); | |
| 57 | + | |
| 58 | + // Fetch events & exams | |
| 59 | + const [eventsRes] = createResource( | |
| 60 | + async () => { | |
| 61 | + try { | |
| 62 | + return (await getEvents({ limit: 100 })).items; | |
| 63 | + } catch { | |
| 64 | + return []; | |
| 65 | + } | |
| 66 | + }, | |
| 67 | + { initialValue: [] } | |
| 68 | + ); | |
| 69 | + | |
| 70 | + const [examsRes] = createResource( | |
| 71 | + async () => { | |
| 72 | + try { | |
| 73 | + return (await getExams({ limit: 100 })).items; | |
| 74 | + } catch { | |
| 75 | + return []; | |
| 76 | + } | |
| 77 | + }, | |
| 78 | + { initialValue: [] } | |
| 79 | + ); | |
| 80 | + | |
| 81 | + // Computed message data | |
| 82 | + const allMessages = () => messagesRes().items; | |
| 83 | + const unreadCount = createMemo(() => allMessages().filter((m: Message) => !m.read).length); | |
| 84 | + | |
| 85 | + const filteredMessages = createMemo(() => { | |
| 86 | + let list = allMessages(); | |
| 87 | + if (unreadOnly()) { | |
| 88 | + list = list.filter((m: Message) => !m.read); | |
| 89 | + } | |
| 90 | + return list; | |
| 91 | + }); | |
| 92 | + | |
| 93 | + // Top 5 recent messages only for side panel | |
| 94 | + const recentMessages = createMemo(() => { | |
| 95 | + return filteredMessages().slice(0, 5); | |
| 96 | + }); | |
| 97 | + | |
| 98 | + // Computed calendar data | |
| 99 | + const now = new Date(); | |
| 100 | + const startOfDay = new Date(now.getFullYear(), now.getMonth(), now.getDate()).getTime(); | |
| 101 | + | |
| 102 | + const activeEvents = createMemo(() => { | |
| 103 | + return eventsRes().filter((e: Event) => { | |
| 104 | + if (!e.starts_at) return false; | |
| 105 | + return new Date(e.starts_at).getTime() >= startOfDay; | |
| 106 | + }); | |
| 107 | + }); | |
| 108 | + | |
| 109 | + const activeExams = createMemo(() => { | |
| 110 | + return examsRes().filter((e: Exam) => { | |
| 111 | + if (!e.starts_at || e.draft) return false; | |
| 112 | + return new Date(e.starts_at).getTime() >= startOfDay; | |
| 113 | + }); | |
| 114 | + }); | |
| 115 | + | |
| 116 | + const hasTodayEvents = createMemo(() => activeEvents().length > 0); | |
| 117 | + const hasTodayExams = createMemo(() => activeExams().length > 0); | |
| 118 | + | |
| 119 | + const combinedCalendarItems = createMemo(() => { | |
| 120 | + const items: CalendarItemRef[] = []; | |
| 121 | + | |
| 122 | + if (calFilter() === "all" || calFilter() === "events") { | |
| 123 | + for (const ev of activeEvents()) { | |
| 124 | + items.push({ type: "event", data: ev }); | |
| 125 | + } | |
| 126 | + } | |
| 127 | + | |
| 128 | + if (calFilter() === "all" || calFilter() === "exams") { | |
| 129 | + for (const ex of activeExams()) { | |
| 130 | + items.push({ type: "exam", data: ex }); | |
| 131 | + } | |
| 132 | + } | |
| 133 | + | |
| 134 | + // Sort chronologically by start date | |
| 135 | + return items.sort((a, b) => { | |
| 136 | + const timeA = a.data.starts_at ? new Date(a.data.starts_at).getTime() : 0; | |
| 137 | + const timeB = b.data.starts_at ? new Date(b.data.starts_at).getTime() : 0; | |
| 138 | + return timeA - timeB; | |
| 139 | + }); | |
| 140 | + }); | |
| 141 | + | |
| 142 | + const calTotalPages = createMemo(() => Math.max(1, Math.ceil(combinedCalendarItems().length / PAGE_SIZE))); | |
| 143 | + const paginatedCalItems = createMemo(() => { | |
| 144 | + const start = calPage() * PAGE_SIZE; | |
| 145 | + return combinedCalendarItems().slice(start, start + PAGE_SIZE); | |
| 146 | + }); | |
| 147 | + | |
| 148 | + // Toggle drawer tabs | |
| 149 | + const toggleTab = (tab: "messages" | "calendar") => { | |
| 150 | + if (activeTab() === tab) { | |
| 151 | + setActiveTab(null); | |
| 152 | + } else { | |
| 153 | + setActiveTab(tab); | |
| 154 | + // Reset preview state when switching tabs | |
| 155 | + setSelectedMessage(null); | |
| 156 | + setSelectedCalItem(null); | |
| 157 | + } | |
| 158 | + }; | |
| 159 | + | |
| 160 | + const closePanel = () => { | |
| 161 | + setActiveTab(null); | |
| 162 | + setSelectedMessage(null); | |
| 163 | + setSelectedCalItem(null); | |
| 164 | + }; | |
| 165 | + | |
| 166 | + const goTo = (path: string) => { | |
| 167 | + closePanel(); | |
| 168 | + void navigate({ to: path }); | |
| 169 | + }; | |
| 170 | + | |
| 171 | + // Mark message as read/unread toggle | |
| 172 | + const toggleReadStatus = async (msg: Message) => { | |
| 173 | + try { | |
| 174 | + await patchMessageById(msg.id, { read: !msg.read }); | |
| 175 | + setSelectedMessage({ ...msg, read: !msg.read }); | |
| 176 | + void refetchMessages(); | |
| 177 | + } catch { | |
| 178 | + // ignore | |
| 179 | + } | |
| 180 | + }; | |
| 181 | + | |
| 182 | + // Mark as read if unread and navigate directly to /messages page | |
| 183 | + const handleSelectMessage = async (msg: Message) => { | |
| 184 | + if (!msg.read) { | |
| 185 | + try { | |
| 186 | + await patchMessageById(msg.id, { read: true }); | |
| 187 | + void refetchMessages(); | |
| 188 | + } catch { | |
| 189 | + // ignore | |
| 190 | + } | |
| 191 | + } | |
| 192 | + goTo("/messages"); | |
| 193 | + }; | |
| 194 | + | |
| 195 | + return ( | |
| 196 | + <> | |
| 197 | + {/* Sticky Right Icon Bar */} | |
| 198 | + <aside | |
| 199 | + class="sticky top-0 z-30 hidden h-screen w-14 shrink-0 flex-col items-center justify-between border-l border-black/[0.06] bg-sidebar py-3 text-sidebar-foreground dark:border-white/[0.08] dark:bg-[#070707] dark:text-white lg:flex" | |
| 200 | + > | |
| 201 | + <div class="flex flex-col items-center gap-3"> | |
| 202 | + {/* Messages Icon Button */} | |
| 203 | + <button | |
| 204 | + type="button" | |
| 205 | + onClick={() => toggleTab("messages")} | |
| 206 | + class={cn( | |
| 207 | + "relative flex h-10 w-10 items-center justify-center rounded-xl transition-all duration-200", | |
| 208 | + activeTab() === "messages" | |
| 209 | + ? "bg-primary text-primary-foreground shadow-md scale-105" | |
| 210 | + : "text-muted-foreground hover:bg-secondary hover:text-foreground dark:text-white/70 dark:hover:bg-white/[0.08] dark:hover:text-white" | |
| 211 | + )} | |
| 212 | + title={t("rightPanel.messagesTitle")} | |
| 213 | + aria-label={t("rightPanel.messagesTitle")} | |
| 214 | + > | |
| 215 | + <IconMessage class="h-5 w-5" /> | |
| 216 | + <Show when={unreadCount() > 0}> | |
| 217 | + <span | |
| 218 | + class="absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-rose-500 px-1 text-[9px] font-bold text-white shadow-xs animate-pulse ring-2 ring-sidebar dark:ring-[#070707]" | |
| 219 | + > | |
| 220 | + {unreadCount() > 9 ? "9+" : unreadCount()} | |
| 221 | + </span> | |
| 222 | + </Show> | |
| 223 | + </button> | |
| 224 | + | |
| 225 | + {/* Calendar Icon Button with Overlapping Colored Indicators */} | |
| 226 | + <button | |
| 227 | + type="button" | |
| 228 | + onClick={() => toggleTab("calendar")} | |
| 229 | + class={cn( | |
| 230 | + "relative flex h-10 w-10 items-center justify-center rounded-xl transition-all duration-200", | |
| 231 | + activeTab() === "calendar" | |
| 232 | + ? "bg-primary text-primary-foreground shadow-md scale-105" | |
| 233 | + : "text-muted-foreground hover:bg-secondary hover:text-foreground dark:text-white/70 dark:hover:bg-white/[0.08] dark:hover:text-white" | |
| 234 | + )} | |
| 235 | + title={t("rightPanel.calendarTitle")} | |
| 236 | + aria-label={t("rightPanel.calendarTitle")} | |
| 237 | + > | |
| 238 | + <IconCalendarDays class="h-5 w-5" /> | |
| 239 | + | |
| 240 | + {/* Both Event and Exam: Overlapping Colored Dots */} | |
| 241 | + <Show when={hasTodayEvents() && hasTodayExams()}> | |
| 242 | + <div class="absolute -top-1 -right-1 z-10 flex items-center -space-x-1.5"> | |
| 243 | + <span | |
| 244 | + class="h-2.5 w-2.5 rounded-full bg-emerald-500 ring-2 ring-sidebar dark:ring-[#070707] shadow-xs" | |
| 245 | + title={t("nav.events")} | |
| 246 | + /> | |
| 247 | + <span | |
| 248 | + class="h-2.5 w-2.5 rounded-full bg-rose-500 ring-2 ring-sidebar dark:ring-[#070707] shadow-xs" | |
| 249 | + title={t("nav.exams")} | |
| 250 | + /> | |
| 251 | + </div> | |
| 252 | + </Show> | |
| 253 | + | |
| 254 | + {/* Only Event */} | |
| 255 | + <Show when={hasTodayEvents() && !hasTodayExams()}> | |
| 256 | + <span | |
| 257 | + class="absolute -top-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-emerald-500 ring-2 ring-sidebar dark:ring-[#070707] shadow-xs" | |
| 258 | + title={t("nav.events")} | |
| 259 | + /> | |
| 260 | + </Show> | |
| 261 | + | |
| 262 | + {/* Only Exam */} | |
| 263 | + <Show when={hasTodayExams() && !hasTodayEvents()}> | |
| 264 | + <span | |
| 265 | + class="absolute -top-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-rose-500 ring-2 ring-sidebar dark:ring-[#070707] shadow-xs" | |
| 266 | + title={t("nav.exams")} | |
| 267 | + /> | |
| 268 | + </Show> | |
| 269 | + </button> | |
| 270 | + </div> | |
| 271 | + | |
| 272 | + <div class="flex flex-col items-center gap-2"> | |
| 273 | + <div class="h-1.5 w-1.5 rounded-full bg-muted-foreground/30" /> | |
| 274 | + </div> | |
| 275 | + </aside> | |
| 276 | + | |
| 277 | + {/* Flyout Side Drawer Panel */} | |
| 278 | + <Show when={activeTab() !== null}> | |
| 279 | + {/* Backdrop overlay blurring main page content on the left */} | |
| 280 | + <div | |
| 281 | + class="fixed inset-0 z-40 bg-black/20 backdrop-blur-sm transition-all" | |
| 282 | + onClick={closePanel} | |
| 283 | + /> | |
| 284 | + | |
| 285 | + <div | |
| 286 | + class="fixed right-14 top-0 z-50 flex h-screen w-80 sm:w-96 flex-col border-l border-black/[0.08] bg-card text-card-foreground shadow-2xl dark:border-white/[0.08] dark:bg-[#0c0c0e] animate-in slide-in-from-right-4 duration-200" | |
| 287 | + > | |
| 288 | + {/* Drawer Header */} | |
| 289 | + <div class="flex h-14 shrink-0 items-center justify-between border-b border-border/60 px-4"> | |
| 290 | + <div class="flex items-center gap-2 font-display text-sm font-semibold tracking-tight"> | |
| 291 | + <Show when={activeTab() === "messages"}> | |
| 292 | + <Show | |
| 293 | + when={selectedMessage()} | |
| 294 | + fallback={ | |
| 295 | + <> | |
| 296 | + <IconMessage class="h-4 w-4 text-primary" /> | |
| 297 | + <span>{t("rightPanel.messagesTitle")}</span> | |
| 298 | + <Show when={unreadCount() > 0}> | |
| 299 | + <Badge variant="destructive" class="ml-1.5 px-1.5 py-0 text-[10px]"> | |
| 300 | + {unreadCount()} {t("rightPanel.unreadBadge")} | |
| 301 | + </Badge> | |
| 302 | + </Show> | |
| 303 | + </> | |
| 304 | + } | |
| 305 | + > | |
| 306 | + <Button | |
| 307 | + type="button" | |
| 308 | + variant="ghost" | |
| 309 | + size="sm" | |
| 310 | + class="h-7 px-2 text-xs gap-1 rounded-lg hover:bg-secondary" | |
| 311 | + onClick={() => setSelectedMessage(null)} | |
| 312 | + > | |
| 313 | + <IconChevronLeft class="h-3.5 w-3.5" /> | |
| 314 | + <span>{t("common.back")}</span> | |
| 315 | + </Button> | |
| 316 | + </Show> | |
| 317 | + </Show> | |
| 318 | + | |
| 319 | + <Show when={activeTab() === "calendar"}> | |
| 320 | + <Show | |
| 321 | + when={selectedCalItem()} | |
| 322 | + fallback={ | |
| 323 | + <> | |
| 324 | + <IconCalendarDays class="h-4 w-4 text-primary" /> | |
| 325 | + <span>{t("rightPanel.calendarTitle")}</span> | |
| 326 | + </> | |
| 327 | + } | |
| 328 | + > | |
| 329 | + <Button | |
| 330 | + type="button" | |
| 331 | + variant="ghost" | |
| 332 | + size="sm" | |
| 333 | + class="h-7 px-2 text-xs gap-1 rounded-lg hover:bg-secondary" | |
| 334 | + onClick={() => setSelectedCalItem(null)} | |
| 335 | + > | |
| 336 | + <IconChevronLeft class="h-3.5 w-3.5" /> | |
| 337 | + <span>{t("common.back")}</span> | |
| 338 | + </Button> | |
| 339 | + </Show> | |
| 340 | + </Show> | |
| 341 | + </div> | |
| 342 | + | |
| 343 | + <Button | |
| 344 | + type="button" | |
| 345 | + variant="ghost" | |
| 346 | + size="sm" | |
| 347 | + class="h-8 w-8 rounded-lg p-0 text-muted-foreground hover:text-foreground" | |
| 348 | + onClick={closePanel} | |
| 349 | + aria-label={t("nav.close")} | |
| 350 | + > | |
| 351 | + <IconX class="h-4 w-4" /> | |
| 352 | + </Button> | |
| 353 | + </div> | |
| 354 | + | |
| 355 | + {/* Drawer Body */} | |
| 356 | + <div class="min-h-0 flex-1 overflow-y-auto p-4 space-y-3"> | |
| 357 | + {/* MESSAGES TAB */} | |
| 358 | + <Show when={activeTab() === "messages"}> | |
| 359 | + {/* Message Details Preview View */} | |
| 360 | + <Show | |
| 361 | + when={selectedMessage()} | |
| 362 | + fallback={ | |
| 363 | + /* Messages List View */ | |
| 364 | + <Suspense fallback={<PageSpinner />}> | |
| 365 | + {/* Filter Bar */} | |
| 366 | + <div class="flex items-center justify-between gap-2 pb-1 border-b border-border/40 text-xs"> | |
| 367 | + <div class="flex items-center gap-1"> | |
| 368 | + <button | |
| 369 | + type="button" | |
| 370 | + onClick={() => setUnreadOnly(false)} | |
| 371 | + class={cn( | |
| 372 | + "rounded-lg px-2.5 py-1 text-[11px] font-medium transition-colors", | |
| 373 | + !unreadOnly() | |
| 374 | + ? "bg-primary text-primary-foreground font-semibold" | |
| 375 | + : "text-muted-foreground hover:bg-secondary hover:text-foreground" | |
| 376 | + )} | |
| 377 | + > | |
| 378 | + {t("common.all")} ({allMessages().length}) | |
| 379 | + </button> | |
| 380 | + <button | |
| 381 | + type="button" | |
| 382 | + onClick={() => setUnreadOnly(true)} | |
| 383 | + class={cn( | |
| 384 | + "rounded-lg px-2.5 py-1 text-[11px] font-medium transition-colors", | |
| 385 | + unreadOnly() | |
| 386 | + ? "bg-primary text-primary-foreground font-semibold" | |
| 387 | + : "text-muted-foreground hover:bg-secondary hover:text-foreground" | |
| 388 | + )} | |
| 389 | + > | |
| 390 | + {t("rightPanel.unreadBadge")} ({unreadCount()}) | |
| 391 | + </button> | |
| 392 | + </div> | |
| 393 | + </div> | |
| 394 | + | |
| 395 | + <Show | |
| 396 | + when={recentMessages().length > 0} | |
| 397 | + fallback={ | |
| 398 | + <div class="flex h-48 flex-col items-center justify-center text-center text-xs text-muted-foreground space-y-2"> | |
| 399 | + <IconMessage class="h-8 w-8 text-muted-foreground/40" /> | |
| 400 | + <p>{t("rightPanel.noUnread")}</p> | |
| 401 | + </div> | |
| 402 | + } | |
| 403 | + > | |
| 404 | + <div class="space-y-2"> | |
| 405 | + <For each={recentMessages()}> | |
| 406 | + {(msg) => ( | |
| 407 | + <div | |
| 408 | + onClick={() => handleSelectMessage(msg)} | |
| 409 | + class={cn( | |
| 410 | + "group flex cursor-pointer flex-col gap-1 rounded-xl border p-2.5 transition-all hover:border-primary/50 hover:bg-muted/40 shadow-2xs max-w-full overflow-hidden", | |
| 411 | + !msg.read | |
| 412 | + ? "border-primary/30 bg-primary/[0.03] dark:bg-primary/[0.06]" | |
| 413 | + : "border-border/60 bg-card" | |
| 414 | + )} | |
| 415 | + > | |
| 416 | + <div class="flex items-center justify-between text-xs gap-2 min-w-0"> | |
| 417 | + <div class="flex items-center gap-1.5 min-w-0 max-w-[70%]"> | |
| 418 | + <span class="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-primary/10 text-[9px] font-bold text-primary"> | |
| 419 | + {personLabel(msg.sender).charAt(0).toUpperCase()} | |
| 420 | + </span> | |
| 421 | + <span class="font-semibold text-foreground truncate max-w-[140px]"> | |
| 422 | + {personLabel(msg.sender)} | |
| 423 | + </span> | |
| 424 | + </div> | |
| 425 | + <span class="text-[10px] text-muted-foreground shrink-0"> | |
| 426 | + {msg.sent_at | |
| 427 | + ? new Date(msg.sent_at).toLocaleTimeString( | |
| 428 | + locale() === "tr" ? "tr-TR" : "en-US", | |
| 429 | + { hour: "2-digit", minute: "2-digit" } | |
| 430 | + ) | |
| 431 | + : ""} | |
| 432 | + </span> | |
| 433 | + </div> | |
| 434 | + <Show when={msg.subject}> | |
| 435 | + <p class="text-xs font-medium text-foreground truncate max-w-[280px]"> | |
| 436 | + {msg.subject} | |
| 437 | + </p> | |
| 438 | + </Show> | |
| 439 | + <p class="line-clamp-1 text-xs text-muted-foreground leading-relaxed truncate max-w-full"> | |
| 440 | + {msg.body} | |
| 441 | + </p> | |
| 442 | + <div class="flex items-center justify-between pt-0.5 text-[10px]"> | |
| 443 | + <Show when={!msg.read}> | |
| 444 | + <span class="inline-flex items-center gap-1 font-semibold text-primary"> | |
| 445 | + <span class="h-1.5 w-1.5 rounded-full bg-primary animate-pulse" /> | |
| 446 | + {t("rightPanel.unreadBadge")} | |
| 447 | + </span> | |
| 448 | + </Show> | |
| 449 | + <span class="text-muted-foreground/70 group-hover:text-primary transition-colors ml-auto font-medium"> | |
| 450 | + Mesaja Git → | |
| 451 | + </span> | |
| 452 | + </div> | |
| 453 | + </div> | |
| 454 | + )} | |
| 455 | + </For> | |
| 456 | + </div> | |
| 457 | + | |
| 458 | + {/* Redirect link for all messages if total > 5 */} | |
| 459 | + <Show when={filteredMessages().length > 5}> | |
| 460 | + <div class="pt-2 text-center"> | |
| 461 | + <Button | |
| 462 | + type="button" | |
| 463 | + variant="outline" | |
| 464 | + size="sm" | |
| 465 | + class="w-full h-8 text-xs text-primary border-primary/20 hover:bg-primary/5 rounded-lg justify-center gap-1.5 font-medium" | |
| 466 | + onClick={() => goTo("/messages")} | |
| 467 | + > | |
| 468 | + <span>Tüm Mesajları Aç ({filteredMessages().length})</span> | |
| 469 | + <IconExternalLink class="h-3.5 w-3.5" /> | |
| 470 | + </Button> | |
| 471 | + </div> | |
| 472 | + </Show> | |
| 473 | + </Show> | |
| 474 | + </Suspense> | |
| 475 | + } | |
| 476 | + > | |
| 477 | + {(msg) => ( | |
| 478 | + <div class="space-y-4 animate-in fade-in-50"> | |
| 479 | + <div class="rounded-xl border border-border/80 bg-muted/20 p-3.5 space-y-3"> | |
| 480 | + <div class="flex items-start justify-between gap-2 border-b border-border/50 pb-2.5"> | |
| 481 | + <div class="flex items-center gap-2.5 min-w-0"> | |
| 482 | + <span class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-primary text-xs font-bold text-primary-foreground shadow-sm"> | |
| 483 | + {personLabel(msg().sender).charAt(0).toUpperCase()} | |
| 484 | + </span> | |
| 485 | + <div class="min-w-0"> | |
| 486 | + <h4 class="text-xs font-semibold text-foreground truncate"> | |
| 487 | + {personLabel(msg().sender)} | |
| 488 | + </h4> | |
| 489 | + <p class="text-[10px] text-muted-foreground"> | |
| 490 | + {msg().sent_at | |
| 491 | + ? new Date(msg().sent_at).toLocaleString( | |
| 492 | + locale() === "tr" ? "tr-TR" : "en-US", | |
| 493 | + { dateStyle: "medium", timeStyle: "short" } | |
| 494 | + ) | |
| 495 | + : ""} | |
| 496 | + </p> | |
| 497 | + </div> | |
| 498 | + </div> | |
| 499 | + | |
| 500 | + <Button | |
| 501 | + type="button" | |
| 502 | + variant="outline" | |
| 503 | + size="sm" | |
| 504 | + class="h-7 px-2 text-[10px] rounded-lg shrink-0" | |
| 505 | + onClick={() => toggleReadStatus(msg())} | |
| 506 | + > | |
| 507 | + {msg().read ? "Okunmadı Yap" : "Okundu İşaretle"} | |
| 508 | + </Button> | |
| 509 | + </div> | |
| 510 | + | |
| 511 | + <Show when={msg().subject}> | |
| 512 | + <h3 class="text-sm font-semibold text-foreground tracking-tight"> | |
| 513 | + {msg().subject} | |
| 514 | + </h3> | |
| 515 | + </Show> | |
| 516 | + | |
| 517 | + <div class="rounded-lg bg-card p-3 border border-border/40 text-xs text-foreground leading-relaxed whitespace-pre-wrap"> | |
| 518 | + {msg().body} | |
| 519 | + </div> | |
| 520 | + | |
| 521 | + <div class="pt-2 flex justify-end"> | |
| 522 | + <Button | |
| 523 | + type="button" | |
| 524 | + variant="secondary" | |
| 525 | + size="sm" | |
| 526 | + class="h-8 rounded-lg gap-1.5 text-xs font-medium" | |
| 527 | + onClick={() => goTo("/messages")} | |
| 528 | + > | |
| 529 | + <span>{t("rightPanel.openFullMessages")}</span> | |
| 530 | + <IconExternalLink class="h-3.5 w-3.5" /> | |
| 531 | + </Button> | |
| 532 | + </div> | |
| 533 | + </div> | |
| 534 | + </div> | |
| 535 | + )} | |
| 536 | + </Show> | |
| 537 | + </Show> | |
| 538 | + | |
| 539 | + {/* CALENDAR TAB */} | |
| 540 | + <Show when={activeTab() === "calendar"}> | |
| 541 | + {/* Calendar Item Preview View */} | |
| 542 | + <Show | |
| 543 | + when={selectedCalItem()} | |
| 544 | + fallback={ | |
| 545 | + /* Calendar Items List View */ | |
| 546 | + <Suspense fallback={<PageSpinner />}> | |
| 547 | + {/* Filter Chips */} | |
| 548 | + <div class="flex items-center gap-1.5 pb-1 border-b border-border/40 text-xs"> | |
| 549 | + <button | |
| 550 | + type="button" | |
| 551 | + onClick={() => { setCalFilter("all"); setCalPage(0); }} | |
| 552 | + class={cn( | |
| 553 | + "rounded-lg px-2.5 py-1 text-[11px] font-medium transition-colors", | |
| 554 | + calFilter() === "all" | |
| 555 | + ? "bg-primary text-primary-foreground font-semibold" | |
| 556 | + : "text-muted-foreground hover:bg-secondary hover:text-foreground" | |
| 557 | + )} | |
| 558 | + > | |
| 559 | + {t("common.all")} | |
| 560 | + </button> | |
| 561 | + <button | |
| 562 | + type="button" | |
| 563 | + onClick={() => { setCalFilter("events"); setCalPage(0); }} | |
| 564 | + class={cn( | |
| 565 | + "rounded-lg px-2.5 py-1 text-[11px] font-medium transition-colors border", | |
| 566 | + calFilter() === "events" | |
| 567 | + ? "bg-emerald-500 text-white font-semibold border-emerald-500" | |
| 568 | + : "text-emerald-600 dark:text-emerald-400 border-emerald-500/30 hover:bg-emerald-500/10" | |
| 569 | + )} | |
| 570 | + > | |
| 571 | + {t("calendar.events")} ({activeEvents().length}) | |
| 572 | + </button> | |
| 573 | + <button | |
| 574 | + type="button" | |
| 575 | + onClick={() => { setCalFilter("exams"); setCalPage(0); }} | |
| 576 | + class={cn( | |
| 577 | + "rounded-lg px-2.5 py-1 text-[11px] font-medium transition-colors border", | |
| 578 | + calFilter() === "exams" | |
| 579 | + ? "bg-rose-500 text-white font-semibold border-rose-500" | |
| 580 | + : "text-rose-600 dark:text-rose-400 border-rose-500/30 hover:bg-rose-500/10" | |
| 581 | + )} | |
| 582 | + > | |
| 583 | + {t("calendar.exams")} ({activeExams().length}) | |
| 584 | + </button> | |
| 585 | + </div> | |
| 586 | + | |
| 587 | + <Show | |
| 588 | + when={paginatedCalItems().length > 0} | |
| 589 | + fallback={ | |
| 590 | + <div class="flex h-48 flex-col items-center justify-center text-center text-xs text-muted-foreground space-y-2"> | |
| 591 | + <IconCalendarDays class="h-8 w-8 text-muted-foreground/40" /> | |
| 592 | + <p>{t("rightPanel.noUpcoming")}</p> | |
| 593 | + </div> | |
| 594 | + } | |
| 595 | + > | |
| 596 | + <div class="space-y-2"> | |
| 597 | + <For each={paginatedCalItems()}> | |
| 598 | + {(item) => { | |
| 599 | + const isEvent = item.type === "event"; | |
| 600 | + const ev = item.data; | |
| 601 | + return ( | |
| 602 | + <div | |
| 603 | + onClick={() => setSelectedCalItem(item)} | |
| 604 | + class={cn( | |
| 605 | + "group flex cursor-pointer items-start justify-between gap-2.5 rounded-xl border p-3 shadow-2xs transition-all hover:shadow-md", | |
| 606 | + isEvent | |
| 607 | + ? "border-emerald-500/30 bg-emerald-500/[0.02] hover:border-emerald-500/60 hover:bg-emerald-500/[0.05]" | |
| 608 | + : "border-rose-500/30 bg-rose-500/[0.02] hover:border-rose-500/60 hover:bg-rose-500/[0.05]" | |
| 609 | + )} | |
| 610 | + > | |
| 611 | + <div class="min-w-0 space-y-1"> | |
| 612 | + <p | |
| 613 | + class={cn( | |
| 614 | + "truncate text-xs font-semibold", | |
| 615 | + isEvent | |
| 616 | + ? "text-emerald-700 dark:text-emerald-300 group-hover:text-emerald-600" | |
| 617 | + : "text-rose-700 dark:text-rose-300 group-hover:text-rose-600" | |
| 618 | + )} | |
| 619 | + > | |
| 620 | + {ev.title} | |
| 621 | + </p> | |
| 622 | + <div class="flex items-center gap-1.5 text-[11px] text-muted-foreground"> | |
| 623 | + <IconClock class="h-3 w-3 shrink-0" /> | |
| 624 | + <span> | |
| 625 | + {ev.starts_at | |
| 626 | + ? new Date(ev.starts_at).toLocaleDateString( | |
| 627 | + locale() === "tr" ? "tr-TR" : "en-US", | |
| 628 | + { day: "numeric", month: "short", hour: "2-digit", minute: "2-digit" } | |
| 629 | + ) | |
| 630 | + : ""} | |
| 631 | + </span> | |
| 632 | + </div> | |
| 633 | + </div> | |
| 634 | + | |
| 635 | + <Badge | |
| 636 | + variant="outline" | |
| 637 | + class={cn( | |
| 638 | + "shrink-0 text-[9px] font-semibold px-2 py-0.5", | |
| 639 | + isEvent | |
| 640 | + ? "border-emerald-500/40 text-emerald-700 dark:text-emerald-300 bg-emerald-500/10" | |
| 641 | + : "border-rose-500/40 text-rose-700 dark:text-rose-300 bg-rose-500/10" | |
| 642 | + )} | |
| 643 | + > | |
| 644 | + {isEvent ? t("calendar.events") : t("calendar.exams")} | |
| 645 | + </Badge> | |
| 646 | + </div> | |
| 647 | + ); | |
| 648 | + }} | |
| 649 | + </For> | |
| 650 | + </div> | |
| 651 | + | |
| 652 | + {/* Pagination Controls */} | |
| 653 | + <Show when={calTotalPages() > 1}> | |
| 654 | + <PaginationControls | |
| 655 | + page={calPage()} | |
| 656 | + totalPages={calTotalPages()} | |
| 657 | + onPageChange={setCalPage} | |
| 658 | + /> | |
| 659 | + </Show> | |
| 660 | + </Show> | |
| 661 | + </Suspense> | |
| 662 | + } | |
| 663 | + > | |
| 664 | + {(item) => { | |
| 665 | + const isEvent = item().type === "event"; | |
| 666 | + const data = item().data; | |
| 667 | + return ( | |
| 668 | + <div class="space-y-4 animate-in fade-in-50"> | |
| 669 | + <div | |
| 670 | + class={cn( | |
| 671 | + "rounded-xl border p-4 space-y-3", | |
| 672 | + isEvent | |
| 673 | + ? "border-emerald-500/30 bg-emerald-500/[0.03]" | |
| 674 | + : "border-rose-500/30 bg-rose-500/[0.03]" | |
| 675 | + )} | |
| 676 | + > | |
| 677 | + <div class="flex items-center justify-between"> | |
| 678 | + <Badge | |
| 679 | + variant="outline" | |
| 680 | + class={cn( | |
| 681 | + "text-xs font-semibold px-2.5 py-0.5", | |
| 682 | + isEvent | |
| 683 | + ? "border-emerald-500/50 text-emerald-700 dark:text-emerald-300 bg-emerald-500/10" | |
| 684 | + : "border-rose-500/50 text-rose-700 dark:text-rose-300 bg-rose-500/10" | |
| 685 | + )} | |
| 686 | + > | |
| 687 | + {isEvent ? t("calendar.events") : t("calendar.exams")} | |
| 688 | + </Badge> | |
| 689 | + </div> | |
| 690 | + | |
| 691 | + <h3 class="text-base font-bold text-foreground tracking-tight"> | |
| 692 | + {data.title} | |
| 693 | + </h3> | |
| 694 | + | |
| 695 | + <div class="space-y-2 text-xs text-muted-foreground border-t border-border/40 pt-2.5"> | |
| 696 | + <div class="flex items-center gap-2"> | |
| 697 | + <IconClock class="h-4 w-4 text-primary shrink-0" /> | |
| 698 | + <span> | |
| 699 | + {data.starts_at | |
| 700 | + ? new Date(data.starts_at).toLocaleString( | |
| 701 | + locale() === "tr" ? "tr-TR" : "en-US", | |
| 702 | + { dateStyle: "full", timeStyle: "short" } | |
| 703 | + ) | |
| 704 | + : "—"} | |
| 705 | + </span> | |
| 706 | + </div> | |
| 707 | + | |
| 708 | + <Show when={"description" in data && data.description}> | |
| 709 | + <div class="pt-2 border-t border-border/30 text-foreground"> | |
| 710 | + <p class="text-xs font-medium text-muted-foreground mb-1">Açıklama / Detay:</p> | |
| 711 | + <p class="text-xs leading-relaxed whitespace-pre-wrap">{String(data.description)}</p> | |
| 712 | + </div> | |
| 713 | + </Show> | |
| 714 | + </div> | |
| 715 | + | |
| 716 | + <div class="pt-3 flex justify-end"> | |
| 717 | + <Button | |
| 718 | + type="button" | |
| 719 | + variant="secondary" | |
| 720 | + size="sm" | |
| 721 | + class="h-8 rounded-lg gap-1.5 text-xs font-medium" | |
| 722 | + onClick={() => goTo(isEvent ? `/events/${data.id}` : `/exams/${data.id}`)} | |
| 723 | + > | |
| 724 | + <span>Detay Sayfasına Git</span> | |
| 725 | + <IconExternalLink class="h-3.5 w-3.5" /> | |
| 726 | + </Button> | |
| 727 | + </div> | |
| 728 | + </div> | |
| 729 | + </div> | |
| 730 | + ); | |
| 731 | + }} | |
| 732 | + </Show> | |
| 733 | + </Show> | |
| 734 | + </div> | |
| 735 | + | |
| 736 | + {/* Drawer Footer Action */} | |
| 737 | + <div class="shrink-0 border-t border-border/60 p-3 bg-card/60"> | |
| 738 | + <Show when={activeTab() === "messages"}> | |
| 739 | + <Button | |
| 740 | + type="button" | |
| 741 | + variant="outline" | |
| 742 | + class="w-full justify-between h-9 rounded-lg text-xs font-medium" | |
| 743 | + onClick={() => goTo("/messages")} | |
| 744 | + > | |
| 745 | + <span>{t("rightPanel.openFullMessages")}</span> | |
| 746 | + <IconChevronRight class="h-3.5 w-3.5 text-muted-foreground" /> | |
| 747 | + </Button> | |
| 748 | + </Show> | |
| 749 | + | |
| 750 | + <Show when={activeTab() === "calendar"}> | |
| 751 | + <Button | |
| 752 | + type="button" | |
| 753 | + variant="outline" | |
| 754 | + class="w-full justify-between h-9 rounded-lg text-xs font-medium" | |
| 755 | + onClick={() => goTo("/calendar")} | |
| 756 | + > | |
| 757 | + <span>{t("rightPanel.openFullCalendar")}</span> | |
| 758 | + <IconChevronRight class="h-3.5 w-3.5 text-muted-foreground" /> | |
| 759 | + </Button> | |
| 760 | + </Show> | |
| 761 | + </div> | |
| 762 | + </div> | |
| 763 | + </Show> | |
| 764 | + </> | |
| 765 | + ); | |
| 766 | +} |
src/components/ui/icons.tsxmodified+11 -0
| @@ -682,3 +682,14 @@ export function IconRefresh(props: IconProps) { | ||
| 682 | 682 | </Svg> |
| 683 | 683 | ); |
| 684 | 684 | } |
| 685 | + | |
| 686 | +export function IconExternalLink(props: IconProps) { | |
| 687 | + return ( | |
| 688 | + <Svg {...props}> | |
| 689 | + <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" /> | |
| 690 | + <polyline points="15 3 21 3 21 9" /> | |
| 691 | + <line x1="10" y1="14" x2="21" y2="3" /> | |
| 692 | + </Svg> | |
| 693 | + ); | |
| 694 | +} | |
| 695 | + |
src/i18n/messages.tsmodified+21 -0
| @@ -47,6 +47,13 @@ export type MessageKey = | ||
| 47 | 47 | | "nav.group.reports" |
| 48 | 48 | | "nav.group.settings" |
| 49 | 49 | | "nav.group.community" |
| 50 | + | "rightPanel.messagesTitle" | |
| 51 | + | "rightPanel.calendarTitle" | |
| 52 | + | "rightPanel.openFullMessages" | |
| 53 | + | "rightPanel.openFullCalendar" | |
| 54 | + | "rightPanel.noUnread" | |
| 55 | + | "rightPanel.noUpcoming" | |
| 56 | + | "rightPanel.unreadBadge" | |
| 50 | 57 | | "nav.myStudents" |
| 51 | 58 | | "parents.title" |
| 52 | 59 | | "parents.subtitle" |
| @@ -817,6 +824,13 @@ const en: Dict = { | ||
| 817 | 824 | "nav.clubs": "Clubs", |
| 818 | 825 | "nav.marks": "Report card", |
| 819 | 826 | "nav.messages": "Messages", |
| 827 | + "rightPanel.messagesTitle": "Messages", | |
| 828 | + "rightPanel.calendarTitle": "Calendar & Events", | |
| 829 | + "rightPanel.openFullMessages": "Open Full Messages", | |
| 830 | + "rightPanel.openFullCalendar": "Open Full Calendar", | |
| 831 | + "rightPanel.noUnread": "No unread messages", | |
| 832 | + "rightPanel.noUpcoming": "No upcoming events or exams", | |
| 833 | + "rightPanel.unreadBadge": "Unread", | |
| 820 | 834 | "nav.pomodoro": "Pomodoro", |
| 821 | 835 | "nav.attendance": "Attendance", |
| 822 | 836 | "nav.questions": "Question Pool", |
| @@ -1626,6 +1640,13 @@ const tr: Dict = { | ||
| 1626 | 1640 | "nav.clubs": "Kulüp", |
| 1627 | 1641 | "nav.marks": "Karnem", |
| 1628 | 1642 | "nav.messages": "Mesajlar", |
| 1643 | + "rightPanel.messagesTitle": "Mesajlar", | |
| 1644 | + "rightPanel.calendarTitle": "Takvim & Etkinlikler", | |
| 1645 | + "rightPanel.openFullMessages": "Tüm Mesajları Aç", | |
| 1646 | + "rightPanel.openFullCalendar": "Tüm Takvimi Aç", | |
| 1647 | + "rightPanel.noUnread": "Okunmamış mesaj yok", | |
| 1648 | + "rightPanel.noUpcoming": "Yaklaşan etkinlik veya sınav yok", | |
| 1649 | + "rightPanel.unreadBadge": "Okunmamış", | |
| 1629 | 1650 | "nav.pomodoro": "Pomodoro", |
| 1630 | 1651 | "nav.attendance": "Yoklama", |
| 1631 | 1652 | "nav.questions": "Soru Havuzu", |
src/pages/questions-page.tsxmodified+1 -1
| @@ -187,7 +187,7 @@ function QuestionsContent() { | ||
| 187 | 187 | open={!!questionToDelete()} |
| 188 | 188 | onOpenChange={(open) => !open && setQuestionToDelete(null)} |
| 189 | 189 | title={t("common.delete")} |
| 190 | - description="Bu soruyu silmek istediğinizden emin misiniz?" | |
| 190 | + summary="Bu soruyu silmek istediğinizden emin misiniz?" | |
| 191 | 191 | onConfirm={handleDeleteConfirmed} |
| 192 | 192 | /> |
| 193 | 193 | </div> |