react-native-monflowts 0.5.0 → 0.5.2
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/README.md +37 -3
- package/android/build.gradle +1 -0
- package/android/src/main/java/com/monflowts/MonflowtsNavigationModule.kt +43 -0
- package/android/src/main/java/com/monflowts/MonflowtsPackage.kt +10 -1
- package/android/src/main/java/com/monflowts/MonflowtsStackView.kt +443 -0
- package/android/src/main/java/com/monflowts/MonflowtsStackViewManager.kt +70 -0
- package/ios/MonflowtsNavigationBridge.m +10 -0
- package/ios/MonflowtsNavigationModule.swift +28 -0
- package/ios/MonflowtsStackBridge.m +17 -0
- package/ios/MonflowtsStackUIView.swift +409 -0
- package/ios/MonflowtsStackViewManager.swift +14 -0
- package/lib/module/HubContent.js +259 -219
- package/lib/module/HubContent.js.map +1 -1
- package/lib/module/MonflowtsHub.js +42 -3
- package/lib/module/MonflowtsHub.js.map +1 -1
- package/lib/module/api/mutations.js +4 -0
- package/lib/module/api/mutations.js.map +1 -1
- package/lib/module/api/queries.js +9 -3
- package/lib/module/api/queries.js.map +1 -1
- package/lib/module/components/AbandonPolicyNotice.js +3 -2
- package/lib/module/components/AbandonPolicyNotice.js.map +1 -1
- package/lib/module/components/CoinFlyOverlay.js +27 -20
- package/lib/module/components/CoinFlyOverlay.js.map +1 -1
- package/lib/module/components/GameRulesModal.js +8 -6
- package/lib/module/components/GameRulesModal.js.map +1 -1
- package/lib/module/components/HypeCallout.js +5 -5
- package/lib/module/components/HypeCallout.js.map +1 -1
- package/lib/module/components/InsufficientFundsOverlay.js +2 -1
- package/lib/module/components/InsufficientFundsOverlay.js.map +1 -1
- package/lib/module/components/JackpotNearMiss.js +3 -2
- package/lib/module/components/JackpotNearMiss.js.map +1 -1
- package/lib/module/components/JackpotTeaser.js +2 -1
- package/lib/module/components/JackpotTeaser.js.map +1 -1
- package/lib/module/components/QuitConfirmModal.js +3 -2
- package/lib/module/components/QuitConfirmModal.js.map +1 -1
- package/lib/module/components/SessionTimer.js +3 -2
- package/lib/module/components/SessionTimer.js.map +1 -1
- package/lib/module/components/ShopArtView.js +105 -0
- package/lib/module/components/ShopArtView.js.map +1 -0
- package/lib/module/components/SideDemoTab.js +20 -2
- package/lib/module/components/SideDemoTab.js.map +1 -1
- package/lib/module/components/StakeInput.js +3 -2
- package/lib/module/components/StakeInput.js.map +1 -1
- package/lib/module/content.js.map +1 -1
- package/lib/module/hooks/useAvailableGames.js +7 -2
- package/lib/module/hooks/useAvailableGames.js.map +1 -1
- package/lib/module/hooks/useLeaderboard.js.map +1 -1
- package/lib/module/hooks/usePlayGame.js +11 -5
- package/lib/module/hooks/usePlayGame.js.map +1 -1
- package/lib/module/hooks/useRaffleDrawState.js +4 -1
- package/lib/module/hooks/useRaffleDrawState.js.map +1 -1
- package/lib/module/index.js +15 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/NativeStackView.js +5 -0
- package/lib/module/navigation/NativeStackView.js.map +1 -0
- package/lib/module/navigation/Navigator.js +250 -0
- package/lib/module/navigation/Navigator.js.map +1 -0
- package/lib/module/navigation/engine.js +466 -0
- package/lib/module/navigation/engine.js.map +1 -0
- package/lib/module/navigation/hooks.js +29 -0
- package/lib/module/navigation/hooks.js.map +1 -0
- package/lib/module/navigation/index.js +7 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/routes.js +111 -0
- package/lib/module/navigation/routes.js.map +1 -0
- package/lib/module/theme.js +2 -2
- package/lib/module/theme.js.map +1 -1
- package/lib/module/utils/scale.js +35 -0
- package/lib/module/utils/scale.js.map +1 -0
- package/lib/module/views/DepositSelect.js +3 -2
- package/lib/module/views/DepositSelect.js.map +1 -1
- package/lib/module/views/DiceBattle.js +207 -125
- package/lib/module/views/DiceBattle.js.map +1 -1
- package/lib/module/views/DiceLobby.js +97 -30
- package/lib/module/views/DiceLobby.js.map +1 -1
- package/lib/module/views/FortuneWheel.js +417 -271
- package/lib/module/views/FortuneWheel.js.map +1 -1
- package/lib/module/views/Freefall.js +147 -88
- package/lib/module/views/Freefall.js.map +1 -1
- package/lib/module/views/History.js +3 -2
- package/lib/module/views/History.js.map +1 -1
- package/lib/module/views/Home.js +1026 -401
- package/lib/module/views/Home.js.map +1 -1
- package/lib/module/views/Jetstream.js +43 -19
- package/lib/module/views/Jetstream.js.map +1 -1
- package/lib/module/views/Leaderboard.js +98 -89
- package/lib/module/views/Leaderboard.js.map +1 -1
- package/lib/module/views/MillionaireHunter.js +743 -569
- package/lib/module/views/MillionaireHunter.js.map +1 -1
- package/lib/module/views/Minefield.js +40 -18
- package/lib/module/views/Minefield.js.map +1 -1
- package/lib/module/views/PaymentWebView.js +4 -3
- package/lib/module/views/PaymentWebView.js.map +1 -1
- package/lib/module/views/PlayerCard.js +3 -2
- package/lib/module/views/PlayerCard.js.map +1 -1
- package/lib/module/views/Profile.js +3 -2
- package/lib/module/views/Profile.js.map +1 -1
- package/lib/module/views/RaffleDraw.js +16 -6
- package/lib/module/views/RaffleDraw.js.map +1 -1
- package/lib/module/views/RevealWin.js +152 -25
- package/lib/module/views/RevealWin.js.map +1 -1
- package/lib/module/views/Splash.js +17 -9
- package/lib/module/views/Splash.js.map +1 -1
- package/lib/module/views/Success.js +5 -2
- package/lib/module/views/Success.js.map +1 -1
- package/lib/module/views/TicketShop.js +1067 -236
- package/lib/module/views/TicketShop.js.map +1 -1
- package/lib/module/views/TriviaLobby.js +43 -6
- package/lib/module/views/TriviaLobby.js.map +1 -1
- package/lib/module/views/TriviaMaster.js +23 -18
- package/lib/module/views/TriviaMaster.js.map +1 -1
- package/lib/module/views/Wallet.js +2 -1
- package/lib/module/views/Wallet.js.map +1 -1
- package/lib/module/views/WithdrawFlow.js +3 -2
- package/lib/module/views/WithdrawFlow.js.map +1 -1
- package/lib/module/views/diceDuel.js +44 -0
- package/lib/module/views/diceDuel.js.map +1 -0
- package/lib/module/views/freefallDrop.js +66 -0
- package/lib/module/views/freefallDrop.js.map +1 -0
- package/lib/module/views/homeLayout.js +47 -0
- package/lib/module/views/homeLayout.js.map +1 -0
- package/lib/module/views/launchFeatured.js +43 -0
- package/lib/module/views/launchFeatured.js.map +1 -0
- package/lib/module/views/leaderboardPhase.js +52 -0
- package/lib/module/views/leaderboardPhase.js.map +1 -0
- package/lib/module/views/lobbyKit.js +224 -0
- package/lib/module/views/lobbyKit.js.map +1 -0
- package/lib/module/views/raffleContent.js +11 -0
- package/lib/module/views/raffleContent.js.map +1 -0
- package/lib/module/views/rafflePhase.js +15 -0
- package/lib/module/views/rafflePhase.js.map +1 -0
- package/lib/module/views/revealWinHelpers.js +19 -0
- package/lib/module/views/revealWinHelpers.js.map +1 -1
- package/lib/module/views/shopArtMotion.js +25 -0
- package/lib/module/views/shopArtMotion.js.map +1 -0
- package/lib/module/views/ticketBundlePresets.js +15 -12
- package/lib/module/views/ticketBundlePresets.js.map +1 -1
- package/lib/module/views/ticketShopArt.js +391 -0
- package/lib/module/views/ticketShopArt.js.map +1 -0
- package/lib/module/views/treasureHunt.js +81 -0
- package/lib/module/views/treasureHunt.js.map +1 -0
- package/lib/module/views/wheelLayout.js +47 -0
- package/lib/module/views/wheelLayout.js.map +1 -0
- package/lib/typescript/src/HubContent.d.ts.map +1 -1
- package/lib/typescript/src/MonflowtsHub.d.ts.map +1 -1
- package/lib/typescript/src/api/gameTypes.d.ts +18 -2
- package/lib/typescript/src/api/gameTypes.d.ts.map +1 -1
- package/lib/typescript/src/api/mutations.d.ts.map +1 -1
- package/lib/typescript/src/api/queries.d.ts.map +1 -1
- package/lib/typescript/src/api/sdkTypes.d.ts +3 -0
- package/lib/typescript/src/api/sdkTypes.d.ts.map +1 -1
- package/lib/typescript/src/components/AbandonPolicyNotice.d.ts.map +1 -1
- package/lib/typescript/src/components/CoinFlyOverlay.d.ts.map +1 -1
- package/lib/typescript/src/components/GameRulesModal.d.ts +1 -0
- package/lib/typescript/src/components/GameRulesModal.d.ts.map +1 -1
- package/lib/typescript/src/components/HypeCallout.d.ts.map +1 -1
- package/lib/typescript/src/components/InsufficientFundsOverlay.d.ts.map +1 -1
- package/lib/typescript/src/components/JackpotNearMiss.d.ts.map +1 -1
- package/lib/typescript/src/components/JackpotTeaser.d.ts.map +1 -1
- package/lib/typescript/src/components/QuitConfirmModal.d.ts.map +1 -1
- package/lib/typescript/src/components/SessionTimer.d.ts.map +1 -1
- package/lib/typescript/src/components/ShopArtView.d.ts +11 -0
- package/lib/typescript/src/components/ShopArtView.d.ts.map +1 -0
- package/lib/typescript/src/components/SideDemoTab.d.ts +1 -0
- package/lib/typescript/src/components/SideDemoTab.d.ts.map +1 -1
- package/lib/typescript/src/components/StakeInput.d.ts.map +1 -1
- package/lib/typescript/src/content.d.ts +1 -0
- package/lib/typescript/src/content.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useAvailableGames.d.ts +3 -0
- package/lib/typescript/src/hooks/useAvailableGames.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useLeaderboard.d.ts +4 -0
- package/lib/typescript/src/hooks/useLeaderboard.d.ts.map +1 -1
- package/lib/typescript/src/hooks/usePlayGame.d.ts +1 -1
- package/lib/typescript/src/hooks/usePlayGame.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useRaffleDrawState.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +16 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/navigation/NativeStackView.d.ts +41 -0
- package/lib/typescript/src/navigation/NativeStackView.d.ts.map +1 -0
- package/lib/typescript/src/navigation/Navigator.d.ts +13 -0
- package/lib/typescript/src/navigation/Navigator.d.ts.map +1 -0
- package/lib/typescript/src/navigation/engine.d.ts +69 -0
- package/lib/typescript/src/navigation/engine.d.ts.map +1 -0
- package/lib/typescript/src/navigation/hooks.d.ts +6 -0
- package/lib/typescript/src/navigation/hooks.d.ts.map +1 -0
- package/lib/typescript/src/navigation/index.d.ts +7 -0
- package/lib/typescript/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/src/navigation/routes.d.ts +80 -0
- package/lib/typescript/src/navigation/routes.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +0 -9
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/scale.d.ts +12 -0
- package/lib/typescript/src/utils/scale.d.ts.map +1 -0
- package/lib/typescript/src/views/DiceBattle.d.ts.map +1 -1
- package/lib/typescript/src/views/DiceLobby.d.ts.map +1 -1
- package/lib/typescript/src/views/FortuneWheel.d.ts.map +1 -1
- package/lib/typescript/src/views/Freefall.d.ts.map +1 -1
- package/lib/typescript/src/views/History.d.ts.map +1 -1
- package/lib/typescript/src/views/Home.d.ts +2 -2
- package/lib/typescript/src/views/Home.d.ts.map +1 -1
- package/lib/typescript/src/views/Jetstream.d.ts.map +1 -1
- package/lib/typescript/src/views/Leaderboard.d.ts.map +1 -1
- package/lib/typescript/src/views/MillionaireHunter.d.ts.map +1 -1
- package/lib/typescript/src/views/Minefield.d.ts.map +1 -1
- package/lib/typescript/src/views/PlayerCard.d.ts.map +1 -1
- package/lib/typescript/src/views/Profile.d.ts.map +1 -1
- package/lib/typescript/src/views/RaffleDraw.d.ts +2 -1
- package/lib/typescript/src/views/RaffleDraw.d.ts.map +1 -1
- package/lib/typescript/src/views/RevealWin.d.ts.map +1 -1
- package/lib/typescript/src/views/Splash.d.ts.map +1 -1
- package/lib/typescript/src/views/Success.d.ts.map +1 -1
- package/lib/typescript/src/views/TicketShop.d.ts +1 -0
- package/lib/typescript/src/views/TicketShop.d.ts.map +1 -1
- package/lib/typescript/src/views/TriviaLobby.d.ts.map +1 -1
- package/lib/typescript/src/views/TriviaMaster.d.ts.map +1 -1
- package/lib/typescript/src/views/Wallet.d.ts.map +1 -1
- package/lib/typescript/src/views/diceDuel.d.ts +22 -0
- package/lib/typescript/src/views/diceDuel.d.ts.map +1 -0
- package/lib/typescript/src/views/freefallDrop.d.ts +19 -0
- package/lib/typescript/src/views/freefallDrop.d.ts.map +1 -0
- package/lib/typescript/src/views/homeLayout.d.ts +15 -0
- package/lib/typescript/src/views/homeLayout.d.ts.map +1 -0
- package/lib/typescript/src/views/launchFeatured.d.ts +2 -0
- package/lib/typescript/src/views/launchFeatured.d.ts.map +1 -0
- package/lib/typescript/src/views/leaderboardPhase.d.ts +6 -0
- package/lib/typescript/src/views/leaderboardPhase.d.ts.map +1 -0
- package/lib/typescript/src/views/lobbyKit.d.ts +45 -0
- package/lib/typescript/src/views/lobbyKit.d.ts.map +1 -0
- package/lib/typescript/src/views/raffleContent.d.ts +3 -0
- package/lib/typescript/src/views/raffleContent.d.ts.map +1 -0
- package/lib/typescript/src/views/rafflePhase.d.ts +9 -0
- package/lib/typescript/src/views/rafflePhase.d.ts.map +1 -0
- package/lib/typescript/src/views/revealWinHelpers.d.ts +9 -0
- package/lib/typescript/src/views/revealWinHelpers.d.ts.map +1 -1
- package/lib/typescript/src/views/shopArtMotion.d.ts +13 -0
- package/lib/typescript/src/views/shopArtMotion.d.ts.map +1 -0
- package/lib/typescript/src/views/ticketBundlePresets.d.ts +3 -17
- package/lib/typescript/src/views/ticketBundlePresets.d.ts.map +1 -1
- package/lib/typescript/src/views/ticketShopArt.d.ts +27 -0
- package/lib/typescript/src/views/ticketShopArt.d.ts.map +1 -0
- package/lib/typescript/src/views/treasureHunt.d.ts +29 -0
- package/lib/typescript/src/views/treasureHunt.d.ts.map +1 -0
- package/lib/typescript/src/views/wheelLayout.d.ts +30 -0
- package/lib/typescript/src/views/wheelLayout.d.ts.map +1 -0
- package/package.json +1 -1
package/lib/module/views/Home.js
CHANGED
|
@@ -1,114 +1,408 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { useState } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { Image, Platform, ScrollView, StyleSheet, Text, View } from 'react-native';
|
|
5
|
+
import { scaledStyles } from "../utils/scale.js";
|
|
6
|
+
import { useFocusEffect, useIsFocused } from "../navigation/hooks.js";
|
|
7
|
+
import { IMAGES } from "../constants.js";
|
|
6
8
|
import SvgIcon from "../Icons.js";
|
|
7
9
|
import MonflowtsPressable from "../components/MonflowtsPressable.js";
|
|
8
10
|
import MonflowtsLottieView from "../NativeLottieView.js";
|
|
9
11
|
import { lottie } from "../assets/remote.js";
|
|
10
12
|
import { animationContent, gameContent, randomMessageKey } from "../content.js";
|
|
13
|
+
import { useQuery } from '@apollo/client/react';
|
|
11
14
|
import { useAvailableGames } from "../hooks/useAvailableGames.js";
|
|
15
|
+
import { GET_ACTIVE_LEADERBOARD_RAFFLE } from "../api/queries.js";
|
|
12
16
|
import { useAuthStore } from "../stores/authStore.js";
|
|
13
17
|
import { t, formatNumber } from "../i18n.js";
|
|
14
18
|
import { useResponsive } from "../hooks/useResponsive.js";
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
import { LOBBY_COMPACT_MAX_WIDTH, LOBBY_WIDE_MIN_WIDTH, drawCountdown, lobbyCardWidth, lobbyColumns, rotateToFront, tipLines } from "./homeLayout.js";
|
|
20
|
+
import { useLaunchFeatured } from "./launchFeatured.js";
|
|
21
|
+
import { LOBBY, Notch, Perforation, Sunburst, useNow, useReducedMotion } from "./lobbyKit.js";
|
|
22
|
+
import { rafflePeriod } from "./leaderboardPhase.js";
|
|
23
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
const HERO_GAME = 'RAFFLE_DRAW';
|
|
25
|
+
const TIP_ROTATE_MS = 6000;
|
|
26
|
+
const LOBBY_REFRESH_MS = 60000;
|
|
27
|
+
const PLUS_PATH = 'M12 5v14M5 12h14';
|
|
28
|
+
const ARROW_PATH = 'M5 12h14M13 6l6 6-6 6';
|
|
29
|
+
const CHEVRON_PATH = 'M9 6l6 6-6 6';
|
|
30
|
+
const GAME_CODE_SCREEN = {
|
|
31
|
+
RAFFLE_DRAW: 'RAFFLE_DRAW',
|
|
32
|
+
SPIN_WHEEL: 'FORTUNE_WHEEL',
|
|
33
|
+
MILLIONAIRE_HUNTER: 'MILLIONAIRE_HUNTER',
|
|
34
|
+
FAST_FINGER: 'TRIVIA_LOBBY',
|
|
35
|
+
DICE_ROLL: 'DICE_LOBBY',
|
|
36
|
+
REVEAL_WIN: 'REVEAL_WIN',
|
|
37
|
+
PLINKO: 'FREEFALL',
|
|
38
|
+
MINES: 'MINEFIELD',
|
|
39
|
+
CRASH: 'JETSTREAM'
|
|
40
|
+
};
|
|
41
|
+
function cardData(game, cardLotties) {
|
|
42
|
+
const display = game.uiConfig?.display;
|
|
43
|
+
const card = gameContent(game.gameCode).card;
|
|
44
|
+
if (!display && !card) return null;
|
|
45
|
+
const lottieKey = cardLotties[display?.lottieId || card?.lottieId || ''];
|
|
46
|
+
const rules = game.gameplayRules;
|
|
47
|
+
const topKobo = rules?.jackpotAmountKobo || rules?.maxWinKobo || 0;
|
|
48
|
+
const stakeKobo = rules?.stakeOptions?.[0] ?? game.playCost?.fixedAmountKobo ?? null;
|
|
49
|
+
return {
|
|
50
|
+
game,
|
|
51
|
+
name: game.gameCode === HERO_GAME && game.name || t(`games.${game.gameCode}.name`),
|
|
52
|
+
tag: game.gameCode === HERO_GAME && game.tagLine || t(`games.${game.gameCode}.tag`),
|
|
53
|
+
band: display?.bandColor || card?.bandColor || LOBBY.fallbackBand,
|
|
54
|
+
lottieJson: lottieKey ? lottie(lottieKey) : '',
|
|
55
|
+
prizeLabel: t(card?.prizeLabel ?? 'home.topPrize'),
|
|
56
|
+
prize: topKobo ? formatNumber(topKobo / 100) : '—',
|
|
57
|
+
minStake: stakeKobo ? Math.round(stakeKobo / 100) : null
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
const SHRINK_WORDS = Platform.OS === 'ios' ? {
|
|
61
|
+
adjustsFontSizeToFit: true,
|
|
62
|
+
minimumFontScale: 0.7
|
|
63
|
+
} : {};
|
|
64
|
+
const Tag = ({
|
|
65
|
+
label,
|
|
66
|
+
large,
|
|
27
67
|
style
|
|
28
|
-
}) => /*#__PURE__*/
|
|
29
|
-
style: [styles.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
68
|
+
}) => /*#__PURE__*/_jsx(View, {
|
|
69
|
+
style: [styles.tag, large && styles.tagLarge, style],
|
|
70
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
71
|
+
style: [styles.tagText, large && styles.tagTextLarge],
|
|
72
|
+
numberOfLines: 1,
|
|
73
|
+
...SHRINK_WORDS,
|
|
74
|
+
children: label
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
const PillButton = ({
|
|
78
|
+
label,
|
|
79
|
+
icon,
|
|
80
|
+
light,
|
|
81
|
+
stretch
|
|
82
|
+
}) => /*#__PURE__*/_jsxs(View, {
|
|
83
|
+
style: [styles.pillButton, light ? styles.pillButtonLight : styles.pillButtonGold, stretch && styles.pillButtonStretch],
|
|
84
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
85
|
+
style: [styles.pillButtonText, {
|
|
86
|
+
color: light ? LOBBY.bg : LOBBY.goldInk
|
|
87
|
+
}],
|
|
88
|
+
children: label
|
|
89
|
+
}), icon ? /*#__PURE__*/_jsx(SvgIcon, {
|
|
90
|
+
name: "",
|
|
91
|
+
d: icon,
|
|
92
|
+
stroked: true,
|
|
93
|
+
size: 18,
|
|
94
|
+
strokeWidth: 2.8,
|
|
95
|
+
color: light ? LOBBY.bg : LOBBY.goldInk
|
|
96
|
+
}) : null]
|
|
97
|
+
});
|
|
98
|
+
const BANNER_ROTATE_MS = 6000;
|
|
99
|
+
const CTA_KEY = {
|
|
100
|
+
RAFFLE_DRAW: 'home.getTickets',
|
|
101
|
+
SPIN_WHEEL: 'home.spinNow'
|
|
102
|
+
};
|
|
103
|
+
function bannerHeight(wide, compact) {
|
|
104
|
+
return wide ? 272 : compact ? 212 : 224;
|
|
105
|
+
}
|
|
106
|
+
const DrawChip = ({
|
|
107
|
+
drawDate
|
|
108
|
+
}) => {
|
|
109
|
+
const now = useNow(30000);
|
|
110
|
+
const left = drawCountdown(drawDate, now);
|
|
111
|
+
if (!left) return null;
|
|
112
|
+
const value = left.days !== '00' ? `${left.days}d ${left.hours}h` : `${left.hours}h ${left.minutes}m`;
|
|
113
|
+
return /*#__PURE__*/_jsx(View, {
|
|
114
|
+
style: styles.drawChip,
|
|
115
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
116
|
+
style: styles.drawChipText,
|
|
117
|
+
numberOfLines: 1,
|
|
118
|
+
children: `${t('home.drawIn')} ${value}`
|
|
119
|
+
})
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
const FeaturedBanner = ({
|
|
123
|
+
data,
|
|
124
|
+
width,
|
|
125
|
+
height,
|
|
126
|
+
wide,
|
|
127
|
+
live,
|
|
128
|
+
active,
|
|
129
|
+
onPress
|
|
130
|
+
}) => {
|
|
131
|
+
const artWidth = Math.round(width * (wide ? 0.36 : 0.4));
|
|
132
|
+
const lottieSize = Math.min(artWidth - 12, height - 36);
|
|
133
|
+
const sunburst = Math.round(Math.max(artWidth, height) * 2);
|
|
134
|
+
const drawDate = data.game.gameplayRules?.drawDate;
|
|
135
|
+
const prizeSize = fittedNumberSize(data.prize, width - artWidth - (wide ? 52 : 34), wide ? 56 : 32);
|
|
136
|
+
return /*#__PURE__*/_jsxs(MonflowtsPressable, {
|
|
137
|
+
style: [styles.banner, {
|
|
138
|
+
width,
|
|
139
|
+
height,
|
|
140
|
+
backgroundColor: data.band
|
|
141
|
+
}],
|
|
142
|
+
onPress: onPress,
|
|
143
|
+
activeOpacity: 0.94,
|
|
144
|
+
accessibilityRole: "button",
|
|
145
|
+
accessibilityLabel: `${data.name}, ${data.prizeLabel} ${data.prize}`,
|
|
34
146
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
style: [styles.
|
|
42
|
-
|
|
147
|
+
style: [styles.bannerBody, wide && styles.bannerBodyWide],
|
|
148
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
149
|
+
style: styles.bannerHeading,
|
|
150
|
+
children: [/*#__PURE__*/_jsx(Tag, {
|
|
151
|
+
label: data.tag
|
|
152
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
153
|
+
style: [styles.bannerTitle, wide && styles.bannerTitleWide],
|
|
154
|
+
numberOfLines: 1,
|
|
155
|
+
adjustsFontSizeToFit: true,
|
|
156
|
+
minimumFontScale: 0.7,
|
|
157
|
+
children: data.name
|
|
158
|
+
})]
|
|
159
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
160
|
+
style: styles.bannerPrizeBox,
|
|
161
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
162
|
+
style: styles.bannerPrizeLabel,
|
|
163
|
+
children: data.prizeLabel
|
|
164
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
165
|
+
style: [styles.bannerPrize, {
|
|
166
|
+
fontSize: prizeSize,
|
|
167
|
+
lineHeight: Math.round(prizeSize * 1.2)
|
|
43
168
|
}],
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
169
|
+
numberOfLines: 1,
|
|
170
|
+
children: data.prize
|
|
171
|
+
})]
|
|
172
|
+
}), /*#__PURE__*/_jsx(PillButton, {
|
|
173
|
+
label: t(CTA_KEY[data.game.gameCode] ?? 'home.playNow'),
|
|
174
|
+
icon: ARROW_PATH
|
|
49
175
|
})]
|
|
50
176
|
}), /*#__PURE__*/_jsxs(View, {
|
|
51
|
-
style: styles.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
})
|
|
177
|
+
style: [styles.bannerArt, {
|
|
178
|
+
width: artWidth
|
|
179
|
+
}],
|
|
180
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
181
|
+
style: [StyleSheet.absoluteFill, {
|
|
182
|
+
backgroundColor: LOBBY.shade
|
|
183
|
+
}]
|
|
184
|
+
}), live ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
185
|
+
children: [/*#__PURE__*/_jsx(Sunburst, {
|
|
186
|
+
size: sunburst,
|
|
187
|
+
style: {
|
|
188
|
+
left: (artWidth - sunburst) / 2,
|
|
189
|
+
top: (height - sunburst) / 2
|
|
190
|
+
}
|
|
191
|
+
}), data.lottieJson ? /*#__PURE__*/_jsx(MonflowtsLottieView, {
|
|
192
|
+
sourceJson: data.lottieJson,
|
|
193
|
+
playing: active,
|
|
194
|
+
loop: true,
|
|
195
|
+
speed: 1,
|
|
196
|
+
style: {
|
|
197
|
+
width: lottieSize,
|
|
198
|
+
height: lottieSize
|
|
199
|
+
}
|
|
200
|
+
}) : null]
|
|
201
|
+
}) : null, drawDate ? /*#__PURE__*/_jsx(DrawChip, {
|
|
202
|
+
drawDate: drawDate
|
|
203
|
+
}) : null]
|
|
204
|
+
}), /*#__PURE__*/_jsx(Perforation, {
|
|
205
|
+
vertical: true,
|
|
206
|
+
style: {
|
|
207
|
+
position: 'absolute',
|
|
208
|
+
right: artWidth - 3,
|
|
209
|
+
top: 20,
|
|
210
|
+
bottom: 20,
|
|
211
|
+
width: 6
|
|
212
|
+
}
|
|
213
|
+
}), /*#__PURE__*/_jsx(Notch, {
|
|
214
|
+
size: 24,
|
|
215
|
+
style: {
|
|
216
|
+
right: artWidth - 12,
|
|
217
|
+
top: -12
|
|
218
|
+
}
|
|
219
|
+
}), /*#__PURE__*/_jsx(Notch, {
|
|
220
|
+
size: 24,
|
|
221
|
+
style: {
|
|
222
|
+
right: artWidth - 12,
|
|
223
|
+
bottom: -12
|
|
224
|
+
}
|
|
59
225
|
})]
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
const FeaturedCarousel = ({
|
|
229
|
+
cards,
|
|
230
|
+
width,
|
|
231
|
+
gap,
|
|
232
|
+
wide,
|
|
233
|
+
compact,
|
|
234
|
+
focused,
|
|
235
|
+
onOpen
|
|
236
|
+
}) => {
|
|
237
|
+
const scrollRef = useRef(null);
|
|
238
|
+
const [index, setIndex] = useState(0);
|
|
239
|
+
const [dragging, setDragging] = useState(false);
|
|
240
|
+
const reduced = useReducedMotion();
|
|
241
|
+
const step = width + gap;
|
|
242
|
+
const height = bannerHeight(wide, compact);
|
|
243
|
+
const lead = cards[0]?.game.id;
|
|
244
|
+
const show = (i, animated) => {
|
|
245
|
+
setIndex(i);
|
|
246
|
+
scrollRef.current?.scrollTo({
|
|
247
|
+
x: i * step,
|
|
248
|
+
animated
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
useEffect(() => {
|
|
252
|
+
show(0, false);
|
|
253
|
+
}, [lead, cards.length, step]);
|
|
254
|
+
useEffect(() => {
|
|
255
|
+
if (reduced !== false || !focused || dragging || cards.length < 2) return;
|
|
256
|
+
const id = setTimeout(() => show((index + 1) % cards.length, true), BANNER_ROTATE_MS);
|
|
257
|
+
return () => clearTimeout(id);
|
|
258
|
+
}, [index, reduced, focused, dragging, cards.length, step]);
|
|
259
|
+
const settle = x => {
|
|
260
|
+
setDragging(false);
|
|
261
|
+
setIndex(Math.max(0, Math.min(cards.length - 1, Math.round(x / step))));
|
|
262
|
+
};
|
|
263
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
264
|
+
style: styles.carousel,
|
|
265
|
+
children: [/*#__PURE__*/_jsx(ScrollView, {
|
|
266
|
+
ref: scrollRef,
|
|
267
|
+
horizontal: true,
|
|
268
|
+
showsHorizontalScrollIndicator: false,
|
|
269
|
+
snapToInterval: step,
|
|
270
|
+
decelerationRate: "fast",
|
|
271
|
+
disableIntervalMomentum: true,
|
|
72
272
|
style: {
|
|
73
|
-
|
|
74
|
-
|
|
273
|
+
width,
|
|
274
|
+
height,
|
|
275
|
+
overflow: 'visible'
|
|
75
276
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
277
|
+
contentContainerStyle: {
|
|
278
|
+
gap
|
|
279
|
+
},
|
|
280
|
+
onScrollBeginDrag: () => setDragging(true),
|
|
281
|
+
onMomentumScrollEnd: e => settle(e.nativeEvent.contentOffset.x),
|
|
282
|
+
children: cards.map((c, i) => /*#__PURE__*/_jsx(FeaturedBanner, {
|
|
283
|
+
data: c,
|
|
284
|
+
width: width,
|
|
285
|
+
height: height,
|
|
286
|
+
wide: wide,
|
|
287
|
+
live: Math.abs(i - index) <= 1,
|
|
288
|
+
active: i === index,
|
|
289
|
+
onPress: () => onOpen(c.game)
|
|
290
|
+
}, c.game.id))
|
|
291
|
+
}), cards.length > 1 ? /*#__PURE__*/_jsx(View, {
|
|
292
|
+
style: styles.bannerDots,
|
|
293
|
+
children: cards.map((c, i) => /*#__PURE__*/_jsx(MonflowtsPressable, {
|
|
294
|
+
style: styles.bannerDotTap,
|
|
295
|
+
onPress: () => show(i, true),
|
|
296
|
+
accessibilityRole: "button",
|
|
297
|
+
accessibilityLabel: `${c.name}, ${t('home.bannerPosition', {
|
|
298
|
+
current: i + 1,
|
|
299
|
+
total: cards.length
|
|
300
|
+
})}`,
|
|
301
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
302
|
+
style: [styles.bannerDot, i === index && styles.bannerDotActive]
|
|
303
|
+
})
|
|
304
|
+
}, c.game.id))
|
|
305
|
+
}) : null]
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
function fittedNumberSize(text, room, max) {
|
|
309
|
+
return Math.min(max, Math.floor(room / Math.max(4, text.length * 0.64)));
|
|
310
|
+
}
|
|
311
|
+
const GameCard = ({
|
|
312
|
+
data,
|
|
313
|
+
width,
|
|
314
|
+
onPress
|
|
315
|
+
}) => {
|
|
316
|
+
const prizeSize = fittedNumberSize(data.prize, width - 26, 28);
|
|
317
|
+
return /*#__PURE__*/_jsxs(MonflowtsPressable, {
|
|
318
|
+
style: [styles.card, {
|
|
319
|
+
width
|
|
320
|
+
}],
|
|
321
|
+
onPress: onPress,
|
|
322
|
+
activeOpacity: 0.92,
|
|
323
|
+
accessibilityRole: "button",
|
|
324
|
+
accessibilityLabel: t('home.playGame', {
|
|
325
|
+
name: data.name
|
|
326
|
+
}),
|
|
327
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
328
|
+
style: [styles.cardBand, {
|
|
329
|
+
backgroundColor: data.band
|
|
90
330
|
}],
|
|
91
|
-
children: [/*#__PURE__*/_jsx(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
331
|
+
children: [/*#__PURE__*/_jsx(Tag, {
|
|
332
|
+
label: data.tag,
|
|
333
|
+
style: styles.cardTag
|
|
334
|
+
}), data.lottieJson ? /*#__PURE__*/_jsx(MonflowtsLottieView, {
|
|
335
|
+
sourceJson: data.lottieJson,
|
|
336
|
+
autoPlay: true,
|
|
337
|
+
loop: true,
|
|
338
|
+
speed: 1,
|
|
339
|
+
style: styles.cardLottie
|
|
340
|
+
}) : null]
|
|
341
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
342
|
+
style: styles.cardBody,
|
|
343
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
344
|
+
style: styles.cardTitle,
|
|
345
|
+
numberOfLines: 2,
|
|
346
|
+
children: data.name
|
|
347
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
348
|
+
style: styles.cardPrize,
|
|
349
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
350
|
+
style: styles.cardPrizeLabel,
|
|
351
|
+
children: data.prizeLabel
|
|
352
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
353
|
+
style: [styles.cardPrizeValue, {
|
|
354
|
+
fontSize: prizeSize,
|
|
355
|
+
lineHeight: Math.round(prizeSize * 1.15)
|
|
356
|
+
}],
|
|
357
|
+
numberOfLines: 1,
|
|
358
|
+
children: data.prize
|
|
359
|
+
})]
|
|
360
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
361
|
+
style: styles.cardFooter,
|
|
362
|
+
children: [data.minStake ? /*#__PURE__*/_jsxs(View, {
|
|
363
|
+
style: styles.cardStake,
|
|
364
|
+
children: [/*#__PURE__*/_jsx(SvgIcon, {
|
|
365
|
+
name: "diamond",
|
|
366
|
+
size: 12,
|
|
367
|
+
color: LOBBY.subtle
|
|
368
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
369
|
+
style: styles.cardStakeText,
|
|
370
|
+
numberOfLines: 1,
|
|
371
|
+
children: t('home.fromStake', {
|
|
372
|
+
amount: formatNumber(data.minStake)
|
|
373
|
+
})
|
|
374
|
+
})]
|
|
375
|
+
}) : /*#__PURE__*/_jsx(View, {}), /*#__PURE__*/_jsx(View, {
|
|
376
|
+
style: styles.playButton,
|
|
377
|
+
children: /*#__PURE__*/_jsx(SvgIcon, {
|
|
378
|
+
name: "play",
|
|
379
|
+
size: 18,
|
|
380
|
+
color: LOBBY.bg
|
|
381
|
+
})
|
|
382
|
+
})]
|
|
98
383
|
})]
|
|
384
|
+
}), /*#__PURE__*/_jsx(Perforation, {
|
|
385
|
+
style: {
|
|
386
|
+
position: 'absolute',
|
|
387
|
+
left: 18,
|
|
388
|
+
right: 18,
|
|
389
|
+
top: 147,
|
|
390
|
+
height: 6
|
|
391
|
+
}
|
|
392
|
+
}), /*#__PURE__*/_jsx(Notch, {
|
|
393
|
+
size: 24,
|
|
394
|
+
style: {
|
|
395
|
+
left: -12,
|
|
396
|
+
top: 138
|
|
397
|
+
}
|
|
398
|
+
}), /*#__PURE__*/_jsx(Notch, {
|
|
399
|
+
size: 24,
|
|
400
|
+
style: {
|
|
401
|
+
right: -12,
|
|
402
|
+
top: 138
|
|
403
|
+
}
|
|
99
404
|
})]
|
|
100
|
-
})
|
|
101
|
-
});
|
|
102
|
-
const GAME_CODE_SCREEN = {
|
|
103
|
-
RAFFLE_DRAW: 'RAFFLE_DRAW',
|
|
104
|
-
SPIN_WHEEL: 'FORTUNE_WHEEL',
|
|
105
|
-
MILLIONAIRE_HUNTER: 'MILLIONAIRE_HUNTER',
|
|
106
|
-
FAST_FINGER: 'TRIVIA_LOBBY',
|
|
107
|
-
DICE_ROLL: 'DICE_LOBBY',
|
|
108
|
-
REVEAL_WIN: 'REVEAL_WIN',
|
|
109
|
-
PLINKO: 'FREEFALL',
|
|
110
|
-
MINES: 'MINEFIELD',
|
|
111
|
-
CRASH: 'JETSTREAM'
|
|
405
|
+
});
|
|
112
406
|
};
|
|
113
407
|
const Home = ({
|
|
114
408
|
onNavigate,
|
|
@@ -118,434 +412,765 @@ const Home = ({
|
|
|
118
412
|
onExit
|
|
119
413
|
}) => {
|
|
120
414
|
const [tipKey] = useState(() => randomMessageKey('home.tip'));
|
|
415
|
+
const tips = useMemo(() => tipLines(t(tipKey)), [tipKey]);
|
|
416
|
+
const [tipIndex, setTipIndex] = useState(0);
|
|
121
417
|
const player = useAuthStore(s => s.player);
|
|
122
418
|
const {
|
|
123
|
-
isLoadingGames
|
|
419
|
+
isLoadingGames,
|
|
420
|
+
refetch: refetchGames,
|
|
421
|
+
startPolling,
|
|
422
|
+
stopPolling
|
|
124
423
|
} = useAvailableGames();
|
|
125
|
-
const
|
|
424
|
+
const raffleQ = useQuery(GET_ACTIVE_LEADERBOARD_RAFFLE, {
|
|
425
|
+
fetchPolicy: 'cache-and-network'
|
|
426
|
+
});
|
|
427
|
+
const activeRaffle = raffleQ.data?.getActiveLeaderboardRaffle ?? null;
|
|
428
|
+
const lobbyShownBefore = useRef(false);
|
|
429
|
+
const focused = useIsFocused();
|
|
430
|
+
useFocusEffect(() => {
|
|
431
|
+
if (lobbyShownBefore.current) {
|
|
432
|
+
refetchGames().catch(() => {});
|
|
433
|
+
raffleQ.refetch().catch(() => {});
|
|
434
|
+
}
|
|
435
|
+
lobbyShownBefore.current = true;
|
|
436
|
+
startPolling(LOBBY_REFRESH_MS);
|
|
437
|
+
raffleQ.startPolling(LOBBY_REFRESH_MS);
|
|
438
|
+
return () => {
|
|
439
|
+
stopPolling();
|
|
440
|
+
raffleQ.stopPolling();
|
|
441
|
+
};
|
|
442
|
+
});
|
|
126
443
|
const {
|
|
127
|
-
width
|
|
128
|
-
isWide,
|
|
129
|
-
gameColumns
|
|
444
|
+
width: windowWidth
|
|
130
445
|
} = useResponsive();
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
446
|
+
const [boxWidth, setBoxWidth] = useState(0);
|
|
447
|
+
const width = boxWidth || windowWidth;
|
|
448
|
+
const wide = width >= LOBBY_WIDE_MIN_WIDTH;
|
|
449
|
+
const compact = width < LOBBY_COMPACT_MAX_WIDTH;
|
|
450
|
+
const pagePadding = wide ? 32 : compact ? 16 : 20;
|
|
451
|
+
const gap = wide ? 16 : 12;
|
|
452
|
+
const columns = lobbyColumns(width);
|
|
453
|
+
const cardWidth = lobbyCardWidth(width - pagePadding * 2, columns, gap);
|
|
454
|
+
useEffect(() => {
|
|
455
|
+
if (tips.length < 2) return;
|
|
456
|
+
const id = setInterval(() => setTipIndex(i => (i + 1) % tips.length), TIP_ROTATE_MS);
|
|
457
|
+
return () => clearInterval(id);
|
|
458
|
+
}, [tips.length]);
|
|
459
|
+
const cards = useMemo(() => {
|
|
460
|
+
const lotties = animationContent().cardLotties ?? {};
|
|
461
|
+
return (availableGames ?? []).map(g => cardData(g, lotties)).filter(c => c !== null);
|
|
462
|
+
}, [availableGames]);
|
|
463
|
+
const codes = useMemo(() => cards.map(c => c.game.gameCode), [cards]);
|
|
464
|
+
const featuredCode = useLaunchFeatured(codes);
|
|
465
|
+
const bannerCards = useMemo(() => featuredCode ? rotateToFront(cards, cards.findIndex(c => c.game.gameCode === featuredCode)) : [], [cards, featuredCode]);
|
|
466
|
+
const open = game => {
|
|
467
|
+
if (onGameSelect) onGameSelect(game.gameCode);else {
|
|
138
468
|
const screen = GAME_CODE_SCREEN[game.gameCode];
|
|
139
469
|
if (screen) onNavigate(screen);
|
|
140
470
|
}
|
|
141
471
|
};
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
472
|
+
const onLayout = e => {
|
|
473
|
+
const w = Math.round(e.nativeEvent.layout.width);
|
|
474
|
+
setBoxWidth(prev => prev === w ? prev : w);
|
|
475
|
+
};
|
|
476
|
+
const period = rafflePeriod(activeRaffle?.schedule?.recurrence);
|
|
477
|
+
const leaderboard = activeRaffle ? /*#__PURE__*/_jsxs(MonflowtsPressable, {
|
|
478
|
+
style: [styles.tile, wide ? styles.tileFlex : styles.tileLeaderboard],
|
|
145
479
|
onPress: () => onNavigate('LEADERBOARD'),
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
480
|
+
activeOpacity: 0.85,
|
|
481
|
+
accessibilityRole: "button",
|
|
482
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
483
|
+
style: [styles.tileIcon, {
|
|
484
|
+
backgroundColor: LOBBY.leaderTint
|
|
485
|
+
}],
|
|
486
|
+
children: /*#__PURE__*/_jsx(SvgIcon, {
|
|
487
|
+
name: "trophy",
|
|
488
|
+
size: 26,
|
|
489
|
+
color: LOBBY.gold
|
|
490
|
+
})
|
|
151
491
|
}), /*#__PURE__*/_jsxs(View, {
|
|
152
|
-
style: styles.
|
|
492
|
+
style: styles.tileText,
|
|
153
493
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
154
|
-
style: styles.
|
|
155
|
-
|
|
494
|
+
style: styles.tileTitle,
|
|
495
|
+
numberOfLines: 1,
|
|
496
|
+
...SHRINK_WORDS,
|
|
497
|
+
children: t(`leaderboard.title.${period}`)
|
|
498
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
499
|
+
style: styles.tileSub,
|
|
500
|
+
numberOfLines: 2,
|
|
501
|
+
children: t(`leaderboard.tileSub.${period}`)
|
|
502
|
+
})]
|
|
503
|
+
}), /*#__PURE__*/_jsx(SvgIcon, {
|
|
504
|
+
name: "",
|
|
505
|
+
d: CHEVRON_PATH,
|
|
506
|
+
stroked: true,
|
|
507
|
+
size: 20,
|
|
508
|
+
strokeWidth: 2.2,
|
|
509
|
+
color: LOBBY.muted
|
|
510
|
+
})]
|
|
511
|
+
}) : null;
|
|
512
|
+
const oracle = /*#__PURE__*/_jsxs(MonflowtsPressable, {
|
|
513
|
+
style: [styles.tile, wide ? styles.tileFlex : styles.tileOracle],
|
|
514
|
+
onPress: () => setTipIndex(i => (i + 1) % Math.max(1, tips.length)),
|
|
515
|
+
activeOpacity: 0.85,
|
|
516
|
+
accessibilityLabel: `${t('home.oracleTip')}: ${tips[tipIndex] ?? ''}`,
|
|
517
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
518
|
+
style: [styles.tileIcon, {
|
|
519
|
+
backgroundColor: LOBBY.oracleTint
|
|
520
|
+
}],
|
|
521
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
522
|
+
source: IMAGES.ORACLE,
|
|
523
|
+
style: styles.oracleImage,
|
|
524
|
+
resizeMode: "contain"
|
|
525
|
+
})
|
|
526
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
527
|
+
style: styles.tileText,
|
|
528
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
529
|
+
style: styles.oracleHead,
|
|
530
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
531
|
+
style: styles.oracleLabel,
|
|
532
|
+
children: t('home.oracleTip')
|
|
533
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
534
|
+
style: styles.pager,
|
|
535
|
+
children: tips.map((_, i) => /*#__PURE__*/_jsx(View, {
|
|
536
|
+
style: [styles.pagerDot, i === tipIndex && styles.pagerDotActive]
|
|
537
|
+
}, i))
|
|
538
|
+
})]
|
|
156
539
|
}), /*#__PURE__*/_jsx(Text, {
|
|
157
|
-
style: styles.
|
|
158
|
-
|
|
540
|
+
style: styles.oracleText,
|
|
541
|
+
numberOfLines: 2,
|
|
542
|
+
children: tips[tipIndex] ?? ''
|
|
159
543
|
})]
|
|
160
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
161
|
-
style: styles.leaderboardTileChevron,
|
|
162
|
-
children: "\u203A"
|
|
163
544
|
})]
|
|
164
545
|
});
|
|
165
546
|
return /*#__PURE__*/_jsxs(View, {
|
|
166
547
|
style: styles.container,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
source: IMAGES.AVATAR,
|
|
176
|
-
style: styles.avatar
|
|
177
|
-
})
|
|
178
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
179
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
180
|
-
style: styles.welcomeText,
|
|
181
|
-
children: t('home.welcomeBack')
|
|
182
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
183
|
-
style: styles.playerName,
|
|
184
|
-
children: player?.firstName ?? player?.displayName ?? t('home.playerFallback')
|
|
185
|
-
})]
|
|
186
|
-
})]
|
|
187
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
188
|
-
style: styles.headerRight,
|
|
189
|
-
children: [onExit && /*#__PURE__*/_jsx(MonflowtsPressable, {
|
|
190
|
-
style: styles.closeBtn,
|
|
191
|
-
onPress: onExit,
|
|
192
|
-
activeOpacity: 0.7,
|
|
193
|
-
children: /*#__PURE__*/_jsx(SvgIcon, {
|
|
194
|
-
name: "door",
|
|
195
|
-
size: 16,
|
|
196
|
-
color: COLORS.slateLight
|
|
197
|
-
})
|
|
198
|
-
}), /*#__PURE__*/_jsxs(MonflowtsPressable, {
|
|
199
|
-
style: styles.balancePill,
|
|
200
|
-
onPress: () => onNavigate('WALLET'),
|
|
201
|
-
children: [/*#__PURE__*/_jsx(View, {
|
|
202
|
-
style: styles.diamondIcon,
|
|
203
|
-
children: /*#__PURE__*/_jsx(SvgIcon, {
|
|
204
|
-
name: "diamond",
|
|
205
|
-
size: 16,
|
|
206
|
-
color: COLORS.gold
|
|
207
|
-
})
|
|
208
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
209
|
-
style: styles.balanceText,
|
|
210
|
-
children: formatNumber(balance)
|
|
211
|
-
})]
|
|
212
|
-
})]
|
|
213
|
-
})]
|
|
214
|
-
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
215
|
-
style: styles.scrollArea,
|
|
216
|
-
contentContainerStyle: {
|
|
217
|
-
paddingBottom: 120
|
|
218
|
-
},
|
|
548
|
+
onLayout: onLayout,
|
|
549
|
+
children: [/*#__PURE__*/_jsxs(ScrollView, {
|
|
550
|
+
contentContainerStyle: [styles.content, {
|
|
551
|
+
paddingHorizontal: pagePadding,
|
|
552
|
+
paddingTop: wide ? 56 : 60,
|
|
553
|
+
gap: wide ? 20 : 16
|
|
554
|
+
}],
|
|
555
|
+
showsVerticalScrollIndicator: false,
|
|
219
556
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
220
|
-
style:
|
|
221
|
-
children: [/*#__PURE__*/_jsxs(
|
|
222
|
-
style: [styles.
|
|
557
|
+
style: [styles.header, compact && styles.headerCompact],
|
|
558
|
+
children: [/*#__PURE__*/_jsxs(MonflowtsPressable, {
|
|
559
|
+
style: [styles.headerLeft, compact && styles.headerLeftCompact],
|
|
560
|
+
onPress: () => onNavigate('PROFILE'),
|
|
561
|
+
accessibilityRole: "button",
|
|
223
562
|
children: [/*#__PURE__*/_jsx(Image, {
|
|
224
|
-
source: IMAGES.
|
|
225
|
-
style: styles.
|
|
226
|
-
resizeMode: "contain"
|
|
563
|
+
source: IMAGES.AVATAR,
|
|
564
|
+
style: [styles.avatar, wide && styles.avatarWide, compact && styles.avatarCompact]
|
|
227
565
|
}), /*#__PURE__*/_jsxs(View, {
|
|
228
|
-
style: styles.
|
|
566
|
+
style: styles.headerNames,
|
|
229
567
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
230
|
-
style: styles.
|
|
231
|
-
|
|
568
|
+
style: [styles.welcome, wide && styles.welcomeWide],
|
|
569
|
+
numberOfLines: 1,
|
|
570
|
+
children: t('home.welcomeBack')
|
|
232
571
|
}), /*#__PURE__*/_jsx(Text, {
|
|
233
|
-
style: styles.
|
|
234
|
-
|
|
572
|
+
style: [styles.playerName, wide && styles.playerNameWide],
|
|
573
|
+
numberOfLines: 1,
|
|
574
|
+
...SHRINK_WORDS,
|
|
575
|
+
children: player?.firstName ?? player?.displayName ?? t('home.playerFallback')
|
|
235
576
|
})]
|
|
236
577
|
})]
|
|
237
|
-
}),
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
578
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
579
|
+
style: [styles.headerRight, compact && styles.headerRightCompact],
|
|
580
|
+
children: [onExit ? /*#__PURE__*/_jsx(MonflowtsPressable, {
|
|
581
|
+
style: [styles.exitButton, compact && styles.roundCompact],
|
|
582
|
+
onPress: onExit,
|
|
583
|
+
activeOpacity: 0.7,
|
|
584
|
+
accessibilityRole: "button",
|
|
585
|
+
children: /*#__PURE__*/_jsx(SvgIcon, {
|
|
586
|
+
name: "door",
|
|
587
|
+
size: 18,
|
|
588
|
+
color: LOBBY.muted
|
|
589
|
+
})
|
|
590
|
+
}) : null, /*#__PURE__*/_jsxs(View, {
|
|
591
|
+
style: [styles.balancePill, compact && styles.balancePillCompact],
|
|
592
|
+
children: [/*#__PURE__*/_jsxs(MonflowtsPressable, {
|
|
593
|
+
style: [styles.balanceTap, compact && styles.balanceTapCompact],
|
|
594
|
+
onPress: () => onNavigate('WALLET'),
|
|
595
|
+
accessibilityRole: "button",
|
|
596
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
597
|
+
style: [styles.coin, compact && styles.coinCompact],
|
|
598
|
+
children: /*#__PURE__*/_jsx(SvgIcon, {
|
|
599
|
+
name: "diamond",
|
|
600
|
+
size: compact ? 13 : 15,
|
|
601
|
+
color: LOBBY.goldInk
|
|
602
|
+
})
|
|
603
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
604
|
+
style: [styles.balanceText, wide && styles.balanceTextWide],
|
|
605
|
+
children: formatNumber(balance)
|
|
606
|
+
})]
|
|
607
|
+
}), /*#__PURE__*/_jsxs(MonflowtsPressable, {
|
|
608
|
+
style: [styles.topUp, wide ? styles.topUpWide : styles.topUpRound, compact && styles.roundCompact],
|
|
609
|
+
onPress: () => onNavigate('DEPOSIT_SELECT'),
|
|
610
|
+
accessibilityRole: "button",
|
|
611
|
+
accessibilityLabel: t('home.topUp'),
|
|
612
|
+
children: [/*#__PURE__*/_jsx(SvgIcon, {
|
|
613
|
+
name: "",
|
|
614
|
+
d: PLUS_PATH,
|
|
615
|
+
stroked: true,
|
|
616
|
+
size: wide ? 18 : 20,
|
|
617
|
+
strokeWidth: 2.8,
|
|
618
|
+
color: LOBBY.goldInk
|
|
619
|
+
}), wide ? /*#__PURE__*/_jsx(Text, {
|
|
620
|
+
style: styles.topUpText,
|
|
621
|
+
children: t('home.topUp')
|
|
622
|
+
}) : null]
|
|
623
|
+
})]
|
|
247
624
|
})]
|
|
248
|
-
})
|
|
249
|
-
}),
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
})
|
|
276
|
-
})
|
|
625
|
+
})]
|
|
626
|
+
}), bannerCards.length > 0 ? /*#__PURE__*/_jsx(FeaturedCarousel, {
|
|
627
|
+
cards: bannerCards,
|
|
628
|
+
width: width - pagePadding * 2,
|
|
629
|
+
gap: gap,
|
|
630
|
+
wide: wide,
|
|
631
|
+
compact: compact,
|
|
632
|
+
focused: focused,
|
|
633
|
+
onOpen: open
|
|
634
|
+
}) : cards.length > 0 ? /*#__PURE__*/_jsx(View, {
|
|
635
|
+
style: {
|
|
636
|
+
height: bannerHeight(wide, compact)
|
|
637
|
+
}
|
|
638
|
+
}) : null, wide ? /*#__PURE__*/_jsxs(View, {
|
|
639
|
+
style: styles.tileRow,
|
|
640
|
+
children: [leaderboard, oracle]
|
|
641
|
+
}) : leaderboard, /*#__PURE__*/_jsx(Text, {
|
|
642
|
+
style: [styles.sectionTitle, wide && styles.sectionTitleWide],
|
|
643
|
+
children: t('home.allGames')
|
|
644
|
+
}), cards.length > 0 ? /*#__PURE__*/_jsx(View, {
|
|
645
|
+
style: [styles.grid, {
|
|
646
|
+
gap
|
|
647
|
+
}],
|
|
648
|
+
children: cards.map(c => /*#__PURE__*/_jsx(GameCard, {
|
|
649
|
+
data: c,
|
|
650
|
+
width: cardWidth,
|
|
651
|
+
onPress: () => open(c.game)
|
|
652
|
+
}, c.game.id))
|
|
653
|
+
}) : !isLoadingGames && cards.length === 0 ? /*#__PURE__*/_jsx(Text, {
|
|
654
|
+
style: styles.emptyText,
|
|
655
|
+
children: t('home.noGames')
|
|
656
|
+
}) : null, wide ? null : oracle]
|
|
657
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
658
|
+
pointerEvents: "none",
|
|
659
|
+
style: styles.statusBackdrop
|
|
277
660
|
})]
|
|
278
661
|
});
|
|
279
662
|
};
|
|
280
|
-
const
|
|
663
|
+
const DISPLAY_NUMBER = {
|
|
664
|
+
fontWeight: '900',
|
|
665
|
+
letterSpacing: -1,
|
|
666
|
+
fontVariant: ['tabular-nums']
|
|
667
|
+
};
|
|
668
|
+
const styles = scaledStyles({
|
|
281
669
|
container: {
|
|
282
670
|
flex: 1,
|
|
283
|
-
backgroundColor:
|
|
671
|
+
backgroundColor: LOBBY.bg
|
|
672
|
+
},
|
|
673
|
+
content: {
|
|
674
|
+
paddingBottom: 140
|
|
675
|
+
},
|
|
676
|
+
statusBackdrop: {
|
|
677
|
+
position: 'absolute',
|
|
678
|
+
top: 0,
|
|
679
|
+
left: 0,
|
|
680
|
+
right: 0,
|
|
681
|
+
height: 50,
|
|
682
|
+
backgroundColor: 'rgba(12, 11, 18, 0.94)'
|
|
284
683
|
},
|
|
285
684
|
header: {
|
|
685
|
+
height: 56,
|
|
286
686
|
flexDirection: 'row',
|
|
287
|
-
justifyContent: 'space-between',
|
|
288
687
|
alignItems: 'center',
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
borderBottomColor: COLORS.white05
|
|
688
|
+
justifyContent: 'space-between',
|
|
689
|
+
gap: 12
|
|
690
|
+
},
|
|
691
|
+
headerCompact: {
|
|
692
|
+
gap: 8
|
|
295
693
|
},
|
|
296
694
|
headerLeft: {
|
|
297
695
|
flexDirection: 'row',
|
|
298
696
|
alignItems: 'center',
|
|
299
697
|
gap: 12,
|
|
300
|
-
|
|
698
|
+
flexShrink: 1
|
|
301
699
|
},
|
|
302
|
-
|
|
303
|
-
flexDirection: 'row',
|
|
304
|
-
alignItems: 'center',
|
|
700
|
+
headerLeftCompact: {
|
|
305
701
|
gap: 10
|
|
306
702
|
},
|
|
307
|
-
|
|
308
|
-
width: 36,
|
|
309
|
-
height: 36,
|
|
310
|
-
borderRadius: 18,
|
|
311
|
-
backgroundColor: 'rgba(30, 41, 59, 0.5)',
|
|
312
|
-
borderWidth: 1,
|
|
313
|
-
borderColor: 'rgba(71, 85, 105, 0.4)',
|
|
314
|
-
alignItems: 'center',
|
|
315
|
-
justifyContent: 'center'
|
|
316
|
-
},
|
|
317
|
-
avatarContainer: {
|
|
703
|
+
avatar: {
|
|
318
704
|
width: 44,
|
|
319
705
|
height: 44,
|
|
320
706
|
borderRadius: 22,
|
|
321
707
|
borderWidth: 2,
|
|
322
|
-
borderColor:
|
|
323
|
-
|
|
324
|
-
backgroundColor: '#1e293b'
|
|
708
|
+
borderColor: LOBBY.border,
|
|
709
|
+
backgroundColor: LOBBY.surface
|
|
325
710
|
},
|
|
326
|
-
|
|
327
|
-
width:
|
|
328
|
-
height:
|
|
711
|
+
avatarWide: {
|
|
712
|
+
width: 52,
|
|
713
|
+
height: 52,
|
|
714
|
+
borderRadius: 26
|
|
329
715
|
},
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
716
|
+
avatarCompact: {
|
|
717
|
+
width: 40,
|
|
718
|
+
height: 40,
|
|
719
|
+
borderRadius: 20
|
|
720
|
+
},
|
|
721
|
+
roundCompact: {
|
|
722
|
+
width: 40,
|
|
723
|
+
height: 40,
|
|
724
|
+
borderRadius: 20
|
|
725
|
+
},
|
|
726
|
+
headerRightCompact: {
|
|
727
|
+
gap: 6
|
|
728
|
+
},
|
|
729
|
+
balancePillCompact: {
|
|
730
|
+
gap: 4,
|
|
731
|
+
paddingLeft: 6
|
|
732
|
+
},
|
|
733
|
+
balanceTapCompact: {
|
|
734
|
+
gap: 6,
|
|
735
|
+
minHeight: 40
|
|
736
|
+
},
|
|
737
|
+
coinCompact: {
|
|
738
|
+
width: 24,
|
|
739
|
+
height: 24,
|
|
740
|
+
borderRadius: 12
|
|
741
|
+
},
|
|
742
|
+
headerNames: {
|
|
743
|
+
flexShrink: 1,
|
|
744
|
+
gap: 2
|
|
745
|
+
},
|
|
746
|
+
welcome: {
|
|
747
|
+
fontSize: 12,
|
|
748
|
+
lineHeight: 15,
|
|
749
|
+
fontWeight: '500',
|
|
750
|
+
color: LOBBY.muted
|
|
751
|
+
},
|
|
752
|
+
welcomeWide: {
|
|
753
|
+
fontSize: 13,
|
|
754
|
+
lineHeight: 16
|
|
335
755
|
},
|
|
336
756
|
playerName: {
|
|
337
|
-
fontSize:
|
|
757
|
+
fontSize: 19,
|
|
758
|
+
lineHeight: 23,
|
|
338
759
|
fontWeight: '800',
|
|
339
|
-
color:
|
|
760
|
+
color: LOBBY.text,
|
|
761
|
+
letterSpacing: -0.2
|
|
762
|
+
},
|
|
763
|
+
playerNameWide: {
|
|
764
|
+
fontSize: 24,
|
|
765
|
+
lineHeight: 28
|
|
766
|
+
},
|
|
767
|
+
headerRight: {
|
|
768
|
+
flexDirection: 'row',
|
|
769
|
+
alignItems: 'center',
|
|
770
|
+
gap: 8
|
|
771
|
+
},
|
|
772
|
+
exitButton: {
|
|
773
|
+
width: 44,
|
|
774
|
+
height: 44,
|
|
775
|
+
borderRadius: 22,
|
|
776
|
+
alignItems: 'center',
|
|
777
|
+
justifyContent: 'center',
|
|
778
|
+
backgroundColor: LOBBY.surface,
|
|
779
|
+
borderWidth: 1,
|
|
780
|
+
borderColor: LOBBY.border
|
|
340
781
|
},
|
|
341
782
|
balancePill: {
|
|
342
783
|
flexDirection: 'row',
|
|
343
784
|
alignItems: 'center',
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
785
|
+
gap: 6,
|
|
786
|
+
padding: 3,
|
|
787
|
+
paddingLeft: 8,
|
|
788
|
+
borderRadius: 999,
|
|
789
|
+
backgroundColor: LOBBY.surface,
|
|
349
790
|
borderWidth: 1,
|
|
350
|
-
borderColor:
|
|
791
|
+
borderColor: LOBBY.border
|
|
351
792
|
},
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
height: 30,
|
|
355
|
-
borderRadius: 15,
|
|
356
|
-
backgroundColor: '#eab308',
|
|
793
|
+
balanceTap: {
|
|
794
|
+
flexDirection: 'row',
|
|
357
795
|
alignItems: 'center',
|
|
358
|
-
|
|
359
|
-
|
|
796
|
+
gap: 8,
|
|
797
|
+
minHeight: 44,
|
|
798
|
+
paddingRight: 4
|
|
360
799
|
},
|
|
361
|
-
|
|
362
|
-
|
|
800
|
+
coin: {
|
|
801
|
+
width: 28,
|
|
802
|
+
height: 28,
|
|
803
|
+
borderRadius: 14,
|
|
804
|
+
backgroundColor: LOBBY.gold,
|
|
805
|
+
alignItems: 'center',
|
|
806
|
+
justifyContent: 'center'
|
|
363
807
|
},
|
|
364
808
|
balanceText: {
|
|
365
|
-
|
|
366
|
-
fontWeight: '
|
|
367
|
-
|
|
809
|
+
fontSize: 19,
|
|
810
|
+
fontWeight: '800',
|
|
811
|
+
color: LOBBY.text,
|
|
812
|
+
fontVariant: ['tabular-nums']
|
|
368
813
|
},
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
paddingHorizontal: PAGE_PADDING,
|
|
372
|
-
paddingTop: 16
|
|
814
|
+
balanceTextWide: {
|
|
815
|
+
fontSize: 22
|
|
373
816
|
},
|
|
374
|
-
|
|
817
|
+
topUp: {
|
|
818
|
+
height: 44,
|
|
819
|
+
borderRadius: 999,
|
|
820
|
+
backgroundColor: LOBBY.gold,
|
|
375
821
|
flexDirection: 'row',
|
|
376
|
-
|
|
377
|
-
|
|
822
|
+
alignItems: 'center',
|
|
823
|
+
justifyContent: 'center',
|
|
824
|
+
borderBottomWidth: 3,
|
|
825
|
+
borderBottomColor: 'rgba(51, 27, 0, 0.22)'
|
|
378
826
|
},
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
marginBottom: 0
|
|
827
|
+
topUpRound: {
|
|
828
|
+
width: 44
|
|
382
829
|
},
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
830
|
+
topUpWide: {
|
|
831
|
+
paddingLeft: 14,
|
|
832
|
+
paddingRight: 18,
|
|
833
|
+
gap: 6
|
|
834
|
+
},
|
|
835
|
+
topUpText: {
|
|
836
|
+
fontSize: 15,
|
|
837
|
+
fontWeight: '800',
|
|
838
|
+
color: LOBBY.goldInk
|
|
839
|
+
},
|
|
840
|
+
tag: {
|
|
841
|
+
alignSelf: 'flex-start',
|
|
842
|
+
height: 22,
|
|
843
|
+
paddingHorizontal: 9,
|
|
844
|
+
borderRadius: 999,
|
|
845
|
+
justifyContent: 'center',
|
|
846
|
+
backgroundColor: LOBBY.chip,
|
|
847
|
+
maxWidth: '100%'
|
|
848
|
+
},
|
|
849
|
+
tagLarge: {
|
|
850
|
+
height: 26,
|
|
851
|
+
paddingHorizontal: 11
|
|
852
|
+
},
|
|
853
|
+
tagText: {
|
|
854
|
+
fontSize: 10,
|
|
855
|
+
fontWeight: '700',
|
|
856
|
+
letterSpacing: 1.2,
|
|
857
|
+
textTransform: 'uppercase',
|
|
858
|
+
color: '#FFFFFF'
|
|
859
|
+
},
|
|
860
|
+
tagTextLarge: {
|
|
861
|
+
fontSize: 11,
|
|
862
|
+
letterSpacing: 1.3
|
|
387
863
|
},
|
|
388
|
-
|
|
864
|
+
pillButton: {
|
|
865
|
+
height: 56,
|
|
866
|
+
borderRadius: 999,
|
|
867
|
+
paddingHorizontal: 26,
|
|
389
868
|
flexDirection: 'row',
|
|
390
|
-
backgroundColor: 'rgba(127, 19, 236, 0.05)',
|
|
391
|
-
borderWidth: 1,
|
|
392
|
-
borderColor: 'rgba(127, 19, 236, 0.2)',
|
|
393
|
-
borderRadius: 16,
|
|
394
|
-
padding: 16,
|
|
395
869
|
alignItems: 'center',
|
|
396
|
-
|
|
397
|
-
|
|
870
|
+
justifyContent: 'center',
|
|
871
|
+
gap: 10,
|
|
872
|
+
borderBottomWidth: 4
|
|
398
873
|
},
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
874
|
+
pillButtonGold: {
|
|
875
|
+
backgroundColor: LOBBY.gold,
|
|
876
|
+
borderBottomColor: 'rgba(51, 27, 0, 0.22)'
|
|
402
877
|
},
|
|
403
|
-
|
|
404
|
-
|
|
878
|
+
pillButtonLight: {
|
|
879
|
+
backgroundColor: LOBBY.text,
|
|
880
|
+
borderBottomColor: 'rgba(12, 11, 18, 0.16)',
|
|
881
|
+
height: 44,
|
|
882
|
+
paddingHorizontal: 20,
|
|
883
|
+
borderBottomWidth: 3,
|
|
884
|
+
alignSelf: 'flex-start'
|
|
405
885
|
},
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
fontWeight: '900',
|
|
409
|
-
color: COLORS.primary,
|
|
410
|
-
letterSpacing: 3,
|
|
411
|
-
marginBottom: 4
|
|
886
|
+
pillButtonStretch: {
|
|
887
|
+
alignSelf: 'stretch'
|
|
412
888
|
},
|
|
413
|
-
|
|
414
|
-
fontSize:
|
|
415
|
-
|
|
416
|
-
fontStyle: 'italic',
|
|
417
|
-
lineHeight: 18
|
|
889
|
+
pillButtonText: {
|
|
890
|
+
fontSize: 16,
|
|
891
|
+
fontWeight: '800'
|
|
418
892
|
},
|
|
419
|
-
|
|
893
|
+
tile: {
|
|
420
894
|
flexDirection: 'row',
|
|
421
|
-
justifyContent: 'space-between',
|
|
422
895
|
alignItems: 'center',
|
|
423
|
-
|
|
896
|
+
gap: 14,
|
|
897
|
+
paddingLeft: 16,
|
|
898
|
+
paddingRight: 14,
|
|
899
|
+
borderRadius: 24,
|
|
900
|
+
backgroundColor: LOBBY.surface,
|
|
901
|
+
borderWidth: 1,
|
|
902
|
+
borderColor: LOBBY.border
|
|
424
903
|
},
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
fontWeight: '800',
|
|
428
|
-
color: '#ffffff'
|
|
904
|
+
carousel: {
|
|
905
|
+
gap: 4
|
|
429
906
|
},
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
borderWidth: 1,
|
|
433
|
-
borderColor: COLORS.white10,
|
|
434
|
-
borderRadius: 16,
|
|
907
|
+
banner: {
|
|
908
|
+
borderRadius: 28,
|
|
435
909
|
overflow: 'hidden',
|
|
436
|
-
|
|
910
|
+
flexDirection: 'row'
|
|
437
911
|
},
|
|
438
|
-
|
|
439
|
-
|
|
912
|
+
bannerBody: {
|
|
913
|
+
flex: 1,
|
|
914
|
+
paddingVertical: 18,
|
|
915
|
+
paddingLeft: 20,
|
|
916
|
+
paddingRight: 14,
|
|
440
917
|
justifyContent: 'space-between',
|
|
918
|
+
alignItems: 'flex-start'
|
|
919
|
+
},
|
|
920
|
+
bannerBodyWide: {
|
|
921
|
+
paddingVertical: 26,
|
|
922
|
+
paddingLeft: 32,
|
|
923
|
+
paddingRight: 20
|
|
924
|
+
},
|
|
925
|
+
bannerHeading: {
|
|
926
|
+
gap: 8,
|
|
441
927
|
alignItems: 'flex-start',
|
|
442
|
-
|
|
928
|
+
alignSelf: 'stretch'
|
|
443
929
|
},
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
alignSelf: 'flex-start'
|
|
930
|
+
bannerTitle: {
|
|
931
|
+
fontSize: 24,
|
|
932
|
+
lineHeight: 28,
|
|
933
|
+
fontWeight: '800',
|
|
934
|
+
color: LOBBY.text,
|
|
935
|
+
letterSpacing: -0.5
|
|
451
936
|
},
|
|
452
|
-
|
|
453
|
-
fontSize:
|
|
937
|
+
bannerTitleWide: {
|
|
938
|
+
fontSize: 34,
|
|
939
|
+
lineHeight: 38,
|
|
940
|
+
letterSpacing: -0.6
|
|
941
|
+
},
|
|
942
|
+
bannerPrizeBox: {
|
|
943
|
+
alignSelf: 'stretch',
|
|
944
|
+
flexShrink: 0
|
|
945
|
+
},
|
|
946
|
+
bannerPrizeLabel: {
|
|
947
|
+
fontSize: 11,
|
|
454
948
|
fontWeight: '700',
|
|
455
|
-
letterSpacing: 1,
|
|
456
|
-
textTransform: 'uppercase'
|
|
949
|
+
letterSpacing: 1.3,
|
|
950
|
+
textTransform: 'uppercase',
|
|
951
|
+
color: LOBBY.onBand
|
|
457
952
|
},
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
color: '#ffffff',
|
|
462
|
-
textTransform: 'uppercase'
|
|
953
|
+
bannerPrize: {
|
|
954
|
+
...DISPLAY_NUMBER,
|
|
955
|
+
color: LOBBY.gold
|
|
463
956
|
},
|
|
464
|
-
|
|
465
|
-
alignItems: '
|
|
957
|
+
bannerArt: {
|
|
958
|
+
alignItems: 'center',
|
|
959
|
+
justifyContent: 'center',
|
|
960
|
+
overflow: 'hidden'
|
|
466
961
|
},
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
962
|
+
drawChip: {
|
|
963
|
+
position: 'absolute',
|
|
964
|
+
bottom: 12,
|
|
965
|
+
alignSelf: 'center',
|
|
966
|
+
paddingHorizontal: 10,
|
|
967
|
+
paddingVertical: 5,
|
|
968
|
+
borderRadius: 999,
|
|
969
|
+
backgroundColor: LOBBY.chip
|
|
471
970
|
},
|
|
472
|
-
|
|
473
|
-
fontSize:
|
|
971
|
+
drawChipText: {
|
|
972
|
+
fontSize: 11,
|
|
474
973
|
fontWeight: '700',
|
|
475
|
-
color:
|
|
974
|
+
color: LOBBY.text,
|
|
975
|
+
fontVariant: ['tabular-nums']
|
|
976
|
+
},
|
|
977
|
+
bannerDots: {
|
|
978
|
+
flexDirection: 'row',
|
|
979
|
+
justifyContent: 'center',
|
|
980
|
+
alignItems: 'center'
|
|
981
|
+
},
|
|
982
|
+
bannerDotTap: {
|
|
983
|
+
paddingVertical: 8,
|
|
984
|
+
paddingHorizontal: 3
|
|
985
|
+
},
|
|
986
|
+
bannerDot: {
|
|
987
|
+
width: 6,
|
|
988
|
+
height: 6,
|
|
989
|
+
borderRadius: 3,
|
|
990
|
+
backgroundColor: LOBBY.dot
|
|
991
|
+
},
|
|
992
|
+
bannerDotActive: {
|
|
993
|
+
width: 18,
|
|
994
|
+
backgroundColor: LOBBY.gold
|
|
995
|
+
},
|
|
996
|
+
tileRow: {
|
|
997
|
+
flexDirection: 'row',
|
|
998
|
+
gap: 16,
|
|
999
|
+
height: 96
|
|
1000
|
+
},
|
|
1001
|
+
tileFlex: {
|
|
1002
|
+
flex: 1,
|
|
1003
|
+
minHeight: 0
|
|
1004
|
+
},
|
|
1005
|
+
tileLeaderboard: {
|
|
1006
|
+
height: 80
|
|
476
1007
|
},
|
|
477
|
-
|
|
478
|
-
height:
|
|
1008
|
+
tileOracle: {
|
|
1009
|
+
height: 84
|
|
1010
|
+
},
|
|
1011
|
+
tileIcon: {
|
|
1012
|
+
width: 48,
|
|
1013
|
+
height: 48,
|
|
1014
|
+
borderRadius: 24,
|
|
479
1015
|
alignItems: 'center',
|
|
480
1016
|
justifyContent: 'center'
|
|
481
1017
|
},
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
1018
|
+
tileText: {
|
|
1019
|
+
flex: 1,
|
|
1020
|
+
gap: 3
|
|
1021
|
+
},
|
|
1022
|
+
tileTitle: {
|
|
1023
|
+
fontSize: 17,
|
|
1024
|
+
lineHeight: 20,
|
|
1025
|
+
fontWeight: '700',
|
|
1026
|
+
color: LOBBY.text
|
|
1027
|
+
},
|
|
1028
|
+
tileSub: {
|
|
1029
|
+
fontSize: 13,
|
|
1030
|
+
lineHeight: 17,
|
|
1031
|
+
color: LOBBY.muted
|
|
1032
|
+
},
|
|
1033
|
+
oracleImage: {
|
|
1034
|
+
width: 34,
|
|
1035
|
+
height: 34
|
|
485
1036
|
},
|
|
486
|
-
|
|
1037
|
+
oracleHead: {
|
|
487
1038
|
flexDirection: 'row',
|
|
488
|
-
justifyContent: 'space-between',
|
|
489
1039
|
alignItems: 'center',
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
borderTopWidth: 1,
|
|
493
|
-
borderTopColor: COLORS.white05
|
|
1040
|
+
justifyContent: 'space-between',
|
|
1041
|
+
gap: 8
|
|
494
1042
|
},
|
|
495
|
-
|
|
496
|
-
fontSize:
|
|
497
|
-
fontWeight: '
|
|
1043
|
+
oracleLabel: {
|
|
1044
|
+
fontSize: 11,
|
|
1045
|
+
fontWeight: '700',
|
|
1046
|
+
letterSpacing: 1.3,
|
|
1047
|
+
textTransform: 'uppercase',
|
|
1048
|
+
color: LOBBY.oracleLabel,
|
|
1049
|
+
flexShrink: 1
|
|
498
1050
|
},
|
|
499
|
-
|
|
1051
|
+
pager: {
|
|
500
1052
|
flexDirection: 'row',
|
|
501
1053
|
alignItems: 'center',
|
|
502
|
-
gap:
|
|
503
|
-
paddingHorizontal: 20,
|
|
504
|
-
paddingVertical: 10,
|
|
505
|
-
borderRadius: 12
|
|
1054
|
+
gap: 4
|
|
506
1055
|
},
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
1056
|
+
pagerDot: {
|
|
1057
|
+
width: 6,
|
|
1058
|
+
height: 6,
|
|
1059
|
+
borderRadius: 3,
|
|
1060
|
+
backgroundColor: LOBBY.dot
|
|
1061
|
+
},
|
|
1062
|
+
pagerDotActive: {
|
|
1063
|
+
width: 14,
|
|
1064
|
+
backgroundColor: LOBBY.text
|
|
1065
|
+
},
|
|
1066
|
+
oracleText: {
|
|
1067
|
+
fontSize: 14,
|
|
1068
|
+
lineHeight: 19,
|
|
1069
|
+
fontWeight: '600',
|
|
1070
|
+
color: LOBBY.text
|
|
1071
|
+
},
|
|
1072
|
+
sectionTitle: {
|
|
1073
|
+
marginTop: 12,
|
|
1074
|
+
fontSize: 24,
|
|
1075
|
+
lineHeight: 30,
|
|
1076
|
+
fontWeight: '800',
|
|
1077
|
+
color: LOBBY.text,
|
|
1078
|
+
letterSpacing: -0.5
|
|
511
1079
|
},
|
|
512
|
-
|
|
1080
|
+
sectionTitleWide: {
|
|
1081
|
+
fontSize: 28,
|
|
1082
|
+
lineHeight: 34
|
|
1083
|
+
},
|
|
1084
|
+
grid: {
|
|
513
1085
|
flexDirection: 'row',
|
|
1086
|
+
flexWrap: 'wrap'
|
|
1087
|
+
},
|
|
1088
|
+
card: {
|
|
1089
|
+
height: 320,
|
|
1090
|
+
borderRadius: 24,
|
|
1091
|
+
overflow: 'hidden',
|
|
1092
|
+
backgroundColor: LOBBY.surface
|
|
1093
|
+
},
|
|
1094
|
+
cardBand: {
|
|
1095
|
+
height: 150,
|
|
1096
|
+
paddingTop: 28,
|
|
514
1097
|
alignItems: 'center',
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
1098
|
+
justifyContent: 'center'
|
|
1099
|
+
},
|
|
1100
|
+
cardTag: {
|
|
1101
|
+
position: 'absolute',
|
|
1102
|
+
top: 12,
|
|
1103
|
+
left: 12,
|
|
1104
|
+
maxWidth: '86%'
|
|
1105
|
+
},
|
|
1106
|
+
cardLottie: {
|
|
1107
|
+
width: 112,
|
|
1108
|
+
height: 112
|
|
1109
|
+
},
|
|
1110
|
+
cardBody: {
|
|
1111
|
+
flex: 1,
|
|
1112
|
+
paddingTop: 16,
|
|
1113
|
+
paddingRight: 12,
|
|
1114
|
+
paddingBottom: 12,
|
|
1115
|
+
paddingLeft: 14,
|
|
1116
|
+
justifyContent: 'space-between'
|
|
522
1117
|
},
|
|
523
|
-
|
|
1118
|
+
cardTitle: {
|
|
1119
|
+
minHeight: 42,
|
|
1120
|
+
fontSize: 19,
|
|
1121
|
+
lineHeight: 21,
|
|
1122
|
+
fontWeight: '700',
|
|
1123
|
+
color: LOBBY.text,
|
|
1124
|
+
letterSpacing: -0.2
|
|
1125
|
+
},
|
|
1126
|
+
cardPrize: {
|
|
1127
|
+
gap: 2
|
|
1128
|
+
},
|
|
1129
|
+
cardPrizeLabel: {
|
|
1130
|
+
fontSize: 11,
|
|
1131
|
+
fontWeight: '700',
|
|
1132
|
+
letterSpacing: 1.3,
|
|
1133
|
+
textTransform: 'uppercase',
|
|
1134
|
+
color: LOBBY.subtle
|
|
1135
|
+
},
|
|
1136
|
+
cardPrizeValue: {
|
|
1137
|
+
...DISPLAY_NUMBER,
|
|
524
1138
|
fontSize: 28,
|
|
525
|
-
|
|
1139
|
+
lineHeight: 30,
|
|
1140
|
+
color: LOBBY.gold
|
|
526
1141
|
},
|
|
527
|
-
|
|
528
|
-
|
|
1142
|
+
cardFooter: {
|
|
1143
|
+
flexDirection: 'row',
|
|
1144
|
+
alignItems: 'center',
|
|
1145
|
+
justifyContent: 'space-between',
|
|
1146
|
+
gap: 8
|
|
529
1147
|
},
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
1148
|
+
cardStake: {
|
|
1149
|
+
flexDirection: 'row',
|
|
1150
|
+
alignItems: 'center',
|
|
1151
|
+
gap: 5,
|
|
1152
|
+
flexShrink: 1
|
|
535
1153
|
},
|
|
536
|
-
|
|
1154
|
+
cardStakeText: {
|
|
537
1155
|
fontSize: 12,
|
|
538
|
-
|
|
539
|
-
|
|
1156
|
+
fontWeight: '500',
|
|
1157
|
+
color: LOBBY.subtle,
|
|
1158
|
+
fontVariant: ['tabular-nums'],
|
|
1159
|
+
flexShrink: 1
|
|
540
1160
|
},
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
1161
|
+
playButton: {
|
|
1162
|
+
width: 44,
|
|
1163
|
+
height: 44,
|
|
1164
|
+
borderRadius: 22,
|
|
1165
|
+
alignItems: 'center',
|
|
1166
|
+
justifyContent: 'center',
|
|
1167
|
+
backgroundColor: LOBBY.text,
|
|
1168
|
+
borderBottomWidth: 3,
|
|
1169
|
+
borderBottomColor: 'rgba(12, 11, 18, 0.16)'
|
|
545
1170
|
},
|
|
546
1171
|
emptyText: {
|
|
547
1172
|
fontSize: 14,
|
|
548
|
-
color:
|
|
1173
|
+
color: LOBBY.muted,
|
|
549
1174
|
textAlign: 'center',
|
|
550
1175
|
paddingVertical: 32
|
|
551
1176
|
}
|