Dateien nach "frontend/src/tools" hochladen

This commit is contained in:
2026-05-28 01:16:30 +02:00
parent c4406f54de
commit 51b5bbbdcd

View File

@@ -289,6 +289,15 @@ export default function Nachrichten({ toast, mobile }) {
Noch keine Nachrichten Noch keine Nachrichten
</div> </div>
)} )}
{/* Hinweis wenn Nachrichten nicht entschlüsselt werden können */}
{Object.values(decrypted).some(v => v === null) && (
<InfoBox color="#ffe66d">
🔑 Einige Nachrichten können nicht entschlüsselt werden dein privater Schlüssel passt nicht mehr.{' '}
Importiere deinen alten Schlüssel unter{' '}
<strong>Einstellungen Sicherheit Schlüssel importieren</strong>,
oder erzeuge einen neuen Schlüssel (löscht alle bisherigen Nachrichten).
</InfoBox>
)}
{messages.map(m => { {messages.map(m => {
const isMine = !!m.is_mine; const isMine = !!m.is_mine;
const txt = decrypted[m.id]; const txt = decrypted[m.id];
@@ -395,7 +404,7 @@ function formatMsgTime(isoStr) {
const isToday = d.toDateString() === now.toDateString(); const isToday = d.toDateString() === now.toDateString();
const isThisYear = d.getFullYear() === now.getFullYear(); const isThisYear = d.getFullYear() === now.getFullYear();
const time = d.toLocaleTimeString('de-DE', { hour:'2-digit', minute:'2-digit' }); const time = d.toLocaleTimeString('de-DE', { hour:'2-digit', minute:'2-digit' });
if (isToday) return time; if (isToday) return `Heute, ${time}`;
if (isThisYear) return `${d.toLocaleDateString('de-DE', { day:'numeric', month:'short' })} ${time}`; if (isThisYear) return `${d.toLocaleDateString('de-DE', { day:'numeric', month:'short' })}, ${time}`;
return `${d.toLocaleDateString('de-DE', { day:'numeric', month:'short', year:'numeric' })} ${time}`; return `${d.toLocaleDateString('de-DE', { day:'numeric', month:'short', year:'numeric' })}, ${time}`;
} }