diff --git a/src/api/utils/DoElementsOverlap.ts b/src/api/utils/DoElementsOverlap.ts deleted file mode 100644 index f28b0c86..00000000 --- a/src/api/utils/DoElementsOverlap.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const DoElementsOverlap = (a: HTMLElement, b: HTMLElement) => -{ - const rectA = a.getBoundingClientRect(); - const rectB = b.getBoundingClientRect(); - - const ox = Math.abs(rectA.x - rectB.x) < (rectA.x < rectB.x ? rectB.width : rectA.width); - const oy = Math.abs(rectA.y - rectB.y) < (rectA.y < rectB.y ? rectB.height : rectA.height); - - return (ox && oy); -} diff --git a/src/api/utils/index.ts b/src/api/utils/index.ts index c63244a6..398758cb 100644 --- a/src/api/utils/index.ts +++ b/src/api/utils/index.ts @@ -1,6 +1,5 @@ export * from './CloneObject'; export * from './ColorUtils'; -export * from './DoElementsOverlap'; export * from './LocalizeBadgeDescription'; export * from './LocalizeBageName'; export * from './LocalizeFormattedNumber'; diff --git a/src/components/groups/views/GroupInformationView.tsx b/src/components/groups/views/GroupInformationView.tsx index 51ffceb7..124eb962 100644 --- a/src/components/groups/views/GroupInformationView.tsx +++ b/src/components/groups/views/GroupInformationView.tsx @@ -17,10 +17,10 @@ interface GroupInformationViewProps extends GridProps export const GroupInformationView: FC = props => { - const { groupInformation = null, onClose = null, overflow = 'hidden', ...rest } = props; + const { groupInformation = null, onClose = null, overflow = 'hidden', ...rest } = props; const isRealOwner = (groupInformation && (groupInformation.ownerName === GetSessionDataManager().userName)); - + const joinGroup = () => (groupInformation && TryJoinGroup(groupInformation.id)); const leaveGroup = () => @@ -69,7 +69,7 @@ export const GroupInformationView: FC = props => return; } - + joinGroup(); } @@ -92,9 +92,12 @@ export const GroupInformationView: FC = props => case 'furniture': CreateLinkEvent('catalog/open/' + CatalogPageName.GUILD_CUSTOM_FURNI); break; + case 'popular_groups': + CreateLinkEvent('navigator/search/groups'); + break; } }, [ groupInformation ]); - + if(!groupInformation) return null; return ( @@ -131,9 +134,9 @@ export const GroupInformationView: FC = props => handleAction('homeroom') }>{ LocalizeText('group.linktobase') } handleAction('furniture') }>{ LocalizeText('group.buyfurni') } - { LocalizeText('group.showgroups') } + handleAction('popular_groups') }>{ LocalizeText('group.showgroups') } - { (groupInformation.type !== GroupType.PRIVATE) && + { (groupInformation.type !== GroupType.PRIVATE) && } diff --git a/src/components/navigator/views/room-settings/NavigatorRoomSettingsVipChatTabView.tsx b/src/components/navigator/views/room-settings/NavigatorRoomSettingsVipChatTabView.tsx index cb6122bc..8ecb26eb 100644 --- a/src/components/navigator/views/room-settings/NavigatorRoomSettingsVipChatTabView.tsx +++ b/src/components/navigator/views/room-settings/NavigatorRoomSettingsVipChatTabView.tsx @@ -28,9 +28,9 @@ export const NavigatorRoomSettingsVipChatTabView: FC{LocalizeText('navigator.roomsettings.chat.mode.line.by.line')}