@mundogamernetwork/shared-ui 1.17.18 → 1.18.1

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.
Files changed (56) hide show
  1. package/README.md +23 -0
  2. package/assets/kit/kit-base.css +47 -0
  3. package/assets/whats-new/tokens.css +43 -0
  4. package/components/MediaKit/MgRateCardBundleEditor.vue +2 -7
  5. package/components/MediaKit/MgRateCardEditor.vue +1 -1
  6. package/components/keys/KeyBrowser.vue +4 -9
  7. package/components/keys/KeyCampaignDashboardCard.vue +1 -1
  8. package/components/playtest/PlaytestInviteLanding.vue +17 -6
  9. package/components/ui/MgBanners.vue +13 -0
  10. package/components/ui/MgLoginModal.vue +1 -1
  11. package/components/whats-new/MgWhatsNewDialog.vue +552 -0
  12. package/components/whats-new/MgWhatsNewMedia.vue +242 -0
  13. package/components/whats-new/MgWhatsNewModal.vue +285 -0
  14. package/components/whats-new/MgWhatsNewRichText.vue +90 -0
  15. package/composables/useForceLogout.ts +0 -1
  16. package/composables/useLogout.ts +0 -2
  17. package/composables/useMgCheckout.ts +0 -1
  18. package/error.vue +1 -1
  19. package/locales/de.json +6 -0
  20. package/locales/en.json +6 -0
  21. package/locales/es.json +6 -0
  22. package/locales/pt-BR.json +6 -0
  23. package/locales/ro.json +6 -0
  24. package/nuxt.config.ts +11 -2
  25. package/package.json +5 -11
  26. package/pages/[slug]/index.vue +1 -1
  27. package/pages/about.vue +1 -1
  28. package/pages/blog.vue +1 -1
  29. package/pages/careers.vue +1 -1
  30. package/pages/contact.vue +8 -14
  31. package/pages/faq.vue +1 -1
  32. package/pages/key-campaigns/index.vue +1 -1
  33. package/pages/key-campaigns/redeem-key.vue +5 -11
  34. package/pages/magazine/[slug]/index.vue +1 -1
  35. package/pages/magazine/[slug]/preview.vue +2 -2
  36. package/pages/magazine/index.vue +3 -2
  37. package/pages/partners.vue +1 -1
  38. package/pages/press.vue +1 -1
  39. package/pages/presskit/game/[slug].vue +29 -1
  40. package/pages/roadmap.vue +1 -1
  41. package/pages/status.vue +1 -1
  42. package/pages/team.vue +1 -1
  43. package/pages/whats-new-preview.vue +96 -0
  44. package/services/campaignService.ts +0 -1
  45. package/services/creatorNetworkProgramService.ts +47 -0
  46. package/services/documentService.ts +16 -4
  47. package/services/httpService.ts +2 -2
  48. package/services/institutionalService.ts +1 -1
  49. package/stores/whatsNew.ts +170 -0
  50. package/types/index.ts +0 -3
  51. package/utils/clearSession.ts +0 -1
  52. package/utils/keyRequestError.ts +54 -0
  53. package/utils/whatsNew.ts +300 -0
  54. package/utils/whatsNewMessages.ts +133 -0
  55. package/utils/whatsNewText.ts +10 -0
  56. package/types/echo.d.ts +0 -7
@@ -386,6 +386,12 @@
386
386
  "error_user_blocked": "Seu acesso a pedidos de chave está temporariamente bloqueado por materiais não entregues. Envie seus materiais pendentes para restaurar o acesso.",
387
387
  "error_not_eligible": "Esta campanha não está disponível para o seu plano atual.",
388
388
  "error_pending_limit": "Você atingiu o limite de pedidos simultâneos do seu plano. Entregue o material pendente antes de solicitar uma nova chave.",
389
+ "error_not_open_yet": "Esta campanha ainda não foi aberta.",
390
+ "error_closed": "Esta campanha está encerrada.",
391
+ "error_country": "Esta campanha não está disponível no seu país.",
392
+ "error_not_approved_creator": "Você não é um criador aprovado para esta campanha.",
393
+ "error_tier_locked": "Esta campanha exige o plano {tier} ou superior.",
394
+ "error_streamer_level": "Seu nível de streamer não é suficiente para esta campanha.",
389
395
  "error_session_expired": "Sua sessão expirou.",
390
396
  "error_session_expired_help": "Entre novamente para concluir esta solicitação. Nada do que você preencheu foi enviado ainda.",
391
397
  "login_again": "Entrar novamente",
