feat: realtime sync, settings UX and chat list improvements
Some checks failed
CI / test (push) Failing after 21s
Some checks failed
CI / test (push) Failing after 21s
- add chat_updated realtime event and dynamic chat subscriptions - auto-join invite links in web app - implement Telegram-like settings panel (general/notifications/privacy) - add browser notification preferences and keyboard send mode - improve chat list with last message preview/time and online badge - rework chat members UI with context actions and role crowns
This commit is contained in:
@@ -3,6 +3,7 @@ import { attachFile, requestUploadUrl, sendMessageWithClientId, uploadToPresigne
|
||||
import { useAuthStore } from "../store/authStore";
|
||||
import { useChatStore } from "../store/chatStore";
|
||||
import { buildWsUrl } from "../utils/ws";
|
||||
import { getAppPreferences } from "../utils/preferences";
|
||||
|
||||
type RecordingState = "idle" | "recording" | "locked";
|
||||
|
||||
@@ -149,7 +150,19 @@ export function MessageComposer() {
|
||||
}
|
||||
|
||||
function onComposerKeyDown(event: KeyboardEvent<HTMLTextAreaElement>) {
|
||||
if (event.key === "Enter" && !event.shiftKey) {
|
||||
if (event.key !== "Enter") {
|
||||
return;
|
||||
}
|
||||
const prefs = getAppPreferences();
|
||||
const sendWithCtrlEnter = prefs.sendMode === "ctrl_enter";
|
||||
if (sendWithCtrlEnter) {
|
||||
if (event.ctrlKey) {
|
||||
event.preventDefault();
|
||||
void handleSend();
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!event.shiftKey) {
|
||||
event.preventDefault();
|
||||
void handleSend();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user