diff --git a/src/components/layout/app-shell.tsx b/src/components/layout/app-shell.tsx index 8b480d9..fae39df 100644 --- a/src/components/layout/app-shell.tsx +++ b/src/components/layout/app-shell.tsx @@ -6,7 +6,7 @@ import { CommandPalette } from "@/components/layout/command-palette"; import { MobileTabBar } from "@/components/layout/mobile-tab-bar"; import { NavBar } from "@/components/layout/nav-bar"; import { NotificationCenter } from "@/components/layout/notification-center"; -import { routeNavItem } from "@/components/layout/nav-items"; +import { routeLabelKey } from "@/components/layout/nav-items"; import { ShellMessagesButton } from "@/components/layout/shell-messages-button"; import { SideNav } from "@/components/layout/side-nav"; import { SidebarAccount } from "@/components/layout/sidebar-account"; @@ -35,8 +35,8 @@ export function AppShell(props: ParentProps) { const wide = () => location().pathname.startsWith("/exam-room/") || location().searchStr.includes("answerUser=") || location().pathname === "/messages"; const fullScreen = () => location().pathname.startsWith("/exam-room/"); const routeLabel = createMemo(() => { - const item = routeNavItem(location().pathname, auth.user()?.role); - return item ? t(item.labelKey) : location().pathname; + const key = routeLabelKey(location().pathname, auth.user()?.role); + return key ? t(key) : ""; }); const logout = async () => { await auth.logout(); diff --git a/src/components/layout/command-palette.tsx b/src/components/layout/command-palette.tsx index dbf8730..26cbb5e 100644 --- a/src/components/layout/command-palette.tsx +++ b/src/components/layout/command-palette.tsx @@ -382,7 +382,7 @@ export function CommandPalette(props: CommandPaletteProps) { setQuery(""); inputRef?.focus(); }} - title="Aramayı Temizle" + title={t("common.clearSearch")} > diff --git a/src/components/layout/nav-items.test.ts b/src/components/layout/nav-items.test.ts index bc56c0b..013c245 100644 --- a/src/components/layout/nav-items.test.ts +++ b/src/components/layout/nav-items.test.ts @@ -1,4 +1,4 @@ -import { pathActive, primaryNavItems, primaryPathActive, routeNavItem, sidebarNavGroups, visibleNavItems } from "@/components/layout/nav-items"; +import { pathActive, primaryNavItems, primaryPathActive, routeLabelKey, routeNavItem, sidebarNavGroups, visibleNavItems } from "@/components/layout/nav-items"; test.each([ ["student", ["/", "/courses", "/calendar", "/marks"]], @@ -69,3 +69,31 @@ test.each([ expect(items.filter((item) => item.id === current?.id).map((item) => item.id)).toEqual([expected]); }); + +// The shell header used to print the raw pathname for any route without a +// sidebar entry, so /profile/me read as "/profile/me". +test.each([ + ["/profile/me", "profile.myProfile"], + ["/profile/u-1", "profile.title"], + ["/guide", "nav.guide"], + ["/attendance", "nav.attendance"], + ["/studies", "courses.kind.study"], + ["/clubs", "courses.kind.club"], +] as const)("%s has a header label", (pathname, expected) => { + expect(routeLabelKey(pathname, "student")).toBe(expected); +}); + +test("routes with a sidebar entry still take their nav label", () => { + expect(routeLabelKey("/courses/course-1", "teacher")).toBe(routeNavItem("/courses/course-1", "teacher")?.labelKey); +}); + +test("a route rendered outside the shell has no label rather than a raw path", () => { + expect(routeLabelKey("/login", undefined)).toBeUndefined(); +}); + +test("a page keeps its name for a viewer who may not open it", () => { + // /students is parent-only; an admin lands on the no-access screen, and the + // shell header must still say what page that is. + expect(routeLabelKey("/students", "admin")).toBe("nav.children"); + expect(routeLabelKey("/students", "parent")).toBe("nav.children"); +}); diff --git a/src/components/layout/nav-items.ts b/src/components/layout/nav-items.ts index df61a2f..53c3904 100644 --- a/src/components/layout/nav-items.ts +++ b/src/components/layout/nav-items.ts @@ -229,3 +229,39 @@ export function routeNavItem(pathname: string, role: Role | undefined): NavItem .filter((item) => pathActive(pathname, item.to, item.exact)) .sort((a, b) => b.to.length - a.to.length)[0]; } + +// Routes that are reachable but carry no sidebar entry — the account menu, a +// course-kind view, a deep link. Without these the shell's title falls back to +// the raw pathname and the header reads "/profile/me". +const UNLISTED_ROUTE_LABELS: { prefix: string; labelKey: MessageKey }[] = [ + // Longest prefix first — /profile/me is the viewer's own, every other + // /profile/{id} belongs to somebody else and must not read "My profile". + { prefix: "/profile/me", labelKey: "profile.myProfile" }, + { prefix: "/profile", labelKey: "profile.title" }, + { prefix: "/guide", labelKey: "nav.guide" }, + { prefix: "/attendance", labelKey: "nav.attendance" }, + { prefix: "/studies", labelKey: "courses.kind.study" }, + { prefix: "/clubs", labelKey: "courses.kind.club" }, +]; + +/** + * The label the shell header shows for a route: its nav entry when it has one, + * otherwise an explicit fallback. Returns undefined only for routes rendered + * without the shell (login, register, the exam room). + */ +export function routeLabelKey(pathname: string, role: Role | undefined): MessageKey | undefined { + const item = routeNavItem(pathname, role); + if (item) return item.labelKey; + + const unlisted = UNLISTED_ROUTE_LABELS.find( + (entry) => pathname === entry.prefix || pathname.startsWith(`${entry.prefix}/`), + ); + if (unlisted) return unlisted.labelKey; + + // A page still has a name when the viewer may not open it — the shell title + // must not go blank on the "no access" screen — so fall back to the nav entry + // for any role, not just this one. + return [HOME_ITEM, ...NAV_GROUPS.flatMap((group) => group.items)] + .filter((entry) => pathActive(pathname, entry.to, entry.exact)) + .sort((a, b) => b.to.length - a.to.length)[0]?.labelKey; +} diff --git a/src/components/layout/role-badge.tsx b/src/components/layout/role-badge.tsx index 3bd7b4f..81bcd2f 100644 --- a/src/components/layout/role-badge.tsx +++ b/src/components/layout/role-badge.tsx @@ -1,21 +1,39 @@ import type { Role } from "@/api/client"; import type { MessageKey } from "@/i18n/messages"; -import { Badge } from "@/components/ui/badge"; +import { cn } from "@/lib/cn"; import { useT } from "@/stores/preferences-context"; -const VARIANT: Record = { - student: "secondary", - parent: "secondary", - teacher: "default", - manager: "outline", - admin: "destructive", +// A role is an identity, not a status, so it reads as a tinted pill with a +// leading dot rather than borrowing the semantic success/destructive variants — +// an admin is not an error. Ranked warm-to-cool from most to least privileged. +const TONE: Record = { + parent: "bg-sky-500/10 text-sky-700 ring-sky-500/25 dark:text-sky-300", + student: "bg-emerald-500/10 text-emerald-700 ring-emerald-500/25 dark:text-emerald-300", + teacher: "bg-violet-500/10 text-violet-700 ring-violet-500/25 dark:text-violet-300", + manager: "bg-amber-500/10 text-amber-700 ring-amber-500/25 dark:text-amber-300", + admin: "bg-rose-500/10 text-rose-700 ring-rose-500/25 dark:text-rose-300", }; -export function RoleBadge(props: { role: Role }) { +const DOT: Record = { + parent: "bg-sky-500", + student: "bg-emerald-500", + teacher: "bg-violet-500", + manager: "bg-amber-500", + admin: "bg-rose-500", +}; + +export function RoleBadge(props: { role: Role; class?: string }) { const t = useT(); return ( - + + {t(`role.${props.role}` as MessageKey)} - + ); } diff --git a/src/components/layout/sidebar-account.tsx b/src/components/layout/sidebar-account.tsx index d1a96cf..9b4fb4a 100644 --- a/src/components/layout/sidebar-account.tsx +++ b/src/components/layout/sidebar-account.tsx @@ -12,10 +12,10 @@ import { } from "@/components/ui/dropdown-menu"; import { IconChevronRight, IconGlobe, IconGuide, IconLogout, IconSettings } from "@/components/ui/icons"; import { ThemeModeControl } from "@/components/layout/theme-mode-control"; +import { UserAvatar } from "@/components/users/user-avatar"; import { useAuth } from "@/stores/auth-context"; import { usePreferences, useT } from "@/stores/preferences-context"; import { cn } from "@/lib/cn"; -import { personInitials } from "@/lib/person"; function displayName(user: User) { return [user.name, user.surname].filter(Boolean).join(" ").trim() || user.username; @@ -46,14 +46,12 @@ export function SidebarAccount(props: { collapsed?: boolean; onLogout: () => voi )} aria-label={t("nav.account")} > - - {personInitials(name())} - + {name()} @@ -66,14 +64,16 @@ export function SidebarAccount(props: { collapsed?: boolean; onLogout: () => voi - setProfileOpen(true)}> - - {personInitials(name())} - + void navigate({ to: "/profile/me" })} + > + {name()} - {u().email || u().username} + {t("profile.myProfile")} +
setProfileOpen(true)}> diff --git a/src/components/messages/gmail-compose-box.tsx b/src/components/messages/gmail-compose-box.tsx index 1d3cc2b..e933d5e 100644 --- a/src/components/messages/gmail-compose-box.tsx +++ b/src/components/messages/gmail-compose-box.tsx @@ -153,7 +153,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { setLabel(e.currentTarget.value)} @@ -165,7 +165,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) {
@@ -190,7 +190,7 @@ export function GmailComposeBox(props: GmailComposeBoxProps) { type="button" class="flex h-8 w-8 items-center justify-center rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors" onClick={handleClose} - title="Taslağı Sil" + title={t("messages.deleteDraft")} > diff --git a/src/components/messages/gmail-mail-detail.tsx b/src/components/messages/gmail-mail-detail.tsx index 321e13e..1242d0b 100644 --- a/src/components/messages/gmail-mail-detail.tsx +++ b/src/components/messages/gmail-mail-detail.tsx @@ -178,7 +178,7 @@ export function GmailMailDetail(props: GmailMailDetailProps) { size="sm" class="h-8 rounded-lg text-xs" onClick={() => props.onAction({ folder: restoreFolder() })} - title="Çöp Kutusundan Çıkar" + title={t("messages.restoreFromTrash")} > Çöp Kutusundan Çıkar @@ -313,14 +313,14 @@ export function GmailMailDetail(props: GmailMailDetailProps) { class="text-xs text-muted-foreground hover:text-foreground" onClick={() => setIsReplying(false)} > - Vazgeç + {t("common.cancel")} @@ -336,14 +336,14 @@ export function GmailMailDetail(props: GmailMailDetailProps) { disabled={sending() || !replyBody().trim()} > - Gönder + {t("messages.send")} diff --git a/src/components/ui/data-table-search.tsx b/src/components/ui/data-table-search.tsx index 7acb875..8ca7493 100644 --- a/src/components/ui/data-table-search.tsx +++ b/src/components/ui/data-table-search.tsx @@ -2,6 +2,7 @@ import { Show } from "solid-js"; import { IconSearch, IconX } from "@/components/ui/icons"; import { Input } from "@/components/ui/input"; import { cn } from "@/lib/cn"; +import { useT } from "@/stores/preferences-context"; export type DataTableSearchProps = { value: string; @@ -12,6 +13,7 @@ export type DataTableSearchProps = { /** Rounded search field: leading icon + conditional clear (X) button. */ export function DataTableSearch(props: DataTableSearchProps) { + const t = useT(); return (
@@ -24,7 +26,7 @@ export function DataTableSearch(props: DataTableSearchProps) { @@ -66,7 +68,7 @@ export function RichTextEditor(props: RichTextEditorProps) { type="button" class="flex h-7 w-7 items-center justify-center rounded italic text-xs hover:bg-muted text-foreground" onClick={() => execCommand("italic")} - title="İtalik (Ctrl+I)" + title={t("editor.italic")} > I @@ -74,7 +76,7 @@ export function RichTextEditor(props: RichTextEditorProps) { type="button" class="flex h-7 w-7 items-center justify-center rounded underline text-xs hover:bg-muted text-foreground" onClick={() => execCommand("underline")} - title="Altı Çizili (Ctrl+U)" + title={t("editor.underline")} > U @@ -82,7 +84,7 @@ export function RichTextEditor(props: RichTextEditorProps) { type="button" class="flex h-7 w-7 items-center justify-center rounded line-through text-xs hover:bg-muted text-foreground" onClick={() => execCommand("strikeThrough")} - title="Üstü Çizili" + title={t("editor.strike")} > S @@ -93,7 +95,7 @@ export function RichTextEditor(props: RichTextEditorProps) { type="button" class="flex h-7 px-2 items-center justify-center rounded text-xs font-mono hover:bg-muted text-foreground" onClick={() => execCommand("insertUnorderedList")} - title="Madde İşaretli Liste" + title={t("editor.bulletList")} > • Liste @@ -101,7 +103,7 @@ export function RichTextEditor(props: RichTextEditorProps) { type="button" class="flex h-7 px-2 items-center justify-center rounded text-xs font-mono hover:bg-muted text-foreground" onClick={() => execCommand("insertOrderedList")} - title="Numaralı Liste" + title={t("editor.numberedList")} > 1. Liste @@ -112,7 +114,7 @@ export function RichTextEditor(props: RichTextEditorProps) { type="button" class="flex h-7 px-2 items-center justify-center rounded text-xs hover:bg-muted text-muted-foreground" onClick={() => execCommand("removeFormat")} - title="Biçimlendirmeyi Temizle" + title={t("editor.clearFormatting")} > Biçimi Temizle diff --git a/src/lib/course-kind.ts b/src/lib/course-kind.ts new file mode 100644 index 0000000..54fe8c6 --- /dev/null +++ b/src/lib/course-kind.ts @@ -0,0 +1,9 @@ +import type { MessageKey } from "@/i18n/messages"; + +// `kind` is an open string on the wire, so a value this build has no copy for +// falls back to itself rather than rendering a missing translation key. +const KNOWN_KINDS = new Set(["course", "study", "club"]); + +export function courseKindLabel(kind: string, t: (key: MessageKey) => string): string { + return KNOWN_KINDS.has(kind) ? t(`courses.kind.${kind}Singular` as MessageKey) : kind; +} diff --git a/src/pages/courses-page.tsx b/src/pages/courses-page.tsx index b0b3d16..26e3428 100644 --- a/src/pages/courses-page.tsx +++ b/src/pages/courses-page.tsx @@ -18,6 +18,7 @@ import { Label } from "@/components/ui/label"; import { PageSpinner } from "@/components/ui/page-spinner"; import { PaginationControls } from "@/components/ui/pagination-controls"; import { Select } from "@/components/ui/select"; +import { courseKindLabel } from "@/lib/course-kind"; import { SidePanel } from "@/components/ui/side-panel"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; import { Textarea } from "@/components/ui/textarea"; @@ -26,7 +27,7 @@ import { createFlash } from "@/lib/flash"; import { personLabel } from "@/lib/person"; import { hasMinRole } from "@/lib/roles"; import { useAuth } from "@/stores/auth-context"; -import { useT } from "@/stores/preferences-context"; +import { usePreferences, useT } from "@/stores/preferences-context"; const PAGE_SIZE = 10; @@ -39,10 +40,13 @@ function CoursesContent() { const navigate = useNavigate(); const routeSearch = useSearch({ from: "/courses" }); const t = useT(); + const prefs = usePreferences(); const [pageKind, setPageKind] = createSignal(routeSearch().kind); const createKind = (): CourseKind => pageKind() ?? "course"; const pageLabel = () => t("nav.classes"); const kindLabel = () => createKind() === "study" ? t("courses.kind.study") : createKind() === "club" ? t("courses.kind.club") : t("courses.kind.course"); + const kindInSentence = () => + kindLabelSingular().toLocaleLowerCase(prefs.locale() === "tr" ? "tr-TR" : "en-US"); const kindLabelSingular = () => createKind() === "study" ? t("courses.kind.studySingular") : createKind() === "club" ? t("courses.kind.clubSingular") : t("courses.kind.courseSingular"); const canCreate = () => hasMinRole(auth.user()?.role, "teacher"); const [showForm, setShowForm] = createSignal(routeSearch().action === "new"); @@ -120,7 +124,7 @@ function CoursesContent() { return (
- +
void refetchLimits()} />
@@ -147,7 +151,7 @@ function CoursesContent() { @@ -210,7 +214,7 @@ function CoursesContent() { capacity: t("courses.capacity"), unlimited: t("courses.unlimited"), enrolled: t("courses.enrolled"), - kind: course.kind === "study" ? t("courses.kind.study") : course.kind === "club" ? t("courses.kind.club") : t("courses.kind.course"), + kind: courseKindLabel(course.kind, t), }} /> )} diff --git a/src/pages/guide-page.tsx b/src/pages/guide-page.tsx index 3c2fd67..f132663 100644 --- a/src/pages/guide-page.tsx +++ b/src/pages/guide-page.tsx @@ -1,4 +1,4 @@ -import { For } from "solid-js"; +import { For, type Component } from "solid-js"; import { Link } from "@tanstack/solid-router"; import { RouteGuard } from "@/components/layout/route-guard"; import { PageHeader } from "@/components/layout/page-header"; @@ -21,24 +21,56 @@ import { IconFileText, IconChart, } from "@/components/ui/icons"; +import type { MessageKey } from "@/i18n/messages"; import { useT } from "@/stores/preferences-context"; import { cn } from "@/lib/cn"; +// Everything on this page is copy, so the arrays below carry message keys and +// presentation only — no literal text, in either locale. type GuideStep = { id: string; stepNumber: string; - badge: string; - badgeTone: string; borderTone: string; - icon: any; + icon: Component<{ class?: string }>; iconColor: string; - title: string; - description: string; to: string; - cta: string; - features: string[]; }; +const CARD_TONE = "border-sky-500/40 dark:border-sky-500/30 hover:border-sky-500/70 ring-1 ring-sky-500/20"; +const BADGE_TONE = "border-sky-500/40 text-foreground bg-card"; + +const STEPS: GuideStep[] = [ + { id: "ai", stepNumber: "01", borderTone: CARD_TONE, icon: IconSparkles, iconColor: "text-sky-400", to: "/" }, + { id: "notes", stepNumber: "02", borderTone: CARD_TONE, icon: IconNote, iconColor: "text-sky-400", to: "/notes" }, + { id: "questions", stepNumber: "03", borderTone: CARD_TONE, icon: IconBook, iconColor: "text-sky-400", to: "/questions" }, + { id: "courses", stepNumber: "04", borderTone: CARD_TONE, icon: IconCalendarDays, iconColor: "text-sky-400", to: "/courses" }, + { id: "exams", stepNumber: "05", borderTone: CARD_TONE, icon: IconExam, iconColor: "text-sky-400", to: "/exams" }, + { id: "marks", stepNumber: "06", borderTone: CARD_TONE, icon: IconReportAnalytics, iconColor: "text-sky-400", to: "/marks" }, +]; + +type RoleTab = { + id: string; + tabKey: MessageKey; + icon: Component<{ class?: string }>; + checkColor: string; +}; + +const ROLE_TABS: RoleTab[] = [ + { id: "student", tabKey: "role.student", icon: IconSchool, checkColor: "text-emerald-400" }, + { id: "teacher", tabKey: "role.teacher", icon: IconClipboardCheck, checkColor: "text-sky-400" }, + { id: "parent", tabKey: "role.parent", icon: IconUsers, checkColor: "text-violet-400" }, + { id: "admin", tabKey: "guide.roles.adminTab", icon: IconUserCog, checkColor: "text-amber-400" }, +]; + +const TIPS = [ + { id: "locale", icon: IconGlobe, tone: "text-violet-400" }, + { id: "sync", icon: IconClock, tone: "text-sky-400" }, + { id: "import", icon: IconFileText, tone: "text-amber-400" }, + { id: "weights", icon: IconChart, tone: "text-emerald-400" }, +] satisfies { id: string; icon: Component<{ class?: string }>; tone: string }[]; + +const ITEM_INDEXES = [1, 2, 3, 4] as const; + export default function GuidePage() { return ( @@ -49,266 +81,102 @@ export default function GuidePage() { function GuideContent() { const t = useT(); - - const steps: GuideStep[] = [ - { - id: "ai", - stepNumber: "01", - badge: "Yapay Zeka", - badgeTone: "border-sky-500/40 text-foreground bg-card", - borderTone: "border-sky-500/40 dark:border-sky-500/30 hover:border-sky-500/70 ring-1 ring-sky-500/20", - icon: IconSparkles, - iconColor: "text-sky-400", - title: "Çelebi AI Asistanı", - description: "Tüm sayfalardan üst barda bulunan 'Çelebi'ye Sor' butonuyla erişilebilir akıllı yapay zeka asistanı. Kampüs verileriniz, ders konularınız ve sistem hakkında anlık yanıtlar verir.", - to: "/", - cta: "Çelebi'yi Dene", - features: ["Tüm sayfalardan tek tıkla erişim", "Kampüs ve ders odaklı yanıtlar", "Bağlamsal çalışma rehberliği"], - }, - { - id: "notes", - stepNumber: "02", - badge: "Notlar & Çizim", - badgeTone: "border-sky-500/40 text-foreground bg-card", - borderTone: "border-sky-500/40 dark:border-sky-500/30 hover:border-sky-500/70 ring-1 ring-sky-500/20", - icon: IconNote, - iconColor: "text-sky-400", - title: "Akıllı Defter & Çizim Tuvali", - description: "PDF, TXT ve Markdown materyallerinizi temiz Markdown notlarına dönüştürün. Dahili .hzdraw tuvali ile derslerinize serbest el çizimleri ve grafikler ekleyin.", - to: "/notes", - cta: "Notlara Git", - features: ["PDF & TXT otomatik dönüştürücü", "Dahili .hzdraw serbest çizim tuvali", "Markdown biçimlendirme ve OCR uyarısı"], - }, - { - id: "questions", - stepNumber: "03", - badge: "Soru Havuzu", - badgeTone: "border-sky-500/40 text-foreground bg-card", - borderTone: "border-sky-500/40 dark:border-sky-500/30 hover:border-sky-500/70 ring-1 ring-sky-500/20", - icon: IconBook, - iconColor: "text-sky-400", - title: "Soru Havuzu & Çözümler", - description: "Topluluk soru havuzunda sorularınızı paylaşın, yazılı ve çoktan seçmeli çözümler ekleyin. Öğretmen onaylı çözümlerle ders konularında uzmanlaşın.", - to: "/questions", - cta: "Soru Havuzu", - features: ["Yazılı ve test çözümleri", "Öğretmen onaylı çözüm rozeti", "Filtrelenebilir konu ve durum kategorileri"], - }, - { - id: "courses", - stepNumber: "04", - badge: "Dersler & Etütler", - badgeTone: "border-sky-500/40 text-foreground bg-card", - borderTone: "border-sky-500/40 dark:border-sky-500/30 hover:border-sky-500/70 ring-1 ring-sky-500/20", - icon: IconCalendarDays, - iconColor: "text-sky-400", - title: "Dersler, Etütler & Kulüpler", - description: "Ders, etüt ve kulüp programı. Öğretmenler öğrenci kaydeder, ders içi oturum yoklaması (Var, Yok, Geç, Mazeretli) alır ve müfredat takibi yapar.", - to: "/courses", - cta: "Derslerim", - features: ["Öğrenci ders kayıt yönetimi", "Anlık oturum yoklaması alma", "Sınav ve etüt takvimi hizalaması"], - }, - { - id: "exams", - stepNumber: "05", - badge: "Sınav Odası", - badgeTone: "border-sky-500/40 text-foreground bg-card", - borderTone: "border-sky-500/40 dark:border-sky-500/30 hover:border-sky-500/70 ring-1 ring-sky-500/20", - icon: IconExam, - iconColor: "text-sky-400", - title: "Sınav Odası & Canlı Takip", - description: "Geri sayım ve otomatik kaydetmeli canlı sınav odası. Öğretmenler canlı izleme panelinden yanıt kağıtlarını ve anlık puanlama önerilerini takip eder.", - to: "/exams", - cta: "Sınav Odası", - features: ["Sunucu saati senkronize geri sayım", "WebSocket & REST otomatik kaydetme", "Canlı öğretmen izleme ve puanlama"], - }, - { - id: "marks", - stepNumber: "06", - badge: "Karne & Devam", - badgeTone: "border-sky-500/40 text-foreground bg-card", - borderTone: "border-sky-500/40 dark:border-sky-500/30 hover:border-sky-500/70 ring-1 ring-sky-500/20", - icon: IconReportAnalytics, - iconColor: "text-sky-400", - title: "Karne & İlerleme Raporu", - description: "Dönem ders ortalamaları ve sınav türü ağırlıklarına göre hesaplanan genel başarı puanı. Devamsızlık istatistikleri ile anlık gelişim takibi.", - to: "/marks", - cta: "Karnem", - features: ["Ağırlıklı sınav puan ortalaması", "Devamsızlık ve mazeret özetleri", "Detaylı grafik ve ders raporları"], - }, - ]; + const stepText = (id: string, field: string) => t(`guide.step.${id}.${field}` as MessageKey); return (
- + - {/* 1. ROL BAZLI YETKİ HARİTASI (TABS AT THE TOP) */}
-

Rol Bazlı Yetki Haritası

-

Platformdaki her bir rolün erişebildiği ve yönetebildiği alanlar.

+

{t("guide.roles.title")}

+

{t("guide.roles.subtitle")}

- - - Öğrenci - - - - Öğretmen - - - - Veli - - - - Yönetici & Admin - + + {(role) => ( + + + {t(role.tabKey)} + + )} + - -
-

Öğrenci Çalışma & Katılım Araçları

-
    -
  • - - Kendi özel defterinde not tutma, PDF aktarma ve çizim yapma -
  • -
  • - - Soru havuzunda soru sorma, diğer sorulara çözüm yazma -
  • -
  • - - Kaydolunan derslerin sınav odasına girme ve süreli sınav çözme -
  • -
  • - - Kendi karne ortalamasını ve devamsızlık durumunu izleme -
  • -
-
-
- - -
-

Öğretmen Yönetim & Eğitici Paneli

-
    -
  • - - Ders, etüt ve kulüp oluşturma, öğrencileri derse kaydetme -
  • -
  • - - Ders oturumlarında öğrenci yoklaması alma (Var, Yok, Geç, Mazeretli) -
  • -
  • - - Sınav oluşturma, sorular ekleme ve canlı sınav takibi yürütme -
  • -
  • - - Öğrenci sınav kağıtlarını inceleme, puan verme ve karne onaylama -
  • -
-
-
- - -
-

Veli Takip & Bilgilendirme Portalı

-
    -
  • - - Bağlı öğrencilerin ders devamsızlık kayıtlarını anlık izleme -
  • -
  • - - Öğrencinin ders bazlı karne başarı ortalamalarını görüntüleme -
  • -
  • - - Yaklaşan sınav ve etkinlik takvimini takip etme -
  • -
  • - - Öğretmenler ve okul yönetimi ile doğrudan mesajlaşma -
  • -
-
-
- - -
-

Yönetici & Sistem Politikaları Paneli

-
    -
  • - - Kullanıcı hesapları oluşturma, rollerini atama (Öğrenci, Öğretmen, Veli) -
  • -
  • - - Okul akademik dönemleri, sınav türleri ve ağırlık oranlarını tanımlama -
  • -
  • - - Tüm ders ve etkinlik kayıtlarını genel denetim seviyesinde yönetme -
  • -
  • - - Personel çalışma günlüklerini ve sistem loglarını inceleme -
  • -
-
-
+ + {(role) => ( + +
+

+ {t(`guide.roles.${role.id}.heading` as MessageKey)} +

+
    + + {(n) => ( +
  • + + {t(`guide.roles.${role.id}.i${n}` as MessageKey)} +
  • + )} +
    +
+
+
+ )} +
- {/* 2. TEMEL AKIŞLAR & ÖZELLİKLER (MODÜL KARTLARI) */}
-

Temel Akışlar & Özellikler

-

Hezarfen platformundaki ana modülleri ve kullanım adımlarını inceleyin.

+

{t("guide.modules.title")}

+

{t("guide.modules.subtitle")}

- + {(step) => ( -
+
- + - {step.badge} + {stepText(step.id, "badge")} {step.stepNumber}
-

{step.title}

-

{step.description}

+

{stepText(step.id, "title")}

+

{stepText(step.id, "description")}

    - - {(feat) => ( + + {(n) => (
  • - {feat} + {stepText(step.id, `f${n}`)}
  • )}
-
+
- @@ -319,50 +187,31 @@ function GuideContent() {
- {/* 3. PRATİK İPUÇLARI & KISAYOLLAR */}
-

Pratik İpuçları & Kısayollar

-

Hezarfen deneyimini en verimli şekilde kullanmanızı sağlayan püf noktaları.

+

{t("guide.tips.title")}

+

{t("guide.tips.subtitle")}

    -
  • - - - -
    -

    Dil & Tema Seçimi

    -

    Sağ üstteki profil avatarınıza tıklayarak Türkçe / İngilizce dillerini ve Dark / Light temalarını anında değiştirebilirsiniz.

    -
    -
  • -
  • - - - -
    -

    Otomatik Senkronizasyon

    -

    Sınav odasındaki yanıtlarınız ve çizim tuvalindeki taslaklarınız sunucu saati (`/time`) ile arka planda güvenle kaydedilir.

    -
    -
  • -
  • - - - -
    -

    Hızlı Not İçe Aktarma

    -

    Notlar sayfasında "İçe Aktar" butonunu kullanarak PDF ve TXT ders dokümanlarınızı temiz Markdown metinlerine dönüştürebilirsiniz.

    -
    -
  • -
  • - - - -
    -

    Ağırlıklı Not Hesaplaması

    -

    Sınav sonuçlarınız, okul yönetiminin tanımladığı sınav türü ağırlıklarına göre doğrudan karne ortalamanıza yansıtılır.

    -
    -
  • + + {(tip) => ( +
  • + + + +
    +

    {t(`guide.tips.${tip.id}.title` as MessageKey)}

    +

    {t(`guide.tips.${tip.id}.body` as MessageKey)}

    +
    +
  • + )} +
diff --git a/src/pages/messages-page.tsx b/src/pages/messages-page.tsx index cb2935a..e9281fe 100644 --- a/src/pages/messages-page.tsx +++ b/src/pages/messages-page.tsx @@ -292,7 +292,7 @@ export default function MessagesPage() { class="h-9 px-3 rounded-full text-xs font-semibold shrink-0" onClick={handleRefresh} disabled={isRefreshing()} - title="Mesajları Yenile" + title={t("messages.refreshList")} > - Yenile + {t("common.refresh")}
diff --git a/src/pages/notes-page.tsx b/src/pages/notes-page.tsx index f06e63d..c01b16a 100644 --- a/src/pages/notes-page.tsx +++ b/src/pages/notes-page.tsx @@ -86,14 +86,14 @@ function NotesContent() {
} />
- + setImportOpen(false)} onImport={async (importedTitle, importedMarkdown) => { diff --git a/src/pages/questions-page.tsx b/src/pages/questions-page.tsx index 32fe0df..ab63d89 100644 --- a/src/pages/questions-page.tsx +++ b/src/pages/questions-page.tsx @@ -186,7 +186,7 @@ function QuestionsContent() { open={!!questionToDelete()} onOpenChange={(open) => !open && setQuestionToDelete(null)} title={t("common.delete")} - summary="Bu soruyu silmek istediğinizden emin misiniz?" + summary={t("questions.deleteConfirm")} onConfirm={handleDeleteConfirmed} />