@mundogamernetwork/shared-ui 1.16.15 → 1.16.17
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.
|
@@ -5,13 +5,23 @@
|
|
|
5
5
|
<p class="sidebar-menu__intro">{{ $t('sidebar.platform_switcher_intro') }}</p>
|
|
6
6
|
<ul class="menus">
|
|
7
7
|
<li v-for="system in networkSystems" :key="system.id">
|
|
8
|
-
<
|
|
8
|
+
<component
|
|
9
|
+
:is="system.comingSoon ? 'span' : 'a'"
|
|
10
|
+
class="sidebar__logo"
|
|
11
|
+
:class="{ 'sidebar__logo--disabled': system.comingSoon }"
|
|
12
|
+
:href="system.comingSoon ? undefined : system.domain"
|
|
13
|
+
:target="system.comingSoon ? undefined : '_blank'"
|
|
14
|
+
:rel="system.comingSoon ? undefined : 'noopener noreferrer'"
|
|
15
|
+
:aria-disabled="system.comingSoon || undefined"
|
|
16
|
+
:aria-label="ariaLabelFor(system)"
|
|
17
|
+
>
|
|
9
18
|
<img :src="colorMode.value === 'light' ? system.logo_light : system.logo_dark" :alt="system.name" />
|
|
10
19
|
<span class="sidebar__tooltip" role="tooltip">
|
|
11
20
|
<strong>{{ system.name }}</strong>
|
|
12
|
-
<span v-if="
|
|
21
|
+
<span v-if="system.comingSoon">{{ $t('sidebar.coming_soon') }}</span>
|
|
22
|
+
<span v-else-if="descriptionFor(system.slug)">{{ descriptionFor(system.slug) }}</span>
|
|
13
23
|
</span>
|
|
14
|
-
</
|
|
24
|
+
</component>
|
|
15
25
|
</li>
|
|
16
26
|
</ul>
|
|
17
27
|
</div>
|
|
@@ -56,8 +66,15 @@ interface NetworkSystem {
|
|
|
56
66
|
logo_light: string;
|
|
57
67
|
status: number;
|
|
58
68
|
slug: string;
|
|
69
|
+
comingSoon?: boolean;
|
|
59
70
|
}
|
|
60
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']);
|
|
77
|
+
|
|
61
78
|
// Fallback data - previous static logos
|
|
62
79
|
const fallbackSystems: NetworkSystem[] = [
|
|
63
80
|
{ id: 1, name: 'Mundo Gamer Academy', domain: 'https://mundogamer.academy', logo_dark: '/imgs/dark/academy.svg', logo_light: '/imgs/light/academy.svg', status: 1, slug: 'academy' },
|
|
@@ -67,7 +84,7 @@ const fallbackSystems: NetworkSystem[] = [
|
|
|
67
84
|
{ 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' },
|
|
68
85
|
{ 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' },
|
|
69
86
|
{ 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' },
|
|
70
|
-
{ 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' },
|
|
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 },
|
|
71
88
|
{ 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' },
|
|
72
89
|
{ 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' },
|
|
73
90
|
];
|
|
@@ -104,7 +121,8 @@ async function fetchNetworkSystems() {
|
|
|
104
121
|
logo_dark: slug ? `/imgs/dark/${slug}.svg` : (system.url_reduced_image_src || ''),
|
|
105
122
|
logo_light: slug ? `/imgs/light/${slug}.svg` : (system.url_reduced_image_src || ''),
|
|
106
123
|
status: system.status ? 1 : 0,
|
|
107
|
-
slug
|
|
124
|
+
slug,
|
|
125
|
+
comingSoon: HIJACKED_SLUGS.has(slug)
|
|
108
126
|
};
|
|
109
127
|
});
|
|
110
128
|
} catch (error) {
|
|
@@ -124,6 +142,7 @@ function descriptionFor(slug: string): string {
|
|
|
124
142
|
}
|
|
125
143
|
|
|
126
144
|
function ariaLabelFor(system: NetworkSystem): string {
|
|
145
|
+
if (system.comingSoon) return `${system.name} — ${t('sidebar.coming_soon')}`;
|
|
127
146
|
const description = descriptionFor(system.slug);
|
|
128
147
|
return description ? `${system.name} — ${description}` : system.name;
|
|
129
148
|
}
|
|
@@ -136,8 +155,16 @@ onMounted(() => {
|
|
|
136
155
|
<style scoped lang="scss">
|
|
137
156
|
#sidebar-logo {
|
|
138
157
|
z-index: 36;
|
|
139
|
-
|
|
158
|
+
// fixed (not absolute) + all four insets pinned: absolute with no `top`
|
|
159
|
+
// falls back to its "static position" — roughly where it would sit in
|
|
160
|
+
// normal flow — so on a real page with content above it in the DOM, the
|
|
161
|
+
// whole panel renders far down the page instead of pinned to the
|
|
162
|
+
// viewport's right edge, and its `height: 100%` then has no definite
|
|
163
|
+
// containing-block height to resolve against, stretching the page.
|
|
164
|
+
position: fixed;
|
|
165
|
+
top: 0;
|
|
140
166
|
right: 0;
|
|
167
|
+
bottom: 0;
|
|
141
168
|
|
|
142
169
|
.sidebar {
|
|
143
170
|
display: inline-flex;
|
|
@@ -210,6 +237,11 @@ onMounted(() => {
|
|
|
210
237
|
&__logo {
|
|
211
238
|
position: relative;
|
|
212
239
|
display: inline-flex;
|
|
240
|
+
|
|
241
|
+
&--disabled {
|
|
242
|
+
cursor: default;
|
|
243
|
+
opacity: 0.4;
|
|
244
|
+
}
|
|
213
245
|
}
|
|
214
246
|
|
|
215
247
|
&__tooltip {
|