Issue #56 - Added configuration for helpers and quets (#100)

This commit is contained in:
object 2022-12-22 22:02:04 +01:00 committed by GitHub
parent 6531e629bd
commit c7b4761a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -22,6 +22,8 @@
"wired.action.kick.from.room.max.length": 100, "wired.action.kick.from.room.max.length": 100,
"wired.action.mute.user.max.length": 100, "wired.action.mute.user.max.length": 100,
"game.center.enabled": false, "game.center.enabled": false,
"guides.enabled": true,
"toolbar.hide.quests": true,
"navigator.room.models": [ "navigator.room.models": [
{ "clubLevel": 0, "tileSize": 104, "name": "a" }, { "clubLevel": 0, "tileSize": 104, "name": "a" },
{ "clubLevel": 0, "tileSize": 94, "name": "b" }, { "clubLevel": 0, "tileSize": 94, "name": "b" },

View File

@ -1,6 +1,6 @@
import { GetCfhStatusMessageComposer } from '@nitrots/nitro-renderer'; import { GetCfhStatusMessageComposer } from '@nitrots/nitro-renderer';
import { FC } from 'react'; 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 { Button, Column, Text } from '../../../common';
import { GuideToolEvent } from '../../../events'; import { GuideToolEvent } from '../../../events';
import { useHelp } from '../../../hooks'; import { useHelp } from '../../../hooks';
@ -28,7 +28,7 @@ export const HelpIndexView: FC<{}> = props =>
</Column> </Column>
<Column gap={ 1 }> <Column gap={ 1 }>
<Button onClick={ onReportClick }>{ LocalizeText('help.main.bully.subtitle') }</Button> <Button onClick={ onReportClick }>{ LocalizeText('help.main.bully.subtitle') }</Button>
<Button onClick={ () => DispatchUiEvent(new GuideToolEvent(GuideToolEvent.CREATE_HELP_REQUEST)) }>{ LocalizeText('help.main.help.title') }</Button> <Button onClick={ () => DispatchUiEvent(new GuideToolEvent(GuideToolEvent.CREATE_HELP_REQUEST)) } disabled={ !GetConfiguration('guides.enabled') }>{ LocalizeText('help.main.help.title') }</Button>
<Button disabled={ true }>{ LocalizeText('help.main.self.tips.title') }</Button> <Button disabled={ true }>{ LocalizeText('help.main.self.tips.title') }</Button>
</Column> </Column>
<Button variant="link" textColor="black" onClick={ () => SendMessageComposer(new GetCfhStatusMessageComposer(false)) }>{ LocalizeText('help.main.my.sanction.status') }</Button> <Button variant="link" textColor="black" onClick={ () => SendMessageComposer(new GetCfhStatusMessageComposer(false)) }>{ LocalizeText('help.main.my.sanction.status') }</Button>

View File

@ -1,6 +1,6 @@
import { MouseEventType, RoomObjectCategory } from '@nitrots/nitro-renderer'; import { MouseEventType, RoomObjectCategory } from '@nitrots/nitro-renderer';
import { Dispatch, FC, PropsWithChildren, SetStateAction, useEffect, useRef } from 'react'; 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 { Base, Flex, LayoutItemCountView } from '../../common';
import { GuideToolEvent } from '../../events'; import { GuideToolEvent } from '../../events';
@ -36,7 +36,7 @@ export const ToolbarMeView: FC<PropsWithChildren<ToolbarMeViewProps>> = props =>
return ( return (
<Flex innerRef={ elementRef } alignItems="center" className="nitro-toolbar-me p-2" gap={ 2 }> <Flex innerRef={ elementRef } alignItems="center" className="nitro-toolbar-me p-2" gap={ 2 }>
{ useGuideTool && { (GetConfiguration('guides.enabled') && useGuideTool) &&
<Base pointer className="navigation-item icon icon-me-helper-tool" onClick={ event => DispatchUiEvent(new GuideToolEvent(GuideToolEvent.TOGGLE_GUIDE_TOOL)) } /> } <Base pointer className="navigation-item icon icon-me-helper-tool" onClick={ event => DispatchUiEvent(new GuideToolEvent(GuideToolEvent.TOGGLE_GUIDE_TOOL)) } /> }
<Base pointer className="navigation-item icon icon-me-achievements" onClick={ event => CreateLinkEvent('achievements/toggle') }> <Base pointer className="navigation-item icon icon-me-achievements" onClick={ event => CreateLinkEvent('achievements/toggle') }>
{ (unseenAchievementCount > 0) && { (unseenAchievementCount > 0) &&