mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-26 23:50:52 +01:00
open trax songs catalog page on button click
This commit is contained in:
parent
da281a170b
commit
cf9b7b3d0b
@ -1,6 +1,6 @@
|
|||||||
import { IAdvancedMap, MusicPriorities } from '@nitrots/nitro-renderer';
|
import { IAdvancedMap, MusicPriorities } from '@nitrots/nitro-renderer';
|
||||||
import { FC, MouseEvent, useCallback, useEffect, useState } from 'react';
|
import { FC, MouseEvent, useCallback, useEffect, useState } from 'react';
|
||||||
import { GetConfiguration, GetDiskColor, GetNitroInstance, LocalizeText } from '../../../../../api';
|
import { CatalogPageName, CreateLinkEvent, GetConfiguration, GetDiskColor, GetNitroInstance, LocalizeText } from '../../../../../api';
|
||||||
import { AutoGrid, Base, Button, Flex, LayoutGridItem, Text } from '../../../../../common';
|
import { AutoGrid, Base, Button, Flex, LayoutGridItem, Text } from '../../../../../common';
|
||||||
|
|
||||||
export interface DiskInventoryViewProps
|
export interface DiskInventoryViewProps
|
||||||
@ -29,6 +29,11 @@ export const DiskInventoryView: FC<DiskInventoryViewProps> = props =>
|
|||||||
addToPlaylist(diskId, GetNitroInstance().soundManager.musicController?.getRoomItemPlaylist()?.length)
|
addToPlaylist(diskId, GetNitroInstance().soundManager.musicController?.getRoomItemPlaylist()?.length)
|
||||||
}, [ addToPlaylist ]);
|
}, [ addToPlaylist ]);
|
||||||
|
|
||||||
|
const openCatalogPage = () =>
|
||||||
|
{
|
||||||
|
CreateLinkEvent('catalog/open/' + CatalogPageName.TRAX_SONGS);
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
{
|
{
|
||||||
if(previewSongId === -1) return;
|
if(previewSongId === -1) return;
|
||||||
@ -82,7 +87,7 @@ export const DiskInventoryView: FC<DiskInventoryViewProps> = props =>
|
|||||||
<h5>{ LocalizeText('playlist.editor.text.get.more.music') }</h5>
|
<h5>{ LocalizeText('playlist.editor.text.get.more.music') }</h5>
|
||||||
<div>{ LocalizeText('playlist.editor.text.you.have.no.songdisks.available') }</div>
|
<div>{ LocalizeText('playlist.editor.text.you.have.no.songdisks.available') }</div>
|
||||||
<div>{ LocalizeText('playlist.editor.text.you.can.buy.some.from.the.catalogue') }</div>
|
<div>{ LocalizeText('playlist.editor.text.you.can.buy.some.from.the.catalogue') }</div>
|
||||||
<button className="btn btn-primary btn-sm">{ LocalizeText('playlist.editor.button.open.catalogue') }</button>
|
<button className="btn btn-primary btn-sm" onClick={ () => openCatalogPage() }>{ LocalizeText('playlist.editor.button.open.catalogue') }</button>
|
||||||
</div>
|
</div>
|
||||||
<img src={ GetConfiguration('image.library.url') + 'playlist/background_get_more_music.gif' } className="get-more" />
|
<img src={ GetConfiguration('image.library.url') + 'playlist/background_get_more_music.gif' } className="get-more" />
|
||||||
</>);
|
</>);
|
||||||
|
Loading…
Reference in New Issue
Block a user