feat: port the chat store, realtime client and components

- realtime.ts: the page's one Centrifuge client, setRealtimeAuth, onUserEvent for user:{me} events the chat does not handle
- chatEvents, chatFormat, chatText, chatUnread, format, media, tabs ported; copy passed in localized
- useChat over useState: channels with join and leave, DMs, member list, unread and mention counts, read marks, typing, presence, polling fallback
- ChatPanel, ChatHeader, ChatMessage, ChatDmList, ChatMemberPicker, ChatMentionPopup, ChatAvatar, ChatIcon, ChatNotices
- EN and PL strings
This commit is contained in:
Jakub Zych
2026-10-31 13:52:56 +01:00
parent fa6f9950a6
commit 5d581539b3
27 changed files with 3516 additions and 92 deletions

View File

@@ -2,13 +2,96 @@
"chat": {
"name": "Chat",
"channels": "Channels",
"messages": "Messages",
"message": "Message",
"channelsLeft": "Channels you left",
"join": "Join",
"send": "Send",
"pickChannel": "Pick a channel to start.",
"retry": "Try again",
"close": "Close",
"loading": "Loading",
"someone": "Someone",
"notMember": "Your account is not a member of this chat.",
"pickTitle": "Pick a conversation",
"pickText": "Open a channel or a direct message on the left, or start a new message.",
"error": {
"bootstrap": "The chat could not load. Check your connection and try again.",
"send": "The message was not sent. Try again."
"load": "The messages could not load. Check your connection and try again.",
"older": "Older messages could not load.",
"send": "The message was not sent. Try again.",
"offline": "Not sent: no internet connection. Try again.",
"tooFast": "Too many messages in a short time. Wait a moment and send again.",
"noAccess": "You no longer have access to this conversation.",
"refused": "This message cannot be sent. Check its text and attachments.",
"dm": "The conversation could not start. Try again.",
"tooManyDms": "Too many new conversations in a short time. Wait a minute and try again.",
"openChannel": "The channel could not open. Try again.",
"leaveChannel": "You could not leave the channel. Try again.",
"joinChannel": "You could not join the channel. Try again."
},
"unread": {
"messages": "{n} unread message | {n} unread messages",
"mentions": "{n} mention of you | {n} mentions of you"
},
"dm": {
"title": "Direct messages",
"new": "New message",
"you": "You: {text}",
"failed": "Your conversations could not load.",
"empty": "No direct messages yet. Start one with the + button."
},
"picker": {
"to": "To",
"placeholder": "Type a name",
"failed": "The member list could not load.",
"nobody": "There is nobody else in the chat yet.",
"noMatch": "Nobody matches “{q}”."
},
"mention": {
"label": "Mention someone",
"none": "Nobody matches “{q}”."
},
"msg": {
"bot": "Bot",
"you": "You",
"edited": "(edited)",
"editedAt": "Edited {at}",
"deleted": "Message deleted."
},
"day": {
"today": "Today",
"yesterday": "Yesterday"
},
"list": {
"label": "Messages in {name}",
"startDm": "This is the start of your conversation with {name}.",
"startChannel": "This is the start of {name}.",
"olderLoading": "Loading older messages…",
"new": "New messages",
"jump": "New messages: {n}"
},
"composer": {
"mention": "Mention someone",
"hint": "Enter sends, Shift+Enter adds a new line.",
"label": "Message to {name}",
"placeholder": "Message {name}"
},
"header": {
"channel": "Channel",
"dm": "Direct message",
"back": "Back to the conversations",
"online": "{n} online",
"onlyYou": "only you",
"dmOnline": "online",
"leave": "Leave the channel"
},
"connection": {
"connecting": "Connecting to the chat…",
"reconnecting": "Reconnecting…",
"unavailable": "No live updates: the chat refreshes every 15 seconds."
},
"typing": {
"one": "{a} is typing…",
"two": "{a} and {b} are typing…",
"many": "Several people are typing…"
}
}
}

View File

