diff --git a/another_prompt b/another_prompt index 69bfcde..a28778a 100644 --- a/another_prompt +++ b/another_prompt @@ -49,3 +49,7 @@ sur la page share, l' avatar de l'utilisateur ne s'affiche pas -> fix sa --- improvements: éviter de ask h24 ollama pour ces modèles quand un utilisateur ce connece. c'est le backend qui sert les demande d el'utilisateurs. iL relay pas sur le ollama. Le backend vas cacher avec un TLL les modèles présent en mémire dans un objet qui est dans le backend. refresh avec un TT: toutes les minutes. L'administrateur lui, qand il demande les modèles dams le ollama, lui, force un refresh . + +--- ADMIN CENTER: SMTP CONNECTIVITY. + +Make a SMTP tester in the admin center, and also a viewer of the smtp credentials (default bluring the smtp pasword OBVIOUSLY) And also a SMTP tester , sending a mail to a provided one , to tets the SMTP connectivity diff --git a/frontend/src/components/dialogs.tsx b/frontend/src/components/dialogs.tsx index cd30d10..db250ae 100644 --- a/frontend/src/components/dialogs.tsx +++ b/frontend/src/components/dialogs.tsx @@ -5,7 +5,8 @@ import { cn } from "../lib/cn.ts"; import { ACCENT_PRESETS, applyAccent, currentAccent, previewAccent, type AccentState } from "../lib/accent.ts"; import { FEATURES, setFeature, useFeatures } from "../lib/features.ts"; import type { Conversation, FilePreview, User } from "../lib/types.ts"; -import { Avatar, bumpCdnVersion, Button, ConfirmDialog, CopyButton, Field, Input, Modal, Picker, Spinner, Toggle } from "./ui.tsx"; +import { useT, type StringKey } from "../lib/i18n.ts"; +import { Avatar, bumpCdnVersion, Button, ConfirmDialog, CopyButton, Field, Input, LangPicker, Modal, Picker, Spinner, Toggle } from "./ui.tsx"; /* ---------- Rename + topic ---------- */ @@ -18,6 +19,7 @@ export function ConvEditDialog({ onClose: () => void; onSaved: (c: Conversation) => void; }) { + const { t } = useT(); const [title, setTitle] = useState(""); const [topic, setTopic] = useState(""); const [busy, setBusy] = useState(false); @@ -41,28 +43,28 @@ export function ConvEditDialog({ onSaved(res.conversation); onClose(); } catch (err) { - setError(err instanceof Error ? err.message : "Save failed"); + setError(err instanceof Error ? err.message : t("common.saveFailed")); } finally { setBusy(false); } } return ( - +
- + setTitle(e.target.value)} maxLength={120} required /> - +
- setTopic(e.target.value)} maxLength={120} placeholder="No topic" /> + setTopic(e.target.value)} maxLength={120} placeholder={t("dlg.noTopic")} />
{error &&

{error}

}
- - + +
@@ -72,6 +74,7 @@ export function ConvEditDialog({ /* ---------- Key recovery ---------- */ export function RecoverDialog({ open, onClose, from }: { open: boolean; onClose: () => void; from?: string }) { + const { t } = useT(); const [username, setUsername] = useState(""); const [sent, setSent] = useState(false); const [busy, setBusy] = useState(false); @@ -94,44 +97,44 @@ export function RecoverDialog({ open, onClose, from }: { open: boolean; onClose: await api.recover(username.trim().toLowerCase()); setSent(true); } catch (err) { - setError(err instanceof Error ? err.message : "Request failed"); + setError(err instanceof Error ? err.message : t("dlg.reqFailed")); } finally { setBusy(false); } } return ( - + {sent ? (

- If @{username.trim().toLowerCase() || "…"} exists and has a recovery - email, a reset link is on its way{from ? <> from {from} : ""} (valid 60 minutes, single use). + {t("dlg.recoverSent", { + user: "@" + (username.trim().toLowerCase() || "…"), + fromPart: from ? t("dlg.recoverSentFrom", { from }) : "", + })}

- Check your inbox — and your spam folder, the message may have landed there. + {t("dlg.spamNote")}

- Nothing arrives? Then no recovery email is set on your account and the - reset is not possible — please contact the site administrator. + {t("dlg.noMailNote")}

- +
) : (

- Enter your username. You'll receive a link that issues a fresh key - (the old one stops working). + {t("dlg.recoverIntro")}

- + setUsername(e.target.value)} placeholder="alice" required /> {error &&

{error}

}
- - + +
)} @@ -152,6 +155,7 @@ export function FilePreviewModal({ onClose: () => void; onAttach: (text: string) => void; }) { + const { t } = useT(); const [text, setText] = useState(""); useEffect(() => { @@ -164,24 +168,22 @@ export function FilePreviewModal({ {busy ? (

- {isOcr ? "Transcribing the image on the server (OCR)…" : "Uploading through platform tools…"} + {isOcr ? t("dlg.transcribing") : t("dlg.uploadingTools")}

) : (

- {isOcr - ? <>The image was transcribed to text on the server — the model receives this text, never the image. Fix any reading mistakes below, then attach. - : <>The file was uploaded through platform tools. Its text content is attached to your message. Edit below if needed, then attach.} + {isOcr ? t("dlg.ocrExpl") : t("dlg.textExpl")}

{preview?.truncated && ( -

Transcription truncated to the server limit — the end is missing.

+

{t("dlg.truncWarn")}

)}