diff options
author | dartcafe <github@dartcafe.de> | 2022-09-20 00:49:13 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2022-09-20 00:49:13 +0300 |
commit | cbae190ac89f4b2d0499adbf217b43ad2061fe17 (patch) | |
tree | e3374c4fcfb29587dbd3e96281a523fc96e2d1b2 | |
parent | 7bdae4a335dbf6c6d93f570ad40a1e5e64b2cd07 (diff) |
temporarily fix $copyText in NcActionButton
Signed-off-by: dartcafe <github@dartcafe.de>
-rw-r--r-- | src/js/components/Shares/SharesList.vue | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/js/components/Shares/SharesList.vue b/src/js/components/Shares/SharesList.vue index 426a0e37..bf946117 100644 --- a/src/js/components/Shares/SharesList.vue +++ b/src/js/components/Shares/SharesList.vue @@ -86,12 +86,12 @@ {{ share.type === 'user' ? t('polls', 'Grant poll admin access') : t('polls', 'Withdraw poll admin access') }} </NcActionButton> - <NcActionButton @click="copyLink( { url: share.URL })"> + <!-- <NcActionButton @click="copyLink({ url: share.URL })"> <template #icon> <ClippyIcon /> </template> {{ t('polls', 'Copy link to clipboard') }} - </NcActionButton> + </NcActionButton> --> <NcActionCaption v-if="share.type === 'public'" :title="t('polls', 'Options for the registration dialog')" /> <NcActionRadio v-if="share.type === 'public'" name="publicPollEmail" @@ -116,6 +116,11 @@ </NcActionRadio> </NcActions> + <NcButton v-tooltip="t('polls', 'Copy link to clipboard')" type="tertiary" @click="copyLink({ url: share.URL })"> + <template #icon> + <ClippyIcon /> + </template> + </NcButton> <ActionDelete :title="t('polls', 'Remove share')" @delete="removeShare({ share })" /> </UserItem> @@ -127,7 +132,7 @@ <script> import { mapGetters, mapActions, mapState } from 'vuex' import { showSuccess, showError } from '@nextcloud/dialogs' -import { NcActions, NcActionButton, NcActionCaption, NcActionRadio } from '@nextcloud/vue' +import { NcActions, NcActionButton, NcButton, NcActionCaption, NcActionRadio } from '@nextcloud/vue' import ActionDelete from '../Actions/ActionDelete.vue' import ConfigBox from '../Base/ConfigBox.vue' import VotedIcon from 'vue-material-design-icons/CheckboxMarked.vue' @@ -152,8 +157,9 @@ export default { NcActions, NcActionButton, NcActionCaption, - ActionDelete, NcActionRadio, + NcButton, + ActionDelete, ConfigBox, SharePublicAdd, ShareItemAllUsers, @@ -193,9 +199,9 @@ export default { } }, - async copyLink(payload) { + copyLink(payload) { try { - await this.$copyText(payload.url) + this.$copyText(payload.url) showSuccess(t('polls', 'Link copied to clipboard')) } catch { showError(t('polls', 'Error while copying link to clipboard')) |