[bugfix] Main Page: Top bar: Overlay. Fix showing indicator whether enabled or disabled.
This commit is contained in:
@@ -5,7 +5,7 @@ import HelpSvg from "@images/help.svg?react";
|
|||||||
|
|
||||||
import { useStore_OpenedQuickSetting } from "@store";
|
import { useStore_OpenedQuickSetting } from "@store";
|
||||||
import { useIsSoftwareUpdateAvailable } from "@logics_common";
|
import { useIsSoftwareUpdateAvailable } from "@logics_common";
|
||||||
import { useIsEnabledOverlaySmallLog, useEnableVrcMicMuteSync } from "@logics_configs";
|
import { useIsEnabledOverlaySmallLog, useIsEnabledOverlayLargeLog, useEnableVrcMicMuteSync } from "@logics_configs";
|
||||||
import { OpenQuickSettingButton } from "./_buttons/OpenQuickSettingButton";
|
import { OpenQuickSettingButton } from "./_buttons/OpenQuickSettingButton";
|
||||||
|
|
||||||
export const RightSideComponents = () => {
|
export const RightSideComponents = () => {
|
||||||
@@ -30,15 +30,18 @@ const OpenOverlayQuickSetting = () => {
|
|||||||
// const { t } = useTranslation();
|
// const { t } = useTranslation();
|
||||||
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
|
const { updateOpenedQuickSetting } = useStore_OpenedQuickSetting();
|
||||||
const { currentIsEnabledOverlaySmallLog } = useIsEnabledOverlaySmallLog();
|
const { currentIsEnabledOverlaySmallLog } = useIsEnabledOverlaySmallLog();
|
||||||
|
const { currentIsEnabledOverlayLargeLog } = useIsEnabledOverlayLargeLog();
|
||||||
|
|
||||||
const onClickFunction = () => {
|
const onClickFunction = () => {
|
||||||
updateOpenedQuickSetting("overlay");
|
updateOpenedQuickSetting("overlay");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const is_enable = currentIsEnabledOverlaySmallLog.data === true || currentIsEnabledOverlayLargeLog.data === true;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<OpenQuickSettingButton
|
<OpenQuickSettingButton
|
||||||
label="Overlay(VR)"
|
label="Overlay(VR)"
|
||||||
variable={currentIsEnabledOverlaySmallLog.data}
|
variable={is_enable}
|
||||||
onClickFunction={onClickFunction}
|
onClickFunction={onClickFunction}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user