@rpg-engine/long-bow 0.8.22 → 0.8.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +17 -9
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +17 -9
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/InformationCenter/InformationCenter.tsx +27 -22
- package/src/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.tsx +13 -2
- package/src/components/InformationCenter/shared/BaseInformationDetails.tsx +6 -11
- package/src/mocks/informationCenter.mocks.ts +1 -1
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
IInformationCenterNPC,
|
|
8
8
|
IVideoGuide,
|
|
9
9
|
} from '@rpg-engine/shared';
|
|
10
|
+
import { DraggableContainer } from '../DraggableContainer';
|
|
10
11
|
import { InternalTabs } from '../InternalTabs/InternalTabs';
|
|
11
12
|
import { InformationCenterBestiarySection } from './sections/bestiary/InformationCenterBestiarySection';
|
|
12
13
|
import { InformationCenterFAQSection } from './sections/faq/InformationCenterFaqSection';
|
|
@@ -116,29 +117,33 @@ export const InformationCenter: React.FC<IInformationCenterProps> = ({
|
|
|
116
117
|
];
|
|
117
118
|
|
|
118
119
|
return (
|
|
119
|
-
<
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
{selectedItem && (
|
|
131
|
-
<InformationCenterItemDetails
|
|
132
|
-
item={selectedItem}
|
|
133
|
-
itemsAtlasJSON={itemsAtlasJSON}
|
|
134
|
-
itemsAtlasIMG={itemsAtlasIMG}
|
|
135
|
-
droppedBy={bestiaryItems.filter(npc =>
|
|
136
|
-
npc.loots?.some(loot => loot.itemBlueprintKey === selectedItem.key)
|
|
137
|
-
)}
|
|
138
|
-
onBack={() => setSelectedItem(null)}
|
|
120
|
+
<DraggableContainer title="Information Center">
|
|
121
|
+
<Container>
|
|
122
|
+
<InternalTabs
|
|
123
|
+
tabs={tabs}
|
|
124
|
+
activeTextColor="#000000"
|
|
125
|
+
activeTab={activeTab}
|
|
126
|
+
onTabChange={setActiveTab}
|
|
127
|
+
activeColor="#fef08a"
|
|
128
|
+
inactiveColor="#6b7280"
|
|
129
|
+
borderColor="#f59e0b"
|
|
130
|
+
hoverColor="#fef3c7"
|
|
139
131
|
/>
|
|
140
|
-
|
|
141
|
-
|
|
132
|
+
{selectedItem && (
|
|
133
|
+
<InformationCenterItemDetails
|
|
134
|
+
item={selectedItem}
|
|
135
|
+
itemsAtlasJSON={itemsAtlasJSON}
|
|
136
|
+
itemsAtlasIMG={itemsAtlasIMG}
|
|
137
|
+
droppedBy={bestiaryItems.filter(npc =>
|
|
138
|
+
npc.loots?.some(
|
|
139
|
+
loot => loot.itemBlueprintKey === selectedItem.key
|
|
140
|
+
)
|
|
141
|
+
)}
|
|
142
|
+
onBack={() => setSelectedItem(null)}
|
|
143
|
+
/>
|
|
144
|
+
)}
|
|
145
|
+
</Container>
|
|
146
|
+
</DraggableContainer>
|
|
142
147
|
);
|
|
143
148
|
};
|
|
144
149
|
|
package/src/components/InformationCenter/sections/tutorials/InformationCenterTutorialsSection.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import { uiColors } from '../../../../constants/uiColors';
|
|
|
9
9
|
import { IOptionsProps } from '../../../Dropdown';
|
|
10
10
|
import { PaginatedContent } from '../../../shared/PaginatedContent/PaginatedContent';
|
|
11
11
|
|
|
12
|
+
import { Ellipsis } from '../../../shared/Ellipsis';
|
|
12
13
|
import { formatItemType } from '../items/InformationCenterItemsSection';
|
|
13
14
|
|
|
14
15
|
interface ITutorialsSectionProps {
|
|
@@ -74,8 +75,16 @@ export const InformationCenterTutorialsSection: React.FC<ITutorialsSectionProps>
|
|
|
74
75
|
/>
|
|
75
76
|
</GuideThumbnail>
|
|
76
77
|
<GuideContent>
|
|
77
|
-
<GuideTitle>
|
|
78
|
-
|
|
78
|
+
<GuideTitle>
|
|
79
|
+
<Ellipsis maxWidth="100%" maxLines={2}>
|
|
80
|
+
{guide.title}
|
|
81
|
+
</Ellipsis>
|
|
82
|
+
</GuideTitle>
|
|
83
|
+
<GuideDescription>
|
|
84
|
+
<Ellipsis maxWidth="100%" maxLines={5}>
|
|
85
|
+
{guide.description}
|
|
86
|
+
</Ellipsis>
|
|
87
|
+
</GuideDescription>
|
|
79
88
|
<GuideLabelsContainer>
|
|
80
89
|
<GuideCategory>{guide.category}</GuideCategory>
|
|
81
90
|
<GuideLanguage>{guide.language}</GuideLanguage>
|
|
@@ -185,6 +194,7 @@ const GuideTitle = styled.h3`
|
|
|
185
194
|
color: ${uiColors.yellow};
|
|
186
195
|
font-family: 'Press Start 2P', cursive;
|
|
187
196
|
margin-bottom: 5px;
|
|
197
|
+
text-overflow: ellipsis;
|
|
188
198
|
`;
|
|
189
199
|
|
|
190
200
|
const GuideDescription = styled.p`
|
|
@@ -231,4 +241,5 @@ const GuideLabelsContainer = styled.div`
|
|
|
231
241
|
display: flex;
|
|
232
242
|
justify-content: space-between;
|
|
233
243
|
padding: 0 6px 6px;
|
|
244
|
+
margin-top: auto;
|
|
234
245
|
`;
|
|
@@ -49,11 +49,8 @@ export const BaseInformationDetails: React.FC<IBaseInformationDetailsProps> = ({
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
const Container = styled.div`
|
|
52
|
-
position:
|
|
53
|
-
|
|
54
|
-
left: 0;
|
|
55
|
-
right: 0;
|
|
56
|
-
bottom: 0;
|
|
52
|
+
position: absolute;
|
|
53
|
+
inset: 0;
|
|
57
54
|
display: flex;
|
|
58
55
|
justify-content: center;
|
|
59
56
|
align-items: center;
|
|
@@ -62,18 +59,14 @@ const Container = styled.div`
|
|
|
62
59
|
|
|
63
60
|
const Overlay = styled.div`
|
|
64
61
|
position: absolute;
|
|
65
|
-
|
|
66
|
-
left: 0;
|
|
67
|
-
right: 0;
|
|
68
|
-
bottom: 0;
|
|
62
|
+
inset: 0;
|
|
69
63
|
background-color: rgba(0, 0, 0, 0.8);
|
|
70
64
|
`;
|
|
71
65
|
|
|
72
66
|
const Modal = styled.div`
|
|
73
67
|
position: relative;
|
|
74
68
|
width: 90%;
|
|
75
|
-
|
|
76
|
-
max-height: 90vh;
|
|
69
|
+
height: 90%;
|
|
77
70
|
background-color: rgba(0, 0, 0, 0.95);
|
|
78
71
|
border-radius: 4px;
|
|
79
72
|
padding: 16px;
|
|
@@ -134,6 +127,8 @@ const Content = styled.div`
|
|
|
134
127
|
display: flex;
|
|
135
128
|
flex-direction: column;
|
|
136
129
|
gap: 16px;
|
|
130
|
+
height: 100%;
|
|
131
|
+
overflow: auto;
|
|
137
132
|
`;
|
|
138
133
|
|
|
139
134
|
const Title = styled.h2`
|
|
@@ -601,7 +601,7 @@ export const mockTutorials: IVideoGuide[] = [
|
|
|
601
601
|
},
|
|
602
602
|
{
|
|
603
603
|
id: '2',
|
|
604
|
-
title: 'Advanced Combat Techniques',
|
|
604
|
+
title: 'Advanced Combat Techniques for class Archer',
|
|
605
605
|
description: 'Master the art of combat with advanced combos and spell casting.',
|
|
606
606
|
videoUrl: 'https://youtu.be/7LQlyy0Y720?si=wZ79VC4sCsI781Mn',
|
|
607
607
|
category: VideoGuideCategory.Combat,
|