mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Merge branch 'dev' of https://git.krews.org/nitro/nitro-react into dev
This commit is contained in:
commit
c27f4d7db1
@ -1,8 +1,9 @@
|
|||||||
import { ChatRecordData, UserProfileComposer } from '@nitrots/nitro-renderer';
|
import { ChatRecordData } from '@nitrots/nitro-renderer';
|
||||||
import { CSSProperties, FC, Key, useCallback } from 'react';
|
import { CSSProperties, FC, Key, useCallback } from 'react';
|
||||||
import { AutoSizer, CellMeasurer, CellMeasurerCache, List, ListRowProps } from 'react-virtualized';
|
import { AutoSizer, CellMeasurer, CellMeasurerCache, List, ListRowProps } from 'react-virtualized';
|
||||||
import { SendMessageComposer, TryVisitRoom } from '../../../../api';
|
import { TryVisitRoom } from '../../../../api';
|
||||||
import { Base, Button, Column, Flex, Grid, Text } from '../../../../common';
|
import { Base, Button, Column, Flex, Grid, Text } from '../../../../common';
|
||||||
|
import { ModToolsOpenUserInfoEvent } from '../../../../events';
|
||||||
import { ModToolsOpenRoomInfoEvent } from '../../../../events/mod-tools/ModToolsOpenRoomInfoEvent';
|
import { ModToolsOpenRoomInfoEvent } from '../../../../events/mod-tools/ModToolsOpenRoomInfoEvent';
|
||||||
import { DispatchUiEvent } from '../../../../hooks';
|
import { DispatchUiEvent } from '../../../../hooks';
|
||||||
|
|
||||||
@ -29,7 +30,7 @@ export const ChatlogView: FC<ChatlogViewProps> = props =>
|
|||||||
>
|
>
|
||||||
<Grid key={ props.key } fullHeight={ false } style={ props.style } gap={ 1 } alignItems="center" className="log-entry py-1 border-bottom">
|
<Grid key={ props.key } fullHeight={ false } style={ props.style } gap={ 1 } alignItems="center" className="log-entry py-1 border-bottom">
|
||||||
<Text className="g-col-2">{ chatlogEntry.timestamp }</Text>
|
<Text className="g-col-2">{ chatlogEntry.timestamp }</Text>
|
||||||
<Text className="g-col-3" bold underline pointer onClick={ event => SendMessageComposer(new UserProfileComposer(chatlogEntry.userId)) }>{ chatlogEntry.userName }</Text>
|
<Text className="g-col-3" bold underline pointer onClick={ event => DispatchUiEvent(new ModToolsOpenUserInfoEvent(chatlogEntry.userId)) }>{ chatlogEntry.userName }</Text>
|
||||||
<Text textBreak wrap className="g-col-7">{ chatlogEntry.message }</Text>
|
<Text textBreak wrap className="g-col-7">{ chatlogEntry.message }</Text>
|
||||||
</Grid>
|
</Grid>
|
||||||
</CellMeasurer>
|
</CellMeasurer>
|
||||||
@ -79,7 +80,7 @@ export const ChatlogView: FC<ChatlogViewProps> = props =>
|
|||||||
{ !isRoomInfo &&
|
{ !isRoomInfo &&
|
||||||
<Grid key={ props.key } fullHeight={ false } style={ props.style } gap={ 1 } alignItems="center" className="log-entry py-1 border-bottom">
|
<Grid key={ props.key } fullHeight={ false } style={ props.style } gap={ 1 } alignItems="center" className="log-entry py-1 border-bottom">
|
||||||
<Text className="g-col-2">{ chatlogEntry.timestamp }</Text>
|
<Text className="g-col-2">{ chatlogEntry.timestamp }</Text>
|
||||||
<Text className="g-col-3" bold underline pointer onClick={ event => SendMessageComposer(new UserProfileComposer(chatlogEntry.userId)) }>{ chatlogEntry.userName }</Text>
|
<Text className="g-col-3" bold underline pointer onClick={ event => DispatchUiEvent(new ModToolsOpenUserInfoEvent(chatlogEntry.userId)) }>{ chatlogEntry.userName }</Text>
|
||||||
<Text textBreak wrap className="g-col-7">{ chatlogEntry.message }</Text>
|
<Text textBreak wrap className="g-col-7">{ chatlogEntry.message }</Text>
|
||||||
</Grid> }
|
</Grid> }
|
||||||
</CellMeasurer>
|
</CellMeasurer>
|
||||||
|
@ -258,34 +258,34 @@ export const AvatarInfoWidgetOwnAvatarView: FC<AvatarInfoWidgetOwnAvatarViewProp
|
|||||||
<ContextMenuListItemView onClick={ event => processAction('sign_10') }>
|
<ContextMenuListItemView onClick={ event => processAction('sign_10') }>
|
||||||
10
|
10
|
||||||
</ContextMenuListItemView>
|
</ContextMenuListItemView>
|
||||||
|
<ContextMenuListItemView onClick={ event => processAction('sign_11') }>
|
||||||
|
<i className="icon icon-sign-heart" />
|
||||||
|
</ContextMenuListItemView>
|
||||||
|
<ContextMenuListItemView onClick={ event => processAction('sign_12') }>
|
||||||
|
<i className="icon icon-sign-skull" />
|
||||||
|
</ContextMenuListItemView>
|
||||||
|
</Flex>
|
||||||
|
<Flex className="menu-list-split-3">
|
||||||
<ContextMenuListItemView onClick={ event => processAction('sign_0') }>
|
<ContextMenuListItemView onClick={ event => processAction('sign_0') }>
|
||||||
0
|
0
|
||||||
</ContextMenuListItemView>
|
</ContextMenuListItemView>
|
||||||
|
<ContextMenuListItemView onClick={ event => processAction('sign_13') }>
|
||||||
|
<i className="icon icon-sign-exclamation" />
|
||||||
|
</ContextMenuListItemView>
|
||||||
<ContextMenuListItemView onClick={ event => processAction('sign_15') }>
|
<ContextMenuListItemView onClick={ event => processAction('sign_15') }>
|
||||||
<i className="icon icon-sign-smile" />
|
<i className="icon icon-sign-smile" />
|
||||||
</ContextMenuListItemView>
|
</ContextMenuListItemView>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Flex className="menu-list-split-3">
|
<Flex className="menu-list-split-3">
|
||||||
<ContextMenuListItemView onClick={ event => processAction('sign_12') }>
|
|
||||||
<i className="icon icon-sign-skull" />
|
|
||||||
</ContextMenuListItemView>
|
|
||||||
<ContextMenuListItemView onClick={ event => processAction('sign_14') }>
|
<ContextMenuListItemView onClick={ event => processAction('sign_14') }>
|
||||||
<i className="icon icon-sign-soccer" />
|
<i className="icon icon-sign-soccer" />
|
||||||
</ContextMenuListItemView>
|
</ContextMenuListItemView>
|
||||||
<ContextMenuListItemView onClick={ event => processAction('sign_17') }>
|
<ContextMenuListItemView onClick={ event => processAction('sign_17') }>
|
||||||
<i className="icon icon-sign-yellow" />
|
<i className="icon icon-sign-yellow" />
|
||||||
</ContextMenuListItemView>
|
</ContextMenuListItemView>
|
||||||
</Flex>
|
|
||||||
<Flex className="menu-list-split-3">
|
|
||||||
<ContextMenuListItemView onClick={ event => processAction('sign_16') }>
|
<ContextMenuListItemView onClick={ event => processAction('sign_16') }>
|
||||||
<i className="icon icon-sign-red" />
|
<i className="icon icon-sign-red" />
|
||||||
</ContextMenuListItemView>
|
</ContextMenuListItemView>
|
||||||
<ContextMenuListItemView onClick={ event => processAction('sign_13') }>
|
|
||||||
<i className="icon icon-sign-exclamation" />
|
|
||||||
</ContextMenuListItemView>
|
|
||||||
<ContextMenuListItemView onClick={ event => processAction('sign_11') }>
|
|
||||||
<i className="icon icon-sign-heart" />
|
|
||||||
</ContextMenuListItemView>
|
|
||||||
</Flex>
|
</Flex>
|
||||||
<ContextMenuListItemView onClick={ event => processAction('back') }>
|
<ContextMenuListItemView onClick={ event => processAction('back') }>
|
||||||
<FontAwesomeIcon icon="chevron-left" className="left" />
|
<FontAwesomeIcon icon="chevron-left" className="left" />
|
||||||
|
@ -14,7 +14,7 @@ export const ChatWidgetMessageView: FC<ChatWidgetMessageViewProps> = props =>
|
|||||||
const [ isVisible, setIsVisible ] = useState(false);
|
const [ isVisible, setIsVisible ] = useState(false);
|
||||||
const elementRef = useRef<HTMLDivElement>();
|
const elementRef = useRef<HTMLDivElement>();
|
||||||
|
|
||||||
const onMouseDown = (event: MouseEvent<HTMLDivElement>) => ((event.shiftKey) && onChatClicked(chat));
|
const onMouseDown = (event: MouseEvent<HTMLDivElement>) => onChatClicked(chat);
|
||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ export const ChatWidgetMessageView: FC<ChatWidgetMessageViewProps> = props =>
|
|||||||
useEffect(() => setIsVisible(chat.visible), [ chat.visible ]);
|
useEffect(() => setIsVisible(chat.visible), [ chat.visible ]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={ elementRef } className="bubble-container" style={ { visibility: (isVisible ? 'visible' : 'hidden') } } onMouseDown={ onMouseDown }>
|
<div ref={ elementRef } className="bubble-container" style={ { visibility: (isVisible ? 'visible' : 'hidden') } } onClick={ onMouseDown }>
|
||||||
{ (chat.styleId === 0) && <div className="user-container-bg" style={ { backgroundColor: chat.color } } /> }
|
{ (chat.styleId === 0) && <div className="user-container-bg" style={ { backgroundColor: chat.color } } /> }
|
||||||
<div className={ 'chat-bubble bubble-' + chat.styleId + ' type-' + chat.type }>
|
<div className={ 'chat-bubble bubble-' + chat.styleId + ' type-' + chat.type }>
|
||||||
<div className="user-container">
|
<div className="user-container">
|
||||||
|
@ -39,11 +39,6 @@
|
|||||||
// -webkit-animation-name: bounceIn;
|
// -webkit-animation-name: bounceIn;
|
||||||
// animation-name: bounceIn;
|
// animation-name: bounceIn;
|
||||||
|
|
||||||
&:hover,
|
|
||||||
&:active {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user-container-bg {
|
.user-container-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -1px;
|
top: -1px;
|
||||||
|
Loading…
Reference in New Issue
Block a user