@mundogamernetwork/shared-ui 1.1.69 → 1.1.72

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/locales/de.json CHANGED
@@ -153,7 +153,17 @@
153
153
  "copied": "Kopiert!",
154
154
  "redeem_on_platform": "Löse diesen Schlüssel auf der entsprechenden Plattform ein.",
155
155
  "revealing": "Enthülle...",
156
- "status": "Status"
156
+ "status": {
157
+ "pending": "Ausstehend",
158
+ "under_review": "In Prüfung",
159
+ "approved": "Genehmigt",
160
+ "waiting_material": "Wartet auf Material",
161
+ "completed": "Abgeschlossen",
162
+ "refused": "Abgelehnt",
163
+ "cancelled": "Abgebrochen",
164
+ "expired": "Abgelaufen",
165
+ "revoked": "Widerrufen"
166
+ }
157
167
  },
158
168
  "materials": {
159
169
  "title": "Submit material",
package/locales/en.json CHANGED
@@ -153,7 +153,17 @@
153
153
  "copied": "Copied!",
154
154
  "redeem_on_platform": "Redeem this key on the platform where you received it.",
155
155
  "revealing": "Revealing...",
156
- "status": "Status"
156
+ "status": {
157
+ "pending": "Pending",
158
+ "under_review": "Under review",
159
+ "approved": "Approved",
160
+ "waiting_material": "Waiting material",
161
+ "completed": "Completed",
162
+ "refused": "Refused",
163
+ "cancelled": "Cancelled",
164
+ "expired": "Expired",
165
+ "revoked": "Revoked"
166
+ }
157
167
  },
158
168
  "materials": {
159
169
  "title": "Submit material",
@@ -153,7 +153,17 @@
153
153
  "copied": "Copiado!",
154
154
  "redeem_on_platform": "Resgate esta chave na plataforma correspondente.",
155
155
  "revealing": "Revelando...",
156
- "status": "Status"
156
+ "status": {
157
+ "pending": "Pendente",
158
+ "under_review": "Em análise",
159
+ "approved": "Aprovado",
160
+ "waiting_material": "Aguardando material",
161
+ "completed": "Concluído",
162
+ "refused": "Recusado",
163
+ "cancelled": "Cancelado",
164
+ "expired": "Expirado",
165
+ "revoked": "Revogado"
166
+ }
157
167
  },
158
168
  "materials": {
159
169
  "title": "Submit material",
package/locales/ro.json CHANGED
@@ -153,7 +153,17 @@
153
153
  "copied": "Copiat!",
154
154
  "redeem_on_platform": "Activează această cheie pe platforma corespunzătoare.",
155
155
  "revealing": "Se dezvăluie...",
156
- "status": "Status"
156
+ "status": {
157
+ "pending": "În așteptare",
158
+ "under_review": "În revizuire",
159
+ "approved": "Aprobat",
160
+ "waiting_material": "Așteptând material",
161
+ "completed": "Finalizat",
162
+ "refused": "Refuzat",
163
+ "cancelled": "Anulat",
164
+ "expired": "Expirat",
165
+ "revoked": "Revocat"
166
+ }
157
167
  },
