@mundogamernetwork/shared-ui 1.1.18 → 1.1.19

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.19",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -76,11 +76,20 @@ 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 ||
81
87
  import.meta.env.VITE_BASE_URL_NETWORK;
82
88
  const platformId = Number(
83
- runtimeConfig.public.mgSharedUi?.systemId || import.meta.env.VITE_SYSTEM_ID,
89
+ cfg.mgSharedUi?.systemId ||
90
+ cfg.platformId ||
91
+ cfg.systemId ||
92
+ import.meta.env.VITE_SYSTEM_ID,
84
93
  );
85
94
 
86
95
  if (!networkBaseUrl || !platformId) {
@@ -119,8 +128,12 @@ export const useAppInstallBannerStore = defineStore("app-install-banner-store",
119
128
 
120
129
  dismiss() {
121
130
  const runtimeConfig = useRuntimeConfig();
131
+ const cfg = runtimeConfig.public;
122
132
  const platformId = Number(
123
- runtimeConfig.public.mgSharedUi?.systemId || import.meta.env.VITE_SYSTEM_ID,
133
+ cfg.mgSharedUi?.systemId ||
134
+ cfg.platformId ||
135
+ cfg.systemId ||
136
+ import.meta.env.VITE_SYSTEM_ID,
124
137
  );
125
138
  if (platformId) writeDismiss(platformId);
126
139
  this.dismissed = true;