Implement platform settings (Stage 9)
- Wire settings to actual platform behavior: maintenance mode, registration toggle, notification emails, curator feedback emails, email verification flag - Add logo (logoUrl, showLogo) and social network links (YouTube, VK, Telegram) settings - Show logo + school name dynamically in student layout header - Add footer to student layout with org requisites and social links - Register page: read settings server-side, validate terms checkbox with legal links - Login page: show notice when redirected from closed registration - Settings form: add Logo and Social Networks sections Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -432,6 +432,62 @@ export function SettingsForm({ initial }: { initial: Settings }) {
|
||||
</Field>
|
||||
</Section>
|
||||
|
||||
{/* ── 7. Логотип ── */}
|
||||
<Section
|
||||
title="Логотип"
|
||||
hint="URL изображения логотипа школы. Отображается рядом с названием в шапке личного кабинета ученика."
|
||||
>
|
||||
<Field label="URL логотипа">
|
||||
<input
|
||||
value={s.logoUrl}
|
||||
onChange={(e) => set("logoUrl", e.target.value)}
|
||||
placeholder="https://..."
|
||||
style={{ ...inputStyle, fontFamily: "var(--font-mono)" }}
|
||||
{...focusHandlers}
|
||||
/>
|
||||
</Field>
|
||||
<Toggle
|
||||
label="Показывать логотип в шапке"
|
||||
hint="Если выключено — логотип скрыт, отображается только название школы."
|
||||
checked={bool("showLogo")}
|
||||
onChange={(v) => set("showLogo", v ? "true" : "false")}
|
||||
/>
|
||||
</Section>
|
||||
|
||||
{/* ── 8. Социальные сети ── */}
|
||||
<Section
|
||||
title="Социальные сети"
|
||||
hint="Ссылки отображаются в подвале личного кабинета ученика."
|
||||
>
|
||||
<Field label="YouTube (URL канала)">
|
||||
<input
|
||||
value={s.socialYoutube}
|
||||
onChange={(e) => set("socialYoutube", e.target.value)}
|
||||
placeholder="https://youtube.com/@..."
|
||||
style={{ ...inputStyle, fontFamily: "var(--font-mono)" }}
|
||||
{...focusHandlers}
|
||||
/>
|
||||
</Field>
|
||||
<Field label="VK (URL сообщества)">
|
||||
<input
|
||||
value={s.socialVk}
|
||||
onChange={(e) => set("socialVk", e.target.value)}
|
||||
placeholder="https://vk.com/..."
|
||||
style={{ ...inputStyle, fontFamily: "var(--font-mono)" }}
|
||||
{...focusHandlers}
|
||||
/>
|
||||
</Field>
|
||||
<Field label="Telegram (ссылка на канал или группу)">
|
||||
<input
|
||||
value={s.socialTelegram}
|
||||
onChange={(e) => set("socialTelegram", e.target.value)}
|
||||
placeholder="https://t.me/..."
|
||||
style={{ ...inputStyle, fontFamily: "var(--font-mono)" }}
|
||||
{...focusHandlers}
|
||||
/>
|
||||
</Field>
|
||||
</Section>
|
||||
|
||||
{/* Bottom save button */}
|
||||
<div className="flex justify-end pb-4">
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user