Skip to content

Commit

Permalink
feat: initial pass at improving "embed" mode URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwegner committed Nov 28, 2023
1 parent f470b89 commit e46d2d6
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions packages/widget-reader/src/ReaderWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,19 @@
:skip="urn === null"
>
<template v-slot="{ result: { data } }">
<Paginator :urn="data && data.previous" :direction="pagerPrevious" />
<Paginator
v-if="showPagination"
:urn="data && data.previous"
:direction="pagerPrevious"
/>

<component :is="readerComponent" :query-variables="queryVariables" />

<Paginator :urn="data && data.next" :direction="pagerNext" />
<Paginator
v-if="showPagination"
:urn="data && data.next"
:direction="pagerNext"
/>
</template>
</ApolloQuery>
</section>
Expand Down Expand Up @@ -45,6 +53,11 @@
Paginator,
},
scaifeConfig: {},
data() {
return {
showPagination: true,
}

Check warning on line 59 in packages/widget-reader/src/ReaderWidget.vue

View workflow job for this annotation

GitHub Actions / test

Insert `;`
},
methods: {
setVersionMetadata() {
if (this.urn === null) {
Expand Down Expand Up @@ -165,6 +178,13 @@
return this.textDirection === 'ltr' ? 'right' : 'left';
},
},
mounted() {
if (this.$route.query.iframe === 'y') {
this.showPagination = false;
this.$store.state[MODULE_NS].leftVisible = false;
this.$store.state[MODULE_NS].rightVisible = false;
}
},
};
</script>

Expand Down

0 comments on commit e46d2d6

Please sign in to comment.