Move guide tool

This commit is contained in:
Bill 2022-02-23 00:37:47 -05:00
parent 91c8ac6bd9
commit be47f5670f
25 changed files with 170 additions and 173 deletions

View File

@ -0,0 +1,91 @@
.nitro-guide-tool {
width: 250px;
.duty-status {
border-radius: 0.25rem;
border-color: #B6BEC5 !important;
background-color: #CDD3D9;
border: 2px solid;
}
.duty-switch {
width: 38px;
height: 21px;
cursor: pointer;
background-image: url(../../assets/images/guide-tool/guide_tool_duty_switch.png);
&.off {
background-position: 0px -22px;
}
}
.info-icon {
width: 23px;
height: 24px;
background-image: url(../../assets/images/guide-tool/guide_tool_info_icon.png);
}
.chat-messages {
height: 200px;
min-height: 200px;
overflow-y: auto;
.message-avatar {
position: relative;
overflow: hidden;
width: 50px;
height: 50px;
.avatar-image {
position: absolute;
margin-left: -22px;
margin-top: -25px;
}
}
.messages-group-left {
position: relative;
&:before {
position: absolute;
content: ' ';
width: 0;
height: 0;
border-right: 8px solid rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
top: 10px;
left: -8px;
}
}
.messages-group-right {
position: relative;
&:before {
position: absolute;
content: ' ';
width: 0;
height: 0;
border-left: 8px solid rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
top: 10px;
right: -8px;
}
}
}
.request-message {
width: 100%;
min-width: 100%;
max-width: 100%;
height: 90px;
min-height: 90px;
max-height: 90px;
border: none;
resize: none;
outline: none;
line-height: 17px;
}
}

View File

