@mundogamernetwork/shared-ui 1.17.13 → 1.17.15
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/ui/MgHeaderAvatarToggle.vue +12 -7
- package/components/ui/MgLoginModal.vue +11 -2
- package/components/ui/MgPlatformSwitcherSidebar.vue +6 -7
- package/package.json +1 -1
- package/pages/presskit/game/[slug].vue +10 -0
- package/public/imgs/dark/deals.svg +23 -0
- package/public/imgs/dark/shop.svg +8 -8
- package/public/imgs/light/deals.svg +23 -0
- package/public/imgs/light/shop.svg +8 -8
- package/utils/clearSession.ts +5 -1
|
@@ -102,13 +102,18 @@ const initialized = computed(() => {
|
|
|
102
102
|
// `:width`/`:height` above render as HTML attributes, sized against the
|
|
103
103
|
// intended box — but a host's wrapper can end up 1-2px smaller once its
|
|
104
104
|
// own border/padding is applied (border-box sizing shrinks the content
|
|
105
|
-
// box
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
width: 100%;
|
|
111
|
-
|
|
105
|
+
// box, while this image's pixel attributes don't know about that and
|
|
106
|
+
// keep its originally requested size), so the image quietly overflowed
|
|
107
|
+
// its own clickable wrapper on every side. Capping at the wrapper keeps
|
|
108
|
+
// the image inside whatever box the host actually gives it.
|
|
109
|
+
//
|
|
110
|
+
// Do NOT use `width: 100%; height: 100%` here: that was tried (b113dd3)
|
|
111
|
+
// and it overrides the size attributes, so any host whose wrapper has no
|
|
112
|
+
// fixed size (a bare <a> in a flex row, e.g. network-site's
|
|
113
|
+
// HeaderNewInternal) renders the avatar at its natural resolution — a
|
|
114
|
+
// full-size photo covering the header.
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
max-height: 100%;
|
|
112
117
|
object-fit: cover;
|
|
113
118
|
}
|
|
114
119
|
</style>
|
|
@@ -19,6 +19,15 @@ const props = defineProps({
|
|
|
19
19
|
type: Boolean,
|
|
20
20
|
default: false,
|
|
21
21
|
},
|
|
22
|
+
// Renders the inline "Register" link that opens the modal. Off by default: hosts that
|
|
23
|
+
// mount this at the top of their layout and open the modal through the login store
|
|
24
|
+
// have no use for it, and it showed up as a stray "Register" in the top-left corner
|
|
25
|
+
// (server-rendered, visible until hydration). Hosts that place the component inside a
|
|
26
|
+
// menu as a clickable entry (e.g. jobs-frontend) pass `inline-trigger`.
|
|
27
|
+
inlineTrigger: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: false,
|
|
30
|
+
},
|
|
22
31
|
loginUrl: {
|
|
23
32
|
type: String,
|
|
24
33
|
default: "",
|
|
@@ -36,7 +45,7 @@ function close() {
|
|
|
36
45
|
|
|
37
46
|
<template>
|
|
38
47
|
<div id="mgLoginModal">
|
|
39
|
-
<a v-if="!signedIn" class="menus__item__option" @click="close()">
|
|
48
|
+
<a v-if="inlineTrigger && !signedIn" class="menus__item__option" @click="close()">
|
|
40
49
|
{{ $t("header.login.btn_register") }}
|
|
41
50
|
</a>
|
|
42
51
|
<Teleport to="body">
|
|
@@ -67,7 +76,7 @@ function close() {
|
|
|
67
76
|
</template>
|
|
68
77
|
|
|
69
78
|
<style lang="scss">
|
|
70
|
-
// #mgLoginModal only wraps the inline "Register" link below — the modal
|
|
79
|
+
// #mgLoginModal only wraps the optional inline "Register" link below — the modal
|
|
71
80
|
// itself is <Teleport to="body">'d out of this element entirely, so it can
|
|
72
81
|
// never be reached by a `#mgLoginModal .foo` selector. It previously used
|
|
73
82
|
// bare, unscoped names (.modal, .pop-up, .title, .buttons, .btn1/2) that
|
|
@@ -69,11 +69,10 @@ interface NetworkSystem {
|
|
|
69
69
|
comingSoon?: boolean;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
// mundogamer.shop was lost/hijacked (now parked/serving unrelated content)
|
|
73
|
-
//
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
const HIJACKED_SLUGS = new Set(['shop']);
|
|
72
|
+
// mundogamer.shop was lost/hijacked (now parked/serving unrelated content);
|
|
73
|
+
// the platform moved to mundogamer.deals. Any entry still pointing at the old
|
|
74
|
+
// domain is forced non-clickable instead of linking out to it.
|
|
75
|
+
const HIJACKED_DOMAIN = /(^|\/\/|\.)mundogamer\.shop(\/|$)/i;
|
|
77
76
|
|
|
78
77
|
// Fallback data - previous static logos
|
|
79
78
|
const fallbackSystems: NetworkSystem[] = [
|
|
@@ -84,7 +83,7 @@ const fallbackSystems: NetworkSystem[] = [
|
|
|
84
83
|
{ id: 5, name: 'Mundo Gamer Community', domain: 'https://mundogamer.community', logo_dark: '/imgs/dark/community.svg', logo_light: '/imgs/light/community.svg', status: 1, slug: 'community' },
|
|
85
84
|
{ id: 6, name: 'Mundo Gamer Jobs', domain: 'https://mundogamerjobs.com', logo_dark: '/imgs/dark/jobs.svg', logo_light: '/imgs/light/jobs.svg', status: 1, slug: 'jobs' },
|
|
86
85
|
{ id: 7, name: 'Mundo Gamer Network', domain: 'https://mundogamer.network', logo_dark: '/imgs/dark/network.svg', logo_light: '/imgs/light/network.svg', status: 1, slug: 'network' },
|
|
87
|
-
{ id: 8, name: 'Mundo Gamer
|
|
86
|
+
{ id: 8, name: 'Mundo Gamer Deals', domain: 'https://mundogamer.deals', logo_dark: '/imgs/dark/shop.svg', logo_light: '/imgs/light/shop.svg', status: 1, slug: 'shop' },
|
|
88
87
|
{ id: 9, name: 'Mundo Gamer Token', domain: 'https://mundogamer.token', logo_dark: '/imgs/dark/token.svg', logo_light: '/imgs/light/token.svg', status: 1, slug: 'token' },
|
|
89
88
|
{ id: 10, name: 'Mundo Gamer TV', domain: 'https://mundogamer.tv', logo_dark: '/imgs/dark/tv.svg', logo_light: '/imgs/light/tv.svg', status: 1, slug: 'tv' },
|
|
90
89
|
];
|
|
@@ -122,7 +121,7 @@ async function fetchNetworkSystems() {
|
|
|
122
121
|
logo_light: slug ? `/imgs/light/${slug}.svg` : (system.url_reduced_image_src || ''),
|
|
123
122
|
status: system.status ? 1 : 0,
|
|
124
123
|
slug,
|
|
125
|
-
comingSoon:
|
|
124
|
+
comingSoon: HIJACKED_DOMAIN.test(system.prod_url || '')
|
|
126
125
|
};
|
|
127
126
|
});
|
|
128
127
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -407,6 +407,12 @@ const requestUrl = useRequestURL();
|
|
|
407
407
|
const seoTitle = computed(() => kit.value ? `${kit.value.name} — Mundo Gamer Press Kit` : 'Mundo Gamer Press Kit');
|
|
408
408
|
const seoDescription = computed(() => kit.value?.tagline || kit.value?.description?.replace(/<[^>]*>/g, '').slice(0, 160) || '');
|
|
409
409
|
const seoImage = computed(() => kit.value?.hero_image_url || kit.value?.cover_image_url || kit.value?.logo_url || '');
|
|
410
|
+
const seoImageType = computed(() => {
|
|
411
|
+
const image = seoImage.value.toLowerCase();
|
|
412
|
+
if (image.includes('.png')) return 'image/png';
|
|
413
|
+
if (image.includes('.webp')) return 'image/webp';
|
|
414
|
+
return 'image/jpeg';
|
|
415
|
+
});
|
|
410
416
|
|
|
411
417
|
// Raw useHead meta-array form, not useSeoMeta — see the matching comment in
|
|
412
418
|
// shared-ui/pages/mural/[slug]/index.vue for why (useSeoMeta's og:*/twitter:*/
|
|
@@ -426,6 +432,10 @@ useHead(() => ({
|
|
|
426
432
|
// Only override the image when the kit actually has one — an empty
|
|
427
433
|
// string would replace (not fall back to) the site default image.
|
|
428
434
|
...(seoImage.value ? [{ property: 'og:image', content: seoImage.value }] : []),
|
|
435
|
+
...(seoImage.value ? [
|
|
436
|
+
{ property: 'og:image:secure_url', content: seoImage.value },
|
|
437
|
+
{ property: 'og:image:type', content: seoImageType.value },
|
|
438
|
+
] : []),
|
|
429
439
|
{ property: 'og:type', content: 'article' },
|
|
430
440
|
{ property: 'og:url', content: requestUrl.href },
|
|
431
441
|
{ property: 'og:site_name', content: 'Mundo Gamer Press Kit' },
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Logo_MG_DEALS_Abreviado_S fundo">
|
|
3
|
+
<g id="Group">
|
|
4
|
+
<path id="Vector" d="M35.8499 24.375L8.3999 24.375L6.1499 33.525L33.5999 33.525Z" fill="#2563EB"/><path d="M10.2874 26.1L8.9249 31.725L12.6509 31.725L14.0876 28.6506L13.1514 26.1ZM12.0114 30.1539L10.6489 30.1539L11.3162 27.2929L12.1968 27.2929L12.7344 28.6506ZM14.0876 31.725L17.9156 31.725L18.2956 30.1345L16.1082 30.1345L16.3028 29.3004L18.4995 29.3004L18.861 27.7778L15.033 27.7778ZM15.1442 27.2929L18.9722 27.2929L19.2595 26.1L15.4316 26.1ZM22.8836 26.1L21.5489 26.1L20.9186 27.2929L23.1061 27.2929ZM23.1988 27.7778L20.7518 27.7778L18.6571 31.725L20.3625 31.725L21.4655 29.4362L21.9567 29.4362L22.346 31.725L23.9495 31.725ZM27.3419 26.1L25.7569 26.1L24.413 31.725L28.3151 31.725L28.6951 30.1248L26.3872 30.1248ZM30.3913 26.1L30.1132 27.2929L33.9968 27.2929L34.2749 26.1ZM29.9742 27.836L29.6313 29.281L32.0133 29.281L31.8187 30.1248L29.4273 30.1248L29.279 30.7455L29.0473 31.725L32.9309 31.725L33.8856 27.7778L29.9927 27.7778Z" fill="white"/>
|
|
5
|
+
<g id="Group_2">
|
|
6
|
+
<g id="Group_3">
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Group_4">
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
</g>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
</g>
|
|
17
|
+
<g id="Group_5">
|
|
18
|
+
<path id="Vector_8" d="M17.5498 8.4751L12.9748 16.5751V8.4751H8.9248L5.9248 20.6251L5.5498 21.9751H8.9248L9.8248 18.4501L10.2748 16.5751V21.9751H13.4248L17.1748 15.3001L15.4498 21.9751H19.1248L22.4248 8.4751H17.5498Z" fill="white"/>
|
|
19
|
+
<path id="Vector_9" d="M35.6246 11.6251L36.4496 8.4751H26.9996L21.5996 14.7751L23.3996 21.9751H33.0746L34.1996 17.4751L35.3246 12.9751H29.4746L28.6496 16.1251H31.1246L30.5996 18.3751H26.0246L25.4246 15.7501L28.9496 11.6251H35.6246Z" fill="white"/>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</svg>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="
|
|
2
|
+
<g id="Logo_MG_DEALS_Abreviado_S fundo">
|
|
3
3
|
<g id="Group">
|
|
4
|
-
<path id="Vector" d="M35.8499 24.
|
|
4
|
+
<path id="Vector" d="M35.8499 24.375L8.3999 24.375L6.1499 33.525L33.5999 33.525Z" fill="#2563EB"/><path d="M10.2874 26.1L8.9249 31.725L12.6509 31.725L14.0876 28.6506L13.1514 26.1ZM12.0114 30.1539L10.6489 30.1539L11.3162 27.2929L12.1968 27.2929L12.7344 28.6506ZM14.0876 31.725L17.9156 31.725L18.2956 30.1345L16.1082 30.1345L16.3028 29.3004L18.4995 29.3004L18.861 27.7778L15.033 27.7778ZM15.1442 27.2929L18.9722 27.2929L19.2595 26.1L15.4316 26.1ZM22.8836 26.1L21.5489 26.1L20.9186 27.2929L23.1061 27.2929ZM23.1988 27.7778L20.7518 27.7778L18.6571 31.725L20.3625 31.725L21.4655 29.4362L21.9567 29.4362L22.346 31.725L23.9495 31.725ZM27.3419 26.1L25.7569 26.1L24.413 31.725L28.3151 31.725L28.6951 30.1248L26.3872 30.1248ZM30.3913 26.1L30.1132 27.2929L33.9968 27.2929L34.2749 26.1ZM29.9742 27.836L29.6313 29.281L32.0133 29.281L31.8187 30.1248L29.4273 30.1248L29.279 30.7455L29.0473 31.725L32.9309 31.725L33.8856 27.7778L29.9927 27.7778Z" fill="white"/>
|
|
5
5
|
<g id="Group_2">
|
|
6
6
|
<g id="Group_3">
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
|
|
9
9
|
</g>
|
|
10
10
|
<g id="Group_4">
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
|
|
12
|
+
|
|
13
13
|
</g>
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
|
|
16
16
|
</g>
|
|
17
17
|
<g id="Group_5">
|
|
18
18
|
<path id="Vector_8" d="M17.5498 8.4751L12.9748 16.5751V8.4751H8.9248L5.9248 20.6251L5.5498 21.9751H8.9248L9.8248 18.4501L10.2748 16.5751V21.9751H13.4248L17.1748 15.3001L15.4498 21.9751H19.1248L22.4248 8.4751H17.5498Z" fill="white"/>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Logo_MG_DEALS_Abreviado_S fundo">
|
|
3
|
+
<g id="Group">
|
|
4
|
+
<path id="Vector" d="M35.8499 24.375L8.3999 24.375L6.1499 33.525L33.5999 33.525Z" fill="#3B82F6"/><path d="M10.2874 26.1L8.9249 31.725L12.6509 31.725L14.0876 28.6506L13.1514 26.1ZM12.0114 30.1539L10.6489 30.1539L11.3162 27.2929L12.1968 27.2929L12.7344 28.6506ZM14.0876 31.725L17.9156 31.725L18.2956 30.1345L16.1082 30.1345L16.3028 29.3004L18.4995 29.3004L18.861 27.7778L15.033 27.7778ZM15.1442 27.2929L18.9722 27.2929L19.2595 26.1L15.4316 26.1ZM22.8836 26.1L21.5489 26.1L20.9186 27.2929L23.1061 27.2929ZM23.1988 27.7778L20.7518 27.7778L18.6571 31.725L20.3625 31.725L21.4655 29.4362L21.9567 29.4362L22.346 31.725L23.9495 31.725ZM27.3419 26.1L25.7569 26.1L24.413 31.725L28.3151 31.725L28.6951 30.1248L26.3872 30.1248ZM30.3913 26.1L30.1132 27.2929L33.9968 27.2929L34.2749 26.1ZM29.9742 27.836L29.6313 29.281L32.0133 29.281L31.8187 30.1248L29.4273 30.1248L29.279 30.7455L29.0473 31.725L32.9309 31.725L33.8856 27.7778L29.9927 27.7778Z" fill="white"/>
|
|
5
|
+
<g id="Group_2">
|
|
6
|
+
<g id="Group_3">
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
</g>
|
|
10
|
+
<g id="Group_4">
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
</g>
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
</g>
|
|
17
|
+
<g id="Group_5">
|
|
18
|
+
<path id="Vector_8" d="M17.5498 8.47461L12.9748 16.5746V8.47461H8.9248L5.9248 20.6246L5.5498 21.9746H8.9248L9.8248 18.4496L10.2748 16.5746V21.9746H13.4248L17.1748 15.2996L15.4498 21.9746H19.1248L22.4248 8.47461H17.5498Z" fill="#0D0D0D"/>
|
|
19
|
+
<path id="Vector_9" d="M35.6246 11.6246L36.4496 8.47461H26.9996L21.5996 14.7746L23.3996 21.9746H33.0746L34.1996 17.4746L35.3246 12.9746H29.4746L28.6496 16.1246H31.1246L30.5996 18.3746H26.0246L25.4246 15.7496L28.9496 11.6246H35.6246Z" fill="#0D0D0D"/>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</svg>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<svg width="42" height="42" viewBox="0 0 42 42" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="
|
|
2
|
+
<g id="Logo_MG_DEALS_Abreviado_S fundo">
|
|
3
3
|
<g id="Group">
|
|
4
|
-
<path id="Vector" d="M35.8499 24.
|
|
4
|
+
<path id="Vector" d="M35.8499 24.375L8.3999 24.375L6.1499 33.525L33.5999 33.525Z" fill="#3B82F6"/><path d="M10.2874 26.1L8.9249 31.725L12.6509 31.725L14.0876 28.6506L13.1514 26.1ZM12.0114 30.1539L10.6489 30.1539L11.3162 27.2929L12.1968 27.2929L12.7344 28.6506ZM14.0876 31.725L17.9156 31.725L18.2956 30.1345L16.1082 30.1345L16.3028 29.3004L18.4995 29.3004L18.861 27.7778L15.033 27.7778ZM15.1442 27.2929L18.9722 27.2929L19.2595 26.1L15.4316 26.1ZM22.8836 26.1L21.5489 26.1L20.9186 27.2929L23.1061 27.2929ZM23.1988 27.7778L20.7518 27.7778L18.6571 31.725L20.3625 31.725L21.4655 29.4362L21.9567 29.4362L22.346 31.725L23.9495 31.725ZM27.3419 26.1L25.7569 26.1L24.413 31.725L28.3151 31.725L28.6951 30.1248L26.3872 30.1248ZM30.3913 26.1L30.1132 27.2929L33.9968 27.2929L34.2749 26.1ZM29.9742 27.836L29.6313 29.281L32.0133 29.281L31.8187 30.1248L29.4273 30.1248L29.279 30.7455L29.0473 31.725L32.9309 31.725L33.8856 27.7778L29.9927 27.7778Z" fill="white"/>
|
|
5
5
|
<g id="Group_2">
|
|
6
6
|
<g id="Group_3">
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
|
|
8
|
+
|
|
9
9
|
</g>
|
|
10
10
|
<g id="Group_4">
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
|
|
12
|
+
|
|
13
13
|
</g>
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
|
|
16
16
|
</g>
|
|
17
17
|
<g id="Group_5">
|
|
18
18
|
<path id="Vector_8" d="M17.5498 8.47461L12.9748 16.5746V8.47461H8.9248L5.9248 20.6246L5.5498 21.9746H8.9248L9.8248 18.4496L10.2748 16.5746V21.9746H13.4248L17.1748 15.2996L15.4498 21.9746H19.1248L22.4248 8.47461H17.5498Z" fill="#0D0D0D"/>
|
package/utils/clearSession.ts
CHANGED
|
@@ -88,7 +88,11 @@ export function clearAuthCredentials() {
|
|
|
88
88
|
const runtimeConfig = useRuntimeConfig();
|
|
89
89
|
const apiBaseURL = runtimeConfig.public.mgSharedUi?.apiBaseURL || runtimeConfig.public.apiBaseURL;
|
|
90
90
|
if (apiBaseURL) {
|
|
91
|
-
|
|
91
|
+
// /logout lives at the API host root, not under /api/v1: useLogout and mgApiUrl strip the suffix the same way.
|
|
92
|
+
// A front whose apiBaseURL carries it (ventures, shop) posted to /api/v1/logout: a 404 on every page view of an
|
|
93
|
+
// anonymous visitor, and the httpOnly cookie this call exists to clear was never cleared.
|
|
94
|
+
const apiRoot = String(apiBaseURL).replace(/\/api\/v1\/?$/, "").replace(/\/$/, "");
|
|
95
|
+
fetch(`${apiRoot}/logout`, {
|
|
92
96
|
method: "POST",
|
|
93
97
|
credentials: "include",
|
|
94
98
|
}).catch(() => {});
|