Commit Graph

692 Commits

Author SHA1 Message Date
simoleo89 39fbfdd9e2 fix(inventory): derive active prefix from the fresh list, not a stale closure
The ActivePrefixUpdatedEvent handler set the active prefix via
`setActivePrefix(prev => { const found = prefixes.find(...) })`, reading the
`prefixes` state from the closure — which lags by a render and is stale/empty when
the prefix was added earlier in the same event batch, so `found` was undefined and
the active prefix fell back to a partial item missing icon/color/displayName. Move
the derivation inside the `setPrefixes` updater so it reads the freshly-mapped list.
2026-06-13 18:15:19 +02:00
simoleo89 9cc9ef86c0 fix(inventory): stop unseen-tracker mutating shared state arrays in place
resetItems/removeUnseen/the UnseenItemsEvent handler each did `new Map(prevValue)`
(a shallow copy) then spliced/pushed the per-category array returned by
`.get(category)` — the SAME array reference still held by the previous Map. That
mutates state outside React's data flow (breaks under StrictMode double-invoke and
any updater replay). resetItems additionally did `splice(existing.indexOf(id), 1)`
with no guard, so an id not present (indexOf === -1) spliced off the wrong LAST
element. Replace each in-place splice/push with a cloned array set back on the new
Map (filter for removals, spread+push for the merge).
2026-06-13 18:15:19 +02:00
hotellidev caf80e5386 Merge branch 'duckietm:main' into multicolorfurnifix 2026-06-12 03:15:02 +03:00
duckietm de38371069 🆙 100% Guild Furni Catalog Page 2026-06-11 13:16:29 +02:00
duckietm 40864cf880 🆙 Fix scrollbar 2026-06-11 10:31:24 +02:00
duckietm 5aa9dcd650 🆙 Added colored background to items in group furni & fix catalog price 2026-06-11 10:14:27 +02:00
hotellidev afaea87bcd Fix multicolor furni names 2026-06-11 04:07:06 +03:00
duckietm 9fcbfba22f 🆙 Fix Group Forum buy 2026-06-10 14:16:18 +02:00
duckietm 4bfd5e96ec 🆙 Update catalogue Forum view 2026-06-10 10:17:20 +02:00
duckietm e5ca4936ea 🆙 Detached Theme from original NitroV3 2026-06-10 07:23:02 +02:00
simoleo89 e6519c301f fix(catalog): honor skip purchase confirmation setting
Wire both classic and modern catalog purchase widgets to the shared catalogSkipPurchaseConfirmation setting used by User Settings. When enabled, the primary buy/rent button now calls the purchase flow directly instead of first switching to the CONFIRM state. Existing validation, gift purchases, club checks, limited sold-out handling, and Builders Club placement flows remain unchanged.
2026-06-09 22:29:11 +02:00
duckietm 3ea6ec70a4 🆙 Update Purse 2026-06-09 13:55:33 +02:00
duckietm 3e92e718e5 🆙 Fix avatar head in friends chat 2026-06-09 07:11:28 +02:00
duckietm ce8e6fa61f 🆙 Fix the avatar head in send pressent 2026-06-08 11:06:01 +02:00
duckietm b1f0fe64c0 🆙 Fix navigator fav. 2026-06-08 10:39:39 +02:00
duckietm 05653e7034 🆙 Better HK icoon 2026-06-08 10:16:03 +02:00
duckietm c427298926 🆙 Small fix for the clasic catalogue mobile view 2026-06-08 09:51:27 +02:00
duckietm cad30673ef 🆙 Updated Housekeeping icon 2026-06-08 08:50:41 +02:00
duckietm 4c36b595f5 🆙 Update the wheel of fortune icon 2026-06-08 08:42:01 +02:00
DuckieTM 50d4920194 Merge pull request #219 from duckietm/main
Sync Main to DEV
2026-06-08 07:29:21 +02:00
hotellidev 10e3a9c93d Merge branch 'duckietm:main' into item-descriptions 2026-06-08 00:24:52 +03:00
hotellidev e5097b824e Add back missing <hr> separator. Cleaned previous commits. 2026-06-08 00:21:11 +03:00
hotellidev 8e834261d0 Add configuration to limit itemLocation to people with access. 2026-06-08 00:21:11 +03:00
hotellidev 0daa2aea66 Config options for description and location 2026-06-08 00:21:11 +03:00
hotellidev 9e21cf5be4 Fix position 2026-06-08 00:21:11 +03:00
hotellidev 4a966d0d3d Add description to items 2026-06-08 00:21:11 +03:00
DuckieTM 2581cc62e9 Merge pull request #217 from medievalshell/feat/catalog-modern
feat(catalog): created two different catalog one nitro v3 and one 1 to 1 habbo
2026-06-07 23:17:23 +02:00
medievalshell e02c1fab8a fix(badge): group badge nero nell'HUD (race onload in LayoutBadgeImageView) 2026-06-07 23:00:06 +02:00
medievalshell 21d3a62b7a feat(catalog): catalogo modern Hippiehotel in albero separato (catalog-modern) 2026-06-07 23:00:06 +02:00
simoleo89 f5d8aacc2c feat: show furnidata diagnostics in editor 2026-06-07 21:21:21 +02:00
simoleo89 288b59f168 fix(chat-input): restore RoomWidgetUpdateChatInputContentEvent.TEXT mode
Upstream 7007752 removed the TEXT constant + its handler case while migrating
in-component inserts to setChatValue, but NotificationDefaultAlertView still
dispatches TEXT to copy a command into the chat input (the only cross-component
path to set the input). Restore the constant and the handler case (setChatValue
+ focus, matching the command-selector path). Fixes TS2339.
2026-06-07 12:31:45 +02:00
simoleo89 f593205d5f fix(chat-input): restore RoomWidgetUpdateChatInputContentEvent.TEXT mode
Upstream 7007752 removed the TEXT constant + its handler case while migrating
in-component inserts to setChatValue, but NotificationDefaultAlertView still
dispatches TEXT to copy a command into the chat input (the only cross-component
path to set the input). Restore the constant and the handler case (setChatValue
+ focus, matching the command-selector path). Fixes TS2339.
2026-06-07 12:04:53 +02:00
simoleo89 1f0fa03702 Merge origin/main into main
Resolved 2 messenger conflicts:
- FriendsMessengerView.tsx: union — kept local typingUserIds/sendTypingStatus
  from useMessenger() plus upstream's useFriends().getFriend.