@ -6,13 +6,13 @@ import { CreateMessageHook, dispatchUiEvent, SendMessageHook, useUiEvent } from
import { NitroCardHeaderView, NitroCardView } from '../../layout'; import { NitroCardHeaderView, NitroCardView } from '../../layout';
import { GuideSessionState, GuideToolMessageGroup } from './common'; import { GuideSessionState, GuideToolMessageGroup } from './common';
import { GuideToolMessage } from './common/GuideToolMessage'; import { GuideToolMessage } from './common/GuideToolMessage';
import { GuideToolAcceptView } from './views/guide-accept/GuideToolAcceptView'; import { GuideToolAcceptView } from './views/GuideToolAcceptView';
import { GuideToolMenuView } from './views/guide-tool-menu/GuideToolMenuView'; import { GuideToolMenuView } from './views/GuideToolMenuView';
import { GuideToolOngoingView } from './views/ongoing/GuideToolOngoingView'; import { GuideToolOngoingView } from './views/GuideToolOngoingView';
import { GuideToolUserCreateRequestView } from './views/user-create-request/GuideToolUserCreateRequestView'; import { GuideToolUserCreateRequestView } from './views/GuideToolUserCreateRequestView';
import { GuideToolUserFeedbackView } from './views/user-feedback/GuideToolUserFeedbackView'; import { GuideToolUserFeedbackView } from './views/GuideToolUserFeedbackView';
import { GuideToolUserPendingView } from './views/user-pending/GuideToolUserPendingView'; import { GuideToolUserPendingView } from './views/GuideToolUserPendingView';
import { GuideToolUserThanksView } from './views/user-thanks/GuideToolUserThanksView'; import { GuideToolUserThanksView } from './views/GuideToolUserThanksView';
export const GuideToolView: FC<{}> = props => export const GuideToolView: FC<{}> = props =>
{ {

View File

@ -1,9 +1,14 @@
import { GuideSessionGuideDecidesMessageComposer } from '@nitrots/nitro-renderer'; import { GuideSessionGuideDecidesMessageComposer } from '@nitrots/nitro-renderer';
import { FC, useCallback } from 'react'; import { FC, useCallback } from 'react';
import { LocalizeText } from '../../../../api'; import { LocalizeText } from '../../../api';
import { SendMessageHook } from '../../../../hooks'; import { SendMessageHook } from '../../../hooks';
import { NitroCardContentView } from '../../../../layout'; import { NitroCardContentView } from '../../../layout';
import { GuideToolAcceptViewProps } from './GuideToolAcceptView.types';
interface GuideToolAcceptViewProps
{
helpRequestDescription: string;
helpRequestAverageTime: number;
}
export const GuideToolAcceptView: FC<GuideToolAcceptViewProps> = props => export const GuideToolAcceptView: FC<GuideToolAcceptViewProps> = props =>
{ {

View File

@ -1,7 +1,21 @@
import { FC } from 'react'; import { FC } from 'react';
import { LocalizeText } from '../../../../api'; import { LocalizeText } from '../../../api';
import { NitroCardContentView } from '../../../../layout'; import { NitroCardContentView } from '../../../layout';
import { GuideToolMenuViewProps } from './GuideToolMenuView.types';
interface GuideToolMenuViewProps
{
isOnDuty: boolean;
isHandlingGuideRequests: boolean;
setIsHandlingGuideRequests: (value: boolean) => void;
isHandlingHelpRequests: boolean;
setIsHandlingHelpRequests: (value: boolean) => void;
isHandlingBullyReports: boolean;
setIsHandlingBullyReports: (value: boolean) => void;
guidesOnDuty: number;
helpersOnDuty: number;
guardiansOnDuty: number;
processAction: (action: string) => void;
}
export const GuideToolMenuView: FC<GuideToolMenuViewProps> = props => export const GuideToolMenuView: FC<GuideToolMenuViewProps> = props =>
{ {

View File

@ -1,12 +1,22 @@
import { GuideSessionGetRequesterRoomMessageComposer, GuideSessionInviteRequesterMessageComposer, GuideSessionRequesterRoomMessageEvent, GuideSessionResolvedMessageComposer } from '@nitrots/nitro-renderer'; import { GuideSessionGetRequesterRoomMessageComposer, GuideSessionInviteRequesterMessageComposer, GuideSessionRequesterRoomMessageEvent, GuideSessionResolvedMessageComposer } from '@nitrots/nitro-renderer';
import { GuideSessionMessageMessageComposer } from '@nitrots/nitro-renderer/src'; import { GuideSessionMessageMessageComposer } from '@nitrots/nitro-renderer/src';
import { FC, KeyboardEvent, useCallback, useState } from 'react'; import { FC, KeyboardEvent, useCallback, useState } from 'react';
import { GetSessionDataManager, LocalizeText, TryVisitRoom } from '../../../../api'; import { GetSessionDataManager, LocalizeText, TryVisitRoom } from '../../../api';
import { CreateMessageHook, SendMessageHook } from '../../../../hooks'; import { CreateMessageHook, SendMessageHook } from '../../../hooks';
import { NitroCardContentView, NitroLayoutButton, NitroLayoutFlex } from '../../../../layout'; import { NitroCardContentView, NitroLayoutButton, NitroLayoutFlex } from '../../../layout';
import { NitroLayoutBase } from '../../../../layout/base'; import { NitroLayoutBase } from '../../../layout/base';
import { AvatarImageView } from '../../../shared/avatar-image/AvatarImageView'; import { AvatarImageView } from '../../../views/shared/avatar-image/AvatarImageView';
import { GuideToolOngoingViewProps } from './GuideToolOngoingView.types'; import { GuideToolMessageGroup } from '../common';
interface GuideToolOngoingViewProps
{
isGuide: boolean;
userId: number;
userName: string;
userFigure: string;
isTyping: boolean;
messageGroups: GuideToolMessageGroup[];
}
export const GuideToolOngoingView: FC<GuideToolOngoingViewProps> = props => export const GuideToolOngoingView: FC<GuideToolOngoingViewProps> = props =>
{ {

View File

@ -1,9 +1,14 @@
import { GuideSessionCreateMessageComposer } from '@nitrots/nitro-renderer'; import { GuideSessionCreateMessageComposer } from '@nitrots/nitro-renderer';
import { FC, useCallback, useState } from 'react'; import { FC, useCallback, useState } from 'react';
import { LocalizeText } from '../../../../api'; import { LocalizeText } from '../../../api';
import { SendMessageHook } from '../../../../hooks'; import { SendMessageHook } from '../../../hooks';
import { NitroCardContentView } from '../../../../layout'; import { NitroCardContentView } from '../../../layout';
import { GuideToolUserCreateRequestViewProps } from './GuideTooluserCreateRequestView.types';
interface GuideToolUserCreateRequestViewProps
{
userRequest: string;
setUserRequest: (value: string) => void;
}
const MIN_REQUEST_LENGTH: number = 15; const MIN_REQUEST_LENGTH: number = 15;

View File

@ -1,9 +1,13 @@
import { GuideSessionFeedbackMessageComposer } from '@nitrots/nitro-renderer'; import { GuideSessionFeedbackMessageComposer } from '@nitrots/nitro-renderer';
import { FC, useCallback } from 'react'; import { FC, useCallback } from 'react';
import { LocalizeText } from '../../../../api'; import { LocalizeText } from '../../../api';
import { SendMessageHook } from '../../../../hooks'; import { SendMessageHook } from '../../../hooks';
import { NitroCardContentView } from '../../../../layout'; import { NitroCardContentView } from '../../../layout';
import { GuideToolUserFeedbackViewProps } from './GuideToolUserFeedbackView.types';
interface GuideToolUserFeedbackViewProps
{
userName: string;
}
export const GuideToolUserFeedbackView: FC<GuideToolUserFeedbackViewProps> = props => export const GuideToolUserFeedbackView: FC<GuideToolUserFeedbackViewProps> = props =>
{ {

View File

@ -1,9 +1,14 @@
import { GuideSessionRequesterCancelsMessageComposer } from '@nitrots/nitro-renderer'; import { GuideSessionRequesterCancelsMessageComposer } from '@nitrots/nitro-renderer';
import { FC, useCallback } from 'react'; import { FC, useCallback } from 'react';
import { LocalizeText } from '../../../../api'; import { LocalizeText } from '../../../api';
import { SendMessageHook } from '../../../../hooks'; import { SendMessageHook } from '../../../hooks';
import { NitroCardContentView } from '../../../../layout'; import { NitroCardContentView } from '../../../layout';
import { GuideToolUserPendingViewProps } from './GuideToolUserPendingView.types';
interface GuideToolUserPendingViewProps
{
helpRequestDescription: string;
helpRequestAverageTime: number;
}
export const GuideToolUserPendingView: FC<GuideToolUserPendingViewProps> = props => export const GuideToolUserPendingView: FC<GuideToolUserPendingViewProps> = props =>
{ {

View File

@ -1,6 +1,6 @@
import { FC } from 'react'; import { FC } from 'react';
import { LocalizeText } from '../../../../api'; import { LocalizeText } from '../../../api';
import { NitroCardContentView } from '../../../../layout'; import { NitroCardContentView } from '../../../layout';
export const GuideToolUserThanksView: FC<{}> = props => export const GuideToolUserThanksView: FC<{}> = props =>
{ {

View File

@ -4,6 +4,7 @@
@import './catalog/CatalogView'; @import './catalog/CatalogView';
@import './chat-history/ChatHistoryView'; @import './chat-history/ChatHistoryView';
@import './groups/GroupView'; @import './groups/GroupView';
@import './guide-tool/GuideToolView';
@import './help/HelpView'; @import './help/HelpView';
@import './inventory/InventoryView'; @import './inventory/InventoryView';
@import './loading/LoadingView'; @import './loading/LoadingView';

View File

@ -7,7 +7,6 @@ import { TransitionAnimation, TransitionAnimationTypes } from '../../layout';
import { CampaignView } from '../../views/campaign/CampaignView'; import { CampaignView } from '../../views/campaign/CampaignView';
import { FloorplanEditorView } from '../../views/floorplan-editor/FloorplanEditorView'; import { FloorplanEditorView } from '../../views/floorplan-editor/FloorplanEditorView';
import { FriendsView } from '../../views/friends/FriendsView'; import { FriendsView } from '../../views/friends/FriendsView';
import { GuideToolView } from '../../views/guide-tool/GuideToolView';
import { HcCenterView } from '../../views/hc-center/HcCenterView'; import { HcCenterView } from '../../views/hc-center/HcCenterView';
import { HotelView } from '../../views/hotel-view/HotelView'; import { HotelView } from '../../views/hotel-view/HotelView';
import { NitropediaView } from '../../views/nitropedia/NitropediaView'; import { NitropediaView } from '../../views/nitropedia/NitropediaView';
@ -17,6 +16,7 @@ import { CameraWidgetView } from '../camera/CameraWidgetView';
import { CatalogView } from '../catalog/CatalogView'; import { CatalogView } from '../catalog/CatalogView';
import { ChatHistoryView } from '../chat-history/ChatHistoryView'; import { ChatHistoryView } from '../chat-history/ChatHistoryView';
import { GroupsView } from '../groups/GroupsView'; import { GroupsView } from '../groups/GroupsView';
import { GuideToolView } from '../guide-tool/GuideToolView';
import { HelpView } from '../help/HelpView'; import { HelpView } from '../help/HelpView';
import { InventoryView } from '../inventory/InventoryView'; import { InventoryView } from '../inventory/InventoryView';
import { ModToolsView } from '../mod-tools/ModToolsView'; import { ModToolsView } from '../mod-tools/ModToolsView';

View File

@ -7,4 +7,3 @@
@import "./nitropedia/NitropediaView"; @import "./nitropedia/NitropediaView";
@import "./hc-center/HcCenterView.scss"; @import "./hc-center/HcCenterView.scss";
@import './campaign/CampaignView'; @import './campaign/CampaignView';
@import './guide-tool/GuideToolView';

View File

@ -1,31 +0,0 @@
.nitro-guide-tool {
width: 250px;
.duty-status {
border-radius: 0.25rem;
border-color: #B6BEC5 !important;
background-color: #CDD3D9;
border: 2px solid;
}
.duty-switch {
width: 38px;
height: 21px;
cursor: pointer;
background-image: url(../../assets/images/guide-tool/guide_tool_duty_switch.png);
&.off {
background-position: 0px -22px;
}
}
.info-icon {
width: 23px;
height: 24px;
background-image: url(../../assets/images/guide-tool/guide_tool_info_icon.png);
}
@import './views/user-create-request/GuideToolUserCreateRequestView';
@import './views/ongoing/GuideToolOngoingView';
}

View File

@ -1,5 +0,0 @@
export interface GuideToolAcceptViewProps
{
helpRequestDescription: string;
helpRequestAverageTime: number;
}

View File

@ -1,14 +0,0 @@
export interface GuideToolMenuViewProps
{
isOnDuty: boolean;
isHandlingGuideRequests: boolean;
setIsHandlingGuideRequests: (value: boolean) => void;
isHandlingHelpRequests: boolean;
setIsHandlingHelpRequests: (value: boolean) => void;
isHandlingBullyReports: boolean;
setIsHandlingBullyReports: (value: boolean) => void;
guidesOnDuty: number;
helpersOnDuty: number;
guardiansOnDuty: number;
processAction: (action: string) => void;
}

View File

@ -1,50 +0,0 @@
.chat-messages {
height: 200px;
min-height: 200px;
overflow-y: auto;
.message-avatar {
position: relative;
overflow: hidden;
width: 50px;
height: 50px;
.avatar-image {
position: absolute;
margin-left: -22px;
margin-top: -25px;
}
}
.messages-group-left {
position: relative;
&:before {
position: absolute;
content: ' ';
width: 0;
height: 0;
border-right: 8px solid rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
top: 10px;
left: -8px;
}
}
.messages-group-right {
position: relative;
&:before {
position: absolute;
content: ' ';
width: 0;
height: 0;
border-left: 8px solid rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
border-top: 8px solid transparent;
border-bottom: 8px solid transparent;
top: 10px;
right: -8px;
}
}
}

View File

@ -1,11 +0,0 @@
import { GuideToolMessageGroup } from '../../common';
export interface GuideToolOngoingViewProps
{
isGuide: boolean;
userId: number;
userName: string;
userFigure: string;
isTyping: boolean;
messageGroups: GuideToolMessageGroup[];
}

View File

@ -1,12 +0,0 @@
.request-message {
width: 100%;
min-width: 100%;
max-width: 100%;
height: 90px;
min-height: 90px;
max-height: 90px;
border: none;
resize: none;
outline: none;
line-height: 17px;
}

View File

@ -1,5 +0,0 @@
export interface GuideToolUserCreateRequestViewProps
{
userRequest: string;
setUserRequest: (value: string) => void;
}

View File

@ -1,4 +0,0 @@
export interface GuideToolUserFeedbackViewProps
{
userName: string;
}

View File

@ -1,5 +0,0 @@
export interface GuideToolUserPendingViewProps
{
helpRequestDescription: string;
helpRequestAverageTime: number;
}