@mundogamernetwork/shared-ui 1.17.5 → 1.17.6
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.
|
@@ -25,6 +25,7 @@ const props = defineProps<{
|
|
|
25
25
|
streamer_type?: number | null;
|
|
26
26
|
type?: string | null;
|
|
27
27
|
platforms?: Array<{ id: number; name: string; slug?: string | null; alternative_name?: string | null } | string>;
|
|
28
|
+
networkSystems?: string[];
|
|
28
29
|
};
|
|
29
30
|
publicMode?: boolean;
|
|
30
31
|
baseRoute?: string;
|
|
@@ -46,7 +47,7 @@ const locale = $i18n.locale;
|
|
|
46
47
|
|
|
47
48
|
const cardCover = computed(() => {
|
|
48
49
|
const c = props.card as any;
|
|
49
|
-
return c.cover || c.cover_src || c.game?.url_cover_src || c.game_cover || "/imgs/no-cover-img.jpg";
|
|
50
|
+
return c.cover || c.cover_src || c.game?.url_cover_src || c.game?.cover_url || c.game?.url_cover || c.game_cover || "/imgs/no-cover-img.jpg";
|
|
50
51
|
});
|
|
51
52
|
|
|
52
53
|
// Only apply the campaign's own focal point to its own cover — a game-cover/no-cover
|
|
@@ -202,6 +203,9 @@ const detailRoute = computed(() =>
|
|
|
202
203
|
</div>
|
|
203
204
|
|
|
204
205
|
<div class="kc-card__body">
|
|
206
|
+
<div v-if="card.networkSystems?.length" class="kc-card__networks">
|
|
207
|
+
<span v-for="network in card.networkSystems" :key="network" class="kc-card__network-tag">{{ network }}</span>
|
|
208
|
+
</div>
|
|
205
209
|
<div v-if="card.platforms?.length" class="kc-card__platforms">
|
|
206
210
|
<span v-for="p in card.platforms" :key="typeof p === 'string' ? p : p.id" class="kc-card__platform-tag">
|
|
207
211
|
{{ platformAbbr(p) }}
|
|
@@ -295,6 +299,23 @@ const detailRoute = computed(() =>
|
|
|
295
299
|
text-align: center;
|
|
296
300
|
}
|
|
297
301
|
|
|
302
|
+
&__networks {
|
|
303
|
+
display: flex;
|
|
304
|
+
flex-wrap: wrap;
|
|
305
|
+
gap: 4px;
|
|
306
|
+
margin-bottom: 6px;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
&__network-tag {
|
|
310
|
+
border: 1px solid color-mix(in srgb, var(--primary, #D297FF) 55%, transparent);
|
|
311
|
+
border-radius: 999px;
|
|
312
|
+
padding: 2px 7px;
|
|
313
|
+
color: var(--primary, #D297FF);
|
|
314
|
+
font-size: 0.68rem;
|
|
315
|
+
line-height: 1.2;
|
|
316
|
+
white-space: nowrap;
|
|
317
|
+
}
|
|
318
|
+
|
|
298
319
|
&__exclusive-badge {
|
|
299
320
|
position: absolute;
|
|
300
321
|
bottom: 6px;
|
package/package.json
CHANGED
|
@@ -622,7 +622,7 @@ async function loadFeaturedCampaigns() {
|
|
|
622
622
|
.filter((item: any) => (truthyFlag(item.featured) || truthyFlag(item.highlight)) && truthyFlag(item.is_open))
|
|
623
623
|
.map((item: any) => ({
|
|
624
624
|
id: item.id,
|
|
625
|
-
cover: item.cover_src || item.game?.url_banner_src || item.game?.url_cover_src || "/imgs/no-cover-img.jpg",
|
|
625
|
+
cover: item.cover_src || item.game?.url_banner_src || item.game?.url_cover_src || item.game?.cover_url || item.game?.url_cover || "/imgs/no-cover-img.jpg",
|
|
626
626
|
coverFocalX: item.cover_src ? (item.cover_focal_x ?? 0.5) : 0.5,
|
|
627
627
|
coverFocalY: item.cover_src ? (item.cover_focal_y ?? 0.5) : 0.5,
|
|
628
628
|
name: item.name,
|
|
@@ -682,7 +682,7 @@ async function loadCampaigns(page = 1) {
|
|
|
682
682
|
id: item.id,
|
|
683
683
|
type: item.type?.name,
|
|
684
684
|
typeId: item.type?.id,
|
|
685
|
-
cover: item.cover_src || item.game?.url_cover_src || item.game?.url_banner_src || "/imgs/no-cover-img.jpg",
|
|
685
|
+
cover: item.cover_src || item.game?.url_cover_src || item.game?.cover_url || item.game?.url_cover || item.game?.url_banner_src || "/imgs/no-cover-img.jpg",
|
|
686
686
|
coverFocalX: item.cover_src ? (item.cover_focal_x ?? 0.5) : 0.5,
|
|
687
687
|
coverFocalY: item.cover_src ? (item.cover_focal_y ?? 0.5) : 0.5,
|
|
688
688
|
text: item.name,
|
|
@@ -700,6 +700,7 @@ async function loadCampaigns(page = 1) {
|
|
|
700
700
|
available_at_for_user: item.available_at_for_user || null,
|
|
701
701
|
max_keys_for_user: item.max_keys_for_user || 1,
|
|
702
702
|
platforms: (item.platforms || []).map((p: any) => p.name),
|
|
703
|
+
networkSystems: (item.mg_network_systems || []).map((s: any) => s.name).filter(Boolean),
|
|
703
704
|
gameName: item.game?.name || null,
|
|
704
705
|
genres: (item.game?.genres || []).map((g: any) => g.name).filter(Boolean).slice(0, 2),
|
|
705
706
|
studioName: item.company?.name || null,
|
|
@@ -374,7 +374,7 @@ export const fetchCampaignBySlug = async (slug: string) => {
|
|
|
374
374
|
cover: k.cover_src,
|
|
375
375
|
cover_focal_x: k.cover_focal_x ?? 0.5,
|
|
376
376
|
cover_focal_y: k.cover_focal_y ?? 0.5,
|
|
377
|
-
game_cover: k.game?.url_cover_src,
|
|
377
|
+
game_cover: k.game?.url_cover_src || k.game?.cover_url || k.game?.url_cover,
|
|
378
378
|
game_slug: k.game?.slug,
|
|
379
379
|
game_name: k.game?.name ?? null,
|
|
380
380
|
// Creator feedback. The can_* flags are computed server-side by
|