processAction('open_group_info') }>
-
+
-
+
{ LocalizeText('navigator.guildbase', ['groupName'], [roomInfoData.enteredGuestRoom.groupName]) }
}
@@ -142,11 +152,13 @@ export const NavigatorRoomInfoView: FC
= props =>
{ LocalizeText('navigator.embed.caption') }
-
-
-
+ { hasPermission('settings') && <>
+
+
+ > }
+ { hasPermission('staff_pick') &&
}
-
+ { hasPermission('settings') &&
}
> }
diff --git a/src/views/right-side/RightSideView.tsx b/src/views/right-side/RightSideView.tsx
index 5917174e..c503a533 100644
--- a/src/views/right-side/RightSideView.tsx
+++ b/src/views/right-side/RightSideView.tsx
@@ -1,4 +1,5 @@
import { FC } from 'react';
+import { GroupRoomInformationView } from '../groups/views/room-information/GroupRoomInformationView';
import { NotificationCenterView } from '../notification-center/NotificationCenterView';
import { PurseView } from '../purse/PurseView';
import { RightSideProps } from './RightSideView.types';
@@ -9,6 +10,7 @@ export const RightSideView: FC
= props =>
diff --git a/src/views/room/widgets/chat/message/ChatWidgetMessageView.scss b/src/views/room/widgets/chat/message/ChatWidgetMessageView.scss
index e2bbbbbf..9bdbcb6b 100644
--- a/src/views/room/widgets/chat/message/ChatWidgetMessageView.scss
+++ b/src/views/room/widgets/chat/message/ChatWidgetMessageView.scss
@@ -62,7 +62,7 @@
word-break: break-word;
max-width: 350px;
min-height: 25px;
- font-size: $font-size-sm;
+ font-size: 15px;
border-image-slice: 17 6 6 29 fill;
border-image-width: 17px 6px 6px 29px;
diff --git a/src/views/user-profile/UserProfileView.tsx b/src/views/user-profile/UserProfileView.tsx
index 796fda0d..e732b384 100644
--- a/src/views/user-profile/UserProfileView.tsx
+++ b/src/views/user-profile/UserProfileView.tsx
@@ -1,6 +1,6 @@
-import { RelationshipStatusInfoEvent, RelationshipStatusInfoMessageParser, UserCurrentBadgesComposer, UserCurrentBadgesEvent, UserProfileEvent, UserProfileParser, UserRelationshipsComposer } from '@nitrots/nitro-renderer';
+import { RelationshipStatusInfoEvent, RelationshipStatusInfoMessageParser, UserCurrentBadgesComposer, UserCurrentBadgesEvent, UserProfileComposer, UserProfileEvent, UserProfileParser, UserRelationshipsComposer } from '@nitrots/nitro-renderer';
import { FC, useCallback, useState } from 'react';
-import { LocalizeText } from '../../api';
+import { GetSessionDataManager, LocalizeText } from '../../api';
import { CreateMessageHook, SendMessageHook } from '../../hooks';
import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../layout';
import { BadgesContainerView } from './views/badges-container/BadgesContainerView';
@@ -20,6 +20,11 @@ export const UserProfileView: FC = props =>
setUserBadges([]);
setUserRelationships(null);
}, []);
+
+ const onLeaveGroup = useCallback(() =>
+ {
+ if(userProfile && userProfile.id === GetSessionDataManager().userId) SendMessageHook(new UserProfileComposer(userProfile.id));
+ }, [ userProfile ]);
const OnUserCurrentBadgesEvent = useCallback((event: UserCurrentBadgesEvent) =>
{
@@ -45,14 +50,14 @@ export const UserProfileView: FC = props =>
{
const parser = event.getParser();
- if(userProfile && userProfile.id !== parser.id)
+ if(userProfile)
{
+ setUserProfile(null);
setUserBadges([]);
setUserRelationships(null);
}
setUserProfile(parser);
- console.log(parser);
SendMessageHook(new UserCurrentBadgesComposer(parser.id));
SendMessageHook(new UserRelationshipsComposer(parser.id));
}, [userProfile]);
@@ -67,8 +72,8 @@ export const UserProfileView: FC = props =>
-
-
+
+
{
@@ -81,7 +86,7 @@ export const UserProfileView: FC = props =>
{LocalizeText('extendedprofile.rooms')}
-
+
)
diff --git a/src/views/user-profile/views/badges-container/BadgesContainerView.tsx b/src/views/user-profile/views/badges-container/BadgesContainerView.tsx
index ca698bdb..cba4e091 100644
--- a/src/views/user-profile/views/badges-container/BadgesContainerView.tsx
+++ b/src/views/user-profile/views/badges-container/BadgesContainerView.tsx
@@ -7,7 +7,7 @@ export const BadgesContainerView: FC = props =>
const { badges = null } = props;
return (
-
+
{
diff --git a/src/views/user-profile/views/groups-container/GroupsContainerView.tsx b/src/views/user-profile/views/groups-container/GroupsContainerView.tsx
index 8ea5895c..dc7ee616 100644
--- a/src/views/user-profile/views/groups-container/GroupsContainerView.tsx
+++ b/src/views/user-profile/views/groups-container/GroupsContainerView.tsx
@@ -1,19 +1,40 @@
+import { GroupInformationComposer, GroupInformationEvent, GroupInformationParser } from '@nitrots/nitro-renderer';
import classNames from 'classnames';
-import { FC, useEffect, useState } from 'react';
-import { GroupInformationView } from '../../../groups/views/GroupInformationView';
+import { FC, useCallback, useEffect, useState } from 'react';
+import { CreateMessageHook, SendMessageHook } from '../../../../hooks';
+import { GroupInformationView } from '../../../groups/views/information/GroupInformationView';
import { BadgeImageView } from '../../../shared/badge-image/BadgeImageView';
import { GroupsContainerViewProps } from './GroupsContainerView.types';
export const GroupsContainerView: FC
= props =>
{
- const { groups = null } = props;
+ const { groups = null, onLeaveGroup = null } = props;
- const [ selectedIndex, setSelectedIndex ] = useState(null);
+ const [ selectedGroupId, setSelectedGroupId ] = useState(null);
+ const [ groupInformation, setGroupInformation ] = useState(null);
+
+ const onGroupInformationEvent = useCallback((event: GroupInformationEvent) =>
+ {
+ const parser = event.getParser();
+
+ if(!selectedGroupId || selectedGroupId !== parser.id || parser.flag) return;
+
+ if(groupInformation) setGroupInformation(null);
+
+ setGroupInformation(parser);
+ }, [ groupInformation, selectedGroupId ]);
+
+ CreateMessageHook(GroupInformationEvent, onGroupInformationEvent);
useEffect(() =>
{
- if(groups.length > 0 && selectedIndex === null) setSelectedIndex(0);
- }, [ groups ]);
+ if(groups.length > 0 && !selectedGroupId) setSelectedGroupId(groups[0].id);
+ }, [ groups, selectedGroupId ]);
+
+ useEffect(() =>
+ {
+ if(selectedGroupId) SendMessageHook(new GroupInformationComposer(selectedGroupId, false));
+ }, [ selectedGroupId ]);
if(!groups) return null;
@@ -23,14 +44,14 @@ export const GroupsContainerView: FC = props =>
{ groups.map((group, index) =>
{
- return
setSelectedIndex(index) } className={ 'profile-groups-item flex-shrink-0 d-flex align-items-center justify-content-center cursor-pointer' + classNames({ ' active': selectedIndex === index }) }>
+ return
setSelectedGroupId(group.id) } className={ 'profile-groups-item flex-shrink-0 d-flex align-items-center justify-content-center cursor-pointer' + classNames({ ' active': selectedGroupId === group.id }) }>
}) }
- { selectedIndex > -1 && }
+ { groupInformation && }
);
diff --git a/src/views/user-profile/views/groups-container/GroupsContainerView.types.ts b/src/views/user-profile/views/groups-container/GroupsContainerView.types.ts
index 3402bd99..0426ca8e 100644
--- a/src/views/user-profile/views/groups-container/GroupsContainerView.types.ts
+++ b/src/views/user-profile/views/groups-container/GroupsContainerView.types.ts
@@ -3,4 +3,5 @@ import { GroupDataParser } from '@nitrots/nitro-renderer';
export interface GroupsContainerViewProps
{
groups: GroupDataParser[];
+ onLeaveGroup: () => void;
}
diff --git a/src/views/user-profile/views/user-container/UserContainerView.tsx b/src/views/user-profile/views/user-container/UserContainerView.tsx
index a9f5456f..8d024a39 100644
--- a/src/views/user-profile/views/user-container/UserContainerView.tsx
+++ b/src/views/user-profile/views/user-container/UserContainerView.tsx
@@ -6,38 +6,38 @@ import { UserContainerViewProps } from './UserContainerView.types';
export const UserContainerView: FC
= props =>
{
- const { figure = null, username = null, motto = null, creation = null, secondsSinceLastLogin = null, achievementScore, isFriend = null, isOnline = null, id = null, requestSent = null } = props;
+ const { userProfile = null } = props;
const OnlineIcon = useCallback(() =>
{
- if(isOnline) return ();
+ if(userProfile.isOnline) return ();
else return ();
- }, [isOnline]);
+ }, [ userProfile ]);
const FriendRequestComponent = useCallback(() =>
{
- if(id === GetSessionDataManager().userId) return ({LocalizeText('extendedprofile.me')} );
+ if(userProfile.id === GetSessionDataManager().userId) return ({LocalizeText('extendedprofile.me')} );
- if(isFriend) return ({LocalizeText('extendedprofile.friend')});
+ if(userProfile.isMyFriend) return ({LocalizeText('extendedprofile.friend')});
- if(requestSent) return ({LocalizeText('extendedprofile.friendrequestsent')});
+ if(userProfile.requestSent) return ({LocalizeText('extendedprofile.friendrequestsent')});
return ()
- }, [id, isFriend, requestSent]);
+ }, [ userProfile ]);
return (
-
{username}
-
{motto}
-
-
-
{LocalizeText('extendedprofile.achievementscore')} {achievementScore}
-
+
{userProfile.username}
+
{userProfile.motto}
+
+
+
{LocalizeText('extendedprofile.achievementscore')} {userProfile.achievementPoints}
+
diff --git a/src/views/user-profile/views/user-container/UserContainerView.types.ts b/src/views/user-profile/views/user-container/UserContainerView.types.ts
index 9ef01c32..88df91d4 100644
--- a/src/views/user-profile/views/user-container/UserContainerView.types.ts
+++ b/src/views/user-profile/views/user-container/UserContainerView.types.ts
@@ -1,12 +1,6 @@
-export interface UserContainerViewProps {
- id: number;
- username: string;
- figure: string;
- motto: string;
- creation: string;
- secondsSinceLastLogin: number;
- achievementScore: number;
- isFriend: boolean;
- requestSent: boolean;
- isOnline: boolean;
+import { UserProfileParser } from '@nitrots/nitro-renderer';
+
+export interface UserContainerViewProps
+{
+ userProfile: UserProfileParser;
}
diff --git a/src/views/wired/WiredView.scss b/src/views/wired/WiredView.scss
index ce1bc799..eba870c2 100644
--- a/src/views/wired/WiredView.scss
+++ b/src/views/wired/WiredView.scss
@@ -3,36 +3,52 @@
padding:7px;
.icon {
- width: 16px;
- height: 9px;
background-repeat: no-repeat;
background-position: center;
&.icon-mv-1 {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_around.png');
}
&.icon-mv-2 {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_up_down.png');
}
&.icon-mv-3 {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_left_right.png');
}
&.icon-ne {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_north_east.png');
}
&.icon-se {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_south_east.png');
}
&.icon-sw {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_south_west.png');
}
&.icon-nw {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_north_west.png');
}
&.icon-rot-1 {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_rotate_clockwise.png');
}
&.icon-rot-2 {
+ width: 16px;
+ height: 9px;
background-image: url('../../assets/images/wired/icon_wired_rotate_counter_clockwise.png');
}
}