diff --git a/tgui/packages/tgui/interfaces/LootPanel/IconDisplay.tsx b/tgui/packages/tgui/interfaces/LootPanel/IconDisplay.tsx index 889d50de884..11e52b2ac55 100644 --- a/tgui/packages/tgui/interfaces/LootPanel/IconDisplay.tsx +++ b/tgui/packages/tgui/interfaces/LootPanel/IconDisplay.tsx @@ -10,15 +10,23 @@ export function IconDisplay(props: Props) { item: { icon, icon_state }, } = props; - const fallback = ; + const fallback = ; if (!icon) { return fallback; } if (icon_state) { - return ; + return ( + + ); } - return ; + return ; } diff --git a/tgui/packages/tgui/interfaces/LootPanel/LootBox.tsx b/tgui/packages/tgui/interfaces/LootPanel/LootBox.tsx index 22b0c8532dd..613db1ead53 100644 --- a/tgui/packages/tgui/interfaces/LootPanel/LootBox.tsx +++ b/tgui/packages/tgui/interfaces/LootPanel/LootBox.tsx @@ -1,4 +1,4 @@ -import { capitalizeAll } from 'common/string'; +import { capitalizeAll, capitalizeFirst } from 'common/string'; import { useBackend } from '../../backend'; import { Tooltip } from '../../components'; @@ -25,28 +25,35 @@ export function LootBox(props: Props) { item = props.item; } + const name = !item.name + ? '???' + : capitalizeFirst(item.name.split(' ')[0]).slice(0, 5); + return ( -
- act('grab', { - ctrl: event.ctrlKey, - ref: item.ref, - shift: event.shiftKey, - }) - } - onContextMenu={(event) => { - event.preventDefault(); - act('grab', { - middle: true, - ref: item.ref, - shift: true, - }); - }} - > - - {amount > 1 &&
{amount}
} +
+
+ act('grab', { + ctrl: event.ctrlKey, + ref: item.ref, + shift: event.shiftKey, + }) + } + onContextMenu={(event) => { + event.preventDefault(); + act('grab', { + middle: true, + ref: item.ref, + shift: true, + }); + }} + > + + {amount > 1 &&
{amount}
} +
+ {name}
); diff --git a/tgui/packages/tgui/interfaces/LootPanel/index.tsx b/tgui/packages/tgui/interfaces/LootPanel/index.tsx index bd64113f302..bc6330b1806 100644 --- a/tgui/packages/tgui/interfaces/LootPanel/index.tsx +++ b/tgui/packages/tgui/interfaces/LootPanel/index.tsx @@ -24,7 +24,7 @@ export function LootPanel(props) { const total = contents.length ? contents.length - 1 : 0; return ( - + { if (event.key === KEY.Escape) { diff --git a/tgui/packages/tgui/styles/components/SearchItem.scss b/tgui/packages/tgui/styles/components/SearchItem.scss index 76946ec9c5a..5dadcdf8d6a 100644 --- a/tgui/packages/tgui/styles/components/SearchItem.scss +++ b/tgui/packages/tgui/styles/components/SearchItem.scss @@ -2,21 +2,34 @@ .SearchItem { align-items: center; + display: flex; + flex-direction: column; + justify-content: center; +} + +.SearchItem--box { background: black; border: thin solid #212121; display: flex; - height: 3rem; + align-items: center; justify-content: center; + height: 3rem; position: relative; width: 3rem; - margin-bottom: 0; } .SearchItem--amount { - bottom: -1rem; + bottom: -4px; color: colors.$teal; font-family: 'Roboto', sans-serif; font-size: 1.5rem; position: absolute; - right: -4px; + right: -6px; +} + +.SearchItem--text { + color: colors.$label; + font-family: 'Roboto', sans-serif; + font-size: 1rem; + z-index: 1; }