mirror of
https://github.com/duckietm/Nitro-Cool-UI.git
synced 2025-06-21 22:36:58 +00:00
🏠 updated Room settings
This commit is contained in:
parent
6f30fe5f29
commit
2bc2a242dc
@ -3,29 +3,30 @@ import { FC, useRef } from 'react';
|
|||||||
import { LocalizeText, PlaySound, SoundNames } from '../../api';
|
import { LocalizeText, PlaySound, SoundNames } from '../../api';
|
||||||
import { DraggableWindow } from '../draggable-window';
|
import { DraggableWindow } from '../draggable-window';
|
||||||
|
|
||||||
interface LayoutMiniCameraViewProps
|
interface LayoutMiniCameraViewProps {
|
||||||
{
|
|
||||||
roomId: number;
|
roomId: number;
|
||||||
textureReceiver: (texture: NitroTexture) => Promise<void>;
|
textureReceiver: (texture: NitroTexture) => Promise<void>;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LayoutMiniCameraView: FC<LayoutMiniCameraViewProps> = props =>
|
export const LayoutMiniCameraView: FC<LayoutMiniCameraViewProps> = props => {
|
||||||
{
|
|
||||||
const { roomId = -1, textureReceiver = null, onClose = null } = props;
|
const { roomId = -1, textureReceiver = null, onClose = null } = props;
|
||||||
const elementRef = useRef<HTMLDivElement>();
|
const elementRef = useRef<HTMLDivElement>();
|
||||||
|
|
||||||
const getCameraBounds = () =>
|
const getCameraBounds = () => {
|
||||||
{
|
|
||||||
if (!elementRef || !elementRef.current) return null;
|
if (!elementRef || !elementRef.current) return null;
|
||||||
|
|
||||||
const frameBounds = elementRef.current.getBoundingClientRect();
|
const frameBounds = elementRef.current.getBoundingClientRect();
|
||||||
|
|
||||||
return new NitroRectangle(Math.floor(frameBounds.x), Math.floor(frameBounds.y), Math.floor(frameBounds.width), Math.floor(frameBounds.height));
|
return new NitroRectangle(
|
||||||
|
Math.floor(frameBounds.x),
|
||||||
|
Math.floor(frameBounds.y),
|
||||||
|
Math.floor(frameBounds.width),
|
||||||
|
Math.floor(frameBounds.height)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const takePicture = () =>
|
const takePicture = () => {
|
||||||
{
|
|
||||||
PlaySound(SoundNames.CAMERA_SHUTTER);
|
PlaySound(SoundNames.CAMERA_SHUTTER);
|
||||||
textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds()));
|
textureReceiver(GetRoomEngine().createTextureFromRoom(roomId, 1, getCameraBounds()));
|
||||||
};
|
};
|
||||||
@ -33,10 +34,38 @@ export const LayoutMiniCameraView: FC<LayoutMiniCameraViewProps> = props =>
|
|||||||
return (
|
return (
|
||||||
<DraggableWindow handleSelector=".nitro-room-thumbnail-camera">
|
<DraggableWindow handleSelector=".nitro-room-thumbnail-camera">
|
||||||
<div className="nitro-room-thumbnail-camera px-2">
|
<div className="nitro-room-thumbnail-camera px-2">
|
||||||
<div ref={ elementRef } className={ 'camera-frame' } />
|
<div
|
||||||
<div className="flex align-items-end h-full pb-2">
|
style={{
|
||||||
<button className="btn btn-sm btn-danger w-full mb-1 me-2" onClick={ onClose }>{ LocalizeText('cancel') }</button>
|
position: 'relative',
|
||||||
<button className="btn btn-sm btn-success w-full mb-1" onClick={ takePicture }>{ LocalizeText('navigator.thumbeditor.save') }</button>
|
paddingBottom: '192px', // Matches the space needed to position buttons as per the design
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div ref={elementRef} className="camera-frame" />
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
position: 'absolute',
|
||||||
|
bottom: '10px',
|
||||||
|
left: '10px',
|
||||||
|
right: '10px',
|
||||||
|
display: 'flex',
|
||||||
|
justifyContent: 'space-between',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<button
|
||||||
|
className="btn btn-sm btn-danger"
|
||||||
|
style={{ width: '80px' }}
|
||||||
|
onClick={onClose}
|
||||||
|
>
|
||||||
|
{LocalizeText('cancel')}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
className="btn btn-sm btn-success"
|
||||||
|
style={{ width: '80px' }}
|
||||||
|
onClick={takePicture}
|
||||||
|
>
|
||||||
|
{LocalizeText('navigator.thumbeditor.save')}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</DraggableWindow>
|
</DraggableWindow>
|
||||||
|
@ -59,7 +59,7 @@ export const ChatHistoryView: FC<{}> = props => {
|
|||||||
setIsVisible(false);
|
setIsVisible(false);
|
||||||
return;
|
return;
|
||||||
case 'toggle':
|
case 'toggle':
|
||||||
setIsVisible(prevValue => !prevChatLength.current);
|
setIsVisible(prevValue => !prevValue);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -74,7 +74,7 @@ export const ChatHistoryView: FC<{}> = props => {
|
|||||||
if (!isVisible) return null;
|
if (!isVisible) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NitroCardView className="w-[400px] h-[400px] nitro-chat-history" theme="primary-slim" uniqueKey="chat-history">
|
<NitroCardView className="nitro-chat-history" theme="primary-slim" uniqueKey="chat-history">
|
||||||
<NitroCardHeaderView headerText={LocalizeText('room.chathistory.button.text')} onCloseClick={event => setIsVisible(false)} />
|
<NitroCardHeaderView headerText={LocalizeText('room.chathistory.button.text')} onCloseClick={event => setIsVisible(false)} />
|
||||||
<NitroCardContentView className="nitro-card-content" gap={2} overflow="hidden" style={{ height: 'calc(100% - 40px)', display: 'flex', flexDirection: 'column' }}>
|
<NitroCardContentView className="nitro-card-content" gap={2} overflow="hidden" style={{ height: 'calc(100% - 40px)', display: 'flex', flexDirection: 'column' }}>
|
||||||
<NitroInput placeholder={LocalizeText('generic.search')} type="text" value={searchText} onChange={event => setSearchText(event.target.value)} />
|
<NitroInput placeholder={LocalizeText('generic.search')} type="text" value={searchText} onChange={event => setSearchText(event.target.value)} />
|
||||||
|
@ -1,51 +1,47 @@
|
|||||||
import { CreateLinkEvent, GetCustomRoomFilterMessageComposer, GetSessionDataManager, NavigatorSearchComposer, RoomMuteComposer, RoomSettingsComposer, SecurityLevel, ToggleStaffPickMessageComposer, UpdateHomeRoomMessageComposer } from '@nitrots/nitro-renderer';
|
import { CreateLinkEvent, GetCustomRoomFilterMessageComposer, GetSessionDataManager, NavigatorSearchComposer, RemoveOwnRoomRightsRoomMessageComposer, RoomControllerLevel, RoomMuteComposer, RoomSettingsComposer, SecurityLevel, ToggleStaffPickMessageComposer, UpdateHomeRoomMessageComposer } from '@nitrots/nitro-renderer';
|
||||||
import { FC, useEffect, useState } from 'react';
|
import { FC, useEffect, useState } from 'react';
|
||||||
import { FaLink } from 'react-icons/fa';
|
import { FaLink, FaSignOutAlt } from 'react-icons/fa';
|
||||||
import { DispatchUiEvent, GetGroupInformation, LocalizeText, ReportType, SendMessageComposer } from '../../../api';
|
import { DispatchUiEvent, GetGroupInformation, LocalizeText, ReportType, SendMessageComposer } from '../../../api';
|
||||||
import { Button, Column, Flex, LayoutBadgeImageView, LayoutRoomThumbnailView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text, UserProfileIconView } from '../../../common';
|
import { Button, Column, Flex, LayoutBadgeImageView, LayoutRoomThumbnailView, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text, UserProfileIconView } from '../../../common';
|
||||||
import { RoomWidgetThumbnailEvent } from '../../../events';
|
import { RoomWidgetThumbnailEvent } from '../../../events';
|
||||||
import { useHelp, useNavigator } from '../../../hooks';
|
import { useHelp, useNavigator, useRoom } from '../../../hooks';
|
||||||
import { classNames } from '../../../layout';
|
import { classNames } from '../../../layout';
|
||||||
|
|
||||||
export class NavigatorRoomInfoViewProps
|
export interface NavigatorRoomInfoViewProps {
|
||||||
{
|
|
||||||
onCloseClick: () => void;
|
onCloseClick: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const NavigatorRoomInfoView: FC<NavigatorRoomInfoViewProps> = props =>
|
export const NavigatorRoomInfoView: FC<NavigatorRoomInfoViewProps> = props => {
|
||||||
{
|
|
||||||
const { onCloseClick = null } = props;
|
const { onCloseClick = null } = props;
|
||||||
const [ isRoomPicked, setIsRoomPicked ] = useState(false);
|
const [ isRoomPicked, setIsRoomPicked ] = useState(false);
|
||||||
const [ isRoomMuted, setIsRoomMuted ] = useState(false);
|
const [ isRoomMuted, setIsRoomMuted ] = useState(false);
|
||||||
const { report = null } = useHelp();
|
const { report = null } = useHelp();
|
||||||
const { navigatorData = null } = useNavigator();
|
const { navigatorData = null } = useNavigator();
|
||||||
|
const { roomSession = null } = useRoom();
|
||||||
|
|
||||||
const hasPermission = (permission: string) =>
|
const hasPermission = (permission: string) => {
|
||||||
{
|
switch(permission) {
|
||||||
switch(permission)
|
|
||||||
{
|
|
||||||
case 'settings':
|
case 'settings':
|
||||||
return (GetSessionDataManager().userId === navigatorData.enteredGuestRoom.ownerId || GetSessionDataManager().isModerator);
|
return (GetSessionDataManager().userId === navigatorData.enteredGuestRoom.ownerId || GetSessionDataManager().isModerator);
|
||||||
case 'staff_pick':
|
case 'staff_pick':
|
||||||
return GetSessionDataManager().securityLevel >= SecurityLevel.COMMUNITY;
|
return GetSessionDataManager().securityLevel >= SecurityLevel.COMMUNITY;
|
||||||
|
case 'floor':
|
||||||
|
return roomSession?.controllerLevel >= RoomControllerLevel.GUEST;
|
||||||
|
case 'guest':
|
||||||
|
return roomSession?.controllerLevel === RoomControllerLevel.GUEST;
|
||||||
default: return false;
|
default: return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const processAction = (action: string, value?: string) =>
|
const processAction = (action: string, value?: string) => {
|
||||||
{
|
|
||||||
if(!navigatorData || !navigatorData.enteredGuestRoom) return;
|
if(!navigatorData || !navigatorData.enteredGuestRoom) return;
|
||||||
|
|
||||||
switch(action)
|
switch(action) {
|
||||||
{
|
|
||||||
case 'set_home_room':
|
case 'set_home_room':
|
||||||
let newRoomId = -1;
|
let newRoomId = -1;
|
||||||
|
if(navigatorData.homeRoomId !== navigatorData.enteredGuestRoom.roomId) {
|
||||||
if(navigatorData.homeRoomId !== navigatorData.enteredGuestRoom.roomId)
|
|
||||||
{
|
|
||||||
newRoomId = navigatorData.enteredGuestRoom.roomId;
|
newRoomId = navigatorData.enteredGuestRoom.roomId;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(newRoomId > 0) SendMessageComposer(new UpdateHomeRoomMessageComposer(newRoomId));
|
if(newRoomId > 0) SendMessageComposer(new UpdateHomeRoomMessageComposer(newRoomId));
|
||||||
return;
|
return;
|
||||||
case 'navigator_search_tag':
|
case 'navigator_search_tag':
|
||||||
@ -81,19 +77,19 @@ export const NavigatorRoomInfoView: FC<NavigatorRoomInfoViewProps> = props =>
|
|||||||
case 'report_room':
|
case 'report_room':
|
||||||
report(ReportType.ROOM, { roomId: navigatorData.enteredGuestRoom.roomId, roomName: navigatorData.enteredGuestRoom.roomName });
|
report(ReportType.ROOM, { roomId: navigatorData.enteredGuestRoom.roomId, roomName: navigatorData.enteredGuestRoom.roomName });
|
||||||
return;
|
return;
|
||||||
|
case 'remove_rights':
|
||||||
|
SendMessageComposer(new RemoveOwnRoomRightsRoomMessageComposer(navigatorData.enteredGuestRoom.roomId));
|
||||||
|
return;
|
||||||
case 'close':
|
case 'close':
|
||||||
onCloseClick();
|
onCloseClick();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() =>
|
useEffect(() => {
|
||||||
{
|
|
||||||
if(!navigatorData) return;
|
if(!navigatorData) return;
|
||||||
|
|
||||||
setIsRoomPicked(navigatorData.currentRoomIsStaffPick);
|
setIsRoomPicked(navigatorData.currentRoomIsStaffPick);
|
||||||
|
|
||||||
if(navigatorData.enteredGuestRoom) setIsRoomMuted(navigatorData.enteredGuestRoom.allInRoomMuted);
|
if(navigatorData.enteredGuestRoom) setIsRoomMuted(navigatorData.enteredGuestRoom.allInRoomMuted);
|
||||||
}, [ navigatorData ]);
|
}, [ navigatorData ]);
|
||||||
|
|
||||||
@ -107,39 +103,40 @@ export const NavigatorRoomInfoView: FC<NavigatorRoomInfoViewProps> = props =>
|
|||||||
<>
|
<>
|
||||||
<Flex gap={ 2 } overflow="hidden">
|
<Flex gap={ 2 } overflow="hidden">
|
||||||
<LayoutRoomThumbnailView customUrl={ navigatorData.enteredGuestRoom.officialRoomPicRef } roomId={ navigatorData.enteredGuestRoom.roomId }>
|
<LayoutRoomThumbnailView customUrl={ navigatorData.enteredGuestRoom.officialRoomPicRef } roomId={ navigatorData.enteredGuestRoom.roomId }>
|
||||||
{ hasPermission('settings') && <i className="top-0 m-1 cursor-pointer icon icon-camera-small absolute b-0 r-0" onClick={ () => processAction('open_room_thumbnail_camera') } /> }
|
{ hasPermission('settings') && <i className="top-0 m-1 cursor-pointer nitro-icon icon-camera-small absolute b-0 r-0" onClick={ () => processAction('open_room_thumbnail_camera') } /> }
|
||||||
</LayoutRoomThumbnailView>
|
</LayoutRoomThumbnailView>
|
||||||
<Column grow gap={ 1 } overflow="hidden">
|
<Column grow gap={ 1 } overflow="hidden">
|
||||||
<div className="flex gap-1">
|
<div className="flex gap-1">
|
||||||
<Column grow gap={ 1 }>
|
<Column grow gap={ 1 }>
|
||||||
<div className="flex gap-1">
|
<div className="flex gap-1">
|
||||||
<i className={ classNames('flex-shrink-0 icon icon-house-small cursor-pointer', ((navigatorData.homeRoomId !== navigatorData.enteredGuestRoom.roomId) && 'gray')) } onClick={ () => processAction('set_home_room') } />
|
<Text>{ navigatorData.enteredGuestRoom.roomName }</Text>
|
||||||
<Text bold>{ navigatorData.enteredGuestRoom.roomName }</Text>
|
|
||||||
</div>
|
</div>
|
||||||
{ navigatorData.enteredGuestRoom.showOwner &&
|
{ navigatorData.enteredGuestRoom.showOwner &&
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<Text variant="muted">{ LocalizeText('navigator.roomownercaption') }</Text>
|
<Text>{ LocalizeText('navigator.roomownercaption') }</Text>
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<UserProfileIconView userId={ navigatorData.enteredGuestRoom.ownerId } />
|
<UserProfileIconView userId={ navigatorData.enteredGuestRoom.ownerId } />
|
||||||
<Text>{ navigatorData.enteredGuestRoom.ownerName }</Text>
|
<Text>{ navigatorData.enteredGuestRoom.ownerName }</Text>
|
||||||
</div>
|
</div>
|
||||||
</div> }
|
</div> }
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
<Text variant="muted">{ LocalizeText('navigator.roomrating') }</Text>
|
<Text>{ LocalizeText('navigator.roomrating') }</Text>
|
||||||
<Text>{ navigatorData.currentRoomRating }</Text>
|
<Text>{ navigatorData.currentRoomRating }</Text>
|
||||||
</div>
|
</div>
|
||||||
{ (navigatorData.enteredGuestRoom.tags.length > 0) &&
|
{ (navigatorData.enteredGuestRoom.tags.length > 0) &&
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
{ navigatorData.enteredGuestRoom.tags.map(tag =>
|
{ navigatorData.enteredGuestRoom.tags.map(tag =>
|
||||||
{
|
<Text key={ tag } pointer className="p-1 rounded bg-muted" onClick={ event => processAction('navigator_search_tag', tag) }>#{ tag }</Text>
|
||||||
return <Text key={ tag } pointer className="p-1 rounded bg-muted" onClick={ event => processAction('navigator_search_tag', tag) }>#{ tag }</Text>;
|
) }
|
||||||
}) }
|
|
||||||
</div> }
|
</div> }
|
||||||
</Column>
|
</Column>
|
||||||
<Column alignItems="center" gap={ 1 }>
|
<Column alignItems="center" gap={ 1 }>
|
||||||
|
<i className={ classNames('flex-shrink-0 nitro-icon icon-house-small cursor-pointer', ((navigatorData.homeRoomId !== navigatorData.enteredGuestRoom.roomId) && 'gray')) } onClick={ () => processAction('set_home_room') } />
|
||||||
{ hasPermission('settings') &&
|
{ hasPermission('settings') &&
|
||||||
<i className="cursor-pointer icon icon-cog" title={ LocalizeText('navigator.room.popup.info.room.settings') } onClick={ event => processAction('open_room_settings') } /> }
|
<i className="cursor-pointer nitro-icon icon-cog" title={ LocalizeText('navigator.room.popup.info.room.settings') } onClick={ event => processAction('open_room_settings') } /> }
|
||||||
<FaLink className="cursor-pointer fa-icon" title={ LocalizeText('navigator.embed.caption') } onClick={ event => CreateLinkEvent('navigator/toggle-room-link') } />
|
<FaLink className="cursor-pointer fa-icon" title={ LocalizeText('navigator.embed.caption') } onClick={ event => processAction('toggle_room_link') } />
|
||||||
|
{ hasPermission('guest') &&
|
||||||
|
<FaSignOutAlt className="cursor-pointer fa-icon" title={ LocalizeText('navigator.roominfo.removerights.tooltip') } onClick={ event => processAction('remove_rights') } /> }
|
||||||
</Column>
|
</Column>
|
||||||
</div>
|
</div>
|
||||||
<Text overflow="auto" style={ { maxHeight: 50 } }>{ navigatorData.enteredGuestRoom.description }</Text>
|
<Text overflow="auto" style={ { maxHeight: 50 } }>{ navigatorData.enteredGuestRoom.description }</Text>
|
||||||
@ -172,9 +169,12 @@ export const NavigatorRoomInfoView: FC<NavigatorRoomInfoViewProps> = props =>
|
|||||||
{ LocalizeText('open.floor.plan.editor') }
|
{ LocalizeText('open.floor.plan.editor') }
|
||||||
</Button>
|
</Button>
|
||||||
</> }
|
</> }
|
||||||
|
{ hasPermission('floor') && !hasPermission('settings') &&
|
||||||
|
<Button onClick={ () => processAction('open_floorplan_editor') }>
|
||||||
|
{ LocalizeText('open.floor.plan.editor') }
|
||||||
|
</Button> }
|
||||||
</div>
|
</div>
|
||||||
</> }
|
</> }
|
||||||
|
|
||||||
</NitroCardContentView>
|
</NitroCardContentView>
|
||||||
</NitroCardView>
|
</NitroCardView>
|
||||||
);
|
);
|
||||||
|
@ -108,7 +108,6 @@ export const RoomToolsWidgetView: FC<{}> = props => {
|
|||||||
return (
|
return (
|
||||||
<div className="flex space-x-2 nitro-room-tools-container">
|
<div className="flex space-x-2 nitro-room-tools-container">
|
||||||
<div className="flex flex-col items-center justify-center p-2 nitro-room-tools">
|
<div className="flex flex-col items-center justify-center p-2 nitro-room-tools">
|
||||||
<div className={classNames('cursor-pointer', 'nitro-icon', (areBubblesMuted ? 'icon-chat-disablebubble' : 'icon-chat-enablebubble'))} title={areBubblesMuted ? LocalizeText('room.unmute.button.text') : LocalizeText('room.mute.button.text')} onClick={() => handleToolClick('hiddenbubbles')} />
|
|
||||||
<div className="cursor-pointer nitro-icon icon-cog" title={LocalizeText('room.settings.button.text')} onClick={() => handleToolClick('settings')} />
|
<div className="cursor-pointer nitro-icon icon-cog" title={LocalizeText('room.settings.button.text')} onClick={() => handleToolClick('settings')} />
|
||||||
<div className={classNames('cursor-pointer', 'nitro-icon', (!isZoomedIn && 'icon-zoom-less'), (isZoomedIn && 'icon-zoom-more'))} title={LocalizeText('room.zoom.button.text')} onClick={() => handleToolClick('zoom')} />
|
<div className={classNames('cursor-pointer', 'nitro-icon', (!isZoomedIn && 'icon-zoom-less'), (isZoomedIn && 'icon-zoom-more'))} title={LocalizeText('room.zoom.button.text')} onClick={() => handleToolClick('zoom')} />
|
||||||
<div className="cursor-pointer nitro-icon icon-chat-history" title={LocalizeText('room.chathistory.button.text')} onClick={() => handleToolClick('chat_history')} />
|
<div className="cursor-pointer nitro-icon icon-chat-history" title={LocalizeText('room.chathistory.button.text')} onClick={() => handleToolClick('chat_history')} />
|
||||||
@ -123,29 +122,17 @@ export const RoomToolsWidgetView: FC<{}> = props => {
|
|||||||
<div className="flex flex-col justify-center">
|
<div className="flex flex-col justify-center">
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
{isOpen && (
|
{isOpen && (
|
||||||
<motion.div
|
<motion.div initial={{ x: -100 }} animate={{ x: 0 }} exit={{ x: -100 }} transition={{ duration: 0.3 }}>
|
||||||
initial={{ x: -100 }}
|
|
||||||
animate={{ x: 0 }}
|
|
||||||
exit={{ x: -100 }}
|
|
||||||
transition={{ duration: 0.3 }}
|
|
||||||
>
|
|
||||||
<div className="flex flex-col items-center justify-center">
|
<div className="flex flex-col items-center justify-center">
|
||||||
<div className="flex flex-col px-3 py-2 rounded nitro-room-tools-info">
|
<div className="flex flex-col px-3 py-2 rounded nitro-room-tools-info">
|
||||||
<div className="flex flex-col gap-1">
|
<div className="flex flex-col gap-1">
|
||||||
<Text wrap fontSize={4} variant="white">{roomName}</Text>
|
<Text wrap fontSize={4} variant="white">{roomName}</Text>
|
||||||
<Text fontSize={5} variant="muted">{roomOwner}</Text>
|
<Text fontSize={5} variant="gray">{roomOwner}</Text>
|
||||||
</div>
|
</div>
|
||||||
{roomTags && roomTags.length > 0 && (
|
{roomTags && roomTags.length > 0 && (
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
{roomTags.map((tag, index) => (
|
{roomTags.map((tag, index) => (
|
||||||
<Text
|
<Text key={index} pointer small className="p-1 rounded bg-primary" variant="white" onClick={() => handleToolClick('navigator_search_tag', tag)}>
|
||||||
key={index}
|
|
||||||
pointer
|
|
||||||
small
|
|
||||||
className="p-1 rounded bg-primary"
|
|
||||||
variant="white"
|
|
||||||
onClick={() => handleToolClick('navigator_search_tag', tag)}
|
|
||||||
>
|
|
||||||
#{tag}
|
#{tag}
|
||||||
</Text>
|
</Text>
|
||||||
))}
|
))}
|
||||||
@ -156,22 +143,10 @@ export const RoomToolsWidgetView: FC<{}> = props => {
|
|||||||
</motion.div>
|
</motion.div>
|
||||||
)}
|
)}
|
||||||
{isOpenHistory && (
|
{isOpenHistory && (
|
||||||
<motion.div
|
<motion.div initial={{ x: -100 }} animate={{ x: 0 }} exit={{ x: -100 }} transition={{ duration: 0.3 }} className="nitro-room-tools-history">
|
||||||
initial={{ x: -100 }}
|
|
||||||
animate={{ x: 0 }}
|
|
||||||
exit={{ x: -100 }}
|
|
||||||
transition={{ duration: 0.3 }}
|
|
||||||
className="nitro-room-tools-history"
|
|
||||||
>
|
|
||||||
<div className="flex flex-col px-3 py-2 rounded nitro-room-history">
|
<div className="flex flex-col px-3 py-2 rounded nitro-room-history">
|
||||||
{roomHistory.map(history => (
|
{roomHistory.map(history => (
|
||||||
<Text
|
<Text key={history.roomId} bold={history.roomId === navigatorData.currentRoomId} variant={history.roomId === navigatorData.currentRoomId ? 'white' : 'muted'} pointer onClick={() => TryVisitRoom(history.roomId)}>
|
||||||
key={history.roomId}
|
|
||||||
bold={history.roomId === navigatorData.currentRoomId}
|
|
||||||
variant={history.roomId === navigatorData.currentRoomId ? 'white' : 'muted'}
|
|
||||||
pointer
|
|
||||||
onClick={() => TryVisitRoom(history.roomId)}
|
|
||||||
>
|
|
||||||
{history.roomName}
|
{history.roomName}
|
||||||
</Text>
|
</Text>
|
||||||
))}
|
))}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
.nitro-chat-history {
|
.nitro-chat-history {
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
|
width: 400px;
|
||||||
|
height: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nitro-chat-history .nitro-card-content {
|
.nitro-chat-history .nitro-card-content {
|
||||||
|
109
src/css/common/Buttons.css
Normal file
109
src/css/common/Buttons.css
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
.btn-sm {
|
||||||
|
min-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
resize: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Chrome, Safari, Edge, Opera */
|
||||||
|
input::-webkit-outer-spin-button,
|
||||||
|
input::-webkit-inner-spin-button {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Firefox */
|
||||||
|
input[type=number] {
|
||||||
|
-moz-appearance: textfield;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rounded {
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #3c6d82;
|
||||||
|
border: 2px solid #1a617f;
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
font-size: .7875rem;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
box-shadow: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
border: 2px solid #1a617f;
|
||||||
|
box-shadow: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-success{
|
||||||
|
color: #fff;
|
||||||
|
background-color: #3c8243;
|
||||||
|
border: 2px solid #006d09;
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
font-size: .7875rem;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
box-shadow: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-success:hover{
|
||||||
|
box-shadow: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger{
|
||||||
|
color: #fff;
|
||||||
|
background-color: #a81a12;
|
||||||
|
border: 2px solid #b9322a;
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
font-size: .7875rem;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
box-shadow: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-danger:hover{
|
||||||
|
box-shadow: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-warning{
|
||||||
|
color: #222;
|
||||||
|
background-color: #ffc107;
|
||||||
|
border: 2px solid #f3c12a;
|
||||||
|
padding: 0.25rem 0.5rem;
|
||||||
|
font-size: .7875rem;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
box-shadow: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-warning:hover{
|
||||||
|
box-shadow: none!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-dark {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #212131;
|
||||||
|
border: 2px solid #1c1c2a;
|
||||||
|
box-shadow: none!important;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 4px 11px 4px 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-dark:hover{
|
||||||
|
background-color: #212131;
|
||||||
|
border: 2px solid #1c1c2a;
|
||||||
|
box-shadow: none!important;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 4px 11px 4px 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-friendsgen{
|
||||||
|
background-color: #424354;
|
||||||
|
border: 2px solid #63647a;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-friendsgensuccess{
|
||||||
|
background-color: #b69b83;
|
||||||
|
border: 2px solid #e2c1a3;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
13
src/css/common/MiniCamera.css
Normal file
13
src/css/common/MiniCamera.css
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
.nitro-room-thumbnail-camera {
|
||||||
|
width: 132px;
|
||||||
|
height: 192px;
|
||||||
|
background-image: url('@/assets/images/room-widgets/thumbnail-widget/thumbnail-camera-spritesheet.png');
|
||||||
|
|
||||||
|
.camera-frame {
|
||||||
|
position: absolute;
|
||||||
|
width: 110px;
|
||||||
|
height: 110px;
|
||||||
|
margin-top: 30px;
|
||||||
|
margin-left: 3px;
|
||||||
|
}
|
||||||
|
}
|
@ -6,6 +6,9 @@ import './css/index.css';
|
|||||||
import './css/chat/Chats.css';
|
import './css/chat/Chats.css';
|
||||||
import './css/chat/ChatHistoryView.css';
|
import './css/chat/ChatHistoryView.css';
|
||||||
|
|
||||||
|
import './css/common/MiniCamera.css';
|
||||||
|
import './css/common/Buttons.css';
|
||||||
|
|
||||||
import './css/floorplan/FloorplanEditorView.css';
|
import './css/floorplan/FloorplanEditorView.css';
|
||||||
|
|
||||||
import './css/hotelview/HotelView.css';
|
import './css/hotelview/HotelView.css';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user