- FriendsView.css: kept local group-chips + typing-indicator styles (upstream
  empty there).
Vitest 545/545 green. (typecheck TS2307 is the un-linked renderer, env-only.)
2026-06-07 11:50:32 +02:00
DuckieTM 3cd6c5a518 Merge pull request #211 from simoleo89/fix/furni-editor-wall-items
fix(infostand): show Edit Furni button for wall items
2026-06-07 08:21:50 +02:00
DuckieTM fbd4a484ac Merge pull request #210 from simoleo89/fix/messenger-offline-avatar
fix(messenger): show real avatar for offline friends + fix head framing
2026-06-07 08:21:22 +02:00
DuckieTM 017768693f Merge pull request #209 from simoleo89/feat/mentions-overhaul
feat(mentions): overhaul, refactor & default-notification integration
2026-06-07 08:21:05 +02:00
DuckieTM 6ee60e212f Merge pull request #208 from simoleo89/fix/mentions-toolbar-icon
fix(toolbar): add missing CSS rule for the mentions icon
2026-06-07 08:20:48 +02:00
DuckieTM 0d2c170998 Merge pull request #206 from simoleo89/feat/badge-leaderboard-local-avatars
feat(badge-leaderboard): render avatar heads with the local renderer
2026-06-07 08:20:29 +02:00
DuckieTM 3678928763 Merge pull request #205 from simoleo89/fix/friendbar-overflow-autofit
fix(friendbar): auto-fit visible friend count so the bar stops clipping
2026-06-07 08:20:03 +02:00
DuckieTM 315503e3a0 Merge pull request #203 from simoleo89/feat/furni-editor
feat(furni-editor): in-client Furni Editor — furnidata name editing, modern search, Habbo import
2026-06-07 08:19:41 +02:00
DuckieTM a5a6676cf3 🆙 smal update css friends 2026-06-07 08:18:25 +02:00
simoleo89 e2cc708497 fix(infostand): show Edit Furni button for wall items
The "Edit Furni" button was nested inside the `(!avatarInfo.isWallItem
&& canMove)` guard, together with the floor-only Buildtools position/
height/rotation controls, so it never rendered for wall furni (e.g.
`ads_campguitar`). Move it out so it shows for any furni when
`godMode` + `isModerator`, leaving the position controls floor-only.
The onClick already resolved WALL vs FLOOR correctly.

While touching this file, clean up two pre-existing lint errors:
- hoist `getValidRoomObjectDirection` to module scope (it is pure and
  uses no component state) so it is no longer accessed before its
  declaration (react-hooks/immutability)
- expand the inline `'scale'` branch to Allman braces (brace-style)
2026-06-07 01:00:18 +02:00
simoleo89 1eb4d5594b fix(messenger): show real avatar for offline friends + fix head framing
The messenger rendered the participant figure straight from the frozen
thread participant, so offline friends (whose look used to be empty)
showed the anonymous/standard avatar. Read the live look from the friend
list via getFriend() - the same source the friends list renders - with
resolveAvatarFigure() as the final fallback, so the real avatar shows
even when offline (pairs with the server fix that now sends offline
looks). Applied to both the avatar-bar tab and the in-thread avatars.

Also fix the avatar-tab head framing: it positioned the head-only image
with full-body geometry (90x130, top:-31px), clipping the head. Render
the head at native size (background-size:auto, no scaling -> not grainy)
and centre it in the 36x36 tab.
2026-06-07 00:37:20 +02:00
simoleo89 dcbf44aedb feat(mentions): overhaul, refactor, notification bubble & window update
Chat tagging:
- Any @user is a visible tag in chat bubbles (the .mention-tag CSS never
  existed, so highlighting was invisible); self/alias mentions get a gold
  emphasis. Fixes cross-room tags not being highlighted.

