@@ -4,6 +4,7 @@ import { Button } from "@/components/Button";
4
4
import { TextAreaWithLabel } from "@/components/TextArea" ;
5
5
import { useJsonRpc } from "@/hooks/useJsonRpc" ;
6
6
import { SettingsPageHeader } from "@components/SettingsPageheader" ;
7
+ import { useSettingsStore } from "@/hooks/stores" ;
7
8
8
9
import notifications from "../notifications" ;
9
10
import { SelectMenuBasic } from "../components/SelectMenuBasic" ;
@@ -45,6 +46,14 @@ export default function SettingsVideoRoute() {
45
46
const [ customEdidValue , setCustomEdidValue ] = useState < string | null > ( null ) ;
46
47
const [ edid , setEdid ] = useState < string | null > ( null ) ;
47
48
49
+ // Video enhancement settings from store
50
+ const videoSaturation = useSettingsStore ( state => state . videoSaturation ) ;
51
+ const setVideoSaturation = useSettingsStore ( state => state . setVideoSaturation ) ;
52
+ const videoBrightness = useSettingsStore ( state => state . videoBrightness ) ;
53
+ const setVideoBrightness = useSettingsStore ( state => state . setVideoBrightness ) ;
54
+ const videoContrast = useSettingsStore ( state => state . videoContrast ) ;
55
+ const setVideoContrast = useSettingsStore ( state => state . setVideoContrast ) ;
56
+
48
57
useEffect ( ( ) => {
49
58
send ( "getStreamQualityFactor" , { } , resp => {
50
59
if ( "error" in resp ) return ;
@@ -126,6 +135,73 @@ export default function SettingsVideoRoute() {
126
135
onChange = { e => handleStreamQualityChange ( e . target . value ) }
127
136
/>
128
137
</ SettingsItem >
138
+
139
+ { /* Video Enhancement Settings */ }
140
+ < SettingsItem
141
+ title = "Video Enhancement"
142
+ description = "Adjust color settings to make the video output more vibrant and colorful"
143
+ />
144
+
145
+ < div className = "space-y-4 pl-4" >
146
+ < SettingsItem
147
+ title = "Saturation"
148
+ description = { `Color saturation (${ videoSaturation . toFixed ( 1 ) } x)` }
149
+ >
150
+ < input
151
+ type = "range"
152
+ min = "0.5"
153
+ max = "2.0"
154
+ step = "0.1"
155
+ value = { videoSaturation }
156
+ onChange = { e => setVideoSaturation ( parseFloat ( e . target . value ) ) }
157
+ className = "w-32 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
158
+ />
159
+ </ SettingsItem >
160
+
161
+ < SettingsItem
162
+ title = "Brightness"
163
+ description = { `Brightness level (${ videoBrightness . toFixed ( 1 ) } x)` }
164
+ >
165
+ < input
166
+ type = "range"
167
+ min = "0.5"
168
+ max = "1.5"
169
+ step = "0.1"
170
+ value = { videoBrightness }
171
+ onChange = { e => setVideoBrightness ( parseFloat ( e . target . value ) ) }
172
+ className = "w-32 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
173
+ />
174
+ </ SettingsItem >
175
+
176
+ < SettingsItem
177
+ title = "Contrast"
178
+ description = { `Contrast level (${ videoContrast . toFixed ( 1 ) } x)` }
179
+ >
180
+ < input
181
+ type = "range"
182
+ min = "0.5"
183
+ max = "2.0"
184
+ step = "0.1"
185
+ value = { videoContrast }
186
+ onChange = { e => setVideoContrast ( parseFloat ( e . target . value ) ) }
187
+ className = "w-32 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700"
188
+ />
189
+ </ SettingsItem >
190
+
191
+ < div className = "flex gap-2" >
192
+ < Button
193
+ size = "SM"
194
+ theme = "light"
195
+ text = "Reset to Default"
196
+ onClick = { ( ) => {
197
+ setVideoSaturation ( 1.0 ) ;
198
+ setVideoBrightness ( 1.0 ) ;
199
+ setVideoContrast ( 1.0 ) ;
200
+ } }
201
+ />
202
+ </ div >
203
+ </ div >
204
+
129
205
< SettingsItem
130
206
title = "EDID"
131
207
description = "Adjust the EDID settings for the display"
0 commit comments