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`
|
- Update `camera.url, thumbnails.url, url.prefix, habbopages.url`
|
||||||
- You can override any variable by passing it to `NitroConfig` in the index.html
|
- 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
|
## Usage
|
||||||
|
|
||||||
- To use Nitro you need `.nitro` assets generated, see [nitro-converter](https://git.krews.org/nitro/nitro-converter) for instructions
|
- 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 { navigatorData = null } = useNavigator();
|
||||||
const { roomSession = null } = useRoom();
|
const { roomSession = null } = useRoom();
|
||||||
const roomHistoryRef = useRef(null);
|
const roomHistoryRef = useRef(null);
|
||||||
|
const [areBubblesMuted, setAreBubblesMuted] = useState(false);
|
||||||
|
|
||||||
const roomsetthidebot = () => {
|
const roomsetthidebot = () => {
|
||||||
setIsOpenHistory(false);
|
setIsOpenHistory(false);
|
||||||
@ -73,12 +74,19 @@ export const RoomToolsWidgetView: FC<{}> = props =>
|
|||||||
},
|
},
|
||||||
'chat_history': () => CreateLinkEvent('chat-history/toggle'),
|
'chat_history': () => CreateLinkEvent('chat-history/toggle'),
|
||||||
'hiddenbubbles': () => {
|
'hiddenbubbles': () => {
|
||||||
CreateLinkEvent('nitrobubblehidden/toggle');
|
CreateLinkEvent('nitrobubblehidden/toggle');
|
||||||
const bubbleElement = document.getElementById('bubble');
|
const bubbleElement = document.getElementById('bubble');
|
||||||
if (bubbleElement) {
|
if (bubbleElement) {
|
||||||
bubbleElement.classList.toggle('icon-chat-disablebubble');
|
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)),
|
'like_room': () => SendMessageComposer(new RateFlatMessageComposer(1)),
|
||||||
'toggle_room_link': () => CreateLinkEvent('navigator/toggle-room-link'),
|
'toggle_room_link': () => CreateLinkEvent('navigator/toggle-room-link'),
|
||||||
'navigator_search_tag': (tag: string) => {
|
'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 className="texticonright" onClick={ () => handleToolClick('chat_history') } title={ LocalizeText('room.chathistory.button.text') }>{LocalizeText('room.chathistory.button.text')}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="gridinforooms">
|
<div className="gridinforooms">
|
||||||
<Base id="bubble" pointer title={ LocalizeText('room.mute.button.texte') } onClick={ () => handleToolClick('hiddenbubbles') } className="iconleftgen icon icon-chat-enablebubble"/>
|
<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 className="texticonright" onClick={ () => handleToolClick('hiddenbubbles') } title={ LocalizeText('room.mute.button.text') }>{LocalizeText('room.mute.button.text')}</div>
|
<div id="hiddenbubblesText" className="texticonright" onClick={() => handleToolClick('hiddenbubbles')} title={areBubblesMuted ? LocalizeText('room.unmute.button.text') : LocalizeText('room.mute.button.text')}>
|
||||||
</div>
|
{areBubblesMuted ? LocalizeText('room.unmute.button.text') : LocalizeText('room.mute.button.text')}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{ navigatorData.canRate &&
|
{ navigatorData.canRate &&
|
||||||
<div className="gridinforooms">
|
<div className="gridinforooms">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user