package/locales/ro.json CHANGED
@@ -386,6 +386,12 @@
386
386
  "error_user_blocked": "Accesul dvs. la solicitările de chei a fost blocat temporar din cauza transmisiilor de materiale restante. Trimiteți materialele dvs. pentru a restabili accesul.",
387
387
  "error_not_eligible": "Această campanie nu este disponibilă pentru planul dvs. actual.",
388
388
  "error_pending_limit": "Ați atins limita de cereri simultane a planului dvs. Îndepliniți-vă obligațiile restante înainte de a solicita o nouă cheie.",
389
+ "error_not_open_yet": "Această campanie nu s-a deschis încă.",
390
+ "error_closed": "Această campanie este închisă.",
391
+ "error_country": "Această campanie nu este disponibilă în țara ta.",
392
+ "error_not_approved_creator": "Nu ești un creator aprobat pentru această campanie.",
393
+ "error_tier_locked": "Această campanie necesită planul {tier} sau superior.",
394
+ "error_streamer_level": "Nivelul tău de streamer nu este suficient pentru această campanie.",
389
395
  "error_session_expired": "Sesiunea ta a expirat.",
390
396
  "error_session_expired_help": "Autentifică-te din nou pentru a finaliza această solicitare. Nimic din ce ai completat nu a fost trimis încă.",
391
397
  "login_again": "Autentifică-te din nou",
package/nuxt.config.ts CHANGED
@@ -123,11 +123,13 @@ export default defineNuxtConfig({
123
123
  `${packageRoot}/stores/announcement.ts`,
124
124
  `${packageRoot}/stores/appInstallBanner.ts`,
125
125
  `${packageRoot}/stores/promotion.ts`,
126
+ `${packageRoot}/stores/whatsNew.ts`,
126
127
  ],
127
128
  },
128
129
  css: [
129
130
  `${packageRoot}/assets/kit/kit-base.css`,
130
131
  `${packageRoot}/assets/kit/kit-theme.css`,
132
+ `${packageRoot}/assets/whats-new/tokens.css`,
131
133
  ],
