mirror of
https://github.com/duckietm/Nitro-Cool-UI.git
synced 2025-06-21 22:36:58 +00:00
Fix the Hide Chat ballons
This commit is contained in:
parent
8baad70c56
commit
7bb61c01e9
@ -27,6 +27,11 @@ Credits: Thanks to wassehk on discord for this release.
|
||||
- Update `camera.url, thumbnails.url, url.prefix, habbopages.url`
|
||||
- You can override any variable by passing it to `NitroConfig` in the index.html
|
||||
|
||||
- Make the following changes
|
||||
- ExternalTesxts.json
|
||||
`"room.mute.button.text": "Hide chat",`
|
||||
`"room.unmute.button.text": "Unhide chat",`
|
||||
|
||||
## Usage
|
||||
|
||||
- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions
|
||||
|
@ -17,6 +17,7 @@ export const RoomToolsWidgetView: FC<{}> = props =>
|
||||
const { navigatorData = null } = useNavigator();
|
||||
const { roomSession = null } = useRoom();
|
||||
const roomHistoryRef = useRef(null);
|
||||
const [areBubblesMuted, setAreBubblesMuted] = useState(false);
|
||||
|
||||
const roomsetthidebot = () => {
|
||||
setIsOpenHistory(false);
|
||||
@ -73,12 +74,19 @@ export const RoomToolsWidgetView: FC<{}> = props =>
|
||||
},
|
||||
'chat_history': () => CreateLinkEvent('chat-history/toggle'),
|
||||
'hiddenbubbles': () => {
|
||||
CreateLinkEvent('nitrobubblehidden/toggle');
|
||||
const bubbleElement = document.getElementById('bubble');
|
||||
if (bubbleElement) {
|
||||
bubbleElement.classList.toggle('icon-chat-disablebubble');
|
||||
}
|
||||
},
|
||||
CreateLinkEvent('nitrobubblehidden/toggle');
|
||||
const bubbleElement = document.getElementById('bubble');
|
||||
if (bubbleElement) {
|
||||
bubbleElement.classList.toggle('icon-chat-disablebubble');
|
||||
}
|
||||
const newText = areBubblesMuted ? LocalizeText('room.unmute.button.text') : LocalizeText('room.mute.button.text');
|
||||
document.getElementById('hiddenbubblesText').innerText = newText;
|
||||
setAreBubblesMuted(!areBubblesMuted);
|
||||
const bubbleIcon = document.getElementById('bubbleIcon');
|
||||
if (bubbleIcon) {
|
||||
bubbleIcon.classList.toggle('icon-chat-disablebubble');
|
||||
}
|
||||
},
|
||||
'like_room': () => SendMessageComposer(new RateFlatMessageComposer(1)),
|
||||
'toggle_room_link': () => CreateLinkEvent('navigator/toggle-room-link'),
|
||||
'navigator_search_tag': (tag: string) => {
|
||||
@ -173,10 +181,12 @@ export const RoomToolsWidgetView: FC<{}> = props =>
|
||||
<div className="texticonright" onClick={ () => handleToolClick('chat_history') } title={ LocalizeText('room.chathistory.button.text') }>{LocalizeText('room.chathistory.button.text')}</div>
|
||||
</div>
|
||||
|
||||
<div className="gridinforooms">
|
||||
<Base id="bubble" pointer title={ LocalizeText('room.mute.button.texte') } onClick={ () => handleToolClick('hiddenbubbles') } className="iconleftgen icon icon-chat-enablebubble"/>
|
||||
<div className="texticonright" onClick={ () => handleToolClick('hiddenbubbles') } title={ LocalizeText('room.mute.button.text') }>{LocalizeText('room.mute.button.text')}</div>
|
||||
</div>
|
||||
<div className="gridinforooms">
|
||||
<Base id="bubble" pointer title={areBubblesMuted ? LocalizeText('room.unmute.button.text') : LocalizeText('room.mute.button.text')} onClick={() => handleToolClick('hiddenbubbles')} className={areBubblesMuted ? "iconleftgen icon icon-chat-disablebubble" : "iconleftgen icon icon-chat-enablebubble"} />
|
||||
<div id="hiddenbubblesText" className="texticonright" onClick={() => handleToolClick('hiddenbubbles')} title={areBubblesMuted ? LocalizeText('room.unmute.button.text') : LocalizeText('room.mute.button.text')}>
|
||||
{areBubblesMuted ? LocalizeText('room.unmute.button.text') : LocalizeText('room.mute.button.text')}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{ navigatorData.canRate &&
|
||||
<div className="gridinforooms">
|
||||
|
Loading…
x
Reference in New Issue
Block a user