From 4bfd5e96ec1ed9111e056df7aa0266f146b7aaa4 Mon Sep 17 00:00:00 2001 From: duckietm Date: Wed, 10 Jun 2026 10:17:20 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=99=20Update=20catalogue=20Forum=20vie?= =?UTF-8?q?w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/CatalogLayoutGuildForumView.tsx | 44 +++++++++---------- .../CatalogGuildSelectorWidgetView.tsx | 12 ++--- .../widgets/CatalogPurchaseWidgetView.tsx | 9 ++-- src/css/catalog/CatalogClassicView.css | 44 +++++++++++++++++++ 4 files changed, 78 insertions(+), 31 deletions(-) diff --git a/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx index 58baa3a..bfbe7e5 100644 --- a/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx +++ b/src/components/catalog/views/page/layout/CatalogLayoutGuildForumView.tsx @@ -1,7 +1,8 @@ -import { FC, useState } from 'react'; +import { FC } from 'react'; import { SanitizeHtml } from '../../../../../api'; -import { Column, Grid, Text } from '../../../../../common'; -import { useCatalogData, useCatalogUiState, useUserGroups } from '../../../../../hooks'; +import { Column, Flex, Grid } from '../../../../../common'; +import { LayoutImage } from '../../../../../common/layout/LayoutImage'; +import { useCatalogData, useUserGroups } from '../../../../../hooks'; import { CatalogFirstProductSelectorWidgetView } from '../widgets/CatalogFirstProductSelectorWidgetView'; import { CatalogGuildSelectorWidgetView } from '../widgets/CatalogGuildSelectorWidgetView'; import { CatalogPurchaseWidgetView } from '../widgets/CatalogPurchaseWidgetView'; @@ -11,32 +12,31 @@ import { CatalogLayoutProps } from './CatalogLayout.types'; export const CatalogLayouGuildForumView: FC = props => { const { page = null } = props; - const [ selectedGroupIndex, setSelectedGroupIndex ] = useState(0); const { currentOffer = null } = useCatalogData(); - const { setCurrentOffer = null } = useCatalogUiState(); const { data: groups = null } = useUserGroups(); + const teaserImage = page.localization.getImage(1); + const hasGroups = !!(groups && groups.length); + return ( <> - - -
- - + + +
{ !!currentOffer && - <> - - { currentOffer.localizationName } -
- -
-
- -
- -
- } + + +
+ +
+ { hasGroups && + } +
} + + + { !!teaserImage && + } diff --git a/src/components/catalog/views/page/widgets/CatalogGuildSelectorWidgetView.tsx b/src/components/catalog/views/page/widgets/CatalogGuildSelectorWidgetView.tsx index d596d09..2168c81 100644 --- a/src/components/catalog/views/page/widgets/CatalogGuildSelectorWidgetView.tsx +++ b/src/components/catalog/views/page/widgets/CatalogGuildSelectorWidgetView.tsx @@ -1,4 +1,4 @@ -import { StringDataType } from '@nitrots/nitro-renderer'; +import { CreateLinkEvent, StringDataType } from '@nitrots/nitro-renderer'; import { FC, useEffect, useMemo, useState } from 'react'; import { LocalizeText } from '../../../../../api'; import { Button, Flex } from '../../../../../common'; @@ -45,11 +45,13 @@ export const CatalogGuildSelectorWidgetView: FC<{}> = props => if(!groups || !groups.length) { return ( -
+
{ LocalizeText('catalog.guild_selector.members_only') } - +
+ +
); } diff --git a/src/components/catalog/views/page/widgets/CatalogPurchaseWidgetView.tsx b/src/components/catalog/views/page/widgets/CatalogPurchaseWidgetView.tsx index 3dd2111..fb45da8 100644 --- a/src/components/catalog/views/page/widgets/CatalogPurchaseWidgetView.tsx +++ b/src/components/catalog/views/page/widgets/CatalogPurchaseWidgetView.tsx @@ -1,9 +1,9 @@ import { CreateLinkEvent, PurchaseFromCatalogComposer } from '@nitrots/nitro-renderer'; import { FC, useCallback, useEffect, useMemo, useState } from 'react'; -import { BuilderFurniPlaceableStatus, CatalogPurchaseState, CatalogType, DispatchUiEvent, GetClubMemberLevel, LocalizeText, NotificationBubbleType, Offer, ProductTypeEnum, SendMessageComposer } from '../../../../../api'; +import { BuilderFurniPlaceableStatus, CatalogPurchaseState, CatalogType, DispatchUiEvent, GetClubMemberLevel, LocalStorageKeys, LocalizeText, NotificationBubbleType, Offer, ProductTypeEnum, SendMessageComposer } from '../../../../../api'; import { Button, LayoutLoadingSpinnerView, Text } from '../../../../../common'; import { CatalogEvent, CatalogInitGiftEvent, CatalogPurchaseFailureEvent, CatalogPurchaseNotAllowedEvent, CatalogPurchaseSoldOutEvent, CatalogPurchasedEvent } from '../../../../../events'; -import { useCatalogActions, useCatalogData, useCatalogSkipPurchaseConfirmation, useCatalogUiState, useNotification, usePurse, useUiEvent } from '../../../../../hooks'; +import { useCatalogActions, useCatalogData, useCatalogUiState, useLocalStorage, useNotification, usePurse, useUiEvent } from '../../../../../hooks'; interface CatalogPurchaseWidgetViewProps { @@ -17,8 +17,9 @@ export const CatalogPurchaseWidgetView: FC = pro { const { noGiftOption = false, purchaseCallback = null } = props; const [ builderPlaceableRefreshTick, setBuilderPlaceableRefreshTick ] = useState(0); + const [ purchaseWillBeGift, setPurchaseWillBeGift ] = useState(false); const [ purchaseState, setPurchaseState ] = useState(CatalogPurchaseState.NONE); - const [ catalogSkipPurchaseConfirmation ] = useCatalogSkipPurchaseConfirmation(); + const [ catalogSkipPurchaseConfirmation, setCatalogSkipPurchaseConfirmation ] = useLocalStorage(LocalStorageKeys.CATALOG_SKIP_PURCHASE_CONFIRMATION, false); const { currentOffer = null, currentPage = null } = useCatalogData(); const { currentType = CatalogType.NORMAL, purchaseOptions = null, setPurchaseOptions = null, setCatalogPlaceMultipleObjects = null } = useCatalogUiState(); const { requestOfferToMover = null, getBuilderFurniPlaceableStatus = null, getNodesByOfferId = null } = useCatalogActions(); @@ -241,7 +242,7 @@ export const CatalogPurchaseWidgetView: FC = pro return ; case CatalogPurchaseState.NONE: default: - return ; + return ; } }; diff --git a/src/css/catalog/CatalogClassicView.css b/src/css/catalog/CatalogClassicView.css index 54d978d..d42744c 100644 --- a/src/css/catalog/CatalogClassicView.css +++ b/src/css/catalog/CatalogClassicView.css @@ -639,6 +639,50 @@ overflow: hidden; } +.nitro-catalog-classic-window .nitro-catalog-forum-text { + scrollbar-width: none !important; + font-size: 12px; + line-height: 15px; +} + +.nitro-catalog-classic-window .nitro-catalog-forum-text::-webkit-scrollbar { + width: 0 !important; + height: 0 !important; + display: none !important; +} + +.nitro-catalog-classic-window .nitro-catalog-forum-text p, +.nitro-catalog-classic-window .nitro-catalog-forum-text div { + margin: 0 0 8px; +} + +.nitro-catalog-classic-window .nitro-catalog-forum-text > :last-child { + margin-bottom: 0; +} + +.nitro-catalog-classic-window .nitro-catalog-guild-join-btn { + min-height: 20px !important; + width: auto !important; + padding: 1px 10px !important; + border: 1px solid #1c1c1c !important; + border-radius: 5px !important; + background: linear-gradient(180deg, #ffffff 0%, #eaeaea 55%, #d8d8d8 100%) !important; + box-shadow: inset 0 1px 0 #ffffff !important; + color: #000 !important; + font-size: 11px !important; + font-weight: 400 !important; + text-shadow: none !important; +} + +.nitro-catalog-classic-window .nitro-catalog-guild-join-btn:hover { + background: linear-gradient(180deg, #ffffff 0%, #f2f2f2 55%, #e2e2e2 100%) !important; +} + +.nitro-catalog-classic-window .nitro-catalog-guild-join-btn:active { + background: linear-gradient(180deg, #d8d8d8 0%, #eaeaea 100%) !important; + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2) !important; +} + .nitro-catalog-classic-default-layout { position: relative; display: block !important;