158
168
  "materials": {
159
169
  "title": "Submit material",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.69",
3
+ "version": "1.1.72",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -814,7 +814,7 @@ onMounted(async () => {
814
814
  color: var(--card-article-title);
815
815
  span { color: var(--key-accent, var(--primary, var(--key-accent, var(--primary, #D297FF)))); }
816
816
  .yellow { color: var(--status-pending, #FFD600); }
817
- .var(--danger, #e53935) { color: var(--danger, #e53935); }
817
+ .red { color: var(--danger, #e53935); }
818
818
  }
819
819
 
820
820
  .bar {
@@ -843,7 +843,7 @@ onMounted(async () => {
843
843
  color: var(--secondary-info-fg);
844
844
  i { color: var(--key-accent, var(--primary, var(--key-accent, var(--primary, #D297FF)))); }
845
845
  .yellow { color: var(--status-pending, #FFD600); }
846
- .var(--danger, #e53935) { color: var(--danger, #e53935); }
846
+ .red { color: var(--danger, #e53935); }
847
847
  }
848
848
  }
849
849
 
@@ -8,21 +8,14 @@ import axios, { type AxiosInstance } from "axios"
8
8
  let _mainClient: AxiosInstance | null = null
9
9
  let _authClient: AxiosInstance | null = null
10
10
 
11
- // Strip /api/v1 suffix so service paths (/api/v1/...) don't double up when the
12
- // env var already contains it (e.g. VITE_BASE_URL_NETWORK=https://host/api/v1).
13
- function normalizeBaseUrl(url: string): string {
14
- return url.replace(/\/api\/v1\/?$/, "")
15
- }
16
-
17
11
  function getMainClient(): AxiosInstance {
18
12
  if (_mainClient) return _mainClient
19
13
 
20
- const baseURL = normalizeBaseUrl(
14
+ const baseURL =
21
15
  import.meta.env.VITE_CAMPAIGN_API_URL ||
22
16
  import.meta.env.VITE_BASE_URL_NETWORK ||
23
17
  import.meta.env.VITE_API_BASE_URL ||
24
- "",
25
- )
18
+ ""
26
19
 
27
20
  _mainClient = axios.create({ baseURL })
28
21
 
@@ -48,12 +41,11 @@ function getMainClient(): AxiosInstance {
48
41
  function getAuthClient(): AxiosInstance {
49
42
  if (_authClient) return _authClient
50
43
 
51
- const baseURL = normalizeBaseUrl(
44
+ const baseURL =
52
45
  import.meta.env.VITE_CAMPAIGN_API_URL ||
53
46
  import.meta.env.VITE_BASE_URL_NETWORK ||
54
47
  import.meta.env.VITE_API_BASE_URL ||
55
- "",
56
- )
48
+ ""
57
49
 
58
50
  _authClient = axios.create({ baseURL, withCredentials: true })
59
51
 
@@ -323,14 +315,14 @@ export const fetchCampaignTypes = (params: Record<string, any> = {}) => {
323
315
  const queryString = Object.entries(params)
324
316
  .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
325
317
  .join("&")
326
- return authClient.get(`/api/v1/public/key-types${queryString ? `?${queryString}` : ""}`)
318
+ return authClient.get(`/public/key-types${queryString ? `?${queryString}` : ""}`)
327
319
  }
328
320
 
329
321
  /**
330
322
  * Fetch active platforms (for the platform filter select).
331
323
  */
332
324
  export const fetchCampaignPlatforms = () => {
333
- return authClient.get("/api/v1/platforms/currently")
325
+ return authClient.get("/platforms/currently")
334
326
  }
335
327
 
336
328
  /**
@@ -340,7 +332,7 @@ export const fetchMyRequests = (params: Record<string, any> = {}) => {
340
332
  const queryString = Object.entries(params)
341
333
  .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
342
334
  .join("&")
343
- return authClient.get(`/api/v1/key-requests-me${queryString ? `?${queryString}` : ""}`)
335
+ return authClient.get(`/key-requests-me${queryString ? `?${queryString}` : ""}`)
344
336
  }
345
337
 
346
338
  /**
@@ -355,47 +347,47 @@ export const fetchRedeemedUsers = (
355
347
  const queryString = Object.entries(merged)
356
348
  .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`)
357
349
  .join("&")
358
- return authClient.get(`/api/v1/public/keys/${keyId}/redeemed-users${queryString ? `?${queryString}` : ""}`)
350
+ return authClient.get(`/public/keys/${keyId}/redeemed-users${queryString ? `?${queryString}` : ""}`)
359
351
  }
360
352
 
361
353
  /**
362
354
  * Request a key for a campaign.
363
355
  */
364
356
  export const requestKey = (data: Record<string, any>) => {
365
- return authClient.post("/api/v1/public/key-requests", data)
357
+ return authClient.post("/public/key-requests", data)
366
358
  }
367
359
 
368
360
  /**
369
361
  * Reveal a previously granted key.
370
362
  */
371
363
  export const revealKey = (requestId: number) => {
372
- return authClient.get(`/api/v1/public/key-requests/${requestId}/reveal`)
364
+ return authClient.get(`/public/key-requests/${requestId}/reveal`)
373
365
  }
374
366
 
375
367
  /**
376
368
  * Fetch required actions for a campaign.
377
369
  */
378
370
  export const fetchKeyActions = (keyId: number) => {
379
- return authClient.get(`/api/v1/public/keys/${keyId}/actions`)
371
+ return authClient.get(`/public/keys/${keyId}/actions`)
380
372
  }
381
373
 
382
374
  /**
383
375
  * Submit a content material for a key request.
384
376
  */
385
377
  export const submitMaterial = (data: Record<string, any>) => {
386
- return authClient.post("/api/v1/public/key-materials", data)
378
+ return authClient.post("/public/key-materials", data)
387
379
  }
388
380
 
389
381
  /**
390
382
  * Fetch all materials submitted for a key request.
391
383
  */
392
384
  export const fetchMaterialsByRequest = (requestId: number) => {
393
- return authClient.get(`/api/v1/public/key-materials?filter[key_request_id]=${requestId}&per_page=all`)
385
+ return authClient.get(`/public/key-materials?filter[key_request_id]=${requestId}&per_page=all`)
394
386
  }
395
387
 
396
388
  /**
397
389
  * Fetch a single key request by ID.
398
390
  */
399
391
  export const fetchKeyRequestById = (requestId: number) => {
400
- return authClient.get(`/api/v1/public/key-requests/${requestId}`)
392
+ return authClient.get(`/public/key-requests/${requestId}`)
401
393
  }