@opexa/portal-components 0.0.789 → 0.0.791
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.
|
@@ -48,12 +48,12 @@ export function DisclaimerV2(props) {
|
|
|
48
48
|
sessionStorage.clear();
|
|
49
49
|
},
|
|
50
50
|
});
|
|
51
|
-
return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "flex h-full scrollbar:h-2 scrollbar:w-2 w-full flex-col items-start gap-y-4 overflow-y-auto scrollbar-thumb:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent p-3xl lg:mx-auto lg:h-auto lg:max-h-[80vh] lg:w-[
|
|
51
|
+
return (_jsx(Dialog.Root, { open: disclaimer.open, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, {}), _jsx(Dialog.Positioner, { children: _jsxs(Dialog.Content, { className: "flex h-full scrollbar:h-2 scrollbar:w-2 w-full flex-col items-start gap-y-4 overflow-y-auto scrollbar-thumb:rounded-full scrollbar-thumb:bg-bg-quaternary scrollbar-track:bg-transparent p-3xl lg:mx-auto lg:h-auto lg:max-h-[80vh] lg:w-[450px] lg:rounded-xl", children: [_jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx("div", { className: "text-sm", children: "The following individuals are prohibited from registering or participating in this online gaming platform." }), _jsx("div", { className: "w-full grow", children: _jsxs(Dialog.Description, { className: "space-y-2 text-sm", children: [_jsxs("ul", { className: "space-y-1.5 text-left", children: [_jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Persons below the legal gambling age of 21."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Any government official or employee directly involved in the operations of the government or its agencies."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Member of the Armed Forces of the Philippines, including the Army, Navy, Air Force and the Philippine National Police."] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Individuals listed in PAGCOR's National Database of Restricted Persons (NDRP)"] }), _jsxs("li", { className: "flex gap-4", children: [_jsx(Circle, {}), "Holders of a valid Gaming Employment License (GEL)"] })] }), _jsxs(Checkbox.Root, { checked: checked, onCheckedChange: (e) => {
|
|
52
52
|
if (e.checked === 'indeterminate')
|
|
53
53
|
return;
|
|
54
54
|
globalStore.termsOfUse.setAccepted(e.checked);
|
|
55
55
|
globalStore.responsibleGaming.setAccepted(e.checked);
|
|
56
|
-
}, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsxs(Checkbox.Label, { children: ["I have read and agreed to ", props.siteName, ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
56
|
+
}, className: 'pt-2.5 pb-2', children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsxs(Checkbox.Label, { children: ["I have read and agreed to ", props.siteName, ' ', _jsx("button", { type: "button", className: "text-brand-400 underline underline-offset-2", onClick: () => {
|
|
57
57
|
globalStore.termsOfUse.setOpen(true);
|
|
58
58
|
globalStore.termsOfUse.setNext('DISCLAIMER');
|
|
59
59
|
disclaimer.close();
|
|
@@ -61,7 +61,7 @@ export function DisclaimerV2(props) {
|
|
|
61
61
|
globalStore.responsibleGaming.setOpen(true);
|
|
62
62
|
globalStore.responsibleGaming.setNext('DISCLAIMER');
|
|
63
63
|
disclaimer.close();
|
|
64
|
-
}, children: "Responsible Gaming" })] }), _jsx(Checkbox.HiddenInput, {})] }), showWarning && (_jsxs("div", { className: twMerge('mt-2 flex max-w-full items-center gap-2 break-words rounded-md text-text-error-primary text-xs'), role: "alert", "aria-live": "assertive", children: [_jsx(AlertCircleIcon, { className: "size-5 text-text-error-primary" }), "Please agree to ", props.siteName, "'s Terms of Use and Responsible Gaming to proceed."] })), _jsx("div", { children: "Funds or credits in the account of any individual found ineligible to participate will be forfeited and turned over to the government as required by law" }), _jsxs("div", { children: ["Self Exclusion Site:", _jsxs("a", { href: "https://osea.pagcor.ph/", target: "_blank", rel: "noopener noreferrer", className: "break-all text-brand-400", children: [' ', "
|
|
64
|
+
}, children: "Responsible Gaming" })] }), _jsx(Checkbox.HiddenInput, {})] }), showWarning && (_jsxs("div", { className: twMerge('mt-2 flex max-w-full items-center gap-2 break-words rounded-md text-text-error-primary text-xs'), role: "alert", "aria-live": "assertive", children: [_jsx(AlertCircleIcon, { className: "size-5 text-text-error-primary" }), "Please agree to ", props.siteName, "'s Terms of Use and Responsible Gaming to proceed."] })), _jsx("div", { children: "Funds or credits in the account of any individual found ineligible to participate will be forfeited and turned over to the government as required by law" }), _jsxs("div", { children: ["Self Exclusion Site:", _jsxs("a", { href: "https://osea.pagcor.ph/", target: "_blank", rel: "noopener noreferrer", className: "break-all text-brand-400", children: [' ', "osea.pagcor.ph"] })] }), _jsxs("div", { children: ["To know more about PAGCOR\u2019s Responsible Gaming Program:", _jsxs("a", { href: "https://www.pagcor.ph/regulatory/responsible-gaming.php", target: "_blank", rel: "noopener noreferrer", className: "break-all text-brand-400", children: [' ', "pagcor.ph/regulatory/responsible-gaming.php"] })] })] }) }), _jsxs("div", { className: "mt-4 flex w-full gap-3", children: [_jsx(Button, { type: "button", onClick: async () => {
|
|
65
65
|
if (Capacitor.isNativePlatform()) {
|
|
66
66
|
const session = await getQueryClient().fetchQuery({
|
|
67
67
|
queryKey: getSessionQueryKey(),
|
|
@@ -5,7 +5,6 @@ import { useState } from 'react';
|
|
|
5
5
|
import { useInterval } from 'usehooks-ts';
|
|
6
6
|
import { useShallow } from 'zustand/shallow';
|
|
7
7
|
import { useDisclosure } from '../../client/hooks/useDisclosure.js';
|
|
8
|
-
import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
|
|
9
8
|
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
10
9
|
import { useMarkMessageAsReadMutation } from '../../client/hooks/useMarkMessageAsReadMutation.js';
|
|
11
10
|
import { useMessagesQuery } from '../../client/hooks/useMessagesQuery.js';
|
|
@@ -61,8 +60,6 @@ export function MessagesPopup() {
|
|
|
61
60
|
}
|
|
62
61
|
},
|
|
63
62
|
});
|
|
64
|
-
const future = useFeatureFlag();
|
|
65
|
-
const isGameLaunchWaiting = globalStore.gameLaunch.details.status === 'WAITING' || future.enabled;
|
|
66
63
|
const messagesQuery = useMessagesQuery({
|
|
67
64
|
first: 20,
|
|
68
65
|
filter: {
|
|
@@ -74,8 +71,7 @@ export function MessagesPopup() {
|
|
|
74
71
|
},
|
|
75
72
|
},
|
|
76
73
|
}, {
|
|
77
|
-
enabled:
|
|
78
|
-
!globalStore.depositWithdrawal.open &&
|
|
74
|
+
enabled: !globalStore.depositWithdrawal.open &&
|
|
79
75
|
!globalStore.messages.open &&
|
|
80
76
|
!globalStore.message.open &&
|
|
81
77
|
!globalStore.account.open &&
|
|
@@ -86,7 +82,7 @@ export function MessagesPopup() {
|
|
|
86
82
|
refetchInterval: disclosure.open ? undefined : 1000 * 10,
|
|
87
83
|
});
|
|
88
84
|
const messages = messagesQuery.data?.pages.flatMap((page) => page.edges
|
|
89
|
-
.filter((edge) => globalStore.gameLaunch.details.status === 'PLAYING'
|
|
85
|
+
.filter((edge) => globalStore.gameLaunch.details.status === 'PLAYING'
|
|
90
86
|
? edge.node.force
|
|
91
87
|
: true)
|
|
92
88
|
.map((edge) => edge.node)) ?? [];
|
|
@@ -132,7 +128,7 @@ export function MessagesPopup() {
|
|
|
132
128
|
setIndex(details.page);
|
|
133
129
|
}, slideCount: messages.length, allowMouseDrag: true, autoplay: false, children: [_jsx(Carousel.ItemGroup, { children: messages.map((message, index) => (_jsxs(Carousel.Item, { index: index, className: "select-none", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-brand-secondary text-text-brand", children: _jsx(MessageIcon, { type: message.icon, className: "size-6" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg xl:mt-xl", children: message.title }), message.content && (_jsx("div", { dangerouslySetInnerHTML: {
|
|
134
130
|
__html: transformContent(message.content),
|
|
135
|
-
}, className: "mt-xs pb-5 text-
|
|
131
|
+
}, className: "mt-xs pb-5 text-center text-sm text-text-secondary-700 [&_li>ol]:list-decimal [&_li>ol]:pl-5 [&_li>ul]:list-disc [&_li>ul]:pl-5 [&_li]:mb-1 [&_ol]:list-decimal [&_ol]:pl-5 [&_ul]:list-disc [&_ul]:pl-5" })), message.image && (_jsx("div", { className: "mt-5 pb-5", children: _jsx(Image, { src: message.image, alt: "", width: 400, height: 250, loading: "lazy", unoptimized: true, className: "h-auto w-full rounded-sm" }) })), message.actions.length ? (_jsx("div", { className: "mt-3xl flex flex-col gap-2 text-center lg:mt-4xl", children: message.actions.map((action, index) => (_jsx(Button, { asChild: true, children: _jsx(Link, { href: normalizeActionUrl(action.url, session?.token || '', {
|
|
136
132
|
questsPageUrl,
|
|
137
133
|
transactionsPageUrl,
|
|
138
134
|
}), onClick: () => {
|