mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
@@ -45,7 +45,7 @@ export const GroupBadgeCreatorView: FC<GroupBadgeCreatorViewProps> = props =>
|
||||
|
||||
const getAvailableSymbols = () =>
|
||||
{
|
||||
const symbols = groupCustomize.badgeSymbols || [];
|
||||
const symbols = groupCustomize?.badgeSymbols || [];
|
||||
|
||||
if(selectedIndex < 0) return symbols;
|
||||
|
||||
@@ -69,7 +69,7 @@ export const GroupBadgeCreatorView: FC<GroupBadgeCreatorViewProps> = props =>
|
||||
}
|
||||
};
|
||||
|
||||
if(!badgeParts || !badgeParts.length) return null;
|
||||
if(!groupCustomize || !badgeParts || !badgeParts.length) return null;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GroupBuyComposer, GroupBuyDataComposer, GroupBuyDataEvent } from '@nitrots/nitro-renderer';
|
||||
import { GroupBadgePartsComposer, GroupBuyComposer, GroupBuyDataComposer, GroupBuyDataEvent } from '@nitrots/nitro-renderer';
|
||||
import { FC, useEffect, useState } from 'react';
|
||||
import { HasHabboClub, IGroupData, LocalizeText, SendMessageComposer } from '../../../api';
|
||||
import { Button, Column, Flex, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../common';
|
||||
@@ -119,6 +119,7 @@ export const GroupCreatorView: FC<GroupCreatorViewProps> = props =>
|
||||
});
|
||||
|
||||
SendMessageComposer(new GroupBuyDataComposer());
|
||||
SendMessageComposer(new GroupBadgePartsComposer());
|
||||
}, [ setGroupData ]);
|
||||
|
||||
if(!groupData) return null;
|
||||
@@ -131,7 +132,7 @@ export const GroupCreatorView: FC<GroupCreatorViewProps> = props =>
|
||||
{ TABS.map((tab, index) =>
|
||||
{
|
||||
return (
|
||||
<Flex key={ index } center className={ `relative -ml-[6px] bg-[url('@/assets/images/groups/creator_tabs.png')] bg-no-repeat ${ ((tab === 1) ? 'w-[84px] h-[24px] bg-position-[0px_0px]' : (tab === 4) ? 'w-[133px] h-[28px] bg-position-[0px_-104px]' : 'w-[83px] h-[24px] bg-position-[0px_-52px]') } ${ (currentTab === tab) ? 'active' : '' }` }>
|
||||
<Flex key={ index } center className={ `relative -ml-[6px] bg-[url('@/assets/images/groups/creator_tabs.png')] bg-no-repeat transition-[transform,filter,opacity] duration-150 ${ ((tab === 1) ? 'w-[84px] h-[24px] bg-position-[0px_0px]' : (tab === 4) ? 'w-[133px] h-[28px] bg-position-[0px_-104px]' : 'w-[83px] h-[24px] bg-position-[0px_-52px]') } ${ (currentTab === tab) ? 'active z-[1] scale-[1.05] brightness-110 saturate-150 drop-shadow-[0_1px_3px_rgba(0,0,0,0.4)]' : 'opacity-60 saturate-50' }` }>
|
||||
<Text variant="white">{ LocalizeText(`group.create.steplabel.${ tab }`) }</Text>
|
||||
</Flex>
|
||||
);
|
||||
|
||||
@@ -68,7 +68,9 @@ export const GroupTabBadgeView: FC<GroupTabBadgeViewProps> = props =>
|
||||
|
||||
useEffect(() =>
|
||||
{
|
||||
if(groupData.groupBadgeParts) return;
|
||||
if(groupData.groupBadgeParts && groupData.groupBadgeParts.length) return;
|
||||
|
||||
if(!groupCustomize?.badgeBases?.length || !groupCustomize?.badgePartColors?.length) return;
|
||||
|
||||
const badgeParts = [
|
||||
new GroupBadgePart(GroupBadgePart.BASE, groupCustomize.badgeBases[0].id, groupCustomize.badgePartColors[0].id),
|
||||
|
||||
@@ -20,9 +20,12 @@ export const GroupTabColorsView: FC<GroupTabColorsViewProps> = props =>
|
||||
|
||||
const getGroupColor = (colorIndex: number) =>
|
||||
{
|
||||
if(colorIndex === 0) return groupCustomize.groupColorsA.find(color => (color.id === colors[colorIndex])).color;
|
||||
if(!groupCustomize || !colors) return '000000';
|
||||
|
||||
return groupCustomize.groupColorsB.find(color => (color.id === colors[colorIndex])).color;
|
||||
const list = (colorIndex === 0) ? groupCustomize.groupColorsA : groupCustomize.groupColorsB;
|
||||
const found = list?.find(color => (color.id === colors[colorIndex]));
|
||||
|
||||
return found ? found.color : '000000';
|
||||
};
|
||||
|
||||
const selectColor = (colorIndex: number, colorId: number) =>
|
||||
@@ -64,7 +67,7 @@ export const GroupTabColorsView: FC<GroupTabColorsViewProps> = props =>
|
||||
|
||||
useEffect(() =>
|
||||
{
|
||||
if(!groupCustomize.groupColorsA || !groupCustomize.groupColorsB || groupData.groupColors) return;
|
||||
if(!groupCustomize?.groupColorsA?.length || !groupCustomize?.groupColorsB?.length || (groupData.groupColors && groupData.groupColors.length)) return;
|
||||
|
||||
const groupColors = [ groupCustomize.groupColorsA[0].id, groupCustomize.groupColorsB[0].id ];
|
||||
|
||||
@@ -108,7 +111,7 @@ export const GroupTabColorsView: FC<GroupTabColorsViewProps> = props =>
|
||||
<Column gap={ 1 } overflow="hidden" size={ 5 }>
|
||||
<Text bold>{ LocalizeText('group.edit.color.primary.color') }</Text>
|
||||
<AutoGrid columnCount={ 7 } columnMinHeight={ 16 } columnMinWidth={ 16 } gap={ 1 }>
|
||||
{ groupData.groupColors && groupCustomize.groupColorsA && groupCustomize.groupColorsA.map((item, index) =>
|
||||
{ groupData.groupColors && groupCustomize?.groupColorsA && groupCustomize.groupColorsA.map((item, index) =>
|
||||
{
|
||||
return <div key={ index } className={ classNames('relative rounded-[.25rem] w-[16px] h-[16px] bg-[#fff] border-2 border-[solid] border-[#fff] [box-shadow:inset_3px_3px_#0000001a] [box-shadow:inset_2px_2px_#0003] cursor-pointer', ((groupData.groupColors[0] === item.id) && 'bg-primary [box-shadow:none]')) } style={ { backgroundColor: '#' + item.color } } onClick={ () => selectColor(0, item.id) }></div>;
|
||||
}) }
|
||||
@@ -117,7 +120,7 @@ export const GroupTabColorsView: FC<GroupTabColorsViewProps> = props =>
|
||||
<Column gap={ 1 } overflow="hidden" size={ 5 }>
|
||||
<Text bold>{ LocalizeText('group.edit.color.secondary.color') }</Text>
|
||||
<AutoGrid columnCount={ 7 } columnMinHeight={ 16 } columnMinWidth={ 16 } gap={ 1 }>
|
||||
{ groupData.groupColors && groupCustomize.groupColorsB && groupCustomize.groupColorsB.map((item, index) =>
|
||||
{ groupData.groupColors && groupCustomize?.groupColorsB && groupCustomize.groupColorsB.map((item, index) =>
|
||||
{
|
||||
return <div key={ index } className={ classNames('relative rounded-[.25rem] w-[16px] h-[16px] bg-[#fff] border-2 border-[solid] border-[#fff] [box-shadow:inset_3px_3px_#0000001a] [box-shadow:inset_2px_2px_#0003] cursor-pointer', ((groupData.groupColors[1] === item.id) && 'bg-primary [box-shadow:none]')) } style={ { backgroundColor: '#' + item.color } } onClick={ () => selectColor(1, item.id) }></div>;
|
||||
}) }
|
||||
|
||||
@@ -292,6 +292,7 @@
|
||||
border-right: 1px solid #afafaf;
|
||||
color: #111;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.nitro-extended-profile__summary-button:first-child {
|
||||
|
||||
Reference in New Issue
Block a user