(
onKeyDown={handleKeyDown}
onKeyUp={handleKeyUp}
onPaste={handlePaste}
+ onChange={(value) => setCharCount(toPlainText(value, isMarkdown).trim().length)}
top={
replyDraft && (
@@ -953,6 +957,22 @@ export const RoomInput = forwardRef(
setTimeout(() => setLocationError(null), 4000);
}}
/>
+ {charCount > 0 && (
+
+ {charCount}
+
+ )}
@@ -393,6 +395,42 @@ function Appearance() {
}
/>
+
+
+ }
+ />
+ {nightLightEnabled && (
+
+
+ Intensity: {nightLightOpacity}%
+
+ ) =>
+ setNightLightOpacity(parseInt(e.target.value, 10))
+ }
+ style={{ width: '100%' }}
+ />
+
+ )}
+
+
+ );
+}
const queryClient = new QueryClient();
@@ -76,6 +94,7 @@ function App() {
+
diff --git a/src/app/state/settings.ts b/src/app/state/settings.ts
index 94ab53c1a..9c8810d72 100644
--- a/src/app/state/settings.ts
+++ b/src/app/state/settings.ts
@@ -76,6 +76,9 @@ export interface Settings {
callNoiseSuppression: boolean;
pttMode: boolean;
pttKey: string;
+
+ nightLightEnabled: boolean;
+ nightLightOpacity: number;
}
const defaultSettings: Settings = {
@@ -121,6 +124,9 @@ const defaultSettings: Settings = {
callNoiseSuppression: true,
pttMode: false,
pttKey: 'Space',
+
+ nightLightEnabled: false,
+ nightLightOpacity: 30,
};
export const getSettings = (): Settings => {