From f06d742c78c0496303deda590557f1059efc5abf Mon Sep 17 00:00:00 2001 From: duckietm Date: Wed, 17 Apr 2024 09:04:50 +0200 Subject: [PATCH] Update: Inventory View / Default Alert / Currency View --- src/assets/images/fusion/background.png | Bin 0 -> 1930 bytes src/assets/images/fusion/cards/card-close.png | Bin 0 -> 2417 bytes src/assets/images/fusion/cards/yellow-bg.png | Bin 0 -> 1930 bytes src/assets/images/fusion/friends/online.png | Bin 0 -> 294 bytes src/assets/images/fusion/friends/search.png | Bin 0 -> 1399 bytes src/assets/images/inventory/ach.png | Bin 0 -> 1220 bytes src/assets/images/inventory/bots.png | Bin 0 -> 291 bytes src/assets/images/inventory/furni.png | Bin 0 -> 351 bytes src/assets/images/inventory/pets.png | Bin 0 -> 264 bytes src/common/layout/LayoutBadgeImageView.tsx | 2 +- .../views/page/common/CatalogSearchView.tsx | 8 +-- src/components/inventory/InventoryView.scss | 23 ++++++ src/components/inventory/InventoryView.tsx | 68 +++++++++--------- .../NotificationDefaultAlertView.tsx | 20 ++---- src/components/purse/PurseView.tsx | 9 +-- src/components/purse/views/CurrencyView.tsx | 23 +++--- .../furniture/FurnitureGiftOpeningView.tsx | 12 +++- 17 files changed, 89 insertions(+), 76 deletions(-) create mode 100644 src/assets/images/fusion/background.png create mode 100644 src/assets/images/fusion/cards/card-close.png create mode 100644 src/assets/images/fusion/cards/yellow-bg.png create mode 100644 src/assets/images/fusion/friends/online.png create mode 100644 src/assets/images/fusion/friends/search.png create mode 100644 src/assets/images/inventory/ach.png create mode 100644 src/assets/images/inventory/bots.png create mode 100644 src/assets/images/inventory/furni.png create mode 100644 src/assets/images/inventory/pets.png diff --git a/src/assets/images/fusion/background.png b/src/assets/images/fusion/background.png new file mode 100644 index 0000000000000000000000000000000000000000..01ad341ca14855099de02d6d98d3a4c45c12216a GIT binary patch literal 1930 zcmcIkZA{!`94})ELU@VHsdIC+Xg1Ay?X`DYTR2{J$KV2G2)B)WAo9>YJsR%Xt}Sq& z34{fsF}fEsU&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.png new file mode 100644 index 0000000000000000000000000000000000000000..e3b32a9610a93d1e5adddf4cf6cfb9b3c32c265e GIT binary patch literal 2417 zcmcIle^?Xe9lsP2ivzUKRjbTflz}`R_am2(9EK1HmJ||G2#QZdIWCuQBgw_P0|K&| z;pl9gN~NqFfIln$7w`ROIuK5Clb;vrT#6Uk9GJ8PmaUYI36of)t5dW~MFQVzXx< znGlrpM&tIhoR5p+GWws3$f<+LYmYo9;+8cIH>J-q?mZU2!+mbkqgL~S+Yhe|Z=aR= z@4(II=;(h1qHBk)tnkG)&!4ZH*8Z8QWy7nzUBzyyW#vF&ow==GV`oB9|69H9*$a0s zZy0^)ZI|`E&Y1c==Dv;7YPuIff4y#P|D44S(EG@-FtSY>WBhZ5Z@(&P`1^-ykK}GT z9JRe!uGZ))r@eIgx(hFn#fu z)JAT;THJKQzoWNnQEtI654^E$Ve9djz}cbJ)R7ApXP!)3FmQ*Z*S#oCOw#0<+uF(qIdNz5V@y)*{eke zni(rU3aF`h4g`gda`r;0(2`3ryeEZr@Fi@D-{S*l2wH0J`)H<&mEaQA#d-D0TOV~R zVa}mfu2Neti!YNc<+7^okM9zhnM;(K;U5|8uokKUXk+amE*h=7|YYB z5*~+0WqPGiHV7A5Y;Yzou&^ctLl_Jr;8a}-t|3(#Yza(Y1cqV+imMO|r?6CtAmHGo z1l9zHlgcwK58486dS$63`6v{vtgK9_RHg8O3&nLhoy(sXuQ zL#e=xA()!NunDLIRDy$+=&6Bu2j{Gs3e;ku%wAEVy$owM>6JiK3dcDpT%K?=4PZX|$X8=biMifn|)GVQ55RBB~ z2&N$kq(rU85eKcK)wEhiYIUiTY%2r~oE_TzIIFD60T^{!(g~^?L+BDUfsh(i38GbL zXoMwbr<&1dQ%gv|<6tN!FL-EBDV&FPv8d1MQo{dLlgYbz!NNO0%vF!in?ZvVcqiuu z3&BPympd>HoXqA#klU)@0m^6B2S;uW9SfdLhVhYuVewTcau6VNesa3}RReUhCOeyVkv7o!6O4%J$?n4ua zLH{>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JQaGJcz{ocE06|)`{(ojzrX+g{rY%& z`}}(U`Stqw>(9?W|Ns2@{r~^J-@iUSe*XUZ`_G@BU!U*qzrNmn{`&g$_5S(u_xsE1 z*W1U}&p+S4|NZ)Yd;R3r`uXwm*XQ5oU8)W=m$4+sFPOpM*^M+Hr`FTOF{C1{_G~!c zAqN5G3l(YARg3TcpOYgKu%%(clljXvug+)qG3DT`O9|{zj6X)|BB&-=EM^~d=$vfDx4^>p=fS?83{1OO0#f1m&W literal 0 HcmV?d00001 diff --git a/src/assets/images/fusion/friends/search.png b/src/assets/images/fusion/friends/search.png new file mode 100644 index 0000000000000000000000000000000000000000..81deba3ecaee5ec58bdd6ea13e0c1c0d6b65f1d5 GIT binary patch literal 1399 zcmb7EZA{!`94{Q418)Y=$T&&v~iaO0)Dj!QU34&p9zA@thkxO!Y$+ad>< z31Jc0G`hqk+>9o~n7I#VaB<*EqFW3DvN(-XbjA-(r|~r^A2t&g@hRgN9~Kguw9oVW zpa1XofA5j*uDv@e-IWM}?2L8r3Ak3%_{cx$ZqDiYqOIyRD0gyIXO93>N z69+&7i1Nr2%b*!S9A}i?q?L?!vXYkbinfk7pVJ{4L7H3gx+rCVg{HuOqDHVk-v1Co z6*+?K55&p1&Vh{5F=~LG(XL);G%GPO*0Kj}&a;pp2P_fI=LS`i%}20xUKZ|cF@d4$ zDpodv-E=A$??ySz0BF!l;u1*)(GcUMg8opz*ND<2O%WtbPyw8x*Z|E^K6K;3pfy8I zvk6|f_J(Z5jTqRtXk-Dbq96{MVErN1cH<# zV|-h0{_E6@wY3&U0J+m!AqYZyki?qC%cttUJ6X~{H#b8byz$HT^ZK<5m+JoIj??s* zOXjb;PuI6DBwrbS=#xpYYNGx~7OigiprP~1w{m~sf$`L?PhG-H-{HDa|MbWK*TF*< z`kWIlW~at}=)-EArJX-boc*Zm@f}T%IJn&MUb=rvbLJIn5woZVF!`pWU_uW!|sy^!jkUPnq$Fd*5-&OKUa0dcXHe^xdN+SKWnLo$K#~^KuVm*%xd7&r9<;4?O$Om+Qq-w-aq~y D8j03C literal 0 HcmV?d00001 diff --git a/src/assets/images/inventory/ach.png b/src/assets/images/inventory/ach.png new file mode 100644 index 0000000000000000000000000000000000000000..3969d06551b88ba4d36b5437259a1dbb4b270ae9 GIT binary patch literal 1220 zcmb7EO^DQ191mKkih>A&9~45wdT}Os$s{ugJ1*IIi4JbYb!No5X*PK~^Vm&Zn!Itc zE0iiIihEHJMMZijA`~j^Q5U7BqLk`MP!K!_g$gaUlzQs)Wt>^}APapYd0+qE@Bf|i zQ?>n@Htg8Iaoncr0a$1Amh4@(mVMpLUm`Ybr&fzL$PDedG2%?0Oe4M;xNTHNu0Q|9 zBQ(ZwYwzM_i?*Ce!y`f7&1CXv5HU2zjg6;~>&+s{Pop*t%fcV`9|}D7%feCBk({W4 zI{3gsj2a8IrnfNb>Ao<&j~`17Mi3zC@@X&^CPrEo2D}DaXUC$z4@Br}S$J<$%bDUU zBu2cNS8|>N0Iz9zP*61u?B!(%$fCp^Ee8sQsu^;T9}a5x!erNo0iwiCS6(U>I{IMzNBNWHe1yb0N=P^MSQck? ztx&bPqD*k;gW1gaW(6uL02VOyqHN0(g`!&2&5~9bVXI+6 z-Oxjs(hQ3~VD(k8MkPirC2^CGxluJubqFO%heUj(q419D;V|20sb<{FRfuAI0{M1K z0)7y61Aj!ntZFJOK&hb1l2!tsQ~?E3)^thHwW6x%!Vv5K?|_NS5;3c?6;(GnVx^od zmwSk9mb(yzENL<8vE9YT|FZtvIW^g|{(kqa-|sxQw7dUuynmDH|IGDg2HneXrxw4# zY`LD+YmNSJaE(K0_M;$GXg1Rq{?qD~ucUSG@NMp&@$WbOc#N)M zere|Lnctu9xb*z<^*3@?zJ9!P_2QmKEvvfc+dH`Z+14Y^e){X+r1cCPQt}* xe2%|$;o9c6`w#zVb>AGsOXyDDd$@1SM(*gzPv0(vV80w%{&&BTW1xos0|2Q=zR*GXo7(^Y002ovPDHLkV1go@cZ>i4 literal 0 HcmV?d00001 diff --git a/src/assets/images/inventory/furni.png b/src/assets/images/inventory/furni.png new file mode 100644 index 0000000000000000000000000000000000000000..54772b18c935bd5f353a4d858247382f7a74a4ac GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+3?vf;>QaGJLV!<*E0AUqU=Vg>5O!h^0U~Ec zQD;UmXC}*jUMnD)07QJ@N8}+rB1Zv0bFYr^88cZC^DO&9~afRWV_^ zK!tk9W{&5*_ckR3Tj({NpDfy`K5>@!OnoMiz%w~3AN#dLZ4pbnywP>*9`{u(b5~tC zYx*YS#4eW|*(rM_J%}(bd2Yt*`S{aW5vOmz_z#+%wDY`IJU2RfTlbG2>ucVBWp3k@ VG7_H_rv!8vgQu&X%Q~loCIAVYt)2h? literal 0 HcmV?d00001 diff --git a/src/assets/images/inventory/pets.png b/src/assets/images/inventory/pets.png new file mode 100644 index 0000000000000000000000000000000000000000..6d056f3a922df8e2d574a51235bd2018abb26538 GIT binary patch literal 264 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+3?vf;>QaG}S%6Q7>;M1%mn6voc~$NL_qxsQ z_LzNsu)EqrKtq`IUblI;A@|c|IT1$Oce~79zkXfiCh%-|?z0uS&wTlG0orhc`jV6W?!SieCEjCx95RwVeoYI Kb6Mw<&;$Ub;Av+7 literal 0 HcmV?d00001 diff --git a/src/common/layout/LayoutBadgeImageView.tsx b/src/common/layout/LayoutBadgeImageView.tsx index a469429..b85c050 100644 --- a/src/common/layout/LayoutBadgeImageView.tsx +++ b/src/common/layout/LayoutBadgeImageView.tsx @@ -37,7 +37,7 @@ export const LayoutBadgeImageView: FC = props => if(imageElement) { - newStyle.backgroundImage = `url(${ (isGroup) ? imageElement.src : GetConfiguration('badge.asset.url').replace('%badgename%', badgeCode.toString())})`; + newStyle.backgroundImage = `url(${ imageElement.src })`; newStyle.width = imageElement.width; newStyle.height = imageElement.height; diff --git a/src/components/catalog/views/page/common/CatalogSearchView.tsx b/src/components/catalog/views/page/common/CatalogSearchView.tsx index 69fb789..bfa1ea9 100644 --- a/src/components/catalog/views/page/common/CatalogSearchView.tsx +++ b/src/components/catalog/views/page/common/CatalogSearchView.tsx @@ -42,10 +42,10 @@ export const CatalogSearchView: FC<{}> = props => if((currentType === CatalogType.BUILDER) && (furniture.purchaseOfferId === -1) && (furniture.rentOfferId === -1)) { - if((furniture.furniLine !== '') && (foundFurniLines.indexOf(furniture.furniLine) < 0)) - { - if(searchValues.indexOf(search) >= 0) foundFurniLines.push(furniture.furniLine); - } + // if((furniture.furniLine !== '') && (foundFurniLines.indexOf(furniture.furniLine) < 0)) + // { + // if(searchValues.indexOf(search) >= 0) foundFurniLines.push(furniture.furniLine); + // } } else { diff --git a/src/components/inventory/InventoryView.scss b/src/components/inventory/InventoryView.scss index 3508dee..8243e1a 100644 --- a/src/components/inventory/InventoryView.scss +++ b/src/components/inventory/InventoryView.scss @@ -14,4 +14,27 @@ padding: 1px 2px; z-index: 5; } + + .tab-icon { + width:18px; + height:18px; + background-position: center; + background-repeat: no-repeat; + + &.tab-inventory-furni { + background-image: url(@/assets/images/inventory/furni.png); + } + + &.tab-inventory-bots { + background-image: url(@/assets/images/inventory/bots.png); + } + + &.tab-inventory-furni-tab-pets { + background-image: url(@/assets/images/inventory/pets.png); + } + + &.tab-inventory-badges { + background-image: url(@/assets/images/inventory/ach.png); + } + } } diff --git a/src/components/inventory/InventoryView.tsx b/src/components/inventory/InventoryView.tsx index d46d33e..12c8dff 100644 --- a/src/components/inventory/InventoryView.tsx +++ b/src/components/inventory/InventoryView.tsx @@ -1,14 +1,13 @@ import { BadgePointLimitsEvent, ILinkEventTracker, IRoomSession, RoomEngineObjectEvent, RoomEngineObjectPlacedEvent, RoomPreviewer, RoomSessionEvent } from '@nitrots/nitro-renderer'; import { FC, useEffect, useState } from 'react'; -import { AddEventLinkTracker, GetLocalization, GetRoomEngine, isObjectMoverRequested, LocalizeText, RemoveLinkEventTracker, setObjectMoverRequested, UnseenItemCategory } from '../../api'; -import { NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common'; +import { AddEventLinkTracker, GetLocalization, GetRoomEngine, LocalizeText, RemoveLinkEventTracker, UnseenItemCategory, isObjectMoverRequested, setObjectMoverRequested } from '../../api'; +import { Base, NitroCardContentView, NitroCardHeaderView, NitroCardTabsItemView, NitroCardTabsView, NitroCardView } from '../../common'; import { useInventoryTrade, useInventoryUnseenTracker, useMessageEvent, useRoomEngineEvent, useRoomSessionManagerEvent } from '../../hooks'; import { InventoryBadgeView } from './views/badge/InventoryBadgeView'; import { InventoryBotView } from './views/bot/InventoryBotView'; import { InventoryFurnitureView } from './views/furniture/InventoryFurnitureView'; import { InventoryTradeView } from './views/furniture/InventoryTradeView'; import { InventoryPetView } from './views/pet/InventoryPetView'; -import { InventoryFurnitureDeleteView } from './views/furniture/InventoryFurnitureDeleteView'; const TAB_FURNITURE: string = 'inventory.furni'; const TAB_BOTS: string = 'inventory.bots'; @@ -119,38 +118,35 @@ export const InventoryView: FC<{}> = props => if(!isVisible) return null; return ( - <> - - - { !isTrading && - <> - - { TABS.map((name, index) => - { - return ( - setCurrentTab(name) } count={ getCount(UNSEEN_CATEGORIES[index]) }> - { LocalizeText(name) } - - ); - }) } - - - { (currentTab === TAB_FURNITURE ) && - } - { (currentTab === TAB_BOTS ) && - } - { (currentTab === TAB_PETS ) && - } - { (currentTab === TAB_BADGES ) && - } - - } - { isTrading && + + + { !isTrading && + <> + + { TABS.map((name, index) => + { + return ( + setCurrentTab(name) } count={ getCount(UNSEEN_CATEGORIES[index]) }> + + + ); + }) } + - - } - - - + { (currentTab === TAB_FURNITURE ) && + } + { (currentTab === TAB_BOTS ) && + } + { (currentTab === TAB_PETS ) && + } + { (currentTab === TAB_BADGES ) && + } + + } + { isTrading && + + + } + ); -} +} \ No newline at end of file diff --git a/src/components/notification-center/views/alert-layouts/NotificationDefaultAlertView.tsx b/src/components/notification-center/views/alert-layouts/NotificationDefaultAlertView.tsx index 87bb66e..7c40bbb 100644 --- a/src/components/notification-center/views/alert-layouts/NotificationDefaultAlertView.tsx +++ b/src/components/notification-center/views/alert-layouts/NotificationDefaultAlertView.tsx @@ -21,8 +21,14 @@ export const NotificationDefaultAlertView: FC const hasFrank = (item.alertType === NotificationAlertType.DEFAULT); + const options = + { !item.clickUrl && + } + { item.clickUrl && (item.clickUrl.length > 0) && } + + return ( - + { hasFrank && !item.imageUrl && } { item.imageUrl && !imageFailed && { @@ -36,20 +42,8 @@ export const NotificationDefaultAlertView: FC return ; }) } - { item.clickUrl && (item.clickUrl.length > 0) && (item.imageUrl && !imageFailed) && <> -
- - }
- { (!item.imageUrl || (item.imageUrl && imageFailed)) && <> - -
- { !item.clickUrl && - } - { item.clickUrl && (item.clickUrl.length > 0) && } -
- }
); diff --git a/src/components/purse/PurseView.tsx b/src/components/purse/PurseView.tsx index 196992b..50f352a 100644 --- a/src/components/purse/PurseView.tsx +++ b/src/components/purse/PurseView.tsx @@ -48,12 +48,9 @@ export const PurseView: FC<{}> = props => for(const type of types) { - if((limit > -1) && (count === limit)) break; - - if(seasonal) elements.push(); - else elements.push(); - - count++; + if ((limit > -1) && (count === limit)) break; + elements.push() + count++; } return elements; diff --git a/src/components/purse/views/CurrencyView.tsx b/src/components/purse/views/CurrencyView.tsx index 9f72158..56e2c70 100644 --- a/src/components/purse/views/CurrencyView.tsx +++ b/src/components/purse/views/CurrencyView.tsx @@ -1,7 +1,7 @@ import { FC, useMemo } from 'react'; import { OverlayTrigger, Tooltip } from 'react-bootstrap'; -import { LocalizeFormattedNumber, LocalizeShortNumber } from '../../../api'; -import { Flex, LayoutCurrencyIcon, Text } from '../../../common'; +import { CreateLinkEvent, LocalizeFormattedNumber, LocalizeShortNumber } from '../../../api'; +import { Button, LayoutCurrencyIcon, Text } from '../../../common'; interface CurrencyViewProps { @@ -16,23 +16,18 @@ export const CurrencyView: FC = props => const element = useMemo(() => { - return ( - - { short ? LocalizeShortNumber(amount) : LocalizeFormattedNumber(amount) } - - ); + return }, [ amount, short, type ]); + + if(!short) return element; return ( - - { LocalizeFormattedNumber(amount) } - - }> + { LocalizeFormattedNumber(amount) } }> { element } ); diff --git a/src/components/room/widgets/furniture/FurnitureGiftOpeningView.tsx b/src/components/room/widgets/furniture/FurnitureGiftOpeningView.tsx index 75ffe8b..75af670 100644 --- a/src/components/room/widgets/furniture/FurnitureGiftOpeningView.tsx +++ b/src/components/room/widgets/furniture/FurnitureGiftOpeningView.tsx @@ -1,5 +1,6 @@ +import { RoomObjectCategory, RoomObjectOperationType } from '@nitrots/nitro-renderer'; import { FC } from 'react'; -import { attemptItemPlacement, CreateLinkEvent, LocalizeText } from '../../../../api'; +import { attemptItemPlacement, CreateLinkEvent, LocalizeText, ProcessRoomObjectOperation, ProductTypeEnum } from '../../../../api'; import { Button, Column, Flex, LayoutGiftTagView, LayoutImage, NitroCardContentView, NitroCardHeaderView, NitroCardView, Text } from '../../../../common'; import { useFurniturePresentWidget, useInventoryFurni } from '../../../../hooks'; @@ -19,6 +20,13 @@ export const FurnitureGiftOpeningView: FC<{}> = props => onClose(); } + const pickup = (itemId: number) => + { + ProcessRoomObjectOperation(itemId, itemType === ProductTypeEnum.WALL ? RoomObjectCategory.WALL : RoomObjectCategory.FLOOR, RoomObjectOperationType.OBJECT_PICKUP); + + onClose(); + } + return ( @@ -52,7 +60,7 @@ export const FurnitureGiftOpeningView: FC<{}> = props => { placedInRoom && - }