@mundogamernetwork/shared-ui 1.1.91 → 1.1.93

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.
@@ -756,6 +756,13 @@ body:has(.kit-press) {
756
756
  scrollbar-width: none;
757
757
  }
758
758
  .kit-anchornav-inner::-webkit-scrollbar { display: none; }
759
+ /* Trailing spacer so the last item isn't clipped by the overflow container */
760
+ .kit-anchornav-inner::after {
761
+ content: '';
762
+ display: block;
763
+ min-width: 24px;
764
+ flex-shrink: 0;
765
+ }
759
766
  .kit-anchornav-item {
760
767
  display: inline-block;
761
768
  padding: 14px 16px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.1.91",
3
+ "version": "1.1.93",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { ref, computed, inject, onMounted } from "vue"
2
+ import { ref, computed, inject, onMounted, unref } from "vue"
3
3
  import { useNuxtApp, useRoute, useAsyncData, navigateTo } from "#app"
4
4
  import {
5
5
  fetchCampaignBySlug,
@@ -476,7 +476,7 @@ const tierLabel = computed(() => {
476
476
  // Auth guard for CTA actions
477
477
  // ------------------------------------------------------------------
478
478
  function requireAuth(targetPath: string) {
479
- if (currentUser) {
479
+ if (unref(currentUser)) {
480
480
  navigateTo(targetPath)
481
481
  return
482
482
  }
@@ -497,7 +497,7 @@ const showUsersModal = ref(false)
497
497
  onMounted(async () => {
498
498
  updateCountdown()
499
499
 
500
- if (currentUser && campaign.value?.id) {
500
+ if (unref(currentUser) && campaign.value?.id) {
501
501
  try {
502
502
  const response = await fetchMyRequests({ "filter[key_id]": campaign.value.id })
503
503
  const requests = response?.data?.data
@@ -187,7 +187,7 @@
187
187
  </template>
188
188
 
189
189
  <script setup lang="ts">
190
- import { ref, inject, onMounted } from "vue"
190
+ import { ref, inject, onMounted, unref } from "vue"
191
191
  import { useRoute, useRouter } from "vue-router"
192
192
  import { useI18n } from "#imports"
193
193
  import { submitMaterial, fetchMaterialsByRequest } from "../../services/campaignService"
@@ -312,8 +312,7 @@ const submitForm = async () => {
312
312
  for (const form of forms.value) {
313
313
  await submitMaterial({
314
314
  key_request_id: requestId.value,
315
- user_id: currentUserId,
316
- status: true,
315
+ user_id: unref(currentUserId),
317
316
  content_types: form.content_types.map((type) => contentTypesMap[type]),
318
317
  material_url: form.material_url,
319
318
  description: form.description,
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { ref, inject, onMounted } from "vue"
2
+ import { ref, inject, onMounted, unref } from "vue"
3
3
  import { useRoute, navigateTo } from "#app"
4
4
  import { useNuxtApp } from "#app"
5
5
  import { revealKey, fetchKeyRequestById } from "../../services/campaignService"
@@ -47,7 +47,7 @@ const redeemUrl = computed(() => {
47
47
  })
48
48
 
49
49
  onMounted(async () => {
50
- if (!currentUser) {
50
+ if (!unref(currentUser)) {
51
51
  const returnTo = typeof window !== "undefined" ? window.location.href : ""
52
52
  navigateTo(`${loginUrl}?redirect_to=${encodeURIComponent(returnTo)}`, { external: true })
53
53
  return
@@ -1,5 +1,5 @@
1
1
  <script lang="ts" setup>
2
- import { ref, computed, inject, onMounted } from "vue"
2
+ import { ref, computed, inject, onMounted, unref } from "vue"
3
3
  import { useRoute, navigateTo } from "#app"
4
4
  import { useNuxtApp } from "#app"
5
5
  import {
@@ -46,7 +46,7 @@ function clampQuantity() {
46
46
  }
47
47
 
48
48
  onMounted(async () => {
49
- if (!currentUser) {
49
+ if (!unref(currentUser)) {
50
50
  const returnTo = typeof window !== "undefined" ? window.location.href : ""
51
51
  navigateTo(`${loginUrl}?redirect_to=${encodeURIComponent(returnTo)}`, { external: true })
52
52
  return
@@ -96,6 +96,15 @@ function scrollToTop() {
96
96
  window.scrollTo({ top: 0, behavior: 'smooth' });
97
97
  }
98
98
 
99
+ function scrollToSection(id: string) {
100
+ const el = document.getElementById(id);
101
+ if (!el) return;
102
+ const nav = document.querySelector('.kit-anchornav') as HTMLElement | null;
103
+ const offset = nav ? nav.offsetHeight : 52;
104
+ const top = el.getBoundingClientRect().top + window.scrollY - offset;
105
+ window.scrollTo({ top, behavior: 'smooth' });
106
+ }
107
+
99
108
  onMounted(() => {
100
109
  const hero = document.querySelector('.kit-cover') as HTMLElement | null;
101
110
  heroHeight = hero ? hero.offsetHeight : 300;
@@ -119,7 +128,7 @@ const navSections = computed(() => {
119
128
  if (coverage.value.length) s.push({ id: 'creators', label: 'kit.press.coverage' });
120
129
  if (awards.value.length) s.push({ id: 'awards', label: 'kit.press.awards' });
121
130
  if (team.value.length) s.push({ id: 'team', label: 'kit.press.team' });
122
- if (showcases.value.length) s.push({ id: 'events', label: 'kit.press.showcases' });
131
+ if (hasEcosystem.value) s.push({ id: 'events', label: 'kit.press.showcases' });
123
132
  if (k.press_contact_email) s.push({ id: 'contact', label: 'kit.press.contact' });
124
133
  return s;
125
134
  });
@@ -221,6 +230,7 @@ useSeoMeta({
221
230
  :key="s.id"
222
231
  :href="`#${s.id}`"
223
232
  class="kit-anchornav-item"
233
+ @click.prevent="scrollToSection(s.id)"
224
234
  >{{ $te(s.label) ? $t(s.label) : s.label }}</a>
225
235
  </div>
226
236
  </nav>