@mundogamernetwork/shared-ui 1.1.18 → 1.1.20

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.18",
3
+ "version": "1.1.20",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -76,11 +76,21 @@ export const useAppInstallBannerStore = defineStore("app-install-banner-store",
76
76
  if (this.loaded) return;
77
77
 
78
78
  const runtimeConfig = useRuntimeConfig();
79
+ const cfg = runtimeConfig.public;
80
+ // Support both shared-ui namespace (mgSharedUi.networkBaseUrl / mgSharedUi.systemId)
81
+ // and the per-front flat keys used by fronts that don't go through the full mgSharedUi config
82
+ // (networkBaseURL / platformId).
79
83
  const networkBaseUrl =
80
- runtimeConfig.public.mgSharedUi?.networkBaseUrl ||
84
+ cfg.mgSharedUi?.networkBaseUrl ||
85
+ cfg.networkBaseURL ||
86
+ cfg.networkBaseUrl ||
87
+ cfg.apiBaseURL ||
81
88
  import.meta.env.VITE_BASE_URL_NETWORK;
82
89
  const platformId = Number(
83
- runtimeConfig.public.mgSharedUi?.systemId || import.meta.env.VITE_SYSTEM_ID,
90
+ cfg.mgSharedUi?.systemId ||
91
+ cfg.platformId ||
92
+ cfg.systemId ||
93
+ import.meta.env.VITE_SYSTEM_ID,
84
94
  );
85
95
 
86
96
  if (!networkBaseUrl || !platformId) {
@@ -119,8 +129,12 @@ export const useAppInstallBannerStore = defineStore("app-install-banner-store",
119
129
 
120
130
  dismiss() {
121
131
  const runtimeConfig = useRuntimeConfig();
132
+ const cfg = runtimeConfig.public;
122
133
  const platformId = Number(
123
- runtimeConfig.public.mgSharedUi?.systemId || import.meta.env.VITE_SYSTEM_ID,
134
+ cfg.mgSharedUi?.systemId ||
135
+ cfg.platformId ||
136
+ cfg.systemId ||
137
+ import.meta.env.VITE_SYSTEM_ID,
124
138
  );
125
139
  if (platformId) writeDismiss(platformId);
126
140
  this.dismissed = true;