@rpg-engine/long-bow 0.8.157 → 0.8.158
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 +80 -45
- 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 +80 -45
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/DCWallet/DCHistoryPanel.tsx +20 -19
- package/src/components/DCWallet/DCTransferPanel.tsx +18 -18
- package/src/components/DCWallet/DCWalletContent.tsx +138 -70
package/package.json
CHANGED
|
@@ -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,10 @@
|
|
|
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 { uiColors } from '../../constants/uiColors';
|
|
5
4
|
import { InternalTabs } from '../InternalTabs/InternalTabs';
|
|
6
5
|
import { DCHistoryPanel, IDCTransaction } from './DCHistoryPanel';
|
|
7
6
|
import { DCTransferPanel, IDCTransferCharacterResult } from './DCTransferPanel';
|
|
8
7
|
|
|
9
|
-
type WalletTabId = 'balance' | 'transfer' | 'history';
|
|
10
|
-
|
|
11
8
|
export interface IDCWalletContentProps {
|
|
12
9
|
dcBalance: number;
|
|
13
10
|
historyData: { transactions: IDCTransaction[]; totalPages: number; currentPage: number } | null;
|
|
@@ -25,6 +22,9 @@ export interface IDCWalletContentProps {
|
|
|
25
22
|
searchResults?: IDCTransferCharacterResult[];
|
|
26
23
|
}
|
|
27
24
|
|
|
25
|
+
const DC_TO_GOLD = 5500;
|
|
26
|
+
const DC_TO_USD = 100;
|
|
27
|
+
|
|
28
28
|
export const DCWalletContent: React.FC<IDCWalletContentProps> = ({
|
|
29
29
|
dcBalance,
|
|
30
30
|
historyData,
|
|
@@ -41,26 +41,10 @@ export const DCWalletContent: React.FC<IDCWalletContentProps> = ({
|
|
|
41
41
|
onSearchCharacter,
|
|
42
42
|
searchResults,
|
|
43
43
|
}) => {
|
|
44
|
-
const
|
|
44
|
+
const usdValue = (dcBalance / DC_TO_USD).toFixed(2);
|
|
45
|
+
const goldValue = (dcBalance * DC_TO_GOLD).toLocaleString();
|
|
45
46
|
|
|
46
47
|
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
48
|
{
|
|
65
49
|
id: 'transfer',
|
|
66
50
|
title: 'Transfer',
|
|
@@ -96,21 +80,42 @@ export const DCWalletContent: React.FC<IDCWalletContentProps> = ({
|
|
|
96
80
|
|
|
97
81
|
return (
|
|
98
82
|
<WalletContainer>
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
83
|
+
<BalanceHeader>
|
|
84
|
+
<BalanceTop>
|
|
85
|
+
<BalanceBlock>
|
|
86
|
+
<BalanceLabel>DC BALANCE</BalanceLabel>
|
|
87
|
+
<BalanceAmount>{dcBalance.toLocaleString()} <BalanceDC>DC</BalanceDC></BalanceAmount>
|
|
88
|
+
<BalanceEquiv>≈ ${usdValue} USD · {goldValue} Gold</BalanceEquiv>
|
|
89
|
+
</BalanceBlock>
|
|
90
|
+
{onBuyDC && (
|
|
91
|
+
<BuyButton onPointerDown={onBuyDC} role="button" tabIndex={0} title="Buy Definya Coins">
|
|
92
|
+
<FaShoppingCart />
|
|
93
|
+
<BuyButtonLabel>Buy DC</BuyButtonLabel>
|
|
94
|
+
</BuyButton>
|
|
95
|
+
)}
|
|
96
|
+
</BalanceTop>
|
|
97
|
+
<RateStrip>
|
|
98
|
+
<RateItem><RateNum>1 DC</RateNum><RateSep>=</RateSep><RateVal>5,500 Gold</RateVal></RateItem>
|
|
99
|
+
<RateDivider />
|
|
100
|
+
<RateItem><RateNum>100 DC</RateNum><RateSep>=</RateSep><RateVal>1 USD</RateVal></RateItem>
|
|
101
|
+
<RateDivider />
|
|
102
|
+
<RateItem><RateNum>1 USD</RateNum><RateSep>=</RateSep><RateVal>550K Gold</RateVal></RateItem>
|
|
103
|
+
</RateStrip>
|
|
104
|
+
</BalanceHeader>
|
|
105
|
+
|
|
106
|
+
<TabsWrapper>
|
|
107
|
+
<InternalTabs
|
|
108
|
+
tabs={tabs}
|
|
109
|
+
onTabChange={(tabId) => {
|
|
110
|
+
if (tabId === 'history') onRequestHistory(1);
|
|
111
|
+
}}
|
|
112
|
+
activeTextColor="#000000"
|
|
113
|
+
activeColor="#fef08a"
|
|
114
|
+
inactiveColor="#6b7280"
|
|
115
|
+
borderColor="#f59e0b"
|
|
116
|
+
hoverColor="#fef3c7"
|
|
117
|
+
/>
|
|
118
|
+
</TabsWrapper>
|
|
114
119
|
</WalletContainer>
|
|
115
120
|
);
|
|
116
121
|
};
|
|
@@ -120,64 +125,127 @@ const WalletContainer = styled.div`
|
|
|
120
125
|
flex-direction: column;
|
|
121
126
|
width: 100%;
|
|
122
127
|
min-height: 300px;
|
|
123
|
-
gap: 0.5rem;
|
|
124
128
|
`;
|
|
125
129
|
|
|
126
|
-
const
|
|
130
|
+
const BalanceHeader = styled.div`
|
|
131
|
+
background: rgba(0, 0, 0, 0.35);
|
|
132
|
+
border: 1px solid rgba(245, 158, 11, 0.25);
|
|
133
|
+
border-radius: 6px;
|
|
134
|
+
padding: 14px 16px 10px;
|
|
135
|
+
margin: 0 2.5% 10px;
|
|
127
136
|
display: flex;
|
|
128
137
|
flex-direction: column;
|
|
138
|
+
gap: 10px;
|
|
139
|
+
`;
|
|
140
|
+
|
|
141
|
+
const BalanceTop = styled.div`
|
|
142
|
+
display: flex;
|
|
129
143
|
align-items: center;
|
|
144
|
+
justify-content: space-between;
|
|
130
145
|
gap: 12px;
|
|
131
|
-
|
|
146
|
+
`;
|
|
147
|
+
|
|
148
|
+
const BalanceBlock = styled.div`
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
gap: 5px;
|
|
132
152
|
`;
|
|
133
153
|
|
|
134
154
|
const BalanceLabel = styled.span`
|
|
135
|
-
font-family: 'Press Start 2P', cursive;
|
|
136
|
-
font-size:
|
|
137
|
-
color:
|
|
155
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
156
|
+
font-size: 9px !important;
|
|
157
|
+
color: rgba(245, 158, 11, 0.7) !important;
|
|
158
|
+
letter-spacing: 1px;
|
|
138
159
|
`;
|
|
139
160
|
|
|
140
161
|
const BalanceAmount = styled.div`
|
|
141
|
-
font-family: 'Press Start 2P', cursive;
|
|
142
|
-
font-size:
|
|
143
|
-
color: #fef08a;
|
|
144
|
-
text-shadow: 2px 2px 0 #000;
|
|
162
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
163
|
+
font-size: 24px !important;
|
|
164
|
+
color: #fef08a !important;
|
|
165
|
+
text-shadow: 2px 2px 0 #000 !important;
|
|
145
166
|
letter-spacing: 2px;
|
|
167
|
+
line-height: 1 !important;
|
|
146
168
|
`;
|
|
147
169
|
|
|
148
|
-
const
|
|
149
|
-
|
|
170
|
+
const BalanceDC = styled.span`
|
|
171
|
+
font-size: 14px !important;
|
|
172
|
+
color: rgba(254, 240, 138, 0.6) !important;
|
|
173
|
+
`;
|
|
174
|
+
|
|
175
|
+
const BalanceEquiv = styled.div`
|
|
150
176
|
font-family: 'Press Start 2P', cursive !important;
|
|
151
177
|
font-size: 8px !important;
|
|
152
|
-
color: rgba(255, 255, 255, 0.
|
|
153
|
-
|
|
154
|
-
line-height: 1.8 !important;
|
|
155
|
-
max-width: 280px;
|
|
178
|
+
color: rgba(255, 255, 255, 0.45) !important;
|
|
179
|
+
letter-spacing: 0.5px;
|
|
156
180
|
`;
|
|
157
181
|
|
|
158
|
-
const BuyButton = styled.
|
|
182
|
+
const BuyButton = styled.div`
|
|
159
183
|
display: flex;
|
|
184
|
+
flex-direction: row;
|
|
160
185
|
align-items: center;
|
|
161
|
-
gap:
|
|
162
|
-
|
|
163
|
-
padding: 10px 20px;
|
|
186
|
+
gap: 6px;
|
|
187
|
+
padding: 10px 16px;
|
|
164
188
|
background: #f59e0b;
|
|
165
|
-
border:
|
|
166
|
-
|
|
167
|
-
color: #000;
|
|
189
|
+
border-radius: 4px;
|
|
190
|
+
color: #000 !important;
|
|
168
191
|
cursor: pointer;
|
|
169
|
-
|
|
192
|
+
flex-shrink: 0;
|
|
193
|
+
font-size: 14px;
|
|
194
|
+
white-space: nowrap;
|
|
195
|
+
user-select: none;
|
|
196
|
+
text-shadow: none !important;
|
|
170
197
|
|
|
171
|
-
&:hover {
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&:active {
|
|
176
|
-
background: #d97706;
|
|
177
|
-
}
|
|
198
|
+
&:hover { background: #fbbf24; }
|
|
199
|
+
&:active { background: #d97706; }
|
|
178
200
|
`;
|
|
179
201
|
|
|
180
202
|
const BuyButtonLabel = styled.span`
|
|
181
|
-
font-family: 'Press Start 2P', cursive;
|
|
182
|
-
font-size: 8px;
|
|
203
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
204
|
+
font-size: 8px !important;
|
|
205
|
+
color: #000 !important;
|
|
206
|
+
white-space: nowrap !important;
|
|
207
|
+
text-shadow: none !important;
|
|
208
|
+
`;
|
|
209
|
+
|
|
210
|
+
const RateStrip = styled.div`
|
|
211
|
+
display: flex;
|
|
212
|
+
align-items: center;
|
|
213
|
+
border-top: 1px solid rgba(245, 158, 11, 0.1);
|
|
214
|
+
padding-top: 8px;
|
|
215
|
+
`;
|
|
216
|
+
|
|
217
|
+
const RateItem = styled.div`
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
gap: 5px;
|
|
221
|
+
flex: 1;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
`;
|
|
224
|
+
|
|
225
|
+
const RateDivider = styled.div`
|
|
226
|
+
width: 1px;
|
|
227
|
+
height: 12px;
|
|
228
|
+
background: rgba(245, 158, 11, 0.2);
|
|
229
|
+
`;
|
|
230
|
+
|
|
231
|
+
const RateNum = styled.span`
|
|
232
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
233
|
+
font-size: 6px !important;
|
|
234
|
+
color: rgba(255, 255, 255, 0.5) !important;
|
|
235
|
+
`;
|
|
236
|
+
|
|
237
|
+
const RateSep = styled.span`
|
|
238
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
239
|
+
font-size: 6px !important;
|
|
240
|
+
color: rgba(255, 255, 255, 0.2) !important;
|
|
241
|
+
`;
|
|
242
|
+
|
|
243
|
+
const RateVal = styled.span`
|
|
244
|
+
font-family: 'Press Start 2P', cursive !important;
|
|
245
|
+
font-size: 6px !important;
|
|
246
|
+
color: rgba(254, 240, 138, 0.6) !important;
|
|
247
|
+
`;
|
|
248
|
+
|
|
249
|
+
const TabsWrapper = styled.div`
|
|
250
|
+
padding: 0 2.5%;
|
|
183
251
|
`;
|