From 0ad284fa9c5551a145c0224f7151349274cdb6cc Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Wed, 20 May 2026 22:01:37 +0200 Subject: [PATCH] refactor(mod-tools): drop the launcher Context strip MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Context strip at the top of the launcher showed which room the mod is currently observing — green pill + door icon when in a room, zinc strip when not. In practice it's noise: the Room Tool / Chatlog Tool buttons right under it already gate on the same in-room state (disabled when not in a room) and carry their own tooltip explaining that. The strip duplicated the signal without adding actionable info. Remove the section, the now-unused FaDoorOpen / FaDoorClosed imports, and the matching `modtools.window.section.context` / `modtools.window.context.room` locale keys (from both the runtime UITexts.json and the versioned UITexts.example template). --- public/configuration/UITexts.example | 2 -- src/components/mod-tools/ModToolsView.tsx | 16 +--------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/public/configuration/UITexts.example b/public/configuration/UITexts.example index 62248b3..423d2a8 100644 --- a/public/configuration/UITexts.example +++ b/public/configuration/UITexts.example @@ -124,11 +124,9 @@ "modtools.window.user.clear": "Clear selection", "modtools.window.tickets.open": "%count% open ticket", "modtools.window.tickets.open.many": "%count% open tickets", - "modtools.window.section.context": "Context", "modtools.window.section.room": "Room", "modtools.window.section.user": "User", "modtools.window.section.reports": "Reports", - "modtools.window.context.room": "Room #%roomId%", "modtools.window.user.open_info": "Open Info", "modtools.userinfo.refresh": "Refresh user info", "modtools.userinfo.presence.in_room": "In room", diff --git a/src/components/mod-tools/ModToolsView.tsx b/src/components/mod-tools/ModToolsView.tsx index ffb2164..fa602ff 100644 --- a/src/components/mod-tools/ModToolsView.tsx +++ b/src/components/mod-tools/ModToolsView.tsx @@ -1,6 +1,6 @@ import { AddLinkEventTracker, CreateLinkEvent, ILinkEventTracker, RemoveLinkEventTracker, RoomEngineEvent, RoomId, RoomObjectCategory, RoomObjectType } from '@nitrots/nitro-renderer'; import { FC, useEffect, useMemo, useRef, useState } from 'react'; -import { FaDoorClosed, FaDoorOpen, FaTimes, FaUserSlash } from 'react-icons/fa'; +import { FaTimes, FaUserSlash } from 'react-icons/fa'; import { GetRoomSession, ISelectedUser, LocalizeText } from '../../api'; import { Button, DraggableWindowPosition, NitroCardContentView, NitroCardHeaderView, NitroCardView } from '../../common'; import { useModTools, useNitroEvent, useObjectSelectedEvent, useRoomUserListSnapshot } from '../../hooks'; @@ -146,20 +146,6 @@ export const ModToolsView: FC<{}> = props => setIsVisible(false) } /> - {/* Context strip: which room are we observing? */} -
- { isInRoom - ? - : } -
-
{ LocalizeText('modtools.window.section.context') }
- { isInRoom - ?
{ LocalizeText('modtools.window.context.room', [ 'roomId' ], [ currentRoomId.toString() ]) }
- :
{ noRoomHint }
} -
-
- {/* Room tools */}
{ LocalizeText('modtools.window.section.room') }