@mundogamernetwork/shared-ui 1.17.17 → 1.17.18
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/components/MediaKit/MgRateCardBundleEditor.vue +7 -2
- package/components/MediaKit/MgRateCardEditor.vue +1 -1
- package/components/keys/KeyCampaignDashboardCard.vue +1 -1
- package/components/playtest/PlaytestInviteLanding.vue +6 -17
- package/components/ui/MgLoginModal.vue +1 -1
- package/composables/useForceLogout.ts +1 -0
- package/composables/useLogout.ts +2 -0
- package/composables/useMgCheckout.ts +1 -0
- package/error.vue +1 -1
- package/nuxt.config.ts +2 -0
- package/package.json +10 -3
- package/pages/[slug]/index.vue +1 -1
- package/pages/about.vue +1 -1
- package/pages/blog.vue +1 -1
- package/pages/careers.vue +1 -1
- package/pages/contact.vue +15 -2
- package/pages/faq.vue +1 -1
- package/pages/key-campaigns/index.vue +1 -1
- package/pages/key-campaigns/redeem-key.vue +1 -1
- package/pages/magazine/[slug]/index.vue +1 -1
- package/pages/magazine/[slug]/preview.vue +2 -2
- package/pages/magazine/index.vue +2 -3
- package/pages/partners.vue +1 -1
- package/pages/press.vue +1 -1
- package/pages/roadmap.vue +1 -1
- package/pages/status.vue +1 -1
- package/pages/team.vue +1 -1
- package/services/campaignService.ts +1 -0
- package/services/httpService.ts +2 -2
- package/services/institutionalService.ts +1 -1
- package/types/echo.d.ts +7 -0
- package/types/index.ts +3 -0
- package/utils/clearSession.ts +1 -0
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
</div>
|
|
145
145
|
<p v-if="bundle.description" class="bundle-desc">{{ bundle.description }}</p>
|
|
146
146
|
<div class="bundle-items">
|
|
147
|
-
<span v-for="item in bundle
|
|
147
|
+
<span v-for="item in getBundleRateCards(bundle)" :key="item.id" class="bundle-item-tag">
|
|
148
148
|
{{ item.content_format?.name || item.label }}<template v-if="item.platform?.name"> · {{ item.platform.name }}</template>
|
|
149
149
|
</span>
|
|
150
150
|
</div>
|
|
@@ -297,7 +297,12 @@ onMounted(() => {
|
|
|
297
297
|
});
|
|
298
298
|
|
|
299
299
|
function qtyFor(id: number): number {
|
|
300
|
-
return form.value.quantities[id] || 1;
|
|
300
|
+
return (form.value.quantities as Record<number, number>)[id] || 1;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
function getBundleRateCards(bundle: any): any[] {
|
|
304
|
+
const cards = bundle?.rate_cards;
|
|
305
|
+
return Array.isArray(cards) ? cards : Array.isArray(cards?.data) ? cards.data : [];
|
|
301
306
|
}
|
|
302
307
|
function setQty(id: number, value: number) {
|
|
303
308
|
form.value.quantities = { ...form.value.quantities, [id]: Math.max(1, value || 1) };
|
|
@@ -315,7 +315,7 @@ const saveRateCard = async () => {
|
|
|
315
315
|
Object.keys(rateCardErrors).forEach(k => delete rateCardErrors[k]);
|
|
316
316
|
if (!form.value.content_format_id) rateCardErrors.content_format_id = 'required';
|
|
317
317
|
if (!form.value.ad_channel_id) rateCardErrors.ad_channel_id = 'required';
|
|
318
|
-
if (!form.value.price_min
|
|
318
|
+
if (!form.value.price_min) rateCardErrors.price_min = 'required';
|
|
319
319
|
if (Object.keys(rateCardErrors).length) return;
|
|
320
320
|
|
|
321
321
|
saving.value = true;
|
|
@@ -195,7 +195,7 @@ const detailRoute = computed(() =>
|
|
|
195
195
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="13" viewBox="0 0 16 17" fill="none">
|
|
196
196
|
<path d="M13.3333 4.1112L12.8666 3.64453L11.9333 4.57786L10.9333 3.64453L8.33329 4.1112L2.66663 9.77786L7.19996 14.3112L12.8666 8.64453L13.3333 6.04453L12.4 5.1112L13.3333 4.1112ZM12.6 6.24453L12.2666 8.3112L7.19996 13.3779L3.59996 9.77786L8.66663 4.7112L10.7333 4.3112L11.4666 5.04453L11 5.5112L10.5333 5.04453L9.99996 5.57786L11.4 6.97786L11.8666 6.5112L11.4 6.04453L11.8666 5.57786L12.6 6.24453Z" fill="#D297FF"/>
|
|
197
197
|
</svg>
|
|
198
|
-
{{ typeof card.type === "string" ? card.type : card.type
|
|
198
|
+
{{ typeof card.type === "string" ? card.type : String((card.type as any)?.name ?? "") }}
|
|
199
199
|
</span>
|
|
200
200
|
</div>
|
|
201
201
|
</div>
|
|
@@ -30,12 +30,6 @@ const props = defineProps<{
|
|
|
30
30
|
/** Route to the campaign for a visitor who is already signed in. */
|
|
31
31
|
campaignPath: string;
|
|
32
32
|
signedIn?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Hide the built-in join/open button. A page that records the invitee's
|
|
35
|
-
* answer itself (accept / decline) passes this so there is one decision
|
|
36
|
-
* point instead of a button that never records anything next to the real ones.
|
|
37
|
-
*/
|
|
38
|
-
hideCta?: boolean;
|
|
39
33
|
}>();
|
|
40
34
|
|
|
41
35
|
const { t } = useI18n();
|
|
@@ -112,14 +106,12 @@ onMounted(async () => {
|
|
|
112
106
|
</div>
|
|
113
107
|
|
|
114
108
|
<!-- Someone already signed in has no reason to see a signup CTA. -->
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
</a>
|
|
122
|
-
</template>
|
|
109
|
+
<NuxtLink v-if="signedIn" :to="campaignPath" class="pil__cta">
|
|
110
|
+
{{ t('playtest_invite.cta_open') }}
|
|
111
|
+
</NuxtLink>
|
|
112
|
+
<a v-else :href="registerUrl" class="pil__cta">
|
|
113
|
+
{{ t('playtest_invite.cta_join') }}
|
|
114
|
+
</a>
|
|
123
115
|
|
|
124
116
|
<!-- Stated plainly rather than discovered at the end of a signup:
|
|
125
117
|
taking part needs an account because the reward is paid into a
|
|
@@ -141,9 +133,6 @@ onMounted(async () => {
|
|
|
141
133
|
|
|
142
134
|
<style scoped lang="scss">
|
|
143
135
|
.pil {
|
|
144
|
-
// Set explicitly: it used to inherit whatever the host page had, which in the dark
|
|
145
|
-
// theme left the body copy dark grey on near-black.
|
|
146
|
-
color: var(--text-primary, #fff);
|
|
147
136
|
margin: 0 auto;
|
|
148
137
|
max-width: 640px;
|
|
149
138
|
padding: 40px 20px 64px;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* The composable is a no-op when the user is not signed in or Echo is absent.
|
|
8
8
|
*/
|
|
9
9
|
import { clearClientSession } from "../utils/clearSession";
|
|
10
|
+
import { useAuthStore } from "../stores/auth";
|
|
10
11
|
|
|
11
12
|
export function useForceLogout(loginUrl: string) {
|
|
12
13
|
const authStore = useAuthStore();
|
package/composables/useLogout.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { ref, computed, watch, nextTick, provide, inject } from "vue";
|
|
|
2
2
|
import { storeToRefs } from "pinia";
|
|
3
3
|
import { usePaymentMethods } from "./usePaymentMethods";
|
|
4
4
|
import type { AxiosInstance } from "axios";
|
|
5
|
+
import { useAuthStore } from "../stores/auth";
|
|
5
6
|
|
|
6
7
|
// ─── Types ────────────────────────────────────────────────────────────────────
|
|
7
8
|
|
package/error.vue
CHANGED
|
@@ -12,7 +12,7 @@ interface CustomError {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
const error = useError();
|
|
15
|
-
const statusCodeError = Number((error.value as CustomError)?.statusCode) || 404;
|
|
15
|
+
const statusCodeError = Number((error.value as unknown as CustomError)?.statusCode) || 404;
|
|
16
16
|
|
|
17
17
|
// Do NOT call getUser() on error page — causes infinite loop when API is down or token expired
|
|
18
18
|
|
package/nuxt.config.ts
CHANGED
|
@@ -139,6 +139,8 @@ export default defineNuxtConfig({
|
|
|
139
139
|
agencyBaseUrl: "", // VITE_BASE_URL_AGENCY — used for "create your press kit" CTA link
|
|
140
140
|
accountsBaseUrl: "", // VITE_BASE_ACCOUNTS_URL
|
|
141
141
|
networkBaseUrl: "", // VITE_BASE_URL_NETWORK (institutional APIs)
|
|
142
|
+
communityApiUrl: "", // VITE_BASE_URL_COMMUNITY (community API)
|
|
143
|
+
communitySiteUrl: "", // VITE_BASE_URL_COMMUNITY_FRONT (community frontend)
|
|
142
144
|
// Per-platform pricing/plans page. Left empty, the account menu's
|
|
143
145
|
// "Plans & Pricing" link is hidden — set it per front (e.g.
|
|
144
146
|
// `${localePath}/pricing`) since each front's plans page lives at a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mundogamernetwork/shared-ui",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.18",
|
|
4
4
|
"description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
@@ -39,20 +39,27 @@
|
|
|
39
39
|
"vue": ">=3.5.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@mundogamernetwork/mgn-flipbook": "0.2.0",
|
|
42
43
|
"@vue-leaflet/vue-leaflet": "^0.10.1",
|
|
43
44
|
"leaflet": "^1.9.4"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
46
47
|
"@pinia-plugin-persistedstate/nuxt": "^1.2.1",
|
|
47
48
|
"@pinia/nuxt": "^0.5.5",
|
|
49
|
+
"@nuxtjs/i18n": "^8.3.0",
|
|
50
|
+
"@nuxtjs/color-mode": "^3.5.2",
|
|
51
|
+
"@vueuse/core": "^12.5.0",
|
|
52
|
+
"@types/node": "^22.10.0",
|
|
53
|
+
"sass-embedded": "^1.89.2",
|
|
48
54
|
"@types/leaflet": "^1.9.18",
|
|
49
55
|
"axios": "^1.18.1",
|
|
50
56
|
"hls.js": "^1.6.16",
|
|
51
57
|
"laravel-echo": "^2.3.7",
|
|
52
|
-
"nuxt": "
|
|
58
|
+
"nuxt": "3.15.4",
|
|
53
59
|
"pinia": "^2.3.1",
|
|
54
60
|
"pusher-js": "^8.5.0",
|
|
55
61
|
"typescript": "^5.0.0",
|
|
56
62
|
"vue-tsc": "^2.2.0"
|
|
57
|
-
}
|
|
63
|
+
},
|
|
64
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
58
65
|
}
|
package/pages/[slug]/index.vue
CHANGED
|
@@ -76,7 +76,7 @@ if (error.value || !getDocument.value?.data?.localized_content) {
|
|
|
76
76
|
content: " ";
|
|
77
77
|
display: block;
|
|
78
78
|
position: absolute;
|
|
79
|
-
background:
|
|
79
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
80
80
|
width: 100%;
|
|
81
81
|
height: 100%;
|
|
82
82
|
top: 50%;
|
package/pages/about.vue
CHANGED
|
@@ -71,7 +71,7 @@ definePageMeta({ layout: "default" });
|
|
|
71
71
|
content: " ";
|
|
72
72
|
display: block;
|
|
73
73
|
position: absolute;
|
|
74
|
-
background:
|
|
74
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
75
75
|
width: 100%;
|
|
76
76
|
height: 100%;
|
|
77
77
|
top: 50%;
|
package/pages/blog.vue
CHANGED
|
@@ -260,7 +260,7 @@ onMounted(() => {
|
|
|
260
260
|
content: " ";
|
|
261
261
|
display: block;
|
|
262
262
|
position: absolute;
|
|
263
|
-
background:
|
|
263
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
264
264
|
width: 100%;
|
|
265
265
|
height: 100%;
|
|
266
266
|
top: 50%;
|
package/pages/careers.vue
CHANGED
|
@@ -188,7 +188,7 @@ onMounted(async () => {
|
|
|
188
188
|
content: " ";
|
|
189
189
|
display: block;
|
|
190
190
|
position: absolute;
|
|
191
|
-
background:
|
|
191
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
192
192
|
width: 100%;
|
|
193
193
|
height: 100%;
|
|
194
194
|
top: 50%;
|
package/pages/contact.vue
CHANGED
|
@@ -64,7 +64,20 @@ watchEffect(() => { if (formData.value.message) inputErrors.value.message.status
|
|
|
64
64
|
watchEffect(() => { if (formData.value.subject_id) inputErrors.value.subject_id.status = false; });
|
|
65
65
|
watchEffect(() => { if (formData.value.country_id) inputErrors.value.country_id.status = false; });
|
|
66
66
|
|
|
67
|
+
// Guards against double click / double tap sending the same message twice.
|
|
68
|
+
const isSubmitting = ref(false);
|
|
69
|
+
|
|
67
70
|
const submitForm = async () => {
|
|
71
|
+
if (isSubmitting.value) return;
|
|
72
|
+
isSubmitting.value = true;
|
|
73
|
+
try {
|
|
74
|
+
await sendMessage();
|
|
75
|
+
} finally {
|
|
76
|
+
isSubmitting.value = false;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const sendMessage = async () => {
|
|
68
81
|
try {
|
|
69
82
|
const data = {
|
|
70
83
|
...formData.value,
|
|
@@ -170,7 +183,7 @@ const { $t } = useNuxtApp().$i18n;
|
|
|
170
183
|
<span v-if="inputErrors.message.status" class="error-msg">{{ inputErrors.message.error }}</span>
|
|
171
184
|
</div>
|
|
172
185
|
|
|
173
|
-
<button type="submit" class="btn-contact">
|
|
186
|
+
<button type="submit" class="btn-contact" :disabled="isSubmitting" :aria-busy="isSubmitting">
|
|
174
187
|
{{ $t("more.contact.btn_send_message") }}
|
|
175
188
|
</button>
|
|
176
189
|
</form>
|
|
@@ -212,7 +225,7 @@ const { $t } = useNuxtApp().$i18n;
|
|
|
212
225
|
content: " ";
|
|
213
226
|
display: block;
|
|
214
227
|
position: absolute;
|
|
215
|
-
background:
|
|
228
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
216
229
|
width: 100%;
|
|
217
230
|
height: 100%;
|
|
218
231
|
top: 50%;
|
package/pages/faq.vue
CHANGED
|
@@ -174,7 +174,7 @@ function toggleFaq(index: number) {
|
|
|
174
174
|
content: " ";
|
|
175
175
|
display: block;
|
|
176
176
|
position: absolute;
|
|
177
|
-
background:
|
|
177
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
178
178
|
width: 100%;
|
|
179
179
|
height: 100%;
|
|
180
180
|
top: 50%;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<FormAppSelect
|
|
70
70
|
id="keyCampaignsPlatformFilter"
|
|
71
71
|
:model="activePlatformFilter ?? ''"
|
|
72
|
-
@update:model="(val) => setPlatformFilter(val ? Number(val) : null)"
|
|
72
|
+
@update:model="(val: string | number) => setPlatformFilter(val ? Number(val) : null)"
|
|
73
73
|
:label="$t('keys.campaigns.all')"
|
|
74
74
|
:options="platformList.map((p) => [p.id, platformAbbr(p.name)])"
|
|
75
75
|
/>
|
|
@@ -87,7 +87,7 @@ onMounted(async () => {
|
|
|
87
87
|
fetchKeyRegions(keyId),
|
|
88
88
|
fetchAvailableOptions(keyId).catch(() => null),
|
|
89
89
|
])
|
|
90
|
-
|
|
90
|
+
campaign.value = (campaignRes as any)?.data?.data || (campaignRes as any)?.data || null
|
|
91
91
|
const allPlatforms = platformsRes?.data?.data || platformsRes?.data || []
|
|
92
92
|
const allRegions = regionsRes?.data?.data || regionsRes?.data || []
|
|
93
93
|
|
|
@@ -15,7 +15,7 @@ useSeoMeta({
|
|
|
15
15
|
ogDescription:
|
|
16
16
|
"Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
|
|
17
17
|
ogImage: "/imgs/seo-magazine-image.jpg",
|
|
18
|
-
|
|
18
|
+
ogUrl: "/magazine",
|
|
19
19
|
twitterTitle: "MGN Magazine",
|
|
20
20
|
twitterDescription:
|
|
21
21
|
"Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
|
|
@@ -18,7 +18,7 @@ useSeoMeta({
|
|
|
18
18
|
ogDescription:
|
|
19
19
|
"Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
|
|
20
20
|
ogImage: "/imgs/seo-magazine-image.jpg",
|
|
21
|
-
|
|
21
|
+
ogUrl: "/magazine",
|
|
22
22
|
twitterTitle: "MGN Magazine",
|
|
23
23
|
twitterDescription:
|
|
24
24
|
"Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
|
|
@@ -158,7 +158,7 @@ const flipbookPages = computed<PageData[]>(() => {
|
|
|
158
158
|
page,
|
|
159
159
|
flipbookCode: magazine.value.data?.flipbook_code,
|
|
160
160
|
}),
|
|
161
|
-
}));
|
|
161
|
+
})) as PageData[];
|
|
162
162
|
});
|
|
163
163
|
|
|
164
164
|
// Determine if lead capture modal should show
|
package/pages/magazine/index.vue
CHANGED
|
@@ -184,7 +184,7 @@ useSeoMeta({
|
|
|
184
184
|
ogDescription:
|
|
185
185
|
"Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
|
|
186
186
|
ogImage: "/imgs/seo-magazine-image.jpg",
|
|
187
|
-
|
|
187
|
+
ogUrl: "/magazine",
|
|
188
188
|
twitterTitle: "MGN Magazine",
|
|
189
189
|
twitterDescription:
|
|
190
190
|
"Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
|
|
@@ -764,8 +764,7 @@ const uniqueEditions = computed(() => {
|
|
|
764
764
|
content: " ";
|
|
765
765
|
display: block;
|
|
766
766
|
position: absolute;
|
|
767
|
-
background:
|
|
768
|
-
cover;
|
|
767
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
769
768
|
width: 100%;
|
|
770
769
|
height: 100%;
|
|
771
770
|
top: 50%;
|
package/pages/partners.vue
CHANGED
|
@@ -151,7 +151,7 @@ onMounted(() => {
|
|
|
151
151
|
content: " ";
|
|
152
152
|
display: block;
|
|
153
153
|
position: absolute;
|
|
154
|
-
background:
|
|
154
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
155
155
|
width: 100%;
|
|
156
156
|
height: 100%;
|
|
157
157
|
top: 50%;
|
package/pages/press.vue
CHANGED
|
@@ -130,7 +130,7 @@ onMounted(() => {
|
|
|
130
130
|
content: " ";
|
|
131
131
|
display: block;
|
|
132
132
|
position: absolute;
|
|
133
|
-
background:
|
|
133
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
134
134
|
width: 100%;
|
|
135
135
|
height: 100%;
|
|
136
136
|
top: 50%;
|
package/pages/roadmap.vue
CHANGED
|
@@ -217,7 +217,7 @@ onMounted(() => {
|
|
|
217
217
|
content: " ";
|
|
218
218
|
display: block;
|
|
219
219
|
position: absolute;
|
|
220
|
-
background:
|
|
220
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
221
221
|
width: 100%;
|
|
222
222
|
height: 100%;
|
|
223
223
|
top: 50%;
|
package/pages/status.vue
CHANGED
|
@@ -124,7 +124,7 @@ onMounted(() => {
|
|
|
124
124
|
content: " ";
|
|
125
125
|
display: block;
|
|
126
126
|
position: absolute;
|
|
127
|
-
background:
|
|
127
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
128
128
|
width: 100%;
|
|
129
129
|
height: 100%;
|
|
130
130
|
top: 50%;
|
package/pages/team.vue
CHANGED
|
@@ -150,7 +150,7 @@ onMounted(async () => {
|
|
|
150
150
|
content: " ";
|
|
151
151
|
display: block;
|
|
152
152
|
position: absolute;
|
|
153
|
-
background:
|
|
153
|
+
background: var(--kit-surface-2, #1b1f27);
|
|
154
154
|
width: 100%;
|
|
155
155
|
height: 100%;
|
|
156
156
|
top: 50%;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import axios, { type AxiosInstance } from "axios"
|
|
2
2
|
import { clearAuthCredentials } from "../utils/clearSession"
|
|
3
|
+
import { useAuthStore } from "../stores/auth"
|
|
3
4
|
|
|
4
5
|
// Campaign service wraps the key-campaigns API used by TV, community, and agency.
|
|
5
6
|
// Each frontend backend registers the shared key routes through its own provider.
|
package/services/httpService.ts
CHANGED
|
@@ -134,13 +134,13 @@ export function mgApiUrl(endpoint: string, usePrefix = true) {
|
|
|
134
134
|
case "login":
|
|
135
135
|
case "logout":
|
|
136
136
|
case "register":
|
|
137
|
-
return [apiBaseURL, usePrefix ? locale : "", endpoint]
|
|
137
|
+
return ([apiBaseURL, usePrefix ? locale : "", endpoint] as string[])
|
|
138
138
|
.filter((v) => v)
|
|
139
139
|
.map((part) => part.replace(/^\//, ""))
|
|
140
140
|
.map((part) => part.replace(/\/api\/v1$/, ""))
|
|
141
141
|
.join("/");
|
|
142
142
|
default:
|
|
143
|
-
return [apiBaseURL, usePrefix ? locale : "", endpoint]
|
|
143
|
+
return ([apiBaseURL, usePrefix ? locale : "", endpoint] as string[])
|
|
144
144
|
.filter((v) => v)
|
|
145
145
|
.map((part) => part.replace(/^\//, ""))
|
|
146
146
|
.join("/");
|
|
@@ -31,7 +31,7 @@ export const complexSerialize = function (obj: SerializeObject): string {
|
|
|
31
31
|
if (typeof value === "object" && value !== null) {
|
|
32
32
|
appendObject(`${baseKey}[${key}]`, value);
|
|
33
33
|
} else {
|
|
34
|
-
searchParams.append(`${baseKey}[${key}]`, value
|
|
34
|
+
searchParams.append(`${baseKey}[${key}]`, String(value));
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
};
|
package/types/echo.d.ts
ADDED
package/types/index.ts
CHANGED
|
@@ -114,6 +114,8 @@ export interface MgSharedUiConfig {
|
|
|
114
114
|
systemId: string;
|
|
115
115
|
apiBaseURL: string;
|
|
116
116
|
accountsBaseUrl: string;
|
|
117
|
+
communityApiUrl?: string;
|
|
118
|
+
communitySiteUrl?: string;
|
|
117
119
|
features: {
|
|
118
120
|
chat: boolean;
|
|
119
121
|
notifications: boolean;
|
|
@@ -121,6 +123,7 @@ export interface MgSharedUiConfig {
|
|
|
121
123
|
darkMode: boolean;
|
|
122
124
|
search: boolean;
|
|
123
125
|
statusOnline: boolean;
|
|
126
|
+
gamification?: boolean;
|
|
124
127
|
};
|
|
125
128
|
languages: string[];
|
|
126
129
|
protectedRoutes: string[];
|
package/utils/clearSession.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* The fix: clear the auth credentials CLIENT-SIDE so the next request is a clean
|
|
10
10
|
* guest request and the user can log in again.
|
|
11
11
|
*/
|
|
12
|
+
import { useAuthStore } from "../stores/auth";
|
|
12
13
|
|
|
13
14
|
// Auth-related cookies set across the MGN ecosystem.
|
|
14
15
|
const AUTH_COOKIES = [
|