@opexa/portal-components 0.0.989 → 0.0.991
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/components/GameLaunch/GameLaunch.d.ts +5 -1
- package/dist/components/GameLaunch/GameLaunch.js +2 -2
- package/dist/components/GameLaunch/GameLaunch.lazy.d.ts +5 -1
- package/dist/components/GameLaunch/GameLaunch.lazy.js +3 -2
- package/dist/components/TermsOfUse/TermsOfUse.lazy.js +4 -1
- package/dist/components/TermsOfUse/TermsOfUseV2.lazy.js +4 -1
- package/dist/components/TermsOfUse/TermsOfUseV3.lazy.js +4 -1
- package/dist/icons/PhilippinePesoIcon.d.ts +2 -0
- package/dist/icons/PhilippinePesoIcon.js +4 -0
- package/package.json +1 -1
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
interface GameLaunchProps {
|
|
2
|
+
locale?: 'international' | 'local';
|
|
3
|
+
}
|
|
4
|
+
export declare function GameLaunch({ locale }: GameLaunchProps): import("react/jsx-runtime").JSX.Element | undefined;
|
|
5
|
+
export {};
|
|
@@ -7,8 +7,8 @@ const Component = dynamic(() => import('./GameLaunch.lazy.js').then((m) => m.Gam
|
|
|
7
7
|
ssr: false,
|
|
8
8
|
loading: () => null,
|
|
9
9
|
});
|
|
10
|
-
export function GameLaunch() {
|
|
10
|
+
export function GameLaunch({ locale = 'local' }) {
|
|
11
11
|
const touched = useGlobalStore(useShallow((ctx) => ctx.gameLaunch['~touched']));
|
|
12
12
|
if (touched)
|
|
13
|
-
return _jsx(Component, {});
|
|
13
|
+
return _jsx(Component, { locale: locale });
|
|
14
14
|
}
|
|
@@ -15,6 +15,7 @@ import { ChevronDownIcon } from '../../icons/ChevronDownIcon.js';
|
|
|
15
15
|
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
16
16
|
import { CoinsHandIcon } from '../../icons/CoinsHandIcon.js';
|
|
17
17
|
import { Expand03Icon } from '../../icons/Expand03Icon.js';
|
|
18
|
+
import { PhilippinePesoIcon } from '../../icons/PhilippinePesoIcon.js';
|
|
18
19
|
import { SpinnerIcon } from '../../icons/SpinnerIcon.js';
|
|
19
20
|
import { Star01Icon } from '../../icons/Star01Icon.js';
|
|
20
21
|
import { XIcon } from '../../icons/XIcon.js';
|
|
@@ -23,7 +24,7 @@ import { Button } from '../../ui/Button/index.js';
|
|
|
23
24
|
import { IconButton } from '../../ui/IconButton/index.js';
|
|
24
25
|
import { Portal } from '../../ui/Portal/index.js';
|
|
25
26
|
import { Presence } from '../../ui/Presence/index.js';
|
|
26
|
-
export function GameLaunch() {
|
|
27
|
+
export function GameLaunch({ locale = 'local' }) {
|
|
27
28
|
const globalStore = useGlobalStore(useShallow((ctx) => ({
|
|
28
29
|
gameLaunch: ctx.gameLaunch,
|
|
29
30
|
depositWithdrawal: ctx.depositWithdrawal,
|
|
@@ -103,7 +104,7 @@ export function GameLaunch() {
|
|
|
103
104
|
? 'fill-yellow-400 text-yellow-400'
|
|
104
105
|
: 'text-inherit') }) }), _jsx(IconButton, { size: "xs", variant: "outline", onClick: () => maximizeDisclosure.setOpen(true), children: _jsx(Expand03Icon, { className: "size-5" }) }), _jsx(IconButton, { size: "xs", fullWidth: false, onClick: () => {
|
|
105
106
|
globalStore.depositWithdrawal.setOpen(true);
|
|
106
|
-
}, children: _jsx(CoinsHandIcon, { className: "size-5" }) })] }) }), _jsx(Presence, { asChild: true, lazyMount: true, unmountOnExit: true, present: maximizeDisclosure.open, children: _jsx("button", { type: "button", onClick: () => maximizeDisclosure.setOpen(false), className: "-translate-x-1/2 absolute top-safe-area-inset-top left-1/2 z-1 flex h-7.5 w-[4.5rem] ui-closed:animate-slide-out-down ui-open:animate-slide-in-down items-center justify-center rounded-b-md bg-white/30 shadow-xs backdrop-blur-sm", children: _jsx(ChevronDownIcon, {}) }) }), _jsxs("section", { className: "size-full", children: [globalStore.gameLaunch.details.status === 'LOADING' && (_jsx("div", { className: "flex size-full items-center justify-center", children: _jsx(SpinnerIcon, { className: "size-8" }) })), globalStore.gameLaunch.details.status === 'FAILED' && (_jsx("div", {})), globalStore.gameLaunch.details.status === 'PLAYING' && (_jsx("iframe", { src: globalStore.gameLaunch.details.session.launchUrl ?? '', title: "Game Launch", className: "size-full" }))] })] }) }) }) }), _jsx(AlertDialog.Root, { role: "alertdialog", open: cancelDisclosure.open, onOpenChange: (details) => {
|
|
107
|
+
}, children: locale === 'local' ? (_jsx("span", { children: _jsx(PhilippinePesoIcon, { className: "size-5" }) })) : (_jsx(CoinsHandIcon, { className: "size-5" })) })] }) }), _jsx(Presence, { asChild: true, lazyMount: true, unmountOnExit: true, present: maximizeDisclosure.open, children: _jsx("button", { type: "button", onClick: () => maximizeDisclosure.setOpen(false), className: "-translate-x-1/2 absolute top-safe-area-inset-top left-1/2 z-1 flex h-7.5 w-[4.5rem] ui-closed:animate-slide-out-down ui-open:animate-slide-in-down items-center justify-center rounded-b-md bg-white/30 shadow-xs backdrop-blur-sm", children: _jsx(ChevronDownIcon, {}) }) }), _jsxs("section", { className: "size-full", children: [globalStore.gameLaunch.details.status === 'LOADING' && (_jsx("div", { className: "flex size-full items-center justify-center", children: _jsx(SpinnerIcon, { className: "size-8" }) })), globalStore.gameLaunch.details.status === 'FAILED' && (_jsx("div", {})), globalStore.gameLaunch.details.status === 'PLAYING' && (_jsx("iframe", { src: globalStore.gameLaunch.details.session.launchUrl ?? '', title: "Game Launch", className: "size-full" }))] })] }) }) }) }), _jsx(AlertDialog.Root, { role: "alertdialog", open: cancelDisclosure.open, onOpenChange: (details) => {
|
|
107
108
|
cancelDisclosure.setOpen(details.open);
|
|
108
109
|
}, lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, {}), _jsx(AlertDialog.Positioner, { children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(AlertDialog.Header, { children: _jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, { className: "size-6" }) }) }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: "Quit Game" }), _jsx(AlertDialog.Description, { children: "Are you sure you want to quit?" })] }), _jsx(AlertDialog.Context, { children: (api) => (_jsxs(AlertDialog.Footer, { children: [_jsx(Button, { variant: "outline", colorScheme: "gray", disabled: endGameSessionMutation.isPending, onClick: () => {
|
|
109
110
|
api.setOpen(false);
|
|
@@ -14,11 +14,14 @@ export function TermsOfUse({ logo, siteName, content, ...props }) {
|
|
|
14
14
|
signUp: ctx.signUp,
|
|
15
15
|
disclaimer: ctx.disclaimer,
|
|
16
16
|
termsOfUse: ctx.termsOfUse,
|
|
17
|
+
responsibleGaming: ctx.responsibleGaming,
|
|
17
18
|
})));
|
|
18
19
|
return (_jsx(Dialog.Root, { open: globalStore.termsOfUse.open, onOpenChange: (details) => {
|
|
19
20
|
globalStore.termsOfUse.setOpen(details.open);
|
|
20
|
-
if (!details.open)
|
|
21
|
+
if (!details.open) {
|
|
21
22
|
globalStore.termsOfUse.setAccepted(true);
|
|
23
|
+
globalStore.responsibleGaming.setAccepted(true);
|
|
24
|
+
}
|
|
22
25
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
23
26
|
if (globalStore.termsOfUse.next === 'SIGN_IN') {
|
|
24
27
|
globalStore.signIn.setOpen(true);
|
|
@@ -18,6 +18,7 @@ export function TermsOfUseV2({ logo, content }) {
|
|
|
18
18
|
signUp: ctx.signUp,
|
|
19
19
|
disclaimer: ctx.disclaimer,
|
|
20
20
|
termsOfUse: ctx.termsOfUse,
|
|
21
|
+
responsibleGaming: ctx.responsibleGaming,
|
|
21
22
|
})));
|
|
22
23
|
useEffect(() => {
|
|
23
24
|
if (scrollableContentRef.current) {
|
|
@@ -31,8 +32,10 @@ export function TermsOfUseV2({ logo, content }) {
|
|
|
31
32
|
}, []);
|
|
32
33
|
return (_jsx(Dialog.Root, { open: globalStore.termsOfUse.open, onOpenChange: (details) => {
|
|
33
34
|
globalStore.termsOfUse.setOpen(details.open);
|
|
34
|
-
if (!details.open)
|
|
35
|
+
if (!details.open) {
|
|
35
36
|
globalStore.termsOfUse.setAccepted(true);
|
|
37
|
+
globalStore.responsibleGaming.setAccepted(true);
|
|
38
|
+
}
|
|
36
39
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
37
40
|
if (globalStore.termsOfUse.next === 'SIGN_IN') {
|
|
38
41
|
globalStore.signIn.setOpen(true);
|
|
@@ -19,6 +19,7 @@ export function TermsOfUseV3({ logo, content }) {
|
|
|
19
19
|
signUp: ctx.signUp,
|
|
20
20
|
disclaimer: ctx.disclaimer,
|
|
21
21
|
termsOfUse: ctx.termsOfUse,
|
|
22
|
+
responsibleGaming: ctx.responsibleGaming,
|
|
22
23
|
})));
|
|
23
24
|
useEffect(() => {
|
|
24
25
|
if (scrollableContentRef.current) {
|
|
@@ -32,8 +33,10 @@ export function TermsOfUseV3({ logo, content }) {
|
|
|
32
33
|
}, []);
|
|
33
34
|
return (_jsx(Dialog.Root, { open: globalStore.termsOfUse.open, onOpenChange: (details) => {
|
|
34
35
|
globalStore.termsOfUse.setOpen(details.open);
|
|
35
|
-
if (!details.open)
|
|
36
|
+
if (!details.open) {
|
|
36
37
|
globalStore.termsOfUse.setAccepted(true);
|
|
38
|
+
globalStore.responsibleGaming.setAccepted(true);
|
|
39
|
+
}
|
|
37
40
|
}, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, onExitComplete: () => {
|
|
38
41
|
if (globalStore.termsOfUse.next === 'SIGN_IN') {
|
|
39
42
|
globalStore.signIn.setOpen(true);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function PhilippinePesoIcon(props) {
|
|
3
|
+
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", ...props, children: _jsx("path", { d: "M208 96C190.3 96 176 110.3 176 128L176 192L152 192C138.7 192 128 202.7 128 216C128 229.3 138.7 240 152 240L176 240L176 272L152 272C138.7 272 128 282.7 128 296C128 309.3 138.7 320 152 320L176 320L176 512C176 529.7 190.3 544 208 544C225.7 544 240 529.7 240 512L240 416L336 416C401.6 416 458 376.5 482.7 320L520 320C533.3 320 544 309.3 544 296C544 282.7 533.3 272 520 272L495.2 272C495.7 266.7 496 261.4 496 256C496 250.6 495.7 245.3 495.2 240L520 240C533.3 240 544 229.3 544 216C544 202.7 533.3 192 520 192L482.7 192C458 135.5 401.6 96 336 96L208 96zM407.6 192L240 192L240 160L336 160C364.4 160 390 172.4 407.6 192zM240 240L430.7 240C431.6 245.2 432 250.5 432 256C432 261.5 431.5 266.8 430.7 272L240 272L240 240zM407.6 320C390 339.6 364.5 352 336 352L240 352L240 320L407.6 320z" }) }));
|
|
4
|
+
}
|