mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
refactor(mod-tools): drop the launcher Context strip
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).
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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 =>
|
||||
<NitroCardView className="nitro-mod-tools min-w-[240px] max-w-[260px]" theme="primary-slim" uniqueKey="mod-tools" windowPosition={ DraggableWindowPosition.TOP_LEFT } >
|
||||
<NitroCardHeaderView headerText={ LocalizeText('modtools.window.title') } onCloseClick={ event => setIsVisible(false) } />
|
||||
<NitroCardContentView className="text-black" gap={ 2 }>
|
||||
{/* Context strip: which room are we observing? */}
|
||||
<div className={ `flex items-center gap-2 rounded p-1.5 border ${ isInRoom ? 'bg-gradient-to-r from-emerald-50 to-transparent border-emerald-100' : 'bg-zinc-50 border-zinc-200' }` }
|
||||
title={ isInRoom ? LocalizeText('modtools.window.context.room', [ 'roomId' ], [ currentRoomId.toString() ]) : noRoomHint }>
|
||||
{ isInRoom
|
||||
? <FaDoorOpen className="text-emerald-600 shrink-0" size={ 12 } />
|
||||
: <FaDoorClosed className="text-zinc-400 shrink-0" size={ 12 } /> }
|
||||
<div className="flex flex-col grow min-w-0 leading-tight">
|
||||
<div className="text-[.6rem] uppercase tracking-wide opacity-60 font-semibold">{ LocalizeText('modtools.window.section.context') }</div>
|
||||
{ isInRoom
|
||||
? <div className="text-xs font-medium truncate">{ LocalizeText('modtools.window.context.room', [ 'roomId' ], [ currentRoomId.toString() ]) }</div>
|
||||
: <div className="text-xs italic opacity-60 truncate">{ noRoomHint }</div> }
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Room tools */}
|
||||
<div className="flex flex-col gap-1.5">
|
||||
<div className="text-[.6rem] uppercase tracking-wide opacity-60 font-semibold pl-1">{ LocalizeText('modtools.window.section.room') }</div>
|
||||
|
||||
Reference in New Issue
Block a user