@mundogamernetwork/shared-ui 1.8.22 → 1.8.23
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/components/keys/KeyBrowser.vue +10 -10
- package/components/keys/KeyCampaignDashboardCard.vue +2 -2
- package/components/keys/KeyRevealModal.vue +2 -2
- package/package.json +1 -1
- package/pages/key-campaigns/key-materials.vue +2 -2
- package/pages/key-campaigns/redeem-key-approved.vue +8 -11
- package/pages/key-campaigns/redeem-key.vue +2 -6
- package/pages/keys/index.vue +1 -1
- package/utils/navigation.ts +26 -0
|
@@ -399,7 +399,7 @@ function statusColor(slug: string): string {
|
|
|
399
399
|
&__auth-wall {
|
|
400
400
|
padding: 40px;
|
|
401
401
|
text-align: center;
|
|
402
|
-
color: var(--
|
|
402
|
+
color: var(--secondary-info-fg);
|
|
403
403
|
display: flex;
|
|
404
404
|
flex-direction: column;
|
|
405
405
|
align-items: center;
|
|
@@ -430,7 +430,7 @@ function statusColor(slug: string): string {
|
|
|
430
430
|
background: none;
|
|
431
431
|
border: none;
|
|
432
432
|
border-bottom: 2px solid transparent;
|
|
433
|
-
color: var(--
|
|
433
|
+
color: var(--secondary-info-fg);
|
|
434
434
|
cursor: pointer;
|
|
435
435
|
display: flex;
|
|
436
436
|
align-items: center;
|
|
@@ -455,7 +455,7 @@ function statusColor(slug: string): string {
|
|
|
455
455
|
&__empty {
|
|
456
456
|
padding: 40px;
|
|
457
457
|
text-align: center;
|
|
458
|
-
color: var(--
|
|
458
|
+
color: var(--secondary-info-fg);
|
|
459
459
|
font-size: 0.9rem;
|
|
460
460
|
}
|
|
461
461
|
|
|
@@ -484,13 +484,13 @@ function statusColor(slug: string): string {
|
|
|
484
484
|
|
|
485
485
|
&__pool-availability { font-size: 0.82rem; }
|
|
486
486
|
&__avail-ok { color: var(--success, #22c55e); }
|
|
487
|
-
&__avail-empty { color: var(--
|
|
487
|
+
&__avail-empty { color: var(--secondary-info-fg); }
|
|
488
488
|
|
|
489
489
|
&__platform-sel { display: flex; flex-direction: column; gap: 6px; }
|
|
490
490
|
|
|
491
491
|
&__label {
|
|
492
492
|
font-size: 0.75rem;
|
|
493
|
-
color: var(--
|
|
493
|
+
color: var(--secondary-info-fg);
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
&__platform-chips {
|
|
@@ -503,7 +503,7 @@ function statusColor(slug: string): string {
|
|
|
503
503
|
padding: 4px 10px;
|
|
504
504
|
font-size: 0.78rem;
|
|
505
505
|
border: 1px solid var(--border-color, #2a2a2a);
|
|
506
|
-
color: var(--
|
|
506
|
+
color: var(--secondary-info-fg);
|
|
507
507
|
cursor: pointer;
|
|
508
508
|
transition: border-color 0.15s, color 0.15s;
|
|
509
509
|
|
|
@@ -577,7 +577,7 @@ function statusColor(slug: string): string {
|
|
|
577
577
|
|
|
578
578
|
&__request-platform {
|
|
579
579
|
font-size: 0.78rem;
|
|
580
|
-
color: var(--
|
|
580
|
+
color: var(--secondary-info-fg);
|
|
581
581
|
}
|
|
582
582
|
|
|
583
583
|
&__status-chip {
|
|
@@ -613,7 +613,7 @@ function statusColor(slug: string): string {
|
|
|
613
613
|
|
|
614
614
|
&__pending-label {
|
|
615
615
|
font-size: 0.8rem;
|
|
616
|
-
color: var(--
|
|
616
|
+
color: var(--secondary-info-fg);
|
|
617
617
|
font-style: italic;
|
|
618
618
|
}
|
|
619
619
|
|
|
@@ -647,7 +647,7 @@ function statusColor(slug: string): string {
|
|
|
647
647
|
p {
|
|
648
648
|
margin: 0;
|
|
649
649
|
font-size: 0.82rem;
|
|
650
|
-
color: var(--
|
|
650
|
+
color: var(--secondary-info-fg);
|
|
651
651
|
line-height: 1.4;
|
|
652
652
|
}
|
|
653
653
|
}
|
|
@@ -664,7 +664,7 @@ function statusColor(slug: string): string {
|
|
|
664
664
|
font-weight: 600;
|
|
665
665
|
border: 1px solid var(--border-color, #2a2a2a);
|
|
666
666
|
background: none;
|
|
667
|
-
color: var(--
|
|
667
|
+
color: var(--secondary-info-fg);
|
|
668
668
|
cursor: pointer;
|
|
669
669
|
transition: opacity 0.15s, border-color 0.15s, color 0.15s;
|
|
670
670
|
|
|
@@ -370,7 +370,7 @@ const detailRoute = computed(() =>
|
|
|
370
370
|
|
|
371
371
|
&__days {
|
|
372
372
|
font-size: 11px;
|
|
373
|
-
color: var(--
|
|
373
|
+
color: var(--secondary-info-fg);
|
|
374
374
|
}
|
|
375
375
|
|
|
376
376
|
&__type {
|
|
@@ -401,7 +401,7 @@ const detailRoute = computed(() =>
|
|
|
401
401
|
font-weight: 600;
|
|
402
402
|
padding: 2px 6px;
|
|
403
403
|
border: 1px solid var(--border-color, rgba(255,255,255,0.2));
|
|
404
|
-
color: var(--
|
|
404
|
+
color: var(--secondary-info-fg);
|
|
405
405
|
text-transform: uppercase;
|
|
406
406
|
letter-spacing: 0.4px;
|
|
407
407
|
}
|
|
@@ -77,7 +77,7 @@ function copyCode() {
|
|
|
77
77
|
|
|
78
78
|
&__sub {
|
|
79
79
|
font-size: 0.88rem;
|
|
80
|
-
color: var(--
|
|
80
|
+
color: var(--secondary-info-fg);
|
|
81
81
|
margin: 0;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -112,7 +112,7 @@ function copyCode() {
|
|
|
112
112
|
&__copy {
|
|
113
113
|
background: none;
|
|
114
114
|
border: none;
|
|
115
|
-
color: var(--
|
|
115
|
+
color: var(--secondary-info-fg);
|
|
116
116
|
cursor: pointer;
|
|
117
117
|
font-size: 1.1rem;
|
|
118
118
|
padding: 4px;
|
package/package.json
CHANGED
|
@@ -306,9 +306,9 @@ function toggleBox(boxNumber: number) {
|
|
|
306
306
|
function goBack() {
|
|
307
307
|
if (props.goBackPage) {
|
|
308
308
|
window.location.href = props.goBackPage
|
|
309
|
-
|
|
310
|
-
window.history.back()
|
|
309
|
+
return
|
|
311
310
|
}
|
|
311
|
+
goBackWithin("/key-campaigns")
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
function handleSuccessClose() {
|
|
@@ -191,11 +191,7 @@ function goToLogin() {
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
function goBack() {
|
|
194
|
-
|
|
195
|
-
window.history.back()
|
|
196
|
-
} else {
|
|
197
|
-
navigateTo(`/${locale.value}/key-campaigns`)
|
|
198
|
-
}
|
|
194
|
+
goBackWithin(`/${locale.value}/key-campaigns`)
|
|
199
195
|
}
|
|
200
196
|
</script>
|
|
201
197
|
|
|
@@ -580,7 +576,7 @@ function goBack() {
|
|
|
580
576
|
|
|
581
577
|
.embargo-warning-text {
|
|
582
578
|
strong { display: block; color: var(--danger, #e53935); font-size: 14px; margin-bottom: 4px; }
|
|
583
|
-
p { margin: 0; font-size: 13px; color: var(--
|
|
579
|
+
p { margin: 0; font-size: 13px; color: var(--secondary-info-fg); }
|
|
584
580
|
|
|
585
581
|
.embargo-countdown {
|
|
586
582
|
margin-top: 4px;
|
|
@@ -628,11 +624,12 @@ function goBack() {
|
|
|
628
624
|
gap: 8px;
|
|
629
625
|
font-size: 13px;
|
|
630
626
|
cursor: pointer;
|
|
631
|
-
//
|
|
632
|
-
//
|
|
633
|
-
//
|
|
634
|
-
//
|
|
635
|
-
|
|
627
|
+
// The one thing the user has to read before agreeing to it. This
|
|
628
|
+
// used to reference --text-secondary, which is defined nowhere in
|
|
629
|
+
// the ecosystem, so it always fell back to #ccc — fine on dark,
|
|
630
|
+
// invisible on the light-mode pink. --secondary-info-fg is the real
|
|
631
|
+
// token and is themed in both _light.scss and _dark.scss.
|
|
632
|
+
color: var(--secondary-info-fg);
|
|
636
633
|
|
|
637
634
|
input {
|
|
638
635
|
margin-top: 2px;
|
|
@@ -246,11 +246,7 @@ function goBack() {
|
|
|
246
246
|
navigateTo(campaignPath.value)
|
|
247
247
|
return
|
|
248
248
|
}
|
|
249
|
-
|
|
250
|
-
window.history.back()
|
|
251
|
-
} else {
|
|
252
|
-
navigateTo(`/${locale.value}/key-campaigns`)
|
|
253
|
-
}
|
|
249
|
+
goBackWithin(`/${locale.value}/key-campaigns`)
|
|
254
250
|
}
|
|
255
251
|
|
|
256
252
|
onUnmounted(() => {
|
|
@@ -535,7 +531,7 @@ onUnmounted(() => {
|
|
|
535
531
|
// Same omission as the reveal screen: no colour meant the text the
|
|
536
532
|
// user has to agree to inherited whatever the surrounding card left
|
|
537
533
|
// behind, and came out unreadable on dark.
|
|
538
|
-
color: var(--
|
|
534
|
+
color: var(--secondary-info-fg);
|
|
539
535
|
|
|
540
536
|
input {
|
|
541
537
|
flex-shrink: 0;
|
package/pages/keys/index.vue
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Go back without falling out of the app.
|
|
3
|
+
*
|
|
4
|
+
* `window.history.length > 1` is the wrong test: it counts the whole tab
|
|
5
|
+
* session, so a user who landed here from a Google result has length 2 and
|
|
6
|
+
* `history.back()` returns them to Google. Same for an email link, a Discord
|
|
7
|
+
* link, or anything else external.
|
|
8
|
+
*
|
|
9
|
+
* Vue Router records the previous in-app entry in `history.state.back`. It is
|
|
10
|
+
* only set when the navigation happened inside the SPA, which is exactly the
|
|
11
|
+
* condition under which going back is safe. Anything else falls through to an
|
|
12
|
+
* explicit route.
|
|
13
|
+
*/
|
|
14
|
+
export function goBackWithin(fallbackPath: string): void {
|
|
15
|
+
if (typeof window === "undefined") return
|
|
16
|
+
|
|
17
|
+
const router = useRouter()
|
|
18
|
+
const previous = (router.options.history.state as Record<string, unknown> | undefined)?.back
|
|
19
|
+
|
|
20
|
+
if (typeof previous === "string" && previous.length > 0) {
|
|
21
|
+
router.back()
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
navigateTo(fallbackPath)
|
|
26
|
+
}
|