mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-23 14:40:50 +01:00
Refactor groups
This commit is contained in:
parent
a4fb7c54d2
commit
01d5e5e1be
20
src/components/groups/GroupsContext.tsx
Normal file
20
src/components/groups/GroupsContext.tsx
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { createContext, Dispatch, FC, ProviderProps, useContext } from 'react';
|
||||||
|
import { IGroupsAction, IGroupsState } from './reducers/GroupsReducer';
|
||||||
|
|
||||||
|
interface IGroupsContext
|
||||||
|
{
|
||||||
|
groupsState: IGroupsState;
|
||||||
|
dispatchGroupsState: Dispatch<IGroupsAction>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const GroupsContext = createContext<IGroupsContext>({
|
||||||
|
groupsState: null,
|
||||||
|
dispatchGroupsState: null
|
||||||
|
});
|
||||||
|
|
||||||
|
export const GroupsContextProvider: FC<ProviderProps<IGroupsContext>> = props =>
|
||||||
|
{
|
||||||
|
return <GroupsContext.Provider value={ props.value }>{ props.children }</GroupsContext.Provider>
|
||||||
|
}
|
||||||
|
|
||||||
|
export const useGroupsContext = () => useContext(GroupsContext);
|
@ -2,8 +2,8 @@ import { GroupBadgePartsEvent, GroupBuyDataEvent, GroupSettingsEvent, RoomCreate
|
|||||||
import { FC, useCallback } from 'react';
|
import { FC, useCallback } from 'react';
|
||||||
import { CreateMessageHook } from '../../hooks';
|
import { CreateMessageHook } from '../../hooks';
|
||||||
import { GroupBadgePart } from './common/GroupBadgePart';
|
import { GroupBadgePart } from './common/GroupBadgePart';
|
||||||
import { useGroupsContext } from './context/GroupsContext';
|
import { useGroupsContext } from './GroupsContext';
|
||||||
import { GroupsActions } from './context/GroupsContext.types';
|
import { GroupsActions } from './reducers/GroupsReducer';
|
||||||
|
|
||||||
function compareId(a, b)
|
function compareId(a, b)
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { GroupBadgePartsComposer, GroupPurchasedEvent, GroupSettingsComposer, ILinkEventTracker } from '@nitrots/nitro-renderer';
|
import { GroupBadgePartsComposer, GroupPurchasedEvent, GroupSettingsComposer, ILinkEventTracker } from '@nitrots/nitro-renderer';
|
||||||
import { FC, useCallback, useEffect, useReducer, useState } from 'react';
|
import { FC, useCallback, useEffect, useReducer, useState } from 'react';
|
||||||
import { AddEventLinkTracker, RemoveLinkEventTracker, TryVisitRoom } from '../../api';
|
import { AddEventLinkTracker, RemoveLinkEventTracker, TryVisitRoom } from '../../api';
|
||||||
import { CreateMessageHook, SendMessageHook } from '../../hooks';
|
import { BatchUpdates, CreateMessageHook, SendMessageHook } from '../../hooks';
|
||||||
import { GroupsContextProvider } from './context/GroupsContext';
|
import { GroupsContextProvider } from './GroupsContext';
|
||||||
import { GroupsReducer, initialGroups } from './context/GroupsContext.types';
|
|
||||||
import { GroupsMessageHandler } from './GroupsMessageHandler';
|
import { GroupsMessageHandler } from './GroupsMessageHandler';
|
||||||
|
import { GroupsReducer, initialGroups } from './reducers/GroupsReducer';
|
||||||
import { GroupCreatorView } from './views/creator/GroupCreatorView';
|
import { GroupCreatorView } from './views/creator/GroupCreatorView';
|
||||||
import { GroupInformationStandaloneView } from './views/information-standalone/GroupInformationStandaloneView';
|
import { GroupInformationStandaloneView } from './views/information-standalone/GroupInformationStandaloneView';
|
||||||
import { GroupManagerView } from './views/manager/GroupManagerView';
|
import { GroupManagerView } from './views/manager/GroupManagerView';
|
||||||
@ -12,17 +12,30 @@ import { GroupMembersView } from './views/members/GroupMembersView';
|
|||||||
|
|
||||||
export const GroupsView: FC<{}> = props =>
|
export const GroupsView: FC<{}> = props =>
|
||||||
{
|
{
|
||||||
const [ groupsState, dispatchGroupsState ] = useReducer(GroupsReducer, initialGroups);
|
|
||||||
|
|
||||||
const [ isCreatorVisible, setIsCreatorVisible ] = useState<boolean>(false);
|
const [ isCreatorVisible, setIsCreatorVisible ] = useState<boolean>(false);
|
||||||
const [ groupMembersId, setGroupMembersId ] = useState<number>(null);
|
const [ groupMembersId, setGroupMembersId ] = useState<number>(null);
|
||||||
const [ groupMembersLevel, setGroupMembersLevel ] = useState<number>(null);
|
const [ groupMembersLevel, setGroupMembersLevel ] = useState<number>(null);
|
||||||
|
const [ groupsState, dispatchGroupsState ] = useReducer(GroupsReducer, initialGroups);
|
||||||
|
|
||||||
useEffect(() =>
|
const onGroupPurchasedEvent = useCallback((event: GroupPurchasedEvent) =>
|
||||||
{
|
{
|
||||||
SendMessageHook(new GroupBadgePartsComposer());
|
const parser = event.getParser();
|
||||||
|
|
||||||
|
setIsCreatorVisible(false);
|
||||||
|
TryVisitRoom(parser.roomId);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
CreateMessageHook(GroupPurchasedEvent, onGroupPurchasedEvent);
|
||||||
|
|
||||||
|
const closeMembers = () =>
|
||||||
|
{
|
||||||
|
BatchUpdates(() =>
|
||||||
|
{
|
||||||
|
setGroupMembersId(null);
|
||||||
|
setGroupMembersLevel(null);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const linkReceived = useCallback((url: string) =>
|
const linkReceived = useCallback((url: string) =>
|
||||||
{
|
{
|
||||||
const parts = url.split('/');
|
const parts = url.split('/');
|
||||||
@ -42,9 +55,12 @@ export const GroupsView: FC<{}> = props =>
|
|||||||
case 'members':
|
case 'members':
|
||||||
if(!parts[2]) return;
|
if(!parts[2]) return;
|
||||||
|
|
||||||
setGroupMembersId(Number(parts[2]));
|
BatchUpdates(() =>
|
||||||
|
{
|
||||||
|
setGroupMembersId(Number(parts[2]));
|
||||||
|
|
||||||
if(parts[3]) setGroupMembersLevel(Number(parts[3]));
|
if(parts[3]) setGroupMembersLevel(Number(parts[3]));
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
@ -61,20 +77,9 @@ export const GroupsView: FC<{}> = props =>
|
|||||||
return () => RemoveLinkEventTracker(linkTracker);
|
return () => RemoveLinkEventTracker(linkTracker);
|
||||||
}, [ linkReceived ]);
|
}, [ linkReceived ]);
|
||||||
|
|
||||||
const onGroupPurchasedEvent = useCallback((event: GroupPurchasedEvent) =>
|
useEffect(() =>
|
||||||
{
|
{
|
||||||
const parser = event.getParser();
|
SendMessageHook(new GroupBadgePartsComposer());
|
||||||
|
|
||||||
setIsCreatorVisible(false);
|
|
||||||
TryVisitRoom(parser.roomId);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
CreateMessageHook(GroupPurchasedEvent, onGroupPurchasedEvent);
|
|
||||||
|
|
||||||
const closeMembers = useCallback(() =>
|
|
||||||
{
|
|
||||||
setGroupMembersId(null);
|
|
||||||
setGroupMembersLevel(null);
|
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
import { createContext, FC, useContext } from 'react';
|
|
||||||
import { GroupsContextProps, IGroupsContext } from './GroupsContext.types';
|
|
||||||
|
|
||||||
const GroupsContext = createContext<IGroupsContext>({
|
|
||||||
groupsState: null,
|
|
||||||
dispatchGroupsState: null
|
|
||||||
});
|
|
||||||
|
|
||||||
export const GroupsContextProvider: FC<GroupsContextProps> = props =>
|
|
||||||
{
|
|
||||||
return <GroupsContext.Provider value={ props.value }>{ props.children }</GroupsContext.Provider>
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useGroupsContext = () => useContext(GroupsContext);
|
|
@ -1,17 +1,6 @@
|
|||||||
import { Dispatch, ProviderProps, Reducer } from 'react';
|
import { Reducer } from 'react';
|
||||||
import { GroupBadgePart } from '../common/GroupBadgePart';
|
import { GroupBadgePart } from '../common/GroupBadgePart';
|
||||||
|
|
||||||
export interface IGroupsContext
|
|
||||||
{
|
|
||||||
groupsState: IGroupsState;
|
|
||||||
dispatchGroupsState: Dispatch<IGroupsAction>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface GroupsContextProps extends ProviderProps<IGroupsContext>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IGroupsState
|
export interface IGroupsState
|
||||||
{
|
{
|
||||||
availableRooms: { id: number, name: string }[];
|
availableRooms: { id: number, name: string }[];
|
@ -1,7 +1,7 @@
|
|||||||
import { FC, useCallback } from 'react';
|
import { FC, useCallback } from 'react';
|
||||||
import { LocalizeText } from '../../../../../api';
|
import { LocalizeText } from '../../../../api';
|
||||||
import { BadgeImageView } from '../../../../../views/shared/badge-image/BadgeImageView';
|
import { BadgeImageView } from '../../../../views/shared/badge-image/BadgeImageView';
|
||||||
import { useGroupsContext } from '../../../context/GroupsContext';
|
import { useGroupsContext } from '../../GroupsContext';
|
||||||
|
|
||||||
export const GroupCreatorTabConfirmationView: FC<{}> = props =>
|
export const GroupCreatorTabConfirmationView: FC<{}> = props =>
|
||||||
{
|
{
|
@ -5,16 +5,21 @@ import { Button } from 'react-bootstrap';
|
|||||||
import { HasHabboClub, LocalizeText } from '../../../../api';
|
import { HasHabboClub, LocalizeText } from '../../../../api';
|
||||||
import { SendMessageHook } from '../../../../hooks';
|
import { SendMessageHook } from '../../../../hooks';
|
||||||
import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout';
|
import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout';
|
||||||
import { useGroupsContext } from '../../context/GroupsContext';
|
import { useGroupsContext } from '../../GroupsContext';
|
||||||
import { GroupsActions } from '../../context/GroupsContext.types';
|
import { GroupsActions } from '../../reducers/GroupsReducer';
|
||||||
import { GroupSharedTabBadgeView } from '../shared-tabs/tab-badge/GroupSharedTabBadgeView';
|
import { GroupSharedTabBadgeView } from '../shared-tabs/GroupSharedTabBadgeView';
|
||||||
import { GroupSharedTabColorsView } from '../shared-tabs/tab-colors/GroupSharedTabColorsView';
|
import { GroupSharedTabColorsView } from '../shared-tabs/GroupSharedTabColorsView';
|
||||||
import { GroupSharedTabIdentityView } from '../shared-tabs/tab-identity/GroupSharedTabIdentityView';
|
import { GroupSharedTabIdentityView } from '../shared-tabs/GroupSharedTabIdentityView';
|
||||||
import { GroupCreatorViewProps } from './GroupCreatorView.types';
|
import { GroupCreatorTabConfirmationView } from './GroupCreatorTabConfirmationView';
|
||||||
import { GroupCreatorTabConfirmationView } from './tab-confirmation/GroupCreatorTabConfirmationView';
|
|
||||||
|
|
||||||
const TABS: number[] = [1, 2, 3, 4];
|
const TABS: number[] = [1, 2, 3, 4];
|
||||||
|
|
||||||
|
interface GroupCreatorViewProps
|
||||||
|
{
|
||||||
|
isVisible: boolean;
|
||||||
|
onClose: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
export const GroupCreatorView: FC<GroupCreatorViewProps> = props =>
|
export const GroupCreatorView: FC<GroupCreatorViewProps> = props =>
|
||||||
{
|
{
|
||||||
const { groupsState = null, dispatchGroupsState = null } = useGroupsContext();
|
const { groupsState = null, dispatchGroupsState = null } = useGroupsContext();
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
export interface GroupCreatorViewProps
|
|
||||||
{
|
|
||||||
isVisible: boolean;
|
|
||||||
onClose: () => void;
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
import { GroupRemoveMemberComposer } from '@nitrots/nitro-renderer';
|
import { GroupInformationParser, GroupRemoveMemberComposer } from '@nitrots/nitro-renderer';
|
||||||
import { FC, useCallback } from 'react';
|
import { FC, useCallback } from 'react';
|
||||||
import { CreateLinkEvent, GetSessionDataManager, LocalizeText, TryVisitRoom } from '../../../../api';
|
import { CreateLinkEvent, GetSessionDataManager, LocalizeText, TryVisitRoom } from '../../../../api';
|
||||||
import { GetGroupManager } from '../../../../api/groups/GetGroupManager';
|
import { GetGroupManager } from '../../../../api/groups/GetGroupManager';
|
||||||
@ -9,7 +9,13 @@ import { BadgeImageView } from '../../../../views/shared/badge-image/BadgeImageV
|
|||||||
import { CatalogPageName } from '../../../catalog/common/CatalogPageName';
|
import { CatalogPageName } from '../../../catalog/common/CatalogPageName';
|
||||||
import { GroupMembershipType } from '../../common/GroupMembershipType';
|
import { GroupMembershipType } from '../../common/GroupMembershipType';
|
||||||
import { GroupType } from '../../common/GroupType';
|
import { GroupType } from '../../common/GroupType';
|
||||||
import { GroupInformationViewProps } from './GroupInformationView.types';
|
|
||||||
|
interface GroupInformationViewProps
|
||||||
|
{
|
||||||
|
groupInformation: GroupInformationParser;
|
||||||
|
onJoin?: () => void;
|
||||||
|
onClose?: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
export const GroupInformationView: FC<GroupInformationViewProps> = props =>
|
export const GroupInformationView: FC<GroupInformationViewProps> = props =>
|
||||||
{
|
{
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
import { GroupInformationParser } from '@nitrots/nitro-renderer';
|
|
||||||
|
|
||||||
export interface GroupInformationViewProps
|
|
||||||
{
|
|
||||||
groupInformation: GroupInformationParser;
|
|
||||||
onJoin?: () => void;
|
|
||||||
onClose?: () => void;
|
|
||||||
}
|
|
@ -3,11 +3,11 @@ import { FC, useCallback, useState } from 'react';
|
|||||||
import { LocalizeText } from '../../../../api';
|
import { LocalizeText } from '../../../../api';
|
||||||
import { SendMessageHook } from '../../../../hooks';
|
import { SendMessageHook } from '../../../../hooks';
|
||||||
import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../layout';
|
import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../../../layout';
|
||||||
import { useGroupsContext } from '../../context/GroupsContext';
|
import { useGroupsContext } from '../../GroupsContext';
|
||||||
import { GroupsActions } from '../../context/GroupsContext.types';
|
import { GroupsActions } from '../../reducers/GroupsReducer';
|
||||||
import { GroupSharedTabBadgeView } from '../shared-tabs/tab-badge/GroupSharedTabBadgeView';
|
import { GroupSharedTabBadgeView } from '../shared-tabs/GroupSharedTabBadgeView';
|
||||||
import { GroupSharedTabColorsView } from '../shared-tabs/tab-colors/GroupSharedTabColorsView';
|
import { GroupSharedTabColorsView } from '../shared-tabs/GroupSharedTabColorsView';
|
||||||
import { GroupSharedTabIdentityView } from '../shared-tabs/tab-identity/GroupSharedTabIdentityView';
|
import { GroupSharedTabIdentityView } from '../shared-tabs/GroupSharedTabIdentityView';
|
||||||
import { GroupManagerTabSettingsView } from './tab-settings/GroupManagerTabSettingsView';
|
import { GroupManagerTabSettingsView } from './tab-settings/GroupManagerTabSettingsView';
|
||||||
|
|
||||||
const TABS: number[] = [1, 2, 3, 5];
|
const TABS: number[] = [1, 2, 3, 5];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { FC, useCallback } from 'react';
|
import { FC, useCallback } from 'react';
|
||||||
import { LocalizeText } from '../../../../../api/utils/LocalizeText';
|
import { LocalizeText } from '../../../../../api/utils/LocalizeText';
|
||||||
import { useGroupsContext } from '../../../context/GroupsContext';
|
import { useGroupsContext } from '../../../GroupsContext';
|
||||||
import { GroupsActions } from '../../../context/GroupsContext.types';
|
import { GroupsActions } from '../../../reducers/GroupsReducer';
|
||||||
|
|
||||||
const STATES: string[] = ['regular', 'exclusive', 'private'];
|
const STATES: string[] = ['regular', 'exclusive', 'private'];
|
||||||
|
|
||||||
|
@ -6,7 +6,14 @@ import { CreateMessageHook, SendMessageHook } from '../../../../hooks';
|
|||||||
import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout';
|
import { NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../../../layout';
|
||||||
import { AvatarImageView } from '../../../../views/shared/avatar-image/AvatarImageView';
|
import { AvatarImageView } from '../../../../views/shared/avatar-image/AvatarImageView';
|
||||||
import { BadgeImageView } from '../../../../views/shared/badge-image/BadgeImageView';
|
import { BadgeImageView } from '../../../../views/shared/badge-image/BadgeImageView';
|
||||||
import { GroupMembersViewProps } from './GroupMembersView.types';
|
|
||||||
|
interface GroupMembersViewProps
|
||||||
|
{
|
||||||
|
groupId: number;
|
||||||
|
levelId: number;
|
||||||
|
onClose: () => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export const GroupMembersView: FC<GroupMembersViewProps> = props =>
|
export const GroupMembersView: FC<GroupMembersViewProps> = props =>
|
||||||
{
|
{
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
export interface GroupMembersViewProps
|
|
||||||
{
|
|
||||||
groupId: number;
|
|
||||||
levelId: number;
|
|
||||||
onClose: () => void;
|
|
||||||
}
|
|
@ -1,13 +1,17 @@
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { FC, useCallback, useEffect, useState } from 'react';
|
import { FC, useCallback, useEffect, useState } from 'react';
|
||||||
import { BadgeImageView } from '../../../../../views/shared/badge-image/BadgeImageView';
|
import { BadgeImageView } from '../../../../views/shared/badge-image/BadgeImageView';
|
||||||
import { GroupBadgePart } from '../../../common/GroupBadgePart';
|
import { GroupBadgePart } from '../../common/GroupBadgePart';
|
||||||
import { useGroupsContext } from '../../../context/GroupsContext';
|
import { useGroupsContext } from '../../GroupsContext';
|
||||||
import { GroupsActions } from '../../../context/GroupsContext.types';
|
import { GroupsActions } from '../../reducers/GroupsReducer';
|
||||||
import { GroupSharedTabBadgeViewProps } from './GroupSharedTabBadgeView.types';
|
|
||||||
|
|
||||||
const POSITIONS: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8];
|
const POSITIONS: number[] = [0, 1, 2, 3, 4, 5, 6, 7, 8];
|
||||||
|
|
||||||
|
interface GroupSharedTabBadgeViewProps
|
||||||
|
{
|
||||||
|
skipDefault?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export const GroupSharedTabBadgeView: FC<GroupSharedTabBadgeViewProps> = props =>
|
export const GroupSharedTabBadgeView: FC<GroupSharedTabBadgeViewProps> = props =>
|
||||||
{
|
{
|
||||||
const { groupsState = null, dispatchGroupsState = null } = useGroupsContext();
|
const { groupsState = null, dispatchGroupsState = null } = useGroupsContext();
|
@ -1,8 +1,8 @@
|
|||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { FC, useCallback, useEffect, useState } from 'react';
|
import { FC, useCallback, useEffect, useState } from 'react';
|
||||||
import { LocalizeText } from '../../../../../api';
|
import { LocalizeText } from '../../../../api';
|
||||||
import { useGroupsContext } from '../../../context/GroupsContext';
|
import { useGroupsContext } from '../../GroupsContext';
|
||||||
import { GroupsActions } from '../../../context/GroupsContext.types';
|
import { GroupsActions } from '../../reducers/GroupsReducer';
|
||||||
|
|
||||||
export const GroupSharedTabColorsView: FC<{}> = props =>
|
export const GroupSharedTabColorsView: FC<{}> = props =>
|
||||||
{
|
{
|
@ -1,8 +1,12 @@
|
|||||||
import { FC, useCallback } from 'react';
|
import { FC, useCallback } from 'react';
|
||||||
import { CreateLinkEvent, LocalizeText } from '../../../../../api';
|
import { CreateLinkEvent, LocalizeText } from '../../../../api';
|
||||||
import { useGroupsContext } from '../../../context/GroupsContext';
|
import { useGroupsContext } from '../../GroupsContext';
|
||||||
import { GroupsActions } from '../../../context/GroupsContext.types';
|
import { GroupsActions } from '../../reducers/GroupsReducer';
|
||||||
import { GroupSharedTabIdentityViewProps } from './GroupSharedTabIdentityView.types';
|
|
||||||
|
interface GroupSharedTabIdentityViewProps
|
||||||
|
{
|
||||||
|
isCreator?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
export const GroupSharedTabIdentityView: FC<GroupSharedTabIdentityViewProps> = props =>
|
export const GroupSharedTabIdentityView: FC<GroupSharedTabIdentityViewProps> = props =>
|
||||||
{
|
{
|
@ -26,5 +26,54 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@import './tab-badge/GroupSharedTabBadgeView';
|
.shared-tab-badge {
|
||||||
@import './tab-colors/GroupSharedTabColorsView';
|
.position-swatch {
|
||||||
|
position: relative;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
background: $white;
|
||||||
|
border: 2px solid $white;
|
||||||
|
box-shadow: inset 3px 3px rgba(0, 0, 0, .1);
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background: $primary;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.color-swatch {
|
||||||
|
position: relative;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
border: 2px solid $white;
|
||||||
|
box-shadow: inset 3px 3px rgba(0, 0, 0, .1);
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.selection-list {
|
||||||
|
height: 160px;
|
||||||
|
min-height: 160px;
|
||||||
|
max-height: 160px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.shared-tab-colors {
|
||||||
|
|
||||||
|
.color-swatch {
|
||||||
|
position: relative;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
border: 2px solid $white;
|
||||||
|
box-shadow: inset 2px 2px rgba(0, 0, 0, .2);
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
.shared-tab-badge {
|
|
||||||
.position-swatch {
|
|
||||||
position: relative;
|
|
||||||
border-radius: $border-radius;
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
background: $white;
|
|
||||||
border: 2px solid $white;
|
|
||||||
box-shadow: inset 3px 3px rgba(0, 0, 0, .1);
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
background: $primary;
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.color-swatch {
|
|
||||||
position: relative;
|
|
||||||
border-radius: $border-radius;
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
border: 2px solid $white;
|
|
||||||
box-shadow: inset 3px 3px rgba(0, 0, 0, .1);
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.selection-list {
|
|
||||||
height: 160px;
|
|
||||||
min-height: 160px;
|
|
||||||
max-height: 160px;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export interface GroupSharedTabBadgeViewProps
|
|
||||||
{
|
|
||||||
skipDefault?: boolean;
|
|
||||||
}
|
|
@ -1,15 +0,0 @@
|
|||||||
.shared-tab-colors {
|
|
||||||
|
|
||||||
.color-swatch {
|
|
||||||
position: relative;
|
|
||||||
border-radius: $border-radius;
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
border: 2px solid $white;
|
|
||||||
box-shadow: inset 2px 2px rgba(0, 0, 0, .2);
|
|
||||||
|
|
||||||
&.active {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +0,0 @@
|
|||||||
export interface GroupSharedTabIdentityViewProps
|
|
||||||
{
|
|
||||||
isCreator?: boolean;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user