@@ -2,13 +2,96 @@
"chat": {
"name": "Czat",
"channels": "Kanały",
"messages": "Wiadomości",
"message": "Wiadomość",
"channelsLeft": "Kanały, które opuszczono",
"join": "Dołącz",
"send": "Wyślij",
"pickChannel": "Wybierz kanał, aby zacząć.",
"retry": "Spróbuj ponownie",
"close": "Zamknij",
"loading": "Wczytywanie",
"someone": "Ktoś",
"notMember": "Twoje konto nie należy do tego czatu.",
"pickTitle": "Wybierz rozmowę",
"pickText": "Otwórz kanał albo wiadomość prywatną po lewej lub zacznij nową wiadomość.",
"error": {
"bootstrap": "Nie udało się wczytać czatu. Sprawdź połączenie i spróbuj ponownie.",
"send": "Nie wysłano wiadomości. Spróbuj ponownie."
"load": "Nie udało się wczytać wiadomości. Sprawdź połączenie i spróbuj ponownie.",
"older": "Nie udało się wczytać starszych wiadomości.",
"send": "Nie wysłano wiadomości. Spróbuj ponownie.",
"offline": "Nie wysłano: brak połączenia z internetem. Spróbuj ponownie.",
"tooFast": "Za dużo wiadomości w krótkim czasie. Odczekaj chwilę i wyślij ponownie.",
"noAccess": "Nie masz już dostępu do tej rozmowy.",
"refused": "Tej wiadomości nie da się wysłać. Sprawdź treść i załączniki.",
"dm": "Nie udało się rozpocząć rozmowy. Spróbuj ponownie.",
"tooManyDms": "Za dużo nowych rozmów w krótkim czasie. Odczekaj minutę i spróbuj ponownie.",
"openChannel": "Nie udało się otworzyć kanału. Spróbuj ponownie.",
"leaveChannel": "Nie udało się opuścić kanału. Spróbuj ponownie.",
"joinChannel": "Nie udało się dołączyć do kanału. Spróbuj ponownie."
},
"unread": {
"messages": "nieprzeczytane: {n}",
"mentions": "wzmianki o Tobie: {n}"
},
"dm": {
"title": "Wiadomości prywatne",
"new": "Nowa wiadomość",
"you": "Ty: {text}",
"failed": "Nie udało się wczytać rozmów.",
"empty": "Nie masz jeszcze wiadomości prywatnych. Zacznij rozmowę przyciskiem +."
},
"picker": {
"to": "Do kogo?",
"placeholder": "Wpisz imię lub nazwisko",
"failed": "Nie udało się wczytać listy osób.",
"nobody": "Na czacie nie ma jeszcze innych osób.",
"noMatch": "Nikt nie pasuje do „{q}”."
},
"mention": {
"label": "Wspomnij osobę",
"none": "Brak osób pasujących do „{q}”."
},
"msg": {
"bot": "Bot",
"you": "Ty",
"edited": "(edytowano)",
"editedAt": "Edytowano {at}",
"deleted": "Wiadomość usunięta."
},
"day": {
"today": "Dziś",
"yesterday": "Wczoraj"
},
"list": {
"label": "Wiadomości w {name}",
"startDm": "To początek Waszej rozmowy z {name}.",
"startChannel": "To początek kanału {name}.",
"olderLoading": "Wczytywanie starszych wiadomości…",
"new": "Nowe wiadomości",
"jump": "Nowe wiadomości: {n}"
},
"composer": {
"mention": "Wspomnij osobę",
"hint": "Enter wysyła, Shift+Enter dodaje nową linię.",
"label": "Wiadomość do {name}",
"placeholder": "Wiadomość do {name}"
},
"header": {
"channel": "Kanał",
"dm": "Wiadomość prywatna",
"back": "Wróć do rozmów",
"online": "online: {n}",
"onlyYou": "tylko Ty",
"dmOnline": "online",
"leave": "Opuść kanał"
},
"connection": {
"connecting": "Łączenie z czatem…",
"reconnecting": "Ponowne łączenie…",
"unavailable": "Czat bez aktualizacji na żywo: odświeżam co 15 sekund."
},
"typing": {
"one": "{a} pisze…",
"two": "{a} i {b} piszą…",
"many": "Kilka osób pisze…"
}
}
}