@mundogamernetwork/shared-ui 1.17.14 → 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.
@@ -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 the wrapper's `width: 100%` resolves against, while this image's
106
- // pixel attributes don't know about that and keep its originally
107
- // requested size), so the image quietly overflowed its own clickable
108
- // wrapper on every side. Filling the wrapper via CSS instead keeps the
109
- // image exactly inside whatever box the host actually gives it.
110
- width: 100%;
111
- height: 100%;
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
- // but mg_network_systems still carries it as an active prod_url — the API
74
- // can't be trusted for this one entry until that's fixed at the source, so
75
- // force it non-clickable here instead of linking out to it.
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 Shop', domain: 'https://mundogamer.shop', logo_dark: '/imgs/dark/shop.svg', logo_light: '/imgs/light/shop.svg', status: 1, slug: 'shop', comingSoon: true },
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: HIJACKED_SLUGS.has(slug)
124
+ comingSoon: HIJACKED_DOMAIN.test(system.prod_url || '')
126
125
  };
127
126
  });
128
127
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.17.14",
3
+ "version": "1.17.15",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -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="Logo_MG_SHOP_Abreviado_S fundo">
2
+ <g id="Logo_MG_DEALS_Abreviado_S fundo">
3
3
  <g id="Group">
4
- <path id="Vector" d="M35.8499 24.375H8.3999L6.1499 33.525H33.5999L35.8499 24.375Z" fill="#42BA8A"/>
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
- <path id="Vector_2" d="M26.2495 26.1001H22.4245L22.1245 27.3001H25.9495L26.2495 26.1001Z" fill="white"/>
8
- <path id="Vector_3" d="M24.5997 27.75L23.9997 30.15H22.7247L23.3247 27.75H22.0497L21.0747 31.725H24.8247L25.7997 27.75H24.5997Z" fill="white"/>
7
+
8
+
9
9
  </g>
10
10
  <g id="Group_4">
11
- <path id="Vector_4" d="M11.9999 26.1001L11.7749 27.3001H15.8249L16.1249 26.1001H11.9999Z" fill="white"/>
12
- <path id="Vector_5" d="M11.6249 27.825L11.2499 29.325H13.7249L13.4999 30.15H11.0249L10.8749 30.75L10.6499 31.725H14.6999L15.6749 27.75H11.6249V27.825Z" fill="white"/>
11
+
12
+
13
13
  </g>
14
- <path id="Vector_6" d="M21.375 26.1001H19.8L19.35 27.7501H18.45L18.825 26.1001H17.175L15.75 31.7251H17.475L18 29.5501H18.9L18.375 31.7251H20.025L21.375 26.1001Z" fill="white"/>
15
- <path id="Vector_7" d="M30.6748 26.1751C30.5248 26.1001 30.2998 26.1001 29.9998 26.1001H27.2998L26.9998 27.3001H29.6998C29.8498 27.3001 29.9998 27.3751 29.9998 27.5251C29.9998 27.6751 29.8498 27.7501 29.6998 27.7501H26.8498L25.7998 31.7251H27.5248L28.1248 29.3251H29.8498C30.0748 29.2501 30.2998 29.1751 30.4498 29.1001C30.9748 28.7251 31.2748 28.2001 31.2748 27.5251C31.3498 27.3751 31.4248 26.4751 30.6748 26.1751Z" fill="white"/>
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="Logo_MG_SHOP_Abreviado_S fundo">
2
+ <g id="Logo_MG_DEALS_Abreviado_S fundo">
3
3
  <g id="Group">
4
- <path id="Vector" d="M35.8499 24.375H8.3999L6.1499 33.525H33.5999L35.8499 24.375Z" fill="#53C296"/>
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
- <path id="Vector_2" d="M26.2495 26.0996H22.4245L22.1245 27.2996H25.9495L26.2495 26.0996Z" fill="white"/>
8
- <path id="Vector_3" d="M24.5997 27.75L23.9997 30.15H22.7247L23.3247 27.75H22.0497L21.0747 31.725H24.8247L25.7997 27.75H24.5997Z" fill="white"/>
7
+
8
+
9
9
  </g>
10
10
  <g id="Group_4">
11
- <path id="Vector_4" d="M11.9999 26.0996L11.7749 27.2996H15.8249L16.1249 26.0996H11.9999Z" fill="white"/>
12
- <path id="Vector_5" d="M11.6249 27.825L11.2499 29.325H13.7249L13.4999 30.15H11.0249L10.8749 30.75L10.6499 31.725H14.6999L15.6749 27.75H11.6249V27.825Z" fill="white"/>
11
+
12
+
13
13
  </g>
14
- <path id="Vector_6" d="M21.375 26.0996H19.8L19.35 27.7496H18.45L18.825 26.0996H17.175L15.75 31.7246H17.475L18 29.5496H18.9L18.375 31.7246H20.025L21.375 26.0996Z" fill="white"/>
15
- <path id="Vector_7" d="M30.6748 26.1746C30.5248 26.0996 30.2998 26.0996 29.9998 26.0996H27.2998L26.9998 27.2996H29.6998C29.8498 27.2996 29.9998 27.3746 29.9998 27.5246C29.9998 27.6746 29.8498 27.7496 29.6998 27.7496H26.8498L25.7998 31.7246H27.5248L28.1248 29.3246H29.8498C30.0748 29.2496 30.2998 29.1746 30.4498 29.0996C30.9748 28.7246 31.2748 28.1996 31.2748 27.5246C31.3498 27.3746 31.4248 26.4746 30.6748 26.1746Z" fill="white"/>
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"/>
@@ -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
- fetch(`${String(apiBaseURL).replace(/\/$/, "")}/logout`, {
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(() => {});