Mentions window:
- Redesigned: unread count in the header, restyled filter chips + a refresh
  button, CSS-driven list/date-groups, adaptive height (compact when few,
  capped + scroll when many), polished empty state.
- Rows: framed avatar (friends-list head crop so the face is never clipped),
  per-row unread dot, type marker, icon action buttons (goto / remove).
- Re-requests from the server each time it opens.

Autocomplete:
- Never suggests the viewer themselves; suggests room users + online friends +
  aliases.

Notifications:
- Mention toast removed; mentions flow through the client's standard
  notification stream via a dedicated mention bubble (avatar + actions) in the
  default position. EVERY received mention surfaces (independent of the generic
  info-feed toggle, gated only by mentions_ui.enabled).

Refactor (behaviour-preserving):
- Centralised @-token classification in api/mentions/mentionTokens.
- Moved mentionsFormat -> api/mentions, useMentionActions -> hooks/mentions.
- Extracted ChatInputView @-autocomplete into a tested useChatMentions hook +
  pure helper; removed the dead duplicate useMentionAutocomplete.
2026-06-06 23:37:17 +02:00
simoleo89 f73bbb467c fix(toolbar): add missing CSS rule for the mentions icon
The toolbar renders a mentions button (`ToolbarItemView icon="mentions"` ->
`<div class="nitro-icon icon-mentions">`) and the asset
`assets/images/toolbar/icons/mentions.png` (72x64) exists, but icons.css had
no `.nitro-icon.icon-mentions` rule - so the element had no background image
and, since the base `.nitro-icon` sets no size, rendered at 0x0 (invisible).

Add the rule, sized at half the asset (36x32, preserving the 9:8 aspect) with
`background-size: contain`, matching the other toolbar icon definitions.
2026-06-06 20:43:42 +02:00
simoleo89 5cd470c980 feat(badge-leaderboard): render avatar heads with the local renderer
The leaderboard rows pulled each avatar head from habbo.com's imaging
service (`https://www.habbo.com/habbo-imaging/avatarimage?...headonly=1`)
via a plain <img>. The avatar `figure` is already present in the leaderboard
data (served by the CMS `/api/badges/leaderboard` endpoint), so there is no
need for an external request - render it locally instead.

Swap the <img> for the renderer-backed `LayoutAvatarImageView` (headOnly),
which draws the head through `GetAvatarRenderManager().createAvatarImage(...)`.
The head-only render is an absolutely-positioned background div rather than an
<img>, so the avatar CSS is reworked to frame it (relative, overflow-hidden
box with a head crop mirrored from the friends list), and the now-unused
`getAvatarHeadUrl` helper is removed.

Removes the last runtime dependency on habbo.com for this panel; avatars now
come entirely from the local renderer.
2026-06-06 20:06:43 +02:00
simoleo89 d7fabcd777 fix(friendbar): auto-fit visible friend count so the bar stops clipping
The online-friends bar is portaled into the right toolbar nav, which sits
inside `tb-nav-clip` (fixed, `max-w-[calc(50vw-242px)]`, `overflow-x: clip`).
Each online friend adds a fixed `w-[132px]` chip, so the bar grew with every
friend up to MAX_DISPLAY_COUNT (3). Once it exceeded the clip width the right
edge was silently cut off - the scroll arrow and part of the search button
disappeared. The portal slot is `shrink-0`, so the chips never compressed;
they just overflowed and got clipped. Net effect: "more friends online =
broken bar".

Measure the room actually available between the bar's left edge and the
viewport's right edge (re-measured on resize / ResizeObserver) and derive an
effective visible count clamped 1..3, always reserving space for both arrows
and the search chip so nothing clips at any width or friend count. The bar's
left edge is stable (it follows fixed-width toolbar icons), so changing the
chip count never moves it - no measurement feedback loop.

Scroll offset now derives a clamped safeOffset used by every read, so a
stale indexOffset after the list shrinks / the fit grows renders correctly
and self-corrects on the next arrow click (no write-back effect).
2026-06-06 19:01:19 +02:00
DuckieTM 110363ab1c 🆙 Scrollbar 100% habbo 2026-06-06 18:58:23 +02:00
simoleo89 df7060b391 feat(furni-editor): read-only FurniData.json view (resolved-from-json)
Show the furni's resolved furnidata JSON entry (the editable display
name's source of truth) in a collapsible read-only section under Basic
Info. Uses furniDataEntry already available client-side — no extra
packet. Supersedes the old read-only resolver-preview slice.
2026-06-06 18:00:47 +02:00
simoleo89 f24585b60a feat(furni-editor): read-only FurniData.json view (resolved-from-json)
Show the furni's resolved furnidata JSON entry (the editable display
name's source of truth) in a collapsible read-only section under Basic
Info. Uses furniDataEntry already available client-side — no extra
packet. Supersedes the old read-only resolver-preview slice.
2026-06-06 18:00:41 +02:00