From c7b4761a4a5b9dee807e8ec9d94a78e4756ff5db Mon Sep 17 00:00:00 2001
From: object <110488133+oobjectt@users.noreply.github.com>
Date: Thu, 22 Dec 2022 22:02:04 +0100
Subject: [PATCH] Issue #56 - Added configuration for helpers and quets (#100)
---
public/ui-config.json.example | 2 ++
src/components/help/views/HelpIndexView.tsx | 4 ++--
src/components/toolbar/ToolbarMeView.tsx | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/public/ui-config.json.example b/public/ui-config.json.example
index c9e4a5c3..de2d3f2f 100644
--- a/public/ui-config.json.example
+++ b/public/ui-config.json.example
@@ -22,6 +22,8 @@
"wired.action.kick.from.room.max.length": 100,
"wired.action.mute.user.max.length": 100,
"game.center.enabled": false,
+ "guides.enabled": true,
+ "toolbar.hide.quests": true,
"navigator.room.models": [
{ "clubLevel": 0, "tileSize": 104, "name": "a" },
{ "clubLevel": 0, "tileSize": 94, "name": "b" },
diff --git a/src/components/help/views/HelpIndexView.tsx b/src/components/help/views/HelpIndexView.tsx
index c541f34b..46f3764b 100644
--- a/src/components/help/views/HelpIndexView.tsx
+++ b/src/components/help/views/HelpIndexView.tsx
@@ -1,6 +1,6 @@
import { GetCfhStatusMessageComposer } from '@nitrots/nitro-renderer';
import { FC } from 'react';
-import { DispatchUiEvent, LocalizeText, ReportState, ReportType, SendMessageComposer } from '../../../api';
+import { DispatchUiEvent, GetConfiguration, LocalizeText, ReportState, ReportType, SendMessageComposer } from '../../../api';
import { Button, Column, Text } from '../../../common';
import { GuideToolEvent } from '../../../events';
import { useHelp } from '../../../hooks';
@@ -28,7 +28,7 @@ export const HelpIndexView: FC<{}> = props =>
-
+
diff --git a/src/components/toolbar/ToolbarMeView.tsx b/src/components/toolbar/ToolbarMeView.tsx
index eea60bf2..8a66a912 100644
--- a/src/components/toolbar/ToolbarMeView.tsx
+++ b/src/components/toolbar/ToolbarMeView.tsx
@@ -1,6 +1,6 @@
import { MouseEventType, RoomObjectCategory } from '@nitrots/nitro-renderer';
import { Dispatch, FC, PropsWithChildren, SetStateAction, useEffect, useRef } from 'react';
-import { CreateLinkEvent, DispatchUiEvent, GetRoomEngine, GetRoomSession, GetSessionDataManager, GetUserProfile } from '../../api';
+import { CreateLinkEvent, DispatchUiEvent, GetConfiguration, GetRoomEngine, GetRoomSession, GetSessionDataManager, GetUserProfile } from '../../api';
import { Base, Flex, LayoutItemCountView } from '../../common';
import { GuideToolEvent } from '../../events';
@@ -36,7 +36,7 @@ export const ToolbarMeView: FC> = props =>
return (
- { useGuideTool &&
+ { (GetConfiguration('guides.enabled') && useGuideTool) &&
DispatchUiEvent(new GuideToolEvent(GuideToolEvent.TOGGLE_GUIDE_TOOL)) } /> }
CreateLinkEvent('achievements/toggle') }>
{ (unseenAchievementCount > 0) &&