Skip to content

Commit

Permalink
fix(shares): Provide hidden element isPublic on public shares.
Browse files Browse the repository at this point in the history
Fixes isPublic detection in Text editor on public shares.

Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Aug 14, 2024
1 parent f8a552d commit a0215d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/Collectives.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

<template>
<NcContent app-name="collectives">
<input v-if="isPublic"
id="isPublic"
type="hidden"
name="isPublic"
value="1">
<input v-if="isPublic"
id="sharingToken"
type="hidden"
Expand Down
10 changes: 8 additions & 2 deletions src/components/CollectivePrint.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@

<template>
<div>
<input id="sharingToken"
<input v-if="isPublic"
id="isPublic"
type="hidden"
name="isPublic"
value="1">
<input v-if="isPublic"
id="sharingToken"
type="hidden"
name="sharingToken"
:value="shareTokenParam">
Expand Down Expand Up @@ -76,7 +82,7 @@ export default {
},
computed: {
...mapState(useRootStore, ['shareTokenParam']),
...mapState(useRootStore, ['isPublic', 'shareTokenParam']),
...mapState(useCollectivesStore, ['currentCollective']),
...mapState(usePagesStore, ['pagesTreeWalk']),
Expand Down

0 comments on commit a0215d7

Please sign in to comment.