feat: typing indicator orange dots, push-to-deafen hotkey, night light filter, message length counter
- #108: TypingIndicator reads lotusTerminal setting; applies var(--lt-accent-orange) to container so dots inherit via backgroundColor:currentColor - #100: CallControls registers KeyM as push-to-deafen (e.code, e.repeat guard, ownerDocument.body iframe-safe editable check, [callEmbed] dep array) - P5-5: nightLightEnabled/nightLightOpacity settings; position:fixed rgba(255,140,0) overlay inside JotaiProvider; Night Light tile + intensity slider (5–80%) in Settings → Appearance - #101: RoomInput charCount state via Slate onChange + toPlainText; resets on room switch; displayed before send button when count > 0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -150,6 +150,9 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||
const powerLevels = usePowerLevelsContext();
|
||||
const creators = useRoomCreators(room);
|
||||
|
||||
const [charCount, setCharCount] = useState(0);
|
||||
useEffect(() => { setCharCount(0); }, [roomId]);
|
||||
|
||||
const alive = useAlive();
|
||||
const [msgDraft, setMsgDraft] = useAtom(roomIdToMsgDraftAtomFamily(roomId));
|
||||
const [replyDraft, setReplyDraft] = useAtom(roomIdToReplyDraftAtomFamily(roomId));
|
||||
@@ -718,6 +721,7 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||
onKeyDown={handleKeyDown}
|
||||
onKeyUp={handleKeyUp}
|
||||
onPaste={handlePaste}
|
||||
onChange={(value) => setCharCount(toPlainText(value, isMarkdown).trim().length)}
|
||||
top={
|
||||
replyDraft && (
|
||||
<div>
|
||||
@@ -953,6 +957,22 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
|
||||
setTimeout(() => setLocationError(null), 4000);
|
||||
}}
|
||||
/>
|
||||
{charCount > 0 && (
|
||||
<Text
|
||||
size="T200"
|
||||
style={{
|
||||
color: 'var(--tc-surface-low)',
|
||||
padding: '0 4px',
|
||||
alignSelf: 'center',
|
||||
userSelect: 'none',
|
||||
minWidth: '2rem',
|
||||
textAlign: 'right',
|
||||
opacity: 0.7,
|
||||
}}
|
||||
>
|
||||
{charCount}
|
||||
</Text>
|
||||
)}
|
||||
<IconButton
|
||||
onClick={submit}
|
||||
variant="SurfaceVariant"
|
||||
|
||||
Reference in New Issue
Block a user