Added catalogue links to UI config.

Keeps all the catalogue links in one group, while adding a couple more options.. Uncommented clicking on "Buy Saddle" and added catalogue link.
This commit is contained in:
oshawott 2022-03-24 10:59:12 +11:00
parent 0c06da54b9
commit 32d4dad6e7
4 changed files with 11 additions and 7 deletions

View File

@ -55,14 +55,18 @@
0, 0,
5 5
], ],
"catalog.links": {
"hc.buy_hc": "habbo_club",
"hc.hc_gifts": "club_gifts",
"pets.buy_food": "pets_food",
"pets.buy_saddle": "horse_saddles"
},
"hc.center": { "hc.center": {
"benefits.info": true, "benefits.info": true,
"payday.info": true, "payday.info": true,
"gift.info": true, "gift.info": true,
"benefits.habbopage": "habboclub", "benefits.habbopage": "habboclub",
"payday.habbopage": "hcpayday", "payday.habbopage": "hcpayday",
"catalog.buy": "habbo_club",
"catalog.gifts": "club_gifts"
}, },
"respect.options": { "respect.options": {
"enabled": false, "enabled": false,

View File

@ -100,7 +100,7 @@ export class NotificationUtilities
{ {
if(numGifts <= 0) return; if(numGifts <= 0) return;
this.showSingleBubble(numGifts.toString(), NotificationBubbleType.CLUBGIFT, null, ('catalog/open/' + GetConfiguration('hc.center')['catalog.gifts'])); this.showSingleBubble(numGifts.toString(), NotificationBubbleType.CLUBGIFT, null, ('catalog/open/' + GetConfiguration('catalog.links')['hc.hc_gifts']));
} }
public static handleMOTD(messages: string[]): void public static handleMOTD(messages: string[]): void

View File

@ -221,7 +221,7 @@ export const HcCenterView: FC<{}> = props =>
<Column gap={ 1 }> <Column gap={ 1 }>
<div className="hc-logo" /> <div className="hc-logo" />
<Flex> <Flex>
<Button variant="success" onClick={ event => { CreateLinkEvent('catalog/open/' + GetConfiguration('hc.center')['catalog.buy']) } }> <Button variant="success" onClick={ event => { CreateLinkEvent('catalog/open/' + GetConfiguration('catalog.links')['hc.buy_hc']) } }>
{ LocalizeText((clubStatus === ClubStatus.ACTIVE) ? 'hccenter.btn.extend' : 'hccenter.btn.buy') } { LocalizeText((clubStatus === ClubStatus.ACTIVE) ? 'hccenter.btn.extend' : 'hccenter.btn.buy') }
</Button> </Button>
</Flex> </Flex>
@ -273,7 +273,7 @@ export const HcCenterView: FC<{}> = props =>
<h4 className="mb-1">{LocalizeText('hccenter.gift.title')}</h4> <h4 className="mb-1">{LocalizeText('hccenter.gift.title')}</h4>
<div dangerouslySetInnerHTML={{ __html: unclaimedGifts > 0 ? LocalizeText('hccenter.unclaimedgifts', ['unclaimedgifts'], [unclaimedGifts.toString()]) : LocalizeText('hccenter.gift.info') }}></div> <div dangerouslySetInnerHTML={{ __html: unclaimedGifts > 0 ? LocalizeText('hccenter.unclaimedgifts', ['unclaimedgifts'], [unclaimedGifts.toString()]) : LocalizeText('hccenter.gift.info') }}></div>
</div> </div>
<button className="btn btn-primary btn-lg align-self-center ms-auto" onClick={() => { CreateLinkEvent('catalog/open/' + GetConfiguration('hc.center')['catalog.gifts']) }}>{LocalizeText(clubStatus === ClubStatus.ACTIVE ? 'hccenter.btn.gifts.redeem' : 'hccenter.btn.gifts.view')}</button> <button className="btn btn-primary btn-lg align-self-center ms-auto" onClick={() => { CreateLinkEvent('catalog/open/' + GetConfiguration('catalog.links')['hc.hc_gifts']) }}>{LocalizeText(clubStatus === ClubStatus.ACTIVE ? 'hccenter.btn.gifts.redeem' : 'hccenter.btn.gifts.view')}</button>
</div> </div>
} }
{GetConfiguration('hc.center')['benefits.info'] && {GetConfiguration('hc.center')['benefits.info'] &&

View File

@ -1,6 +1,6 @@
import { PetType, RoomObjectCategory, RoomObjectType, RoomObjectVariable } from '@nitrots/nitro-renderer'; import { PetType, RoomObjectCategory, RoomObjectType, RoomObjectVariable } from '@nitrots/nitro-renderer';
import { FC, useEffect, useMemo, useState } from 'react'; import { FC, useEffect, useMemo, useState } from 'react';
import { GetOwnRoomObject, LocalizeText, RoomWidgetMessage, RoomWidgetUpdateInfostandPetEvent, RoomWidgetUserActionMessage } from '../../../../api'; import { CreateLinkEvent, GetConfiguration, GetOwnRoomObject, LocalizeText, RoomWidgetMessage, RoomWidgetUpdateInfostandPetEvent, RoomWidgetUserActionMessage } from '../../../../api';
import { BatchUpdates } from '../../../../hooks'; import { BatchUpdates } from '../../../../hooks';
import { useRoomContext } from '../../RoomContext'; import { useRoomContext } from '../../RoomContext';
import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView'; import { ContextMenuHeaderView } from '../context-menu/ContextMenuHeaderView';
@ -116,7 +116,7 @@ export const AvatarInfoWidgetOwnPetView: FC<AvatarInfoWidgetOwnPetViewProps> = p
messageType = RoomWidgetUserActionMessage.COMPOST_PLANT; messageType = RoomWidgetUserActionMessage.COMPOST_PLANT;
break; break;
case 'buy_saddle': case 'buy_saddle':
//this.openCatalogPage(this._Str_11220); CreateLinkEvent('catalog/open/' + GetConfiguration('catalog.links')['pets.buy_saddle']);
break; break;
} }