@rpg-engine/long-bow 0.8.157 → 0.8.159
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 +81 -48
- 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 +82 -49
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/components/DCWallet/DCHistoryPanel.tsx +20 -19
- package/src/components/DCWallet/DCTransferPanel.tsx +18 -18
- package/src/components/DCWallet/DCWalletContent.tsx +139 -70
- package/src/components/Marketplace/BlueprintSearchModal.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpg-engine/long-bow",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.159",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@capacitor/core": "^6.1.0",
|
|
86
86
|
"@rollup/plugin-image": "^2.1.1",
|
|
87
|
-
"@rpg-engine/shared": "0.10.
|
|
87
|
+
"@rpg-engine/shared": "^0.10.94",
|
|
88
88
|
"dayjs": "^1.11.2",
|
|
89
89
|
"font-awesome": "^4.7.0",
|
|
90
90
|
"fs-extra": "^10.1.0",
|
|
@@ -163,9 +163,10 @@ const FilterRow = styled.div`
|
|
|
163
163
|
`;
|
|
164
164
|
|
|
165
165
|
const FilterLabel = styled.p`
|
|
166
|
-
margin: 0;
|
|
167
|
-
font-size: 0.7rem;
|
|
168
|
-
color: #ccc;
|
|
166
|
+
margin: 0 !important;
|
|
167
|
+
font-size: 0.7rem !important;
|
|
168
|
+
color: #ccc !important;
|
|
169
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
169
170
|
text-transform: uppercase;
|
|
170
171
|
letter-spacing: 1px;
|
|
171
172
|
white-space: nowrap;
|
|
@@ -221,29 +222,29 @@ const TxRight = styled.div`
|
|
|
221
222
|
`;
|
|
222
223
|
|
|
223
224
|
const TxType = styled.span`
|
|
224
|
-
font-size:
|
|
225
|
-
font-family: 'Press Start 2P', cursive;
|
|
225
|
+
font-size: 8px !important;
|
|
226
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
226
227
|
`;
|
|
227
228
|
|
|
228
229
|
const TxAmount = styled.span`
|
|
229
|
-
font-size:
|
|
230
|
-
font-family: 'Press Start 2P', cursive;
|
|
230
|
+
font-size: 9px !important;
|
|
231
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
231
232
|
white-space: nowrap;
|
|
232
233
|
`;
|
|
233
234
|
|
|
234
235
|
const TxNote = styled.span`
|
|
235
|
-
font-size:
|
|
236
|
-
color: ${uiColors.lightGray};
|
|
237
|
-
font-family: 'Press Start 2P', cursive;
|
|
236
|
+
font-size: 7px !important;
|
|
237
|
+
color: ${uiColors.lightGray} !important;
|
|
238
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
238
239
|
white-space: nowrap;
|
|
239
240
|
overflow: hidden;
|
|
240
241
|
text-overflow: ellipsis;
|
|
241
242
|
`;
|
|
242
243
|
|
|
243
244
|
const TxDate = styled.span`
|
|
244
|
-
font-size:
|
|
245
|
-
color: rgba(255, 255, 255, 0.4);
|
|
246
|
-
font-family: 'Press Start 2P', cursive;
|
|
245
|
+
font-size: 7px !important;
|
|
246
|
+
color: rgba(255, 255, 255, 0.4) !important;
|
|
247
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
247
248
|
white-space: nowrap;
|
|
248
249
|
`;
|
|
249
250
|
|
|
@@ -253,9 +254,9 @@ const LoadingRow = styled.div`
|
|
|
253
254
|
gap: 8px;
|
|
254
255
|
justify-content: center;
|
|
255
256
|
padding: 16px;
|
|
256
|
-
color: ${uiColors.white};
|
|
257
|
-
font-size: 9px;
|
|
258
|
-
font-family: 'Press Start 2P', cursive;
|
|
257
|
+
color: ${uiColors.white} !important;
|
|
258
|
+
font-size: 9px !important;
|
|
259
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
259
260
|
`;
|
|
260
261
|
|
|
261
262
|
const Spinner = styled.div`
|
|
@@ -273,9 +274,9 @@ const Spinner = styled.div`
|
|
|
273
274
|
`;
|
|
274
275
|
|
|
275
276
|
const EmptyMessage = styled.div`
|
|
276
|
-
font-size: 8px;
|
|
277
|
-
color: ${uiColors.lightGray};
|
|
278
|
-
font-family: 'Press Start 2P', cursive;
|
|
277
|
+
font-size: 8px !important;
|
|
278
|
+
color: ${uiColors.lightGray} !important;
|
|
279
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
279
280
|
text-align: center;
|
|
280
281
|
padding: 20px;
|
|
281
282
|
`;
|
|
@@ -213,21 +213,21 @@ const PanelContainer = styled.div`
|
|
|
213
213
|
`;
|
|
214
214
|
|
|
215
215
|
const FieldLabel = styled.label`
|
|
216
|
-
font-size: 9px;
|
|
217
|
-
color: #f59e0b;
|
|
218
|
-
font-family: 'Press Start 2P', cursive;
|
|
216
|
+
font-size: 9px !important;
|
|
217
|
+
color: #f59e0b !important;
|
|
218
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
219
219
|
margin-top: 8px;
|
|
220
220
|
`;
|
|
221
221
|
|
|
222
222
|
const StyledInput = styled(Input)`
|
|
223
|
-
background: rgba(0, 0, 0, 0.6);
|
|
224
|
-
border: 1px solid #f59e0b;
|
|
225
|
-
color: ${uiColors.white};
|
|
226
|
-
padding: 6px 8px;
|
|
227
|
-
font-size:
|
|
228
|
-
font-family: 'Press Start 2P', cursive;
|
|
229
|
-
width: 100
|
|
230
|
-
box-sizing: border-box;
|
|
223
|
+
background: rgba(0, 0, 0, 0.6) !important;
|
|
224
|
+
border: 1px solid #f59e0b !important;
|
|
225
|
+
color: ${uiColors.white} !important;
|
|
226
|
+
padding: 6px 8px !important;
|
|
227
|
+
font-size: 11px !important;
|
|
228
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
229
|
+
width: 100% !important;
|
|
230
|
+
box-sizing: border-box !important;
|
|
231
231
|
|
|
232
232
|
&:disabled {
|
|
233
233
|
opacity: 0.5;
|
|
@@ -235,7 +235,7 @@ const StyledInput = styled(Input)`
|
|
|
235
235
|
|
|
236
236
|
&:focus {
|
|
237
237
|
outline: none;
|
|
238
|
-
border-color: ${uiColors.white};
|
|
238
|
+
border-color: ${uiColors.white} !important;
|
|
239
239
|
}
|
|
240
240
|
`;
|
|
241
241
|
|
|
@@ -261,18 +261,18 @@ const Spinner = styled.div`
|
|
|
261
261
|
const ResultMessage = styled.div<{ $success: boolean }>`
|
|
262
262
|
margin-top: 8px;
|
|
263
263
|
padding: 8px;
|
|
264
|
-
font-size: 9px;
|
|
265
|
-
font-family: 'Press Start 2P', cursive;
|
|
266
|
-
color: ${({ $success }) => ($success ? uiColors.green : uiColors.red)};
|
|
264
|
+
font-size: 9px !important;
|
|
265
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
266
|
+
color: ${({ $success }) => ($success ? uiColors.green : uiColors.red)} !important;
|
|
267
267
|
border: 1px solid ${({ $success }) => ($success ? uiColors.green : uiColors.red)};
|
|
268
268
|
background: rgba(0, 0, 0, 0.4);
|
|
269
269
|
text-align: center;
|
|
270
270
|
`;
|
|
271
271
|
|
|
272
272
|
const ErrorMessage = styled.div`
|
|
273
|
-
font-size: 9px;
|
|
274
|
-
color: ${uiColors.red};
|
|
275
|
-
font-family: 'Press Start 2P', cursive;
|
|
273
|
+
font-size: 9px !important;
|
|
274
|
+
color: ${uiColors.red} !important;
|
|
275
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
276
276
|
`;
|
|
277
277
|
|
|
278
278
|
const AutocompleteWrapper = styled.div`
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { FaShoppingCart } from 'react-icons/fa';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
|
-
import {
|
|
4
|
+
import { formatDCAmount } from '@rpg-engine/shared';
|
|
5
5
|
import { InternalTabs } from '../InternalTabs/InternalTabs';
|
|
6
6
|
import { DCHistoryPanel, IDCTransaction } from './DCHistoryPanel';
|
|
7
7
|
import { DCTransferPanel, IDCTransferCharacterResult } from './DCTransferPanel';
|
|
8
8
|
|
|
9
|
-
type WalletTabId = 'balance' | 'transfer' | 'history';
|
|
10
|
-
|
|
11
9
|
export interface IDCWalletContentProps {
|
|
12
10
|
dcBalance: number;
|
|
13
11
|
historyData: { transactions: IDCTransaction[]; totalPages: number; currentPage: number } | null;
|
|
@@ -25,6 +23,9 @@ export interface IDCWalletContentProps {
|
|
|
25
23
|
searchResults?: IDCTransferCharacterResult[];
|
|
26
24
|
}
|
|
27
25
|
|
|
26
|
+
const DC_TO_GOLD = 5500;
|
|
27
|
+
const DC_TO_USD = 100;
|
|
28
|
+
|
|
28
29
|
export const DCWalletContent: React.FC<IDCWalletContentProps> = ({
|
|
29
30
|
dcBalance,
|
|
30
31
|
historyData,
|
|
@@ -41,26 +42,10 @@ export const DCWalletContent: React.FC<IDCWalletContentProps> = ({
|
|
|
41
42
|
onSearchCharacter,
|
|
42
43
|
searchResults,
|
|
43
44
|
}) => {
|
|
44
|
-
const
|
|
45
|
+
const usdValue = (dcBalance / DC_TO_USD).toFixed(2);
|
|
46
|
+
const goldValue = (dcBalance * DC_TO_GOLD).toLocaleString();
|
|
45
47
|
|
|
46
48
|
const tabs = [
|
|
47
|
-
{
|
|
48
|
-
id: 'balance',
|
|
49
|
-
title: 'Balance',
|
|
50
|
-
content: (
|
|
51
|
-
<BalanceContent>
|
|
52
|
-
<BalanceLabel>Your DC Balance</BalanceLabel>
|
|
53
|
-
<BalanceAmount>{dcBalance.toLocaleString()} DC</BalanceAmount>
|
|
54
|
-
<DCHint>Spend on the Store, buy items on the Marketplace, or transfer to any player.</DCHint>
|
|
55
|
-
{onBuyDC && (
|
|
56
|
-
<BuyButton onPointerDown={onBuyDC} title="Buy Definya Coins">
|
|
57
|
-
<FaShoppingCart />
|
|
58
|
-
<BuyButtonLabel>Buy More DC</BuyButtonLabel>
|
|
59
|
-
</BuyButton>
|
|
60
|
-
)}
|
|
61
|
-
</BalanceContent>
|
|
62
|
-
),
|
|
63
|
-
},
|
|
64
49
|
{
|
|
65
50
|
id: 'transfer',
|
|
66
51
|
title: 'Transfer',
|
|
@@ -96,21 +81,42 @@ export const DCWalletContent: React.FC<IDCWalletContentProps> = ({
|
|
|
96
81
|
|
|
97
82
|
return (
|
|
98
83
|
<WalletContainer>
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
84
|
+
<BalanceHeader>
|
|
85
|
+
<BalanceTop>
|
|
86
|
+
<BalanceBlock>
|
|
87
|
+
<BalanceLabel>DC BALANCE</BalanceLabel>
|
|
88
|
+
<BalanceAmount>{formatDCAmount(dcBalance)} <BalanceDC>DC</BalanceDC></BalanceAmount>
|
|
89
|
+
<BalanceEquiv>≈ ${usdValue} USD · {goldValue} Gold</BalanceEquiv>
|
|
90
|
+
</BalanceBlock>
|
|
91
|
+
{onBuyDC && (
|
|
92
|
+
<BuyButton onPointerDown={onBuyDC} role="button" tabIndex={0} title="Buy Definya Coins">
|
|
93
|
+
<FaShoppingCart />
|
|
94
|
+
<BuyButtonLabel>Buy DC</BuyButtonLabel>
|
|
95
|
+
</BuyButton>
|
|
96
|
+
)}
|
|
97
|
+
</BalanceTop>
|
|
98
|
+
<RateStrip>
|
|
99
|
+
<RateItem><RateNum>1 DC</RateNum><RateSep>=</RateSep><RateVal>5,500 Gold</RateVal></RateItem>
|
|
100
|
+
<RateDivider />
|
|
101
|
+
<RateItem><RateNum>100 DC</RateNum><RateSep>=</RateSep><RateVal>1 USD</RateVal></RateItem>
|
|
102
|
+
<RateDivider />
|
|
103
|
+
<RateItem><RateNum>1 USD</RateNum><RateSep>=</RateSep><RateVal>550K Gold</RateVal></RateItem>
|
|
104
|
+
</RateStrip>
|
|
105
|
+
</BalanceHeader>
|
|
106
|
+
|
|
107
|
+
<TabsWrapper>
|
|
108
|
+
<InternalTabs
|
|
109
|
+
tabs={tabs}
|
|
110
|
+
onTabChange={(tabId) => {
|
|
111
|
+
if (tabId === 'history') onRequestHistory(1);
|
|
112
|
+
}}
|
|
113
|
+
activeTextColor="#000000"
|
|
114
|
+
activeColor="#fef08a"
|
|
115
|
+
inactiveColor="#6b7280"
|
|
116
|
+
borderColor="#f59e0b"
|
|
117
|
+
hoverColor="#fef3c7"
|
|
118
|
+
/>
|
|
119
|
+
</TabsWrapper>
|
|
114
120
|
</WalletContainer>
|
|
115
121
|
);
|
|
116
122
|
};
|
|
@@ -120,64 +126,127 @@ const WalletContainer = styled.div`
|
|
|
120
126
|
flex-direction: column;
|
|
121
127
|
width: 100%;
|
|
122
128
|
min-height: 300px;
|
|
123
|
-
gap: 0.5rem;
|
|
124
129
|
`;
|
|
125
130
|
|
|
126
|
-
const
|
|
131
|
+
const BalanceHeader = styled.div`
|
|
132
|
+
background: rgba(0, 0, 0, 0.35);
|
|
133
|
+
border: 1px solid rgba(245, 158, 11, 0.25);
|
|
134
|
+
border-radius: 6px;
|
|
135
|
+
padding: 14px 16px 10px;
|
|
136
|
+
margin: 0 2.5% 10px;
|
|
127
137
|
display: flex;
|
|
128
138
|
flex-direction: column;
|
|
139
|
+
gap: 10px;
|
|
140
|
+
`;
|
|
141
|
+
|
|
142
|
+
const BalanceTop = styled.div`
|
|
143
|
+
display: flex;
|
|
129
144
|
align-items: center;
|
|
145
|
+
justify-content: space-between;
|
|
130
146
|
gap: 12px;
|
|
131
|
-
|
|
147
|
+
`;
|
|
148
|
+
|
|
149
|
+
const BalanceBlock = styled.div`
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-direction: column;
|
|
152
|
+
gap: 5px;
|
|
132
153
|
`;
|
|
133
154
|
|
|
134
155
|
const BalanceLabel = styled.span`
|
|
135
|
-
font-family: 'Press Start 2P', cursive;
|
|
136
|
-
font-size:
|
|
137
|
-
color:
|
|
156
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
157
|
+
font-size: 9px !important;
|
|
158
|
+
color: rgba(245, 158, 11, 0.7) !important;
|
|
159
|
+
letter-spacing: 1px;
|
|
138
160
|
`;
|
|
139
161
|
|
|
140
162
|
const BalanceAmount = styled.div`
|
|
141
|
-
font-family: 'Press Start 2P', cursive;
|
|
142
|
-
font-size:
|
|
143
|
-
color: #fef08a;
|
|
144
|
-
text-shadow: 2px 2px 0 #000;
|
|
163
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
164
|
+
font-size: 24px !important;
|
|
165
|
+
color: #fef08a !important;
|
|
166
|
+
text-shadow: 2px 2px 0 #000 !important;
|
|
145
167
|
letter-spacing: 2px;
|
|
168
|
+
line-height: 1 !important;
|
|
146
169
|
`;
|
|
147
170
|
|
|
148
|
-
const
|
|
149
|
-
|
|
171
|
+
const BalanceDC = styled.span`
|
|
172
|
+
font-size: 14px !important;
|
|
173
|
+
color: rgba(254, 240, 138, 0.6) !important;
|
|
174
|
+
`;
|
|
175
|
+
|
|
176
|
+
const BalanceEquiv = styled.div`
|
|
150
177
|
font-family: 'Press Start 2P', cursive !important;
|
|
151
178
|
font-size: 8px !important;
|
|
152
|
-
color: rgba(255, 255, 255, 0.
|
|
153
|
-
|
|
154
|
-
line-height: 1.8 !important;
|
|
155
|
-
max-width: 280px;
|
|
179
|
+
color: rgba(255, 255, 255, 0.45) !important;
|
|
180
|
+
letter-spacing: 0.5px;
|
|
156
181
|
`;
|
|
157
182
|
|
|
158
|
-
const BuyButton = styled.
|
|
183
|
+
const BuyButton = styled.div`
|
|
159
184
|
display: flex;
|
|
185
|
+
flex-direction: row;
|
|
160
186
|
align-items: center;
|
|
161
|
-
gap:
|
|
162
|
-
|
|
163
|
-
padding: 10px 20px;
|
|
187
|
+
gap: 6px;
|
|
188
|
+
padding: 10px 16px;
|
|
164
189
|
background: #f59e0b;
|
|
165
|
-
border:
|
|
166
|
-
|
|
167
|
-
color: #000;
|
|
190
|
+
border-radius: 4px;
|
|
191
|
+
color: #000 !important;
|
|
168
192
|
cursor: pointer;
|
|
169
|
-
|
|
193
|
+
flex-shrink: 0;
|
|
194
|
+
font-size: 14px;
|
|
195
|
+
white-space: nowrap;
|
|
196
|
+
user-select: none;
|
|
197
|
+
text-shadow: none !important;
|
|
170
198
|
|
|
171
|
-
&:hover {
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&:active {
|
|
176
|
-
background: #d97706;
|
|
177
|
-
}
|
|
199
|
+
&:hover { background: #fbbf24; }
|
|
200
|
+
&:active { background: #d97706; }
|
|
178
201
|
`;
|
|
179
202
|
|
|
180
203
|
const BuyButtonLabel = styled.span`
|
|
181
|
-
font-family: 'Press Start 2P', cursive;
|
|
182
|
-
font-size: 8px;
|
|
204
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
205
|
+
font-size: 8px !important;
|
|
206
|
+
color: #000 !important;
|
|
207
|
+
white-space: nowrap !important;
|
|
208
|
+
text-shadow: none !important;
|
|
209
|
+
`;
|
|
210
|
+
|
|
211
|
+
const RateStrip = styled.div`
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
border-top: 1px solid rgba(245, 158, 11, 0.1);
|
|
215
|
+
padding-top: 8px;
|
|
216
|
+
`;
|
|
217
|
+
|
|
218
|
+
const RateItem = styled.div`
|
|
219
|
+
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
gap: 5px;
|
|
222
|
+
flex: 1;
|
|
223
|
+
justify-content: center;
|
|
224
|
+
`;
|
|
225
|
+
|
|
226
|
+
const RateDivider = styled.div`
|
|
227
|
+
width: 1px;
|
|
228
|
+
height: 12px;
|
|
229
|
+
background: rgba(245, 158, 11, 0.2);
|
|
230
|
+
`;
|
|
231
|
+
|
|
232
|
+
const RateNum = styled.span`
|
|
233
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
234
|
+
font-size: 6px !important;
|
|
235
|
+
color: rgba(255, 255, 255, 0.5) !important;
|
|
236
|
+
`;
|
|
237
|
+
|
|
238
|
+
const RateSep = styled.span`
|
|
239
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
240
|
+
font-size: 6px !important;
|
|
241
|
+
color: rgba(255, 255, 255, 0.2) !important;
|
|
242
|
+
`;
|
|
243
|
+
|
|
244
|
+
const RateVal = styled.span`
|
|
245
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
246
|
+
font-size: 6px !important;
|
|
247
|
+
color: rgba(254, 240, 138, 0.6) !important;
|
|
248
|
+
`;
|
|
249
|
+
|
|
250
|
+
const TabsWrapper = styled.div`
|
|
251
|
+
padding: 0 2.5%;
|
|
183
252
|
`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IMarketplaceBlueprintSearchRequest,
|
|
3
3
|
IMarketplaceBlueprintSummary,
|
|
4
|
+
ItemType,
|
|
4
5
|
ItemSubType,
|
|
5
6
|
} from '@rpg-engine/shared';
|
|
6
7
|
import { debounce } from 'lodash';
|
|
@@ -38,8 +39,7 @@ const scaleIn = keyframes`
|
|
|
38
39
|
|
|
39
40
|
const typeOptions: IOptionsProps[] = [
|
|
40
41
|
{ id: 1, value: '', option: 'All Types' },
|
|
41
|
-
...Object.keys(
|
|
42
|
-
.filter((t) => t !== 'DeadBody')
|
|
42
|
+
...Object.keys(ItemType)
|
|
43
43
|
.map((t, index) => ({ id: index + 2, value: t, option: t })),
|
|
44
44
|
];
|
|
45
45
|
|