132
134
  runtimeConfig: {
133
135
  public: {
@@ -139,8 +141,6 @@ export default defineNuxtConfig({
139
141
  agencyBaseUrl: "", // VITE_BASE_URL_AGENCY — used for "create your press kit" CTA link
140
142
  accountsBaseUrl: "", // VITE_BASE_ACCOUNTS_URL
141
143
  networkBaseUrl: "", // VITE_BASE_URL_NETWORK (institutional APIs)
142
- communityApiUrl: "", // VITE_BASE_URL_COMMUNITY (community API)
143
- communitySiteUrl: "", // VITE_BASE_URL_COMMUNITY_FRONT (community frontend)
144
144
  // Per-platform pricing/plans page. Left empty, the account menu's
145
145
  // "Plans & Pricing" link is hidden — set it per front (e.g.
146
146
  // `${localePath}/pricing`) since each front's plans page lives at a
@@ -157,6 +157,15 @@ export default defineNuxtConfig({
157
157
  // with no gamification data for its users can set this to false.
158
158
  gamification: true,
159
159
  },
160
+ // "Novidades da Rede" modal, mounted by <MgBanners />. Routes are path
161
+ // prefixes (locale prefix ignored); allowedRoutes empty = any logged-in
162
+ // route that is not blocked. blockedRoutes add to the built-in list
163
+ // (login, signup, checkout, payment, create/publish/upload...).
164
+ whatsNew: {
165
+ enabled: true,
166
+ allowedRoutes: [] as string[],
167
+ blockedRoutes: [] as string[],
168
+ },
160
169
  languages: ["pt-BR", "en", "es", "de", "ro"],
161
170
  protectedRoutes: [] as string[],
162
171
  chatEndpoints: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.17.18",
3
+ "version": "1.18.1",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -25,7 +25,8 @@
25
25
  },
26
26
  "scripts": {
27
27
  "dev": "nuxi dev .playground",
28
- "build": "nuxi build .playground"
28
+ "build": "nuxi build .playground",
29
+ "test": "npx --yes vitest@2.1.9 run"
29
30
  },
30
31
  "peerDependencies": {
31
32
  "@pinia-plugin-persistedstate/nuxt": ">=1.0.0",
@@ -39,27 +40,20 @@
39
40
  "vue": ">=3.5.0"
40
41
  },
41
42
  "dependencies": {
42
- "@mundogamernetwork/mgn-flipbook": "0.2.0",
43
43
  "@vue-leaflet/vue-leaflet": "^0.10.1",
44
44
  "leaflet": "^1.9.4"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@pinia-plugin-persistedstate/nuxt": "^1.2.1",
48
48
  "@pinia/nuxt": "^0.5.5",
49
- "@nuxtjs/i18n": "^8.3.0",
50
- "@nuxtjs/color-mode": "^3.5.2",
51
- "@vueuse/core": "^12.5.0",
52
- "@types/node": "^22.10.0",
53
- "sass-embedded": "^1.89.2",
54
49
  "@types/leaflet": "^1.9.18",
55
50
  "axios": "^1.18.1",
56
51
  "hls.js": "^1.6.16",
57
52
  "laravel-echo": "^2.3.7",
58
- "nuxt": "3.15.4",
53
+ "nuxt": "^3.15.4",
59
54
  "pinia": "^2.3.1",
60
55
  "pusher-js": "^8.5.0",
61
56
  "typescript": "^5.0.0",
62
57
  "vue-tsc": "^2.2.0"
63
- },
64
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
58
+ }
65
59
  }
@@ -76,7 +76,7 @@ if (error.value || !getDocument.value?.data?.localized_content) {
76
76
  content: " ";
77
77
  display: block;
78
78
  position: absolute;
79
- background: var(--kit-surface-2, #1b1f27);
79
+ background: url("@/assets/images/bg-privacy-policy.png") no-repeat center center / cover;
80
80
  width: 100%;
81
81
  height: 100%;
82
82
  top: 50%;
package/pages/about.vue CHANGED
@@ -71,7 +71,7 @@ definePageMeta({ layout: "default" });
71
71
  content: " ";
72
72
  display: block;
73
73
  position: absolute;
74
- background: var(--kit-surface-2, #1b1f27);
74
+ background: url("@/assets/images/bg-about.png") no-repeat center center / cover;
75
75
  width: 100%;
76
76
  height: 100%;
77
77
  top: 50%;
package/pages/blog.vue CHANGED
@@ -260,7 +260,7 @@ onMounted(() => {
260
260
  content: " ";
261
261
  display: block;
262
262
  position: absolute;
263
- background: var(--kit-surface-2, #1b1f27);
263
+ background: url("@/assets/images/bg-blog.png") no-repeat center center / cover;
264
264
  width: 100%;
265
265
  height: 100%;
266
266
  top: 50%;
package/pages/careers.vue CHANGED
@@ -188,7 +188,7 @@ onMounted(async () => {
188
188
  content: " ";
189
189
  display: block;
190
190
  position: absolute;
191
- background: var(--kit-surface-2, #1b1f27);
191
+ background: url("@/assets/images/bg-careers.png") no-repeat center center / cover;
192
192
  width: 100%;
193
193
  height: 100%;
194
194
  top: 50%;
package/pages/contact.vue CHANGED
@@ -64,20 +64,12 @@ watchEffect(() => { if (formData.value.message) inputErrors.value.message.status
64
64
  watchEffect(() => { if (formData.value.subject_id) inputErrors.value.subject_id.status = false; });
65
65
  watchEffect(() => { if (formData.value.country_id) inputErrors.value.country_id.status = false; });
66
66
 
67
- // Guards against double click / double tap sending the same message twice.
68
- const isSubmitting = ref(false);
67
+ // A double click used to send the message twice; the second answer replaced the success dialog with an error.
68
+ const sending = ref(false);
69
69
 
70
70
  const submitForm = async () => {
71
- if (isSubmitting.value) return;
72
- isSubmitting.value = true;
73
- try {
74
- await sendMessage();
75
- } finally {
76
- isSubmitting.value = false;
77
- }
78
- };
79
-
80
- const sendMessage = async () => {
71
+ if (sending.value) return;
72
+ sending.value = true;
81
73
  try {
82
74
  const data = {
83
75
  ...formData.value,
@@ -107,6 +99,8 @@ const sendMessage = async () => {
107
99
  modalMessage.value = String($t("more.contact.message_popup.error") || "There was an error sending your message. Please try again.");
108
100
  showModal.value = true;
109
101
  }
102
+ } finally {
103
+ sending.value = false;
110
104
  }
111
105
  };
112
106
 
@@ -183,7 +177,7 @@ const { $t } = useNuxtApp().$i18n;
183
177
  <span v-if="inputErrors.message.status" class="error-msg">{{ inputErrors.message.error }}</span>
184
178
  </div>
185
179
 
186
- <button type="submit" class="btn-contact" :disabled="isSubmitting" :aria-busy="isSubmitting">
180
+ <button type="submit" class="btn-contact" :disabled="sending">
187
181
  {{ $t("more.contact.btn_send_message") }}
188
182
  </button>
189
183
  </form>
@@ -225,7 +219,7 @@ const { $t } = useNuxtApp().$i18n;
225
219
  content: " ";
226
220
  display: block;
227
221
  position: absolute;
228
- background: var(--kit-surface-2, #1b1f27);
222
+ background: url("@/assets/images/bg-contact.png") no-repeat center center / cover;
229
223
  width: 100%;
230
224
  height: 100%;
231
225
  top: 50%;
package/pages/faq.vue CHANGED
@@ -174,7 +174,7 @@ function toggleFaq(index: number) {
174
174
  content: " ";
175
175
  display: block;
176
176
  position: absolute;
177
- background: var(--kit-surface-2, #1b1f27);
177
+ background: url("@/assets/images/bg-faq.png") no-repeat center center / cover;
178
178
  width: 100%;
179
179
  height: 100%;
180
180
  top: 50%;
@@ -69,7 +69,7 @@
69
69
  <FormAppSelect
70
70
  id="keyCampaignsPlatformFilter"
71
71
  :model="activePlatformFilter ?? ''"
72
- @update:model="(val: string | number) => setPlatformFilter(val ? Number(val) : null)"
72
+ @update:model="(val) => setPlatformFilter(val ? Number(val) : null)"
73
73
  :label="$t('keys.campaigns.all')"
74
74
  :options="platformList.map((p) => [p.id, platformAbbr(p.name)])"
75
75
  />
@@ -13,6 +13,7 @@ import {
13
13
  buildReLoginUrl,
14
14
  } from "../../services/campaignService"
15
15
  import { formatEmbargoDateTime } from "../../utils/embargo"
16
+ import { keyRequestErrorMessage } from "../../utils/keyRequestError"
16
17
  import { useLoginStore } from "../../stores/login"
17
18
 
18
19
  const route = useRoute()
@@ -87,7 +88,7 @@ onMounted(async () => {
87
88
  fetchKeyRegions(keyId),
88
89
  fetchAvailableOptions(keyId).catch(() => null),
89
90
  ])
90
- campaign.value = (campaignRes as any)?.data?.data || (campaignRes as any)?.data || null
91
+ campaign.value = campaignRes?.data?.data || campaignRes?.data || null
91
92
  const allPlatforms = platformsRes?.data?.data || platformsRes?.data || []
92
93
  const allRegions = regionsRes?.data?.data || regionsRes?.data || []
93
94
 
@@ -248,22 +249,15 @@ async function submit() {
248
249
  navigateTo(campaignPath.value)
249
250
  }, 2000)
250
251
  } catch (e: any) {
251
- const status = e?.response?.status
252
- const errorCode = e?.response?.data?.error_code
252
+ let specific: ReturnType<typeof keyRequestErrorMessage> = null
253
253
  if (isSessionExpired(e)) {
254
254
  // The API rejected the request as unauthenticated. Never surface the
255
255
  // backend's own wording here ("Unauthorized"): it is untranslated and
256
256
  // reads as a permission problem when it is really an expired session.
257
257
  sessionExpired.value = true
258
258
  requestError.value = $i18n.t("keys.campaigns.error_session_expired")
259
- } else if (status === 409) {
260
- requestError.value = $i18n.t("keys.campaigns.error_duplicate")
261
- } else if (status === 403 && errorCode === "user_key_blocked") {
262
- requestError.value = $i18n.t("keys.campaigns.error_user_blocked")
263
- } else if (status === 403) {
264
- requestError.value = $i18n.t("keys.campaigns.error_not_eligible")
265
- } else if (status === 422 && errorCode === "pending_limit_reached") {
266
- requestError.value = $i18n.t("keys.campaigns.error_pending_limit")
259
+ } else if ((specific = keyRequestErrorMessage(e))) {
260
+ requestError.value = $i18n.t(specific.key, specific.params ?? {})
267
261
  } else {
268
262
  const msg = e?.response?.data?.message || e?.message || ""
269
263
  requestError.value = msg || $i18n.t("keys.campaigns.error_request")
@@ -15,7 +15,7 @@ useSeoMeta({
15
15
  ogDescription:
16
16
  "Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
17
17
  ogImage: "/imgs/seo-magazine-image.jpg",
18
- ogUrl: "/magazine",
18
+ // No ogUrl: it was the relative "/magazine" for every issue and language. Each front publishes og:url (= its canonical) in app.vue.
19
19
  twitterTitle: "MGN Magazine",
20
20
  twitterDescription:
21
21
  "Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
@@ -18,7 +18,7 @@ useSeoMeta({
18
18
  ogDescription:
19
19
  "Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
20
20
  ogImage: "/imgs/seo-magazine-image.jpg",
21
- ogUrl: "/magazine",
21
+ // No ogUrl: it was the relative "/magazine" for every issue and language. Each front publishes og:url (= its canonical) in app.vue.
22
22
  twitterTitle: "MGN Magazine",
23
23
  twitterDescription:
24
24
  "Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
@@ -158,7 +158,7 @@ const flipbookPages = computed<PageData[]>(() => {
158
158
  page,
159
159
  flipbookCode: magazine.value.data?.flipbook_code,
160
160
  }),
161
- })) as PageData[];
161
+ }));
162
162
  });
163
163
 
164
164
  // Determine if lead capture modal should show
@@ -184,7 +184,7 @@ useSeoMeta({
184
184
  ogDescription:
185
185
  "Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
186
186
  ogImage: "/imgs/seo-magazine-image.jpg",
187
- ogUrl: "/magazine",
187
+ // No ogUrl: it was the relative "/magazine" for every language. Each front publishes og:url (= its canonical) in app.vue.
188
188
  twitterTitle: "MGN Magazine",
189
189
  twitterDescription:
190
190
  "Discover, be inspired and connect in the magazine that breathes digital gaming. Welcome to your new source of gamer passion!",
@@ -764,7 +764,8 @@ const uniqueEditions = computed(() => {
764
764
  content: " ";
765
765
  display: block;
766
766
  position: absolute;
767
- background: var(--kit-surface-2, #1b1f27);
767
+ background: url("@/assets/images/bg-magazine.png") no-repeat center center /
768
+ cover;
768
769
  width: 100%;
769
770
  height: 100%;
770
771
  top: 50%;
@@ -151,7 +151,7 @@ onMounted(() => {
151
151
  content: " ";
152
152
  display: block;
153
153
  position: absolute;
154
- background: var(--kit-surface-2, #1b1f27);
154
+ background: url("@/assets/images/bg-partners.png") no-repeat center center / cover;
155
155
  width: 100%;
156
156
  height: 100%;
157
157
  top: 50%;
package/pages/press.vue CHANGED
@@ -130,7 +130,7 @@ onMounted(() => {
130
130
  content: " ";
131
131
  display: block;
132
132
  position: absolute;
133
- background: var(--kit-surface-2, #1b1f27);
133
+ background: url("@/assets/images/bg-press.png") no-repeat center center / cover;
134
134
  width: 100%;
135
135
  height: 100%;
136
136
  top: 50%;
@@ -1,12 +1,13 @@
1
1
  <script setup lang="ts">
2
2
  import { trackPressKitEvent } from '../../../services/pressKitService';
3
3
  import { mgApiUrl } from '../../../services/httpService';
4
+ import { fetchCreatorNetworkProgram, creatorNetworkProgramLink } from '../../../services/creatorNetworkProgramService';
4
5
 
5
6
  definePageMeta({ layout: 'blank' });
6
7
 
7
8
  const route = useRoute();
8
9
  const slug = route.params.slug as string;
9
- const { t } = useI18n();
10
+ const { t, te } = useI18n();
10
11
 
11
12
  const runtimeConfig = useRuntimeConfig();
12
13
  const cfg = (runtimeConfig.public?.mgSharedUi || {}) as Record<string, any>;
@@ -62,6 +63,19 @@ const { data: moreKitsData } = await useAsyncData(
62
63
  );
63
64
 
64
65
  const kit = computed(() => kitData.value?.data || kitData.value || null);
66
+
67
+ // Does the game have a Creator Network program open? Asked after the page is up and never awaited by
68
+ // it: a missing or slow answer simply means no badge. The strings live in each app's own lang files, so
69
+ // an app that does not carry them yet shows nothing instead of raw keys.
70
+ // The public kit carries its game as `game.id` (it does not carry a top-level `game_id`).
71
+ const kitGameId = computed(() => kit.value?.game?.id ?? kit.value?.game_id ?? null);
72
+ const { data: program } = useAsyncData(
73
+ `press-kit-program-${slug}`,
74
+ () => fetchCreatorNetworkProgram(apiBase, kitGameId.value),
75
+ { lazy: true, server: false, watch: [kitGameId] },
76
+ );
77
+ const programLink = computed(() => (program.value?.open ? creatorNetworkProgramLink(program.value.url, 'press-kit') : null));
78
+ const showProgram = computed(() => !!programLink.value && te('kit.press.creator_program_cta'));
65
79
  const loading = pending;
66
80
 
67
81
  // A request that FAILED is not the same as a kit that does not EXIST. Collapsing
@@ -355,6 +369,7 @@ const navSections = computed(() => {
355
369
  if (team.value.length) s.push({ id: 'team', label: 'kit.press.team' });
356
370
  if (hasEcosystem.value) s.push({ id: 'events', label: 'kit.press.showcases' });
357
371
  if (k.game_id && keyPoolsVisible.value) s.push({ id: 'review-key', label: 'kit.press.request_review_key' });
372
+ if (showProgram.value) s.push({ id: 'creator-network', label: 'kit.press.creator_program_nav' });
358
373
  if (k.press_contact_email) s.push({ id: 'contact', label: 'kit.press.contact' });
359
374
  return s;
360
375
  });
@@ -509,6 +524,9 @@ useHead(() => ({
509
524
  <img v-if="kit.cover_image_url" class="kit-cover-poster" :src="kit.cover_image_url" :alt="kit.name" />
510
525
  <div class="kit-cover-text">
511
526
  <span v-if="kit.release_status" class="kit-eyebrow">{{ String(kit.release_status).replace(/_/g, ' ') }}</span>
527
+ <a v-if="showProgram" class="kit-program-pill" :href="programLink!" @click="track('click')">
528
+ <span class="kit-program-dot" aria-hidden="true" />{{ $t('kit.press.creator_program_open') }}
529
+ </a>
512
530
  <h1 class="kit-cover-title">{{ kit.name }}</h1>
513
531
  <p v-if="kit.tagline" class="kit-tagline">{{ kit.tagline }}</p>
514
532
  <p v-if="kit.developer" class="kit-kicker">{{ kit.developer }}</p>
@@ -522,6 +540,7 @@ useHead(() => ({
522
540
  offered when the kit is actually linked to a game with open pools, same
523
541
  gate as the section itself, so this never links to an empty/broken state. -->
524
542
  <a v-if="kit.game_id" class="kit-btn kit-btn-ghost" href="#review-key" @click.prevent="scrollToSection('review-key')">{{ $t('kit.press.request_review_key') }}</a>
543
+ <a v-if="showProgram" class="kit-btn kit-btn-outline-accent" :href="programLink!" @click="track('click')">{{ $t('kit.press.creator_program_cta') }}</a>
525
544
  <a
526
545
  v-if="interviewHref"
527
546
  class="kit-btn kit-btn-ghost"
@@ -736,6 +755,15 @@ useHead(() => ({
736
755
  </div>
737
756
  </section>
738
757
 
758
+ <!-- Creator Network: offered only while the program has a seat to give (see showProgram) -->
759
+ <section v-if="showProgram" id="creator-network" class="kit-block kit-program-block">
760
+ <h2>{{ $t('kit.press.creator_program_title') }}</h2>
761
+ <div class="kit-program-card">
762
+ <p>{{ $t('kit.press.creator_program_desc', { game: kit.name }) }}</p>
763
+ <a class="kit-btn kit-btn-primary" :href="programLink!" @click="track('click')">{{ $t('kit.press.creator_program_cta') }}</a>
764
+ </div>
765
+ </section>
766
+
739
767
  <!-- Key pools embed — shown when game has active pools -->
740
768
  <section v-if="kit.game_id" v-show="keyPoolsVisible" id="review-key" class="kit-block kit-keys-section">
741
769
  <h2 class="kit-keys-title">{{ $t('kit.press.get_key_title') }}</h2>
package/pages/roadmap.vue CHANGED
@@ -217,7 +217,7 @@ onMounted(() => {
217
217
  content: " ";
218
218
  display: block;
219
219
  position: absolute;
220
- background: var(--kit-surface-2, #1b1f27);
220
+ background: url("@/assets/images/bg-roadmap.png") no-repeat center center / cover;
221
221
  width: 100%;
222
222
  height: 100%;
223
223
  top: 50%;
package/pages/status.vue CHANGED
@@ -124,7 +124,7 @@ onMounted(() => {
124
124
  content: " ";
125
125
  display: block;
126
126
  position: absolute;
127
- background: var(--kit-surface-2, #1b1f27);
127
+ background: url("@/assets/images/bg-status.png") no-repeat center center / cover;
128
128
  width: 100%;
129
129
  height: 100%;
130
130
  top: 50%;
package/pages/team.vue CHANGED
@@ -150,7 +150,7 @@ onMounted(async () => {
150
150
  content: " ";
151
151
  display: block;
152
152
  position: absolute;
153
- background: var(--kit-surface-2, #1b1f27);
153
+ background: url("@/assets/images/bg-team.png") no-repeat center center / cover;
154
154
  width: 100%;
155
155
  height: 100%;
156
156
  top: 50%;
@@ -0,0 +1,96 @@
1
+ <script setup lang="ts">
2
+ /**
3
+ * Renders a "Novidades" comunicado exactly as the fronts do, for the admin's
4
+ * preview (iframe) and for QA.
5
+ *
6
+ * • Admin: the parent window posts
7
+ * { type: "mg-whats-new-preview", payload: <GET /admin/whats-new/{id}/preview body>,
8
+ * theme?: "light"|"dark", lang?: "pt-BR" }
9
+ * and this page answers { type: "mg-whats-new-preview-ready" } once it listens.
10
+ * • QA: /whats-new-preview?demo=image|video|embed|text&lang=pt-BR&theme=dark
11
+ *
12
+ * Nothing is fetched, stored or reported from here, and the payload goes
13
+ * through the same safe renderer (no HTML, https-only links/media).
14
+ */
15
+ import { normalizeWnPost, type WnPost } from "../utils/whatsNew";
16
+
17
+ definePageMeta({ layout: false });
18
+ useHead({ meta: [{ name: "robots", content: "noindex,nofollow" }] });
19
+
20
+ const route = useRoute();
21
+ const colorMode = useColorMode();
22
+
23
+ const post = ref<WnPost | null>(null);
24
+ const lang = ref<string>(String(route.query.lang || "") || "en");
25
+
26
+ const DEMO_BASE = {
27
+ id: 0,
28
+ version: 1,
29
+ kind: "release",
30
+ title: "Game Jams, redesigned",
31
+ summary: "Hi, Ana! Creating a jam now takes **4 steps**, and every cover is checked before publishing. [Read more](/game-jams)",
32
+ published_at: "2026-10-22T14:00:00Z",
33
+ display_mode: "once",
34
+ sections: [
35
+ { type: "feature", title: "", items: [{ body: "Creation wizard in **4 steps**.", link_url: null }, { body: "Jam preview on the site and in the app.", link_url: null }] },
36
+ { type: "improvement", title: "", items: [{ body: "Cover images need at least **1200x600**.", link_url: null }] },
37
+ { type: "fix", title: "", items: [{ body: "Registration dates now respect the time zone.", link_url: null }] },
38
+ { type: "note", title: "", items: [{ body: "Nothing is lost; messages sent later appear normally.", link_url: null }] },
39
+ ],
40
+ cta: { label: "Create my jam", type: "app_route", target: "/game-jams/new" },
41
+ links: [
42
+ { kind: "social", label: "Discord", url: "https://discord.gg/example" },
43
+ { kind: "social", label: "Instagram", url: "https://instagram.com/example" },
44
+ ],
45
+ history_url: "https://example.com/news",
46
+ } as const;
47
+
48
+ function demo(kind: string): WnPost | null {
49
+ const media: Record<string, any> = {
50
+ image: { type: "image", url: "https://placehold.co/1600x900/4a47d6/ffffff.png?text=Game+Jams", poster_url: null, width: 1600, height: 900, duration_s: null, embed: null, description: "The new Game Jams creation wizard." },
51
+ video: { type: "video_upload", url: "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4", poster_url: "https://placehold.co/1280x720/1e2a4a/ffffff.png?text=Video", width: 1280, height: 720, duration_s: 18, embed: null, description: "A short, silent tour of the creation wizard." },
52
+ embed: { type: "video_embed", url: null, poster_url: "https://placehold.co/1280x720/d9468a/ffffff.png?text=Watch", width: 1280, height: 720, duration_s: null, embed: { provider: "youtube", id: "dQw4w9WgXcQ", watch_url: null }, description: "The team presents the redesign." },
53
+ };
54
+ if (!(kind in media) && kind !== "text") return null;
55
+ return normalizeWnPost({ ...DEMO_BASE, media: media[kind] ?? null, cta: kind === "text" ? null : DEMO_BASE.cta, links: kind === "text" ? [] : DEMO_BASE.links });
56
+ }
57
+
58
+ function applyTheme(theme: unknown) {
59
+ if (theme === "light" || theme === "dark") colorMode.preference = theme;
60
+ }
61
+
62
+ function onMessage(event: MessageEvent) {
63
+ const data: any = event.data;
64
+ if (!data || data.type !== "mg-whats-new-preview") return;
65
+ const payload = normalizeWnPost(data.payload?.data ?? data.payload);
66
+ if (!payload) return;
67
+ if (typeof data.lang === "string") lang.value = data.lang;
68
+ applyTheme(data.theme);
69
+ post.value = payload;
70
+ }
71
+
72
+ onMounted(() => {
73
+ // @nuxtjs/color-mode restores the stored preference after mount and would win
74
+ // over the query, so apply the requested theme again once it has settled.
75
+ applyTheme(route.query.theme);
76
+ setTimeout(() => applyTheme(route.query.theme), 150);
77
+ if (route.query.demo) post.value = demo(String(route.query.demo));
78
+ window.addEventListener("message", onMessage);
79
+ if (window.parent !== window) window.parent.postMessage({ type: "mg-whats-new-preview-ready" }, "*");
80
+ });
81
+
82
+ onBeforeUnmount(() => window.removeEventListener("message", onMessage));
83
+ </script>
84
+
85
+ <template>
86
+ <div class="mg-wn-preview-page">
87
+ <MgWhatsNewModal preview :preview-post="post" :locale="lang" />
88
+ </div>
89
+ </template>
90
+
91
+ <style lang="scss" scoped>
92
+ .mg-wn-preview-page {
93
+ min-height: 100dvh;
94
+ background: var(--mg-wn-surface-2);
95
+ }
96
+ </style>
@@ -1,6 +1,5 @@
1
1
  import axios, { type AxiosInstance } from "axios"
2
2
  import { clearAuthCredentials } from "../utils/clearSession"
3
- import { useAuthStore } from "../stores/auth"
4
3
 
5
4
  // Campaign service wraps the key-campaigns API used by TV, community, and agency.
6
5
  // Each frontend backend registers the shared key routes through its own provider.
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Whether a game has a Creator Network program open, for the public pages that can offer it
3
+ * (the press kit page). The answer comes from the agency API, by the community game id the page
4
+ * already knows: GET public/game-network/by-game/{id}.
5
+ */
6
+
7
+ export interface CreatorNetworkProgram {
8
+ enabled: boolean;
9
+ /** True only when the network is on AND a seat can still be promised: the only flag a page should act on. */
10
+ open: boolean;
11
+ url: string | null;
12
+ accent_color: string | null;
13
+ }
14
+
15
+ /** The program of a game, or null when there is none to show or the answer could not be had (never throws). */
16
+ export async function fetchCreatorNetworkProgram(
17
+ apiBase: string,
18
+ gameId: number | string | null | undefined,
19
+ ): Promise<CreatorNetworkProgram | null> {
20
+ if (!apiBase || !gameId) return null;
21
+
22
+ try {
23
+ const res = await $fetch<{ data?: CreatorNetworkProgram }>(
24
+ `${apiBase.replace(/\/$/, '')}/public/game-network/by-game/${encodeURIComponent(String(gameId))}`,
25
+ );
26
+ return res?.data ?? null;
27
+ } catch {
28
+ return null;
29
+ }
30
+ }
31
+
32
+ /**
33
+ * The join link, tagged with where the visitor came from (the studio's funnel reads `campaign_label`).
34
+ * Only an http(s) address is ever returned, so a bad value can never become a `javascript:` link.
35
+ */
36
+ export function creatorNetworkProgramLink(url: string | null | undefined, label: string): string | null {
37
+ if (!url) return null;
38
+
39
+ try {
40
+ const link = new URL(url);
41
+ if (link.protocol !== 'https:' && link.protocol !== 'http:') return null;
42
+ link.searchParams.set('campaign_label', label);
43
+ return link.toString();
44
+ } catch {
45
+ return null;
46
+ }
47
+ }
@@ -5,12 +5,24 @@ interface SerializeObject {
5
5
  [key: string]: string | { [key: string]: string | string[] };
6
6
  }
7
7
 
8
- const getApiBaseUrl = () => {
9
- const config = useRuntimeConfig();
10
- return config.public.mgSharedUi?.apiBaseURL || import.meta.env.VITE_API_BASE_URL;
8
+ // The institutional documents (terms of use, privacy policy, cookies policy...) live in api-main
9
+ // (`GET /document-website-latest`); the per-product APIs (academy, agency, tv...) do not expose that
10
+ // route. Calling `mgSharedUi.apiBaseURL` (the app's own API) made the shared `[slug]` page answer 404
11
+ // for every document in every front that does not point that URL at api-main, so use the network
12
+ // (main) base URL like institutionalService does.
13
+ const getNetworkBaseUrl = () => {
14
+ // useRuntimeConfig() needs the active Nuxt instance and throws when called from an async Pinia
15
+ // action after the SSR context is gone; fall back to the build-time env in that case.
16
+ try {
17
+ const fromConfig = useRuntimeConfig().public.mgSharedUi?.networkBaseUrl;
18
+ if (fromConfig) return fromConfig as string;
19
+ } catch (_) {
20
+ // outside Nuxt context — use the env fallback below
21
+ }
22
+ return import.meta.env.VITE_BASE_URL_NETWORK;
11
23
  };
12
24
 
13
25
  export const fetchDocuments = async (params: SerializeObject): Promise<any> => {
14
26
  const paramsSerialized = serialize(params);
15
- return httpService.get(`/document-website-latest${paramsSerialized}`, { baseURL: getApiBaseUrl() });
27
+ return httpService.get(`/document-website-latest${paramsSerialized}`, { baseURL: getNetworkBaseUrl() });
16
28
  };