diff options
author | René Gieling <github@dartcafe.de> | 2021-05-31 18:23:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-31 18:23:36 +0300 |
commit | b2a5c6f0e39c3385338d27ec7f7bce1deea5cdbc (patch) | |
tree | 47015762dd8e6b5dd48b50d9cd423d7bbcefb484 /src | |
parent | e334e9f293323c51b4bf9fef7699586be422f88a (diff) | |
parent | ba601f318251705955b6cc7e25c97da9bccacfba (diff) |
Merge pull request #1673 from nextcloud/enh/predefine-public-user
Allow URL-Parameters for username and email address in public share
Diffstat (limited to 'src')
-rw-r--r-- | src/js/components/Poll/PublicRegisterModal.vue | 12 | ||||
-rw-r--r-- | src/js/components/Shares/SharesPublic.vue | 3 |
2 files changed, 12 insertions, 3 deletions
diff --git a/src/js/components/Poll/PublicRegisterModal.vue b/src/js/components/Poll/PublicRegisterModal.vue index fd4bfdb8..097ff594 100644 --- a/src/js/components/Poll/PublicRegisterModal.vue +++ b/src/js/components/Poll/PublicRegisterModal.vue @@ -207,8 +207,16 @@ export default { }, mounted() { - this.userName = this.share.displayName - this.emailAddress = this.share.emailAddress + if (this.$route.name === 'publicVote' && this.$route.query.name) { + this.userName = this.$route.query.name + } else { + this.userName = this.share.displayName + } + if (this.$route.name === 'publicVote' && this.$route.query.email) { + this.emailAddress = this.$route.query.email + } else { + this.emailAddress = this.share.emailAddress + } }, methods: { diff --git a/src/js/components/Shares/SharesPublic.vue b/src/js/components/Shares/SharesPublic.vue index de5451a3..d28959f9 100644 --- a/src/js/components/Shares/SharesPublic.vue +++ b/src/js/components/Shares/SharesPublic.vue @@ -21,7 +21,7 @@ --> <template> - <ConfigBox :title="t('polls', 'Public shares')" icon-class="icon-public"> + <ConfigBox v-tooltip.auto="paramsHint" :title="t('polls', 'Public shares')" icon-class="icon-public"> <TransitionGroup :css="false" tag="div" class="shared-list"> <PublicShareItem v-for="(share) in publicShares" :key="share.id" @@ -68,6 +68,7 @@ export default { successText: t('polls', 'Link copied to clipboard'), errorText: t('polls', 'Error while copying link to clipboard'), }, + paramsHint: t('polls', 'Add URL-Paramters \'name=\' and/or \'email=\' to predefine name and email address. I.e. https://example.com/s/aUubZAvweQ6PaX2?name=John Doe&email=johndoe@example.org'), } }, |