@mundogamernetwork/shared-ui 1.1.40 → 1.1.42
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
|
@@ -4,6 +4,8 @@ import { useRoute, useRouter } from "vue-router";
|
|
|
4
4
|
// Explicit import: relying on Nuxt auto-import for this layer-shipped store
|
|
5
5
|
// fails in some fronts' SSR builds ("useMagazineStore is not defined" -> 500).
|
|
6
6
|
import { useMagazineStore } from "../../../stores/magazine";
|
|
7
|
+
import { useInstitutionalStore } from "../../../stores/institutional";
|
|
8
|
+
import { useAuthStore } from "../../../stores/auth";
|
|
7
9
|
|
|
8
10
|
useSeoMeta({
|
|
9
11
|
title: "MGN Magazine",
|
|
@@ -7,6 +7,8 @@ import { getMagazinePageHotspots } from "../../../utils/magazineHotspots";
|
|
|
7
7
|
// Nuxt auto-import for it fails in some consuming fronts' SSR builds (the new
|
|
8
8
|
// store isn't always registered), throwing "useMagazineStore is not defined".
|
|
9
9
|
import { useMagazineStore } from "../../../stores/magazine";
|
|
10
|
+
import { useInstitutionalStore } from "../../../stores/institutional";
|
|
11
|
+
import { useAuthStore } from "../../../stores/auth";
|
|
10
12
|
|
|
11
13
|
useSeoMeta({
|
|
12
14
|
title: "MGN Magazine",
|
|
@@ -397,9 +399,9 @@ const accountsRegisterUrl = computed(() => {
|
|
|
397
399
|
<section v-else>
|
|
398
400
|
<ClientOnly>
|
|
399
401
|
<MgnFlipbook
|
|
400
|
-
v-if="flipbookPages.length > 0 || magazine.data.pdf_url_src"
|
|
402
|
+
v-if="flipbookPages.length > 0 || ((magazinePages.status === 'success' || magazinePages.status === 'error') && magazine.data.pdf_url_src)"
|
|
401
403
|
:pages="flipbookPages.length > 0 ? flipbookPages : undefined"
|
|
402
|
-
:pdf-url="magazine.data.pdf_url_src"
|
|
404
|
+
:pdf-url="flipbookPages.length > 0 ? undefined : magazine.data.pdf_url_src"
|
|
403
405
|
:start-page="startPage"
|
|
404
406
|
:enable-sound="true"
|
|
405
407
|
:enable-zoom="true"
|
|
@@ -416,7 +418,7 @@ const accountsRegisterUrl = computed(() => {
|
|
|
416
418
|
</template>
|
|
417
419
|
</ClientOnly>
|
|
418
420
|
<div
|
|
419
|
-
v-if="!flipbookPages.length &&
|
|
421
|
+
v-if="!flipbookPages.length && (magazinePages.status === 'pending' || magazinePages.status === 'init')"
|
|
420
422
|
>
|
|
421
423
|
<MagazineFlipBookSkelectonLoading />
|
|
422
424
|
</div>
|
package/pages/magazine/index.vue
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref, onMounted } from "vue";
|
|
3
3
|
import { storeToRefs } from "pinia";
|
|
4
|
+
// Explicit store imports: relying on Nuxt auto-import for these layer-shipped
|
|
5
|
+
// stores fails in some consuming fronts' builds (undefined store -> "_s" crash).
|
|
6
|
+
import { useInstitutionalStore } from "../../stores/institutional";
|
|
7
|
+
import { useAuthStore } from "../../stores/auth";
|
|
4
8
|
|
|
5
9
|
const locale = useNuxtApp().$i18n.locale;
|
|
6
10
|
|