gatsby-core-theme 40.0.13 → 40.0.14
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/CHANGELOG.md +19 -0
- package/package.json +1 -1
- package/src/components/atoms/admin/bar/bar.module.scss +28 -57
- package/src/components/atoms/admin/bar/index.js +16 -156
- package/src/components/atoms/admin/bar/layout-section/index.js +64 -0
- package/src/components/atoms/admin/bar/layout-section/layout-section.module.scss +49 -0
- package/src/components/atoms/admin/bar/layout-section/link/index.js +25 -0
- package/src/components/atoms/admin/bar/layout-section/link/link.module.scss +28 -0
- package/src/components/atoms/admin/bar/logo/index.js +35 -0
- package/src/components/atoms/admin/bar/logo/logo.module.scss +8 -0
- package/src/components/atoms/admin/bar/preview/index.js +32 -0
- package/src/components/atoms/admin/bar/preview/preview.module.scss +14 -0
- package/src/components/atoms/header-operator-bannner/index.js +1 -0
- package/src/components/atoms/operator-info-block/index.js +5 -2
- package/src/components/molecules/bonus/template-one/index.js +2 -1
- package/src/components/molecules/bonus/template-two/index.js +6 -8
- package/src/components/molecules/content/index.js +36 -28
- package/src/components/molecules/floating-area/index.js +4 -1
- package/src/components/molecules/module/index.js +13 -14
- package/src/components/molecules/toplist/default-row/index.js +2 -1
- package/src/constants/admin-bar.js +88 -0
- package/src/constants/settings.mjs +5 -0
- package/src/helpers/processor/modules.mjs +41 -27
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [40.0.14](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.13...v40.0.14) (2024-10-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add a constant to get more data for rocket sites ([edceac5](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/edceac5b2eef0550605e7a73d27d784552fa3d2b))
|
|
7
|
+
* clean up ([b97f17c](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/b97f17ce8e93c3c172976a184d42fa695b6ac3ad))
|
|
8
|
+
* fix test ([ba9ef61](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ba9ef61395ce9a68b80e5f148142602f2bd69f57))
|
|
9
|
+
* make style ([4f6caa4](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/4f6caa4fd7cdcae7ffa680b401b8b19028c9446d))
|
|
10
|
+
* refactor ([8d72576](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/8d72576a00ad3235c9ca7af6d0043dadcbc9844c))
|
|
11
|
+
* refactor admin bar ([b674893](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/b67489301d51421e545c928fd7dbafa571451ae8))
|
|
12
|
+
* tracking api ([9f12c77](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/9f12c771ceaa48f96f30c0abe37ba49e11c60071))
|
|
13
|
+
* tracking api ([bae53e4](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/bae53e4d6d31b47b6f5e05998ea4d64e35c2851f))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
* Merge branch 'tm-4861-admin-bar' into 'master' ([785772c](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/785772c1d169595efb891e8b0205ee1c0813140e))
|
|
17
|
+
* Merge branch 'bonus-data-rocket' into 'master' ([4e73f21](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/4e73f213c0150f94e46f982565e76ea0cfb3d9ad))
|
|
18
|
+
* Merge branch 'tm-4898-tracking-api-v2' into 'master' ([528ca42](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/528ca4281b9ee4e4bb3c15b2049a67889a23a711))
|
|
19
|
+
|
|
1
20
|
## [40.0.13](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.12...v40.0.13) (2024-10-24)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
|
@@ -1,74 +1,45 @@
|
|
|
1
|
-
.container
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.innerContainer {
|
|
6
|
-
max-width: var(--main-container-max);
|
|
7
|
-
margin: 0 auto;
|
|
8
|
-
|
|
9
|
-
@include flex-align(center, space-between);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.menuItem {
|
|
13
|
-
@include flex-align(center, center);
|
|
14
|
-
|
|
15
|
-
color: #fff;
|
|
16
|
-
font-size: 1.3rem;
|
|
17
|
-
padding: 1rem 2rem;
|
|
18
|
-
gap: .5rem;
|
|
19
|
-
|
|
20
|
-
&:hover {
|
|
21
|
-
background-color: #32373c;
|
|
22
|
-
color: #00b9eb;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
.container {
|
|
2
|
+
display: none;
|
|
3
|
+
background-color: #000;
|
|
25
4
|
|
|
26
|
-
|
|
27
|
-
|
|
5
|
+
@include min(laptop){
|
|
6
|
+
@include flex-direction(row);
|
|
28
7
|
@include flex-align(center, flex-start);
|
|
29
|
-
|
|
30
|
-
color: #fff;
|
|
31
|
-
font-size: 1.3rem;
|
|
32
|
-
padding: 1rem 2rem;
|
|
33
|
-
gap: .5rem;
|
|
34
|
-
font-weight: bold;
|
|
8
|
+
}
|
|
35
9
|
}
|
|
36
10
|
|
|
37
|
-
.
|
|
38
|
-
|
|
11
|
+
.innerContainer {
|
|
12
|
+
max-width: var(--main-container-max);
|
|
13
|
+
height: var(--admin-bar-height, 7.2rem);
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
width: 100%;
|
|
16
|
+
|
|
17
|
+
@include flex-align(center, space-between);
|
|
39
18
|
}
|
|
40
19
|
|
|
41
20
|
.menuList {
|
|
42
|
-
|
|
21
|
+
@include flex-align(center, center);
|
|
43
22
|
|
|
44
|
-
|
|
23
|
+
gap: 2.4rem;
|
|
24
|
+
position: relative;
|
|
45
25
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
26
|
+
> li:hover {
|
|
27
|
+
> div {
|
|
28
|
+
@include flex-direction(row);
|
|
50
29
|
}
|
|
30
|
+
}
|
|
51
31
|
}
|
|
52
32
|
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
z-index: 99;
|
|
33
|
+
.checkbox {
|
|
34
|
+
color: #fff;
|
|
35
|
+
font-size: 1.4rem;
|
|
36
|
+
font-weight: 500;
|
|
58
37
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
38
|
+
@include flex-direction(row);
|
|
39
|
+
@include flex-align(center, center);
|
|
62
40
|
|
|
41
|
+
gap: 1rem;
|
|
42
|
+
padding-right: 2.5rem;
|
|
63
43
|
}
|
|
64
44
|
|
|
65
|
-
.preview {
|
|
66
|
-
background-color: #00b9eb;
|
|
67
|
-
color: #23282d;
|
|
68
|
-
font-weight: bold;
|
|
69
|
-
}
|
|
70
45
|
|
|
71
|
-
.previewOff {
|
|
72
|
-
background-color: #23282d;
|
|
73
|
-
color: #fff;
|
|
74
|
-
}
|
|
@@ -1,106 +1,34 @@
|
|
|
1
|
+
/* eslint-disable react/prop-types */
|
|
1
2
|
import React, { useContext, useState } from "react";
|
|
2
3
|
import PropTypes from "prop-types";
|
|
3
|
-
import { FaEdit } from "@react-icons/all-files/fa/FaEdit";
|
|
4
|
-
import { FaLayerGroup } from "@react-icons/all-files/fa/FaLayerGroup";
|
|
5
|
-
import { MdMenu } from "@react-icons/all-files/md/MdMenu";
|
|
6
|
-
import { MdArtTrack } from "@react-icons/all-files/md/MdArtTrack";
|
|
7
4
|
import { Context } from "~context/MainProvider.js";
|
|
8
5
|
import { getMenuObj } from "~helpers/menu";
|
|
6
|
+
import { menusConfig } from "../../../../constants/admin-bar";
|
|
7
|
+
import LayoutSection from "./layout-section";
|
|
8
|
+
import PreviewLink from "./preview";
|
|
9
|
+
import Logo from "./logo";
|
|
9
10
|
import styles from "./bar.module.scss";
|
|
10
11
|
|
|
11
|
-
const getRelationLinks = (page) => {
|
|
12
|
-
let hercLink = `${process.env.HERCULES_BACKEND_URL}`;
|
|
13
|
-
let linkText = ``;
|
|
14
|
-
|
|
15
|
-
switch (page.type) {
|
|
16
|
-
case "operator":
|
|
17
|
-
hercLink += `operators/${page.relation.operator_id}/sites-data?site=${process.env.GATSBY_SITE_NAME}`;
|
|
18
|
-
linkText = "Edit Operator Sites Data";
|
|
19
|
-
break;
|
|
20
|
-
case "game":
|
|
21
|
-
hercLink += `games/${page.relation.id}/sites?site_name=${process.env.GATSBY_SITE_NAME}`;
|
|
22
|
-
linkText = "Edit Game Sites Data";
|
|
23
|
-
break;
|
|
24
|
-
case "author":
|
|
25
|
-
hercLink += `site-authors/${page.relation_id}`;
|
|
26
|
-
linkText = "Edit Author Data";
|
|
27
|
-
break;
|
|
28
|
-
case "payment_method":
|
|
29
|
-
hercLink += `deposit-methods/${page.relation_id}`;
|
|
30
|
-
linkText = "Edit Payment Data";
|
|
31
|
-
break;
|
|
32
|
-
default:
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return (
|
|
37
|
-
<>
|
|
38
|
-
<li>
|
|
39
|
-
<span className={`${styles.label}`}>Relations</span>
|
|
40
|
-
</li>
|
|
41
|
-
<li>
|
|
42
|
-
<a
|
|
43
|
-
className={styles.menuItem}
|
|
44
|
-
target="_blank"
|
|
45
|
-
href={hercLink}
|
|
46
|
-
rel="noreferrer"
|
|
47
|
-
>
|
|
48
|
-
<FaEdit /> {linkText}
|
|
49
|
-
</a>
|
|
50
|
-
</li>
|
|
51
|
-
</>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const getFooterLinks = (section) => {
|
|
56
|
-
const menus = ["as_seen_on", "links", "social_icons"];
|
|
57
|
-
|
|
58
|
-
return menus.map((menu) => {
|
|
59
|
-
if (section[menu]) {
|
|
60
|
-
return (
|
|
61
|
-
<li>
|
|
62
|
-
<a
|
|
63
|
-
className={styles.menuItem}
|
|
64
|
-
target="_blank"
|
|
65
|
-
href={`${process.env.HERCULES_BACKEND_URL}site-menus/${section[menu].id}/items`}
|
|
66
|
-
rel="noreferrer"
|
|
67
|
-
>
|
|
68
|
-
<MdMenu /> Edit {section[menu].title}
|
|
69
|
-
</a>
|
|
70
|
-
</li>
|
|
71
|
-
);
|
|
72
|
-
}
|
|
73
|
-
return null;
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
|
|
77
12
|
const AdminBar = ({ page, marketSections, menu }) => {
|
|
78
13
|
const { setShowTranslationKeys, preview } = useContext(Context) || {};
|
|
79
14
|
const [val, setVal] = useState(false);
|
|
15
|
+
const types = ["operator", "game", "author", "payment_method"];
|
|
80
16
|
|
|
81
|
-
const navSection = marketSections
|
|
82
|
-
const footerSection = marketSections
|
|
83
|
-
const
|
|
17
|
+
const navSection = marketSections?.navigation;
|
|
18
|
+
const footerSection = marketSections?.footer?.extra_fields;
|
|
19
|
+
const menuObj = navSection?.modules
|
|
20
|
+
? getMenuObj(navSection.modules, menu)
|
|
21
|
+
: null;
|
|
84
22
|
|
|
85
|
-
|
|
86
|
-
if (navSection?.modules) {
|
|
87
|
-
menuObj = getMenuObj(navSection.modules, menu);
|
|
88
|
-
}
|
|
23
|
+
const menus = menusConfig(menuObj, footerSection, page, types);
|
|
89
24
|
|
|
90
25
|
return (
|
|
91
26
|
<div className={styles.container}>
|
|
92
27
|
<div className={styles.innerContainer}>
|
|
93
|
-
<
|
|
94
|
-
className={styles.menuItem}
|
|
95
|
-
target="_blank"
|
|
96
|
-
href={`${process.env.HERCULES_BACKEND_URL}`}
|
|
97
|
-
rel="noreferrer"
|
|
98
|
-
>
|
|
99
|
-
Hercules
|
|
100
|
-
</a>
|
|
28
|
+
<Logo />
|
|
101
29
|
<ul className={styles.menuList}>
|
|
102
30
|
<li>
|
|
103
|
-
<label className={styles.
|
|
31
|
+
<label className={styles.checkbox} htmlFor="translation">
|
|
104
32
|
<input
|
|
105
33
|
id="translation"
|
|
106
34
|
type="checkbox"
|
|
@@ -114,73 +42,8 @@ const AdminBar = ({ page, marketSections, menu }) => {
|
|
|
114
42
|
Show translation keys
|
|
115
43
|
</label>
|
|
116
44
|
</li>
|
|
117
|
-
<
|
|
118
|
-
<
|
|
119
|
-
<span className={styles.menuItem}>
|
|
120
|
-
<MdArtTrack /> Layout
|
|
121
|
-
</span>
|
|
122
|
-
<ul className={styles.subMenuList}>
|
|
123
|
-
<li>
|
|
124
|
-
<span className={`${styles.label}`}>Navigation Section</span>
|
|
125
|
-
</li>
|
|
126
|
-
<li>
|
|
127
|
-
{menuObj && (
|
|
128
|
-
<a
|
|
129
|
-
className={styles.menuItem}
|
|
130
|
-
target="_blank"
|
|
131
|
-
href={`${process.env.HERCULES_BACKEND_URL}site-menus/${menuObj.menu_id}/items`}
|
|
132
|
-
rel="noreferrer"
|
|
133
|
-
>
|
|
134
|
-
<FaLayerGroup /> Edit Main Menu
|
|
135
|
-
</a>
|
|
136
|
-
)}
|
|
137
|
-
</li>
|
|
138
|
-
<li>
|
|
139
|
-
<span className={`${styles.label} ${styles.labelBorder}`}>
|
|
140
|
-
Footer Section
|
|
141
|
-
</span>
|
|
142
|
-
</li>
|
|
143
|
-
{footerExtraFields && getFooterLinks(footerExtraFields)}
|
|
144
|
-
</ul>
|
|
145
|
-
</li>
|
|
146
|
-
|
|
147
|
-
<li>
|
|
148
|
-
<span className={styles.menuItem}>
|
|
149
|
-
<FaEdit /> Page
|
|
150
|
-
</span>
|
|
151
|
-
<ul className={styles.subMenuList}>
|
|
152
|
-
<li>
|
|
153
|
-
<a
|
|
154
|
-
className={styles.menuItem}
|
|
155
|
-
target="_blank"
|
|
156
|
-
href={`${process.env.HERCULES_BACKEND_URL}site-pages/${page.id}`}
|
|
157
|
-
rel="noreferrer"
|
|
158
|
-
>
|
|
159
|
-
<FaEdit /> Edit Page
|
|
160
|
-
</a>
|
|
161
|
-
</li>
|
|
162
|
-
{getRelationLinks(page)}
|
|
163
|
-
</ul>
|
|
164
|
-
</li>
|
|
165
|
-
|
|
166
|
-
{!preview && <li>|</li>}
|
|
167
|
-
|
|
168
|
-
<li>
|
|
169
|
-
<a
|
|
170
|
-
className={`${styles.menuItem} ${styles.preview} ${
|
|
171
|
-
!preview ? styles.previewOff : ""
|
|
172
|
-
}`}
|
|
173
|
-
target={!preview ? "_blank" : ""}
|
|
174
|
-
href={
|
|
175
|
-
!preview
|
|
176
|
-
? `/preview/?path=${page.path}&market_id=${page.market_id}`
|
|
177
|
-
: `/${page.path}`
|
|
178
|
-
}
|
|
179
|
-
rel="noreferrer"
|
|
180
|
-
>
|
|
181
|
-
{preview ? "Preview Mode On" : "Preview Mode Off"}
|
|
182
|
-
</a>
|
|
183
|
-
</li>
|
|
45
|
+
<LayoutSection menus={menus} />
|
|
46
|
+
<PreviewLink page={page} preview={preview} />
|
|
184
47
|
</ul>
|
|
185
48
|
</div>
|
|
186
49
|
</div>
|
|
@@ -195,9 +58,6 @@ AdminBar.propTypes = {
|
|
|
195
58
|
}),
|
|
196
59
|
marketSections: PropTypes.shape({
|
|
197
60
|
navigation: PropTypes.shape({}),
|
|
198
|
-
navigator: PropTypes.shape({
|
|
199
|
-
modules: PropTypes.shape({}),
|
|
200
|
-
}),
|
|
201
61
|
footer: PropTypes.shape({}),
|
|
202
62
|
}),
|
|
203
63
|
menu: PropTypes.string,
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import styles from "./layout-section.module.scss";
|
|
4
|
+
import Redirect from "./link";
|
|
5
|
+
|
|
6
|
+
const LayoutSection = ({ menus }) => {
|
|
7
|
+
const paths = (type, id) => {
|
|
8
|
+
switch (type) {
|
|
9
|
+
case "menu":
|
|
10
|
+
return `site-menus/${id}/items`;
|
|
11
|
+
case "page":
|
|
12
|
+
return `site-pages/${id}`;
|
|
13
|
+
case "operator":
|
|
14
|
+
return `operators/${id}/sites-data?site=${process.env.GATSBY_SITE_NAME}`;
|
|
15
|
+
case "game":
|
|
16
|
+
return `games/${id}/sites?site_name=${process.env.GATSBY_SITE_NAME}`;
|
|
17
|
+
case "author":
|
|
18
|
+
return `site-authors/${id}`;
|
|
19
|
+
case "payment_method":
|
|
20
|
+
return `deposit-methods/${id}`;
|
|
21
|
+
default:
|
|
22
|
+
return "";
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return menus?.map((res) => (
|
|
27
|
+
<li>
|
|
28
|
+
<span className={`${styles.menuItem} ${styles.link}`}>{res.label}</span>
|
|
29
|
+
<div className={styles.subMenuList}>
|
|
30
|
+
{res?.sections?.map((section) => (
|
|
31
|
+
<ul className={styles.lists}>
|
|
32
|
+
{section.label && (
|
|
33
|
+
<li>
|
|
34
|
+
<span className={styles.label}>{section.label}</span>
|
|
35
|
+
</li>
|
|
36
|
+
)}
|
|
37
|
+
{section?.links?.map((link) => (
|
|
38
|
+
<li>
|
|
39
|
+
<Redirect
|
|
40
|
+
icon={link?.icon}
|
|
41
|
+
path={paths(link?.type, link.data)}
|
|
42
|
+
linkText={link.buttonText}
|
|
43
|
+
description={link.description}
|
|
44
|
+
/>
|
|
45
|
+
</li>
|
|
46
|
+
))}
|
|
47
|
+
</ul>
|
|
48
|
+
))}
|
|
49
|
+
</div>
|
|
50
|
+
</li>
|
|
51
|
+
));
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
LayoutSection.propTypes = {
|
|
55
|
+
navSection: PropTypes.shape({}),
|
|
56
|
+
footerSection: PropTypes.shape({
|
|
57
|
+
extra_fields: PropTypes.shape({}),
|
|
58
|
+
}),
|
|
59
|
+
menuObj: PropTypes.shape({
|
|
60
|
+
menu_id: PropTypes.number,
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default LayoutSection;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.subMenuList {
|
|
2
|
+
background-color: #000;
|
|
3
|
+
|
|
4
|
+
@include flex-direction(row);
|
|
5
|
+
@include flex-align(start, flex-start);
|
|
6
|
+
|
|
7
|
+
padding: 2.4rem;
|
|
8
|
+
display: none;
|
|
9
|
+
position: absolute;
|
|
10
|
+
top: 100%;
|
|
11
|
+
z-index: 99;
|
|
12
|
+
gap: 2.4rem;
|
|
13
|
+
border-radius: .8rem;
|
|
14
|
+
left: 0;
|
|
15
|
+
|
|
16
|
+
> li a {
|
|
17
|
+
@include flex-align(center, flex-start);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.menuItem {
|
|
22
|
+
@include flex-align(center, center);
|
|
23
|
+
|
|
24
|
+
padding: 1rem 2rem;
|
|
25
|
+
gap: 0.5rem;
|
|
26
|
+
border: 1px solid #fff;
|
|
27
|
+
border-radius: 0.4rem;
|
|
28
|
+
height: 4rem;
|
|
29
|
+
font-size: 1.4rem;
|
|
30
|
+
line-height: 2.4rem;
|
|
31
|
+
font-weight: 500;
|
|
32
|
+
color: #fff;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
.label {
|
|
37
|
+
@include flex-align(center, flex-start);
|
|
38
|
+
|
|
39
|
+
color: #fff;
|
|
40
|
+
font-size: 2rem;
|
|
41
|
+
gap: 0.5rem;
|
|
42
|
+
font-weight: 500;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.lists{
|
|
46
|
+
@include flex-direction(column);
|
|
47
|
+
|
|
48
|
+
gap: 1.6rem;
|
|
49
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* eslint-disable react/prop-types */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import styles from './link.module.scss'
|
|
5
|
+
|
|
6
|
+
export default function Link({icon, path, linkText, description}) {
|
|
7
|
+
return (
|
|
8
|
+
<a
|
|
9
|
+
className={styles.link}
|
|
10
|
+
target="_blank"
|
|
11
|
+
href={`${process.env.HERCULES_BACKEND_URL}${path}`}
|
|
12
|
+
rel="noreferrer"
|
|
13
|
+
>
|
|
14
|
+
<span className={styles.title}>{icon && icon} {linkText}</span>
|
|
15
|
+
<p className={styles.desc}>{description}</p>
|
|
16
|
+
</a>
|
|
17
|
+
)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
Link.propTypes = {
|
|
21
|
+
icon: PropTypes.string,
|
|
22
|
+
path: PropTypes.string,
|
|
23
|
+
linkText: PropTypes.string,
|
|
24
|
+
description: PropTypes.string
|
|
25
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.link {
|
|
2
|
+
@include flex-direction(column);
|
|
3
|
+
|
|
4
|
+
background: #0f172a;
|
|
5
|
+
width: 29rem;
|
|
6
|
+
border: 1px solid #1e293b;
|
|
7
|
+
border-radius: .8rem;
|
|
8
|
+
padding: 1.6rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.title{
|
|
12
|
+
font-size: 1.6rem;
|
|
13
|
+
color: #fff;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
|
|
16
|
+
@include flex-direction(row);
|
|
17
|
+
@include flex-align(center, flex-start);
|
|
18
|
+
|
|
19
|
+
svg{
|
|
20
|
+
margin-right: 1.6rem;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.desc{
|
|
25
|
+
font-size: 1.4rem;
|
|
26
|
+
color: #E2E8F0;
|
|
27
|
+
padding-left: 3.2rem;
|
|
28
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/* eslint-disable jsx-a11y/control-has-associated-label */
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styles from "./logo.module.scss";
|
|
4
|
+
|
|
5
|
+
export default function index() {
|
|
6
|
+
return (
|
|
7
|
+
<a
|
|
8
|
+
className={styles.logo}
|
|
9
|
+
target="_blank"
|
|
10
|
+
href={`${process.env.HERCULES_BACKEND_URL}`}
|
|
11
|
+
rel="noreferrer"
|
|
12
|
+
>
|
|
13
|
+
<svg
|
|
14
|
+
id="sidebar-logo"
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
viewBox="0 0 117.96 117.84"
|
|
17
|
+
height="40px"
|
|
18
|
+
fill="#fff"
|
|
19
|
+
>
|
|
20
|
+
<path
|
|
21
|
+
d="M117.96 29.34v59.39c0 8.31-2.42 15.35-7.03 20.43l-.33.36c-.13.14-.26.28-.4.41-.05.06-.11.11-.17.17l-.07.07c-.05.05-.11.11-.17.16-.07.07-.15.14-.22.21l-.36.33c-4.93 4.44-11.88 6.97-20.62 6.97H29.36c-8.74 0-15.69-2.53-20.62-6.97l-.36-.33c-.13-.13-.27-.26-.4-.38-.08-.08-.16-.16-.23-.24-.13-.13-.26-.26-.39-.4l-.33-.36C2.42 104.09 0 97.04 0 88.73V29.34c0-9 2.54-15.97 7.03-20.86.11-.12.22-.24.33-.35l.12-.12c.05-.05.11-.11.16-.17l.07-.07c.06-.06.11-.11.17-.16.1-.1.21-.2.32-.31l.36-.33C13.67 2.35 20.83 0 29.36 0H88.6c8.54 0 15.7 2.35 20.81 6.97l.36.33c.1.1.21.2.31.29.08.08.16.15.23.23.1.1.2.2.29.3.11.12.22.23.33.35 4.49 4.9 7.03 11.88 7.03 20.87"
|
|
22
|
+
fill="#0037ff"
|
|
23
|
+
/>
|
|
24
|
+
<path
|
|
25
|
+
className="st1"
|
|
26
|
+
d="M68.16 16.66l-.93 25.83 9.71 6.96v33.64l-10.89-7.8-.89 24.54 13.25-8.56 14.64-38.22 8.63.37zM41.02 83.09V49.45l9.83-7.05-.92-25.74-33.52 36.76 8.63-.37 14.64 38.22 13.25 8.56-.89-24.64z"
|
|
27
|
+
/>
|
|
28
|
+
<path
|
|
29
|
+
fill="#ffd100"
|
|
30
|
+
d="M72.94 51.51L58.98 41.5 45.02 51.51V75.3l13.96-10 13.96 10z"
|
|
31
|
+
/>
|
|
32
|
+
</svg>
|
|
33
|
+
</a>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import { FiEye } from "@react-icons/all-files/fi/FiEye";
|
|
4
|
+
import { FiEyeOff } from "@react-icons/all-files/fi/FiEyeOff";
|
|
5
|
+
import styles from "./preview.module.scss";
|
|
6
|
+
|
|
7
|
+
const PreviewLink = ({ page, preview }) => (
|
|
8
|
+
<li>
|
|
9
|
+
<a
|
|
10
|
+
className={styles.preview}
|
|
11
|
+
target={!preview ? "_blank" : ""}
|
|
12
|
+
href={
|
|
13
|
+
!preview
|
|
14
|
+
? `/preview/?path=${page.path}&market_id=${page.market_id}`
|
|
15
|
+
: `/${page.path}`
|
|
16
|
+
}
|
|
17
|
+
rel="noreferrer"
|
|
18
|
+
>
|
|
19
|
+
Preview page {preview ? <FiEyeOff /> : <FiEye />}
|
|
20
|
+
</a>
|
|
21
|
+
</li>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
PreviewLink.propTypes = {
|
|
25
|
+
page: PropTypes.shape({
|
|
26
|
+
path: PropTypes.string,
|
|
27
|
+
market_id: PropTypes.number,
|
|
28
|
+
}),
|
|
29
|
+
preview: PropTypes.bool,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default PreviewLink;
|
|
@@ -6,7 +6,7 @@ import PrettyLink from '~atoms/pretty-link';
|
|
|
6
6
|
import styles from './operator-info-block.module.scss';
|
|
7
7
|
import keygen from '~helpers/keygen';
|
|
8
8
|
|
|
9
|
-
const OperatorInfoBlock = ({ page,
|
|
9
|
+
const OperatorInfoBlock = ({ page, modulePosition }) => {
|
|
10
10
|
const { relation } = page;
|
|
11
11
|
const status = relation?.status;
|
|
12
12
|
if (status !== 'active') return null;
|
|
@@ -21,7 +21,7 @@ const OperatorInfoBlock = ({ page, }) => {
|
|
|
21
21
|
return (
|
|
22
22
|
<>
|
|
23
23
|
<ul className={styles.operatorInfoBlock || ''}>
|
|
24
|
-
{infos.map((item) => {
|
|
24
|
+
{infos.map((item, index) => {
|
|
25
25
|
return (
|
|
26
26
|
<li key={keygen()}>
|
|
27
27
|
<p className={styles.label || ''}>{item.field_label}</p>
|
|
@@ -34,6 +34,8 @@ const OperatorInfoBlock = ({ page, }) => {
|
|
|
34
34
|
tracker="main"
|
|
35
35
|
clickedElement="operator_name"
|
|
36
36
|
className="operator-info-block-gtm"
|
|
37
|
+
modulePosition={modulePosition}
|
|
38
|
+
itemPosition={index + 1}
|
|
37
39
|
>
|
|
38
40
|
{relation[item.field_name]}
|
|
39
41
|
</PrettyLink>
|
|
@@ -68,6 +70,7 @@ const OperatorInfoBlock = ({ page, }) => {
|
|
|
68
70
|
OperatorInfoBlock.propTypes = {
|
|
69
71
|
// eslint-disable-next-line react/no-unused-prop-types
|
|
70
72
|
activeOperator: PropTypes.bool,
|
|
73
|
+
modulePosition: PropTypes.number,
|
|
71
74
|
page: PropTypes.shape({
|
|
72
75
|
relation: PropTypes.shape({
|
|
73
76
|
url: PropTypes.string,
|
|
@@ -32,7 +32,7 @@ export default function Bonus({
|
|
|
32
32
|
pageTemplate={pageTemplate}
|
|
33
33
|
module={module.name}
|
|
34
34
|
tracker={module?.tracking_link_name || "main"}
|
|
35
|
-
clickedElement="
|
|
35
|
+
clickedElement="logo"
|
|
36
36
|
className={`${styles.logo || ""} operator-banner-gtm logo-cta`}
|
|
37
37
|
modulePosition={modulePosition}
|
|
38
38
|
>
|
|
@@ -59,6 +59,7 @@ export default function Bonus({
|
|
|
59
59
|
<BonusBox
|
|
60
60
|
item={operator}
|
|
61
61
|
module={module.name}
|
|
62
|
+
pageTemplate={pageTemplate}
|
|
62
63
|
tracker={module?.type || "main"}
|
|
63
64
|
modulePosition={modulePosition}
|
|
64
65
|
/>
|
|
@@ -43,12 +43,10 @@ export default function TemplateOne({
|
|
|
43
43
|
|
|
44
44
|
return (
|
|
45
45
|
<div
|
|
46
|
-
className={`${styles.operatorBanner || ""} ${
|
|
47
|
-
|
|
48
|
-
} ${styles.
|
|
49
|
-
|
|
50
|
-
floating ? styles.floating : ""
|
|
51
|
-
}`}
|
|
46
|
+
className={`${styles.operatorBanner || ""} ${!closedBanner ? styles.show : styles.hide
|
|
47
|
+
} ${styles.tncEnable}
|
|
48
|
+
${tncFixed ? styles.showTncFixed || "" : ""} ${floating ? styles.floating : ""
|
|
49
|
+
}`}
|
|
52
50
|
>
|
|
53
51
|
<div className={styles.container}>
|
|
54
52
|
<div>
|
|
@@ -57,7 +55,7 @@ export default function TemplateOne({
|
|
|
57
55
|
pageTemplate={pageTemplate}
|
|
58
56
|
module={module.name}
|
|
59
57
|
tracker={module?.tracking_link_name || "main"}
|
|
60
|
-
clickedElement="
|
|
58
|
+
clickedElement="logo"
|
|
61
59
|
className={`${styles.logo || ""} operator-banner-gtm logo-cta`}
|
|
62
60
|
>
|
|
63
61
|
<LazyImage
|
|
@@ -85,7 +83,7 @@ export default function TemplateOne({
|
|
|
85
83
|
<p className={styles.welcomeBonus}>{welcomeBonusText}</p>
|
|
86
84
|
)}
|
|
87
85
|
|
|
88
|
-
<BonusBox item={operator} tracker={module?.type || "main"} />
|
|
86
|
+
<BonusBox item={operator} tracker={module?.type || "main"} pageTemplate={pageTemplate} />
|
|
89
87
|
{!tncFixed && <Tnc isFixed={tncFixed} operator={operator} />}
|
|
90
88
|
</div>
|
|
91
89
|
</div>
|
|
@@ -16,6 +16,7 @@ const Content = ({
|
|
|
16
16
|
isHomepageFirstModule = false,
|
|
17
17
|
isModuleIntroduction = '',
|
|
18
18
|
page,
|
|
19
|
+
pageTemplate,
|
|
19
20
|
moduleName = 'content',
|
|
20
21
|
isContentCollapsible = false,
|
|
21
22
|
icon = <IoIosArrowDown />,
|
|
@@ -25,7 +26,7 @@ const Content = ({
|
|
|
25
26
|
}) => {
|
|
26
27
|
const { show_more_label, show_less_label, show_more_enabled } = module || {}
|
|
27
28
|
|
|
28
|
-
const
|
|
29
|
+
const pageTemplateData = page?.template || pageTemplate;
|
|
29
30
|
|
|
30
31
|
const [showMore, setShowMore] = useState(false)
|
|
31
32
|
|
|
@@ -46,20 +47,21 @@ const Content = ({
|
|
|
46
47
|
|
|
47
48
|
const mainContent = (content, customClassName = '') => (
|
|
48
49
|
<div
|
|
49
|
-
className={` ${styles.content || ''} ${lists.ul || ''} ${
|
|
50
|
-
|
|
51
|
-
}
|
|
50
|
+
className={` ${styles.content || ''} ${lists.ul || ''} ${blockquote.blockquote || ''
|
|
51
|
+
}
|
|
52
52
|
${styles[customClass] || ''}
|
|
53
|
-
${switchStyle(module.style) || ''} ${
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
isModuleIntroduction ? styles.moduleIntroMargin || '' : ''
|
|
57
|
-
} ${customClassName}
|
|
53
|
+
${switchStyle(module.style) || ''} ${isHomepageFirstModule ? styles.homepageFirstModuleContent || '' : ''
|
|
54
|
+
} ${isModuleIntroduction ? styles.moduleIntroMargin || '' : ''
|
|
55
|
+
} ${customClassName}
|
|
58
56
|
`}
|
|
59
57
|
>
|
|
60
58
|
{parse(content, {
|
|
61
59
|
replace: (node) =>
|
|
62
|
-
replaceMedia(node, moduleWidth, moduleName,
|
|
60
|
+
replaceMedia(node, moduleWidth, moduleName, pageTemplateData, modulePosition, styles, {
|
|
61
|
+
siteName: page?.siteInfo?.site_name,
|
|
62
|
+
pageTitle: page?.title,
|
|
63
|
+
name: page?.relation?.name,
|
|
64
|
+
})
|
|
63
65
|
})}
|
|
64
66
|
</div>
|
|
65
67
|
)
|
|
@@ -70,21 +72,23 @@ const Content = ({
|
|
|
70
72
|
showMoreText = false
|
|
71
73
|
) => (
|
|
72
74
|
<div
|
|
73
|
-
className={` ${styles.content || ''} ${lists.ul || ''} ${
|
|
74
|
-
|
|
75
|
-
}
|
|
75
|
+
className={` ${styles.content || ''} ${lists.ul || ''} ${blockquote.blockquote || ''
|
|
76
|
+
}
|
|
76
77
|
${styles[customClass] || ''}
|
|
77
78
|
${showMore && !isContentCollapsible ? styles.showMore : ''}
|
|
78
|
-
${switchStyle(module.style) || ''} ${
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
isModuleIntroduction ? styles.moduleIntroMargin || '' : ''
|
|
82
|
-
} ${customClassName}
|
|
79
|
+
${switchStyle(module.style) || ''} ${isHomepageFirstModule ? styles.homepageFirstModuleContent || '' : ''
|
|
80
|
+
} ${isModuleIntroduction ? styles.moduleIntroMargin || '' : ''
|
|
81
|
+
} ${customClassName}
|
|
83
82
|
${showMoreText && !showMore ? styles.hide : ''}
|
|
84
83
|
`}
|
|
85
84
|
>
|
|
86
85
|
{parse(content, {
|
|
87
|
-
replace: (node) =>
|
|
86
|
+
replace: (node) =>
|
|
87
|
+
replaceMedia(node, moduleWidth, moduleName, pageTemplateData, modulePosition, styles, {
|
|
88
|
+
siteName: page?.siteInfo?.site_name,
|
|
89
|
+
pageTitle: page?.title,
|
|
90
|
+
name: page?.relation?.name,
|
|
91
|
+
})
|
|
88
92
|
})}
|
|
89
93
|
</div>
|
|
90
94
|
)
|
|
@@ -96,18 +100,16 @@ const Content = ({
|
|
|
96
100
|
{mainContent(module.value)}
|
|
97
101
|
<button
|
|
98
102
|
type="button"
|
|
99
|
-
className={`${
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
} ${(!isContentCollapsible && showMore && styles.hide) || ''} ${
|
|
104
|
-
(showMore && isContentCollapsible && styles.showMoreTwoButtonOpen) ||
|
|
103
|
+
className={`${isContentCollapsible
|
|
104
|
+
? styles.showMoreTwoButton || ''
|
|
105
|
+
: styles.showMoreButton || ''
|
|
106
|
+
} ${(!isContentCollapsible && showMore && styles.hide) || ''} ${(showMore && isContentCollapsible && styles.showMoreTwoButtonOpen) ||
|
|
105
107
|
''
|
|
106
|
-
|
|
108
|
+
}`}
|
|
107
109
|
onClick={handleChange}
|
|
108
110
|
title="showMoreContentButton"
|
|
109
111
|
>
|
|
110
|
-
{showMore ? show_less_label || show_more_label :
|
|
112
|
+
{showMore ? show_less_label || show_more_label : show_more_label}
|
|
111
113
|
{icon && isContentCollapsible && icon}
|
|
112
114
|
</button>
|
|
113
115
|
|
|
@@ -130,7 +132,13 @@ Content.propTypes = {
|
|
|
130
132
|
style: PropTypes.string,
|
|
131
133
|
show_more_content: PropTypes.string
|
|
132
134
|
}),
|
|
133
|
-
page: PropTypes.shape({
|
|
135
|
+
page: PropTypes.shape({
|
|
136
|
+
template: PropTypes.string,
|
|
137
|
+
title: PropTypes.string,
|
|
138
|
+
relation: PropTypes.shape({ name: PropTypes.string }),
|
|
139
|
+
siteInfo: PropTypes.shape({ site_name: PropTypes.string })
|
|
140
|
+
}),
|
|
141
|
+
pageTemplate: PropTypes.string,
|
|
134
142
|
moduleName: PropTypes.string,
|
|
135
143
|
isHomepageFirstModule: PropTypes.bool,
|
|
136
144
|
isModuleIntroduction: PropTypes.string,
|
|
@@ -45,7 +45,10 @@ export default function FloatingArea({
|
|
|
45
45
|
<Suspense fallback={<></>}>
|
|
46
46
|
<OperatorBanner
|
|
47
47
|
type={pageType}
|
|
48
|
-
|
|
48
|
+
pageTemplate={template}
|
|
49
|
+
module={{
|
|
50
|
+
name: 'bonus',
|
|
51
|
+
}}
|
|
49
52
|
sticky
|
|
50
53
|
logo={pageContext.page.relation.logo_url}
|
|
51
54
|
operator={pageContext.page.relation}
|
|
@@ -109,14 +109,15 @@ const Modules = ({ module, page, pageContext, modulePosition }) => {
|
|
|
109
109
|
const anchorLabel = module.anchor_label
|
|
110
110
|
? removeSymbols(anchorLink(module.anchor_label))
|
|
111
111
|
: module.name === 'archive'
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
? 'archiveLabel'
|
|
113
|
+
: `module_${module.module_value_id}`
|
|
114
114
|
|
|
115
115
|
const extraProps = () => {
|
|
116
116
|
switch (module.name) {
|
|
117
117
|
case 'bonus':
|
|
118
118
|
return {
|
|
119
119
|
operator: module?.value,
|
|
120
|
+
pageTemplate: page?.template,
|
|
120
121
|
logo: module?.value?.logo?.url,
|
|
121
122
|
hasLink: true
|
|
122
123
|
}
|
|
@@ -145,26 +146,24 @@ const Modules = ({ module, page, pageContext, modulePosition }) => {
|
|
|
145
146
|
module.name === 'archive' && module.module_title ? null : anchorLabel
|
|
146
147
|
}
|
|
147
148
|
style={module.background_color && moduleBackgroundColor}
|
|
148
|
-
className={`${
|
|
149
|
-
styles[moduleClassName]
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
module?.style ? styles[module.style] || '' : ''
|
|
154
|
-
} module`}
|
|
149
|
+
className={`${styles[moduleClassName] !== undefined
|
|
150
|
+
? styles[moduleClassName] || ''
|
|
151
|
+
: ''
|
|
152
|
+
} ${module.name || ''} ${styles.module || ''} ${module?.style ? styles[module.style] || '' : ''
|
|
153
|
+
} module`}
|
|
155
154
|
>
|
|
156
155
|
<ModuleTitle
|
|
157
156
|
module={module}
|
|
158
157
|
anchorLabel={module.name === 'archive' ? anchorLabel : ''}
|
|
159
158
|
/>
|
|
160
159
|
{module.module_introduction && (
|
|
161
|
-
<Content module={{ value: module.module_introduction }} />
|
|
160
|
+
<Content module={{ value: module.module_introduction }} pageTemplate={page?.template} modulePosition={modulePosition} />
|
|
162
161
|
)}
|
|
163
162
|
|
|
164
163
|
{module.name === 'accordion' ||
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
module.name === 'content' ||
|
|
165
|
+
module.name === 'top_list' ||
|
|
166
|
+
module.name === 'anchor' ? (
|
|
168
167
|
<ModuleComponent
|
|
169
168
|
module={module}
|
|
170
169
|
page={page}
|
|
@@ -184,7 +183,7 @@ const Modules = ({ module, page, pageContext, modulePosition }) => {
|
|
|
184
183
|
</Suspense>
|
|
185
184
|
)}
|
|
186
185
|
|
|
187
|
-
{admin && <AdminButton page={page} module={module} modulePosition={modulePosition - 1} />
|
|
186
|
+
{admin && <AdminButton page={page} module={module} modulePosition={modulePosition - 1} />}
|
|
188
187
|
</div>
|
|
189
188
|
)
|
|
190
189
|
)
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/* eslint-disable import/prefer-default-export */
|
|
2
|
+
/* eslint-disable react/react-in-jsx-scope */
|
|
3
|
+
import React from 'react'
|
|
4
|
+
import { IoMdMenu } from "@react-icons/all-files/io/IoMdMenu";
|
|
5
|
+
import { FiEye } from "@react-icons/all-files/fi/FiEye";
|
|
6
|
+
import { IoLink } from "@react-icons/all-files/io5/IoLink";
|
|
7
|
+
import { RiInstagramLine } from "@react-icons/all-files/ri/RiInstagramLine";
|
|
8
|
+
import { FiDatabase } from "@react-icons/all-files/fi/FiDatabase";
|
|
9
|
+
import { FaLayerGroup } from "@react-icons/all-files/fa/FaLayerGroup";
|
|
10
|
+
|
|
11
|
+
export const menusConfig = (menuObj, footerSection, page, types) => [
|
|
12
|
+
{
|
|
13
|
+
label: "Layout",
|
|
14
|
+
sections: [
|
|
15
|
+
{
|
|
16
|
+
label: "Main Menu",
|
|
17
|
+
links: [
|
|
18
|
+
{
|
|
19
|
+
data: menuObj?.menu_id || null,
|
|
20
|
+
buttonText: "Edit Main Menu",
|
|
21
|
+
icon: <IoMdMenu fontSize={20} />,
|
|
22
|
+
type: "menu",
|
|
23
|
+
description: "Change the navigation structure and links in the main menu.",
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: "Footer Menu",
|
|
29
|
+
links: [
|
|
30
|
+
{
|
|
31
|
+
buttonText: "Edit as seen on",
|
|
32
|
+
icon: <FiEye fontSize={20} />,
|
|
33
|
+
type: "menu",
|
|
34
|
+
data: footerSection?.as_seen_on.id,
|
|
35
|
+
description: "Change the items within the ‘As seen on’ section.",
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
buttonText: "Edit footer links",
|
|
39
|
+
icon: <IoLink fontSize={20}/>,
|
|
40
|
+
type: "menu",
|
|
41
|
+
data: footerSection?.links.id,
|
|
42
|
+
description: "Change the URL and labels within the footer menu.",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
buttonText: "Edit Social icons",
|
|
46
|
+
icon: <RiInstagramLine fontSize={20} />,
|
|
47
|
+
type: "menu",
|
|
48
|
+
data: footerSection?.social_icons.id,
|
|
49
|
+
description: "Add or replace social media links.",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
label: "Page",
|
|
57
|
+
sections: [
|
|
58
|
+
{
|
|
59
|
+
label: "Page",
|
|
60
|
+
links: [
|
|
61
|
+
{
|
|
62
|
+
data: page.id || null,
|
|
63
|
+
buttonText: "Edit Page",
|
|
64
|
+
icon: <FaLayerGroup fontSize={20} />,
|
|
65
|
+
type: "page",
|
|
66
|
+
description: "Make changes to the page settings.",
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
...(types.includes(page?.type) && {
|
|
72
|
+
label: "Relations",
|
|
73
|
+
links: [
|
|
74
|
+
{
|
|
75
|
+
...(types.includes(page?.type) && {
|
|
76
|
+
data: page?.relation?.operator_id,
|
|
77
|
+
buttonText: `Edit ${page?.type} Sites Data`,
|
|
78
|
+
icon: <FiDatabase fontSize={20} />,
|
|
79
|
+
type: page?.type,
|
|
80
|
+
description: "Make changes to Hercules sites data.",
|
|
81
|
+
}),
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
}),
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
},
|
|
88
|
+
];
|
|
@@ -55,5 +55,10 @@ export default {
|
|
|
55
55
|
default: {
|
|
56
56
|
filter_pages: ['operator'],
|
|
57
57
|
}
|
|
58
|
+
},
|
|
59
|
+
remove_bonus_data:{
|
|
60
|
+
default:['withdrawal_methods', 'currencies', 'license_objects','deposit_methods' ],
|
|
61
|
+
"casinossuisses.org": ['withdrawal_methods', 'currencies'],
|
|
62
|
+
"demo-rocket-theme.gigmedia.com": ['withdrawal_methods', 'currencies']
|
|
58
63
|
}
|
|
59
64
|
};
|
|
@@ -134,7 +134,7 @@ export function processCardsV2(
|
|
|
134
134
|
const moduleSelectedTypes =
|
|
135
135
|
module.cards_selector_filters && module.cards_selector_filters.types;
|
|
136
136
|
|
|
137
|
-
const market = pagesMappedById[pageId] ? pagesMappedById[pageId].market :
|
|
137
|
+
const market = pagesMappedById[pageId] ? pagesMappedById[pageId].market : "";
|
|
138
138
|
|
|
139
139
|
module.items = [];
|
|
140
140
|
|
|
@@ -289,10 +289,10 @@ export function processBonus(module, relations) {
|
|
|
289
289
|
cloneDeep(relations.operator[module.value])
|
|
290
290
|
);
|
|
291
291
|
if (object.bonus) {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
292
|
+
const removeFields =
|
|
293
|
+
settings.remove_bonus_data[process.env.GATSBY_SITE_NAME] ||
|
|
294
|
+
settings.remove_bonus_data.default;
|
|
295
|
+
removeFields.forEach(res => delete object.bonus[res])
|
|
296
296
|
}
|
|
297
297
|
|
|
298
298
|
module.value = pick(
|
|
@@ -307,10 +307,10 @@ export function processTopListModule(
|
|
|
307
307
|
pages,
|
|
308
308
|
markets,
|
|
309
309
|
data,
|
|
310
|
-
toplists
|
|
310
|
+
toplists
|
|
311
311
|
) {
|
|
312
|
-
module.items = module.items.map((listItem) => {
|
|
313
|
-
const {type} = listItem;
|
|
312
|
+
module.items = module.items.map((listItem) => {
|
|
313
|
+
const { type } = listItem;
|
|
314
314
|
const showLoadMore = listItem.show_load_more || 0;
|
|
315
315
|
const itemsCount = listItem.num_items_initial_load
|
|
316
316
|
? Number(listItem.num_items_initial_load)
|
|
@@ -329,8 +329,8 @@ export function processTopListModule(
|
|
|
329
329
|
.toLocaleString("en-US", options)
|
|
330
330
|
.replace(" ", ", ");
|
|
331
331
|
}
|
|
332
|
-
|
|
333
|
-
if (listItem.id && toplists && toplists[listItem.id.toString()]) {
|
|
332
|
+
|
|
333
|
+
if (listItem.id && toplists && toplists[listItem.id.toString()]) {
|
|
334
334
|
listItem.items = toplists[listItem.id].items;
|
|
335
335
|
}
|
|
336
336
|
|
|
@@ -340,24 +340,29 @@ export function processTopListModule(
|
|
|
340
340
|
if (item.ribbons && item.ribbons.length === 0) delete item.ribbons;
|
|
341
341
|
if (item.ribbon_ids && item.ribbon_ids.length === 0)
|
|
342
342
|
delete item.ribbon_ids;
|
|
343
|
-
|
|
343
|
+
|
|
344
344
|
const operatorRelation = Object.values(relations.operator).find(
|
|
345
|
-
(operator) =>
|
|
345
|
+
(operator) =>
|
|
346
|
+
operator.operator_id === item.operator_id &&
|
|
347
|
+
type === operator.type
|
|
346
348
|
);
|
|
347
349
|
|
|
348
|
-
operatorRelation.ribbons =
|
|
350
|
+
operatorRelation.ribbons =
|
|
351
|
+
item.ribbon_ids && item.ribbon_ids.length === 0
|
|
352
|
+
? operatorRelation.ribbons
|
|
353
|
+
: item.ribbon_ids;
|
|
349
354
|
|
|
350
355
|
const operatorPage =
|
|
351
356
|
pages && pages.operator && operatorRelation
|
|
352
357
|
? pages.operator.filter(
|
|
353
|
-
(page) =>
|
|
354
|
-
|
|
358
|
+
(page) =>
|
|
359
|
+
page.relation.operator_id === operatorRelation.operator_id
|
|
355
360
|
)
|
|
356
361
|
: [];
|
|
357
362
|
|
|
358
363
|
const reviewLink =
|
|
359
364
|
operatorPage.length > 0 ? operatorPage[0].path : null;
|
|
360
|
-
|
|
365
|
+
|
|
361
366
|
const clone = pick(
|
|
362
367
|
sanitizeOperatorData(
|
|
363
368
|
cloneDeep(operatorRelation),
|
|
@@ -376,11 +381,14 @@ export function processTopListModule(
|
|
|
376
381
|
});
|
|
377
382
|
}
|
|
378
383
|
|
|
379
|
-
export function processContentModule(
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
+
export function processContentModule(
|
|
385
|
+
module,
|
|
386
|
+
translations,
|
|
387
|
+
relationData,
|
|
388
|
+
content
|
|
389
|
+
) {
|
|
390
|
+
module.value = (content && content[module.value]) || module.value;
|
|
391
|
+
|
|
384
392
|
module.value = generatePlaceholderString(
|
|
385
393
|
module.value,
|
|
386
394
|
translations,
|
|
@@ -393,8 +401,6 @@ export function processContentModule(module, translations, relationData, content
|
|
|
393
401
|
relationData
|
|
394
402
|
);
|
|
395
403
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
404
|
}
|
|
399
405
|
|
|
400
406
|
export function shouldSavePrefilled(module = {}, siteName) {
|
|
@@ -408,10 +414,10 @@ export function shouldSavePrefilled(module = {}, siteName) {
|
|
|
408
414
|
);
|
|
409
415
|
}
|
|
410
416
|
|
|
411
|
-
export function processSpotlightModule(module = {}, content){
|
|
417
|
+
export function processSpotlightModule(module = {}, content) {
|
|
412
418
|
module.items.forEach((item) => {
|
|
413
|
-
item.content = content && content[item.content] || item.content;
|
|
414
|
-
item.text = content && content[item.text] || item.text;
|
|
419
|
+
item.content = (content && content[item.content]) || item.content;
|
|
420
|
+
item.text = (content && content[item.text]) || item.text;
|
|
415
421
|
});
|
|
416
422
|
return module;
|
|
417
423
|
}
|
|
@@ -457,7 +463,15 @@ export function processModule(
|
|
|
457
463
|
} else if (module.name === "bonus") {
|
|
458
464
|
processBonus(module, relations);
|
|
459
465
|
} else if (module.name === "top_list") {
|
|
460
|
-
processTopListModule(
|
|
466
|
+
processTopListModule(
|
|
467
|
+
module,
|
|
468
|
+
relations,
|
|
469
|
+
pages,
|
|
470
|
+
markets,
|
|
471
|
+
data,
|
|
472
|
+
toplists,
|
|
473
|
+
isPreview
|
|
474
|
+
);
|
|
461
475
|
} else if (module.name === "spotlights") {
|
|
462
476
|
processSpotlightModule(module, content);
|
|
463
477
|
} else if (module.name === "menu" && menus && menus[module.menu_id]) {
|