added two thumb slider for device auto brightness
parent
6eca86355c
commit
ed3b92fafb
|
@ -14,17 +14,13 @@ import { useTranslation } from "react-i18next";
|
|||
import MySwitch from "../../Components/Switch";
|
||||
import MyButton, { MyIconButton } from "../../Components/Button";
|
||||
import { MyBottomSheetModal } from "../../Components/Modal";
|
||||
import { Slider } from "@miblanchard/react-native-slider";
|
||||
import {
|
||||
MySliderContainer,
|
||||
MyTwoThumbsSlider,
|
||||
SliderContainer,
|
||||
} from "../../Components/Slider";
|
||||
import { MyTwoThumbsSlider } from "../../Components/Slider";
|
||||
|
||||
export default function SettingsView({ navigation }) {
|
||||
const appContext = useContext(AppContext);
|
||||
const { t } = useTranslation();
|
||||
const [switchState, setSwitchState] = useState(false);
|
||||
const [switchWifiStandby, setSwitchWifiStandby] = useState(false);
|
||||
const [switchAutoBrightness, setSwitchAutoBrightness] = useState(false);
|
||||
const [textDeviceIdHidden, setTextDeviceIdHidden] = useState(true);
|
||||
const [textDeviceMacAddressHidden, setTextDeviceMacAddressHidden] =
|
||||
useState(true);
|
||||
|
@ -113,19 +109,33 @@ export default function SettingsView({ navigation }) {
|
|||
/>
|
||||
|
||||
<MySwitch
|
||||
value={switchState}
|
||||
onValueChange={(e) => setSwitchState(e)}
|
||||
value={switchWifiStandby}
|
||||
onValueChange={(e) => setSwitchWifiStandby(e)}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<Divider />
|
||||
|
||||
<SettingsText
|
||||
title={t("screens.device.settings.deviceAutoBrightnessTitle")}
|
||||
description={t(
|
||||
"screens.device.settings.deviceAutoBrightnessDescription"
|
||||
)}
|
||||
/>
|
||||
<View
|
||||
style={{
|
||||
flexDirection: "row",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<SettingsText
|
||||
containerStyle={{ width: "80%" }}
|
||||
title={t("screens.device.settings.deviceAutoBrightnessTitle")}
|
||||
description={t(
|
||||
"screens.device.settings.deviceAutoBrightnessDescription"
|
||||
)}
|
||||
/>
|
||||
|
||||
<MySwitch
|
||||
value={switchAutoBrightness}
|
||||
onValueChange={(e) => setSwitchAutoBrightness(e)}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<MyTwoThumbsSlider
|
||||
appContext={appContext}
|
||||
|
|
Loading…
Reference in New Issue