@mundogamernetwork/shared-ui 1.1.2 → 1.1.3

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.
@@ -76,22 +76,24 @@ function goRegister() {
76
76
  .mg-login-register {
77
77
  display: flex;
78
78
  flex-direction: column;
79
- gap: 0.85rem;
80
- padding: 1.25rem;
79
+ gap: 0.9rem;
80
+ padding: 1.5rem;
81
81
  // Inline (default): fill the parent dropdown container.
82
82
  width: 100%;
83
83
  box-sizing: border-box;
84
84
  background: var(--header-ui-config-bg, var(--sidebar-bg, var(--body-bg-card, #1c1c1c)));
85
85
 
86
86
  // Dropdown variant: self-positioned card with its own width + border.
87
+ // Wider card so the login CTA reads as primary and the register line
88
+ // stays on a single row across locales (de/ro run long).
87
89
  &--dropdown {
88
90
  position: absolute;
89
91
  top: 100%;
90
92
  right: 0;
91
93
  margin-top: 8px;
92
94
  z-index: 9999;
93
- width: 300px;
94
- max-width: 300px;
95
+ width: 340px;
96
+ max-width: calc(100vw - 24px);
95
97
  border: 1px solid var(--header-ui-config-border, var(--border-card, rgba(255, 255, 255, 0.08)));
96
98
  }
97
99
 
@@ -100,8 +102,8 @@ function goRegister() {
100
102
  align-items: center;
101
103
  justify-content: center;
102
104
  width: 100%;
103
- min-height: 44px;
104
- padding: 10px 16px;
105
+ min-height: 46px;
106
+ padding: 11px 18px;
105
107
  font-size: 15px;
106
108
  font-weight: 600;
107
109
  border: none;
@@ -196,11 +196,24 @@ export function useMgCheckout(httpService: AxiosInstance) {
196
196
  pix_data: data.pix_data ?? undefined,
197
197
  };
198
198
 
199
- // For redirect-based payments (Stripe, PayPal, free), redirect immediately
200
- if (
201
- checkoutResponse.value.payment_type === "redirect" ||
202
- checkoutResponse.value.payment_type === "free"
199
+ // Free order (100%-off coupon): the backend already marked the invoice
200
+ // paid and returns payer_action: null (NO gateway). Send the user to the
201
+ // confirmation/success URL with the invoice id appended, so the
202
+ // confirmation page can read it — never redirect to a null payer_action.
203
+ if (checkoutResponse.value.payment_type === "free") {
204
+ const invId =
205
+ (data.order?.invoice_id ?? data.order?.reference ?? "") as string;
206
+ if (successUrl) {
207
+ const sep = successUrl.includes("?") ? "&" : "?";
208
+ window.location.href = invId
209
+ ? `${successUrl}${sep}invoice_id=${encodeURIComponent(invId)}`
210
+ : successUrl;
211
+ }
212
+ } else if (
213
+ checkoutResponse.value.payment_type === "redirect" &&
214
+ checkoutResponse.value.payer_action
203
215
  ) {
216
+ // Stripe / PayPal — redirect to the gateway.
204
217
  window.location.href = checkoutResponse.value.payer_action;
205
218
  }
206
219
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",