@mundogamernetwork/shared-ui 1.17.4 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.17.4",
3
+ "version": "1.17.6",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -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,
@@ -193,12 +193,9 @@ async function submit() {
193
193
  if (!canSubmit.value) return
194
194
  requestError.value = ""
195
195
  sessionExpired.value = false
196
- // Region is only demanded when the pool actually offers one — a global pool
197
- // (region_id null on every key item) has nothing for the creator to pick,
198
- // and requiring it here left the submit button dead with no explanation.
199
196
  if (
200
197
  !selectedPlatformId.value
201
- || (regionRequired.value && !selectedRegionId.value)
198
+ || !selectedRegionId.value
202
199
  || !quantity.value
203
200
  || !description.value?.trim()
204
201
  ) {
@@ -214,9 +211,7 @@ async function submit() {
214
211
  const response = await requestKey({
215
212
  key_id: keyId,
216
213
  platform_ids: [selectedPlatformId.value],
217
- // Omitted entirely on a global pool — sending [null] would fail
218
- // `region_ids.*` => integer.
219
- ...(selectedRegionId.value ? { region_ids: [selectedRegionId.value] } : {}),
214
+ region_ids: [selectedRegionId.value],
220
215
  description: description.value || "-",
221
216
  quantity_keys: Number(quantity.value) || 1,
222
217
  // Recorded on the request so the acknowledgment is provable, not just
@@ -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