Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2022-09-21 21:02:15 +0300
committerdartcafe <github@dartcafe.de>2022-09-21 21:02:15 +0300
commitd69ca6e0c75f16bcb19ddd220018c2db983023ff (patch)
tree99a7e49f8662ae2ba103b916e030526d279725fd
parentcbae190ac89f4b2d0499adbf217b43ad2061fe17 (diff)
remove vue-clipboard2
Signed-off-by: dartcafe <github@dartcafe.de>
-rw-r--r--package-lock.json83
-rw-r--r--package.json1
-rw-r--r--src/js/components/Shares/SharesList.vue19
-rw-r--r--src/js/components/User/UserMenu.vue9
-rw-r--r--src/js/main.js2
5 files changed, 15 insertions, 99 deletions
diff --git a/package-lock.json b/package-lock.json
index 84597bee..34601529 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -28,7 +28,6 @@
"nextcloud-vue-collections": "^0.10.0",
"v-click-outside": "^3.2.0",
"vue": "^2.7.3",
- "vue-clipboard2": "^0.3.3",
"vue-material-design-icons": "^5.1.2",
"vue-router": "^3.6.5",
"vuedraggable": "^2.24.3",
@@ -3866,16 +3865,6 @@
"resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz",
"integrity": "sha512-kgMuFyE78OC6Dyu3Dy7vcx4uy97EIbVxJB/B0eJ3bUNAkwdNcxYzgKltnyADiYwsR7SEqkkUPsEUT//OVS6XMA=="
},
- "node_modules/clipboard": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
- "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
- "dependencies": {
- "good-listener": "^1.2.2",
- "select": "^1.1.2",
- "tiny-emitter": "^2.0.0"
- }
- },
"node_modules/clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
@@ -4506,11 +4495,6 @@
"node": ">=0.4.0"
}
},
- "node_modules/delegate": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
- "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
- },
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -6331,14 +6315,6 @@
"dev": true,
"peer": true
},
- "node_modules/good-listener": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
- "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
- "dependencies": {
- "delegate": "^3.1.2"
- }
- },
"node_modules/graceful-fs": {
"version": "4.2.10",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
@@ -9835,11 +9811,6 @@
"resolved": "https://registry.npmjs.org/scrollparent/-/scrollparent-2.0.1.tgz",
"integrity": "sha512-HSdN78VMvFCSGCkh0oYX/tY4R3P1DW61f8+TeZZ4j2VLgfwvw0bpRSOv4PCVKisktIwbzHCfZsx+rLbbDBqIBA=="
},
- "node_modules/select": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
- "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
- },
"node_modules/select-hose": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -10981,11 +10952,6 @@
"node": ">=0.6.0"
}
},
- "node_modules/tiny-emitter": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
- "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
- },
"node_modules/tinycolor2": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",
@@ -11351,14 +11317,6 @@
"csstype": "^3.1.0"
}
},
- "node_modules/vue-clipboard2": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
- "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
- "dependencies": {
- "clipboard": "^2.0.0"
- }
- },
"node_modules/vue-color": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/vue-color/-/vue-color-2.8.1.tgz",
@@ -15181,16 +15139,6 @@
"resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz",
"integrity": "sha512-kgMuFyE78OC6Dyu3Dy7vcx4uy97EIbVxJB/B0eJ3bUNAkwdNcxYzgKltnyADiYwsR7SEqkkUPsEUT//OVS6XMA=="
},
- "clipboard": {
- "version": "2.0.11",
- "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz",
- "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
- "requires": {
- "good-listener": "^1.2.2",
- "select": "^1.1.2",
- "tiny-emitter": "^2.0.0"
- }
- },
"clone": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
@@ -15695,11 +15643,6 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="
},
- "delegate": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz",
- "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
- },
"depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -17091,14 +17034,6 @@
"dev": true,
"peer": true
},
- "good-listener": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz",
- "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
- "requires": {
- "delegate": "^3.1.2"
- }
- },
"graceful-fs": {
"version": "4.2.10",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz",
@@ -19717,11 +19652,6 @@
"resolved": "https://registry.npmjs.org/scrollparent/-/scrollparent-2.0.1.tgz",
"integrity": "sha512-HSdN78VMvFCSGCkh0oYX/tY4R3P1DW61f8+TeZZ4j2VLgfwvw0bpRSOv4PCVKisktIwbzHCfZsx+rLbbDBqIBA=="
},
- "select": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz",
- "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
- },
"select-hose": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
@@ -20631,11 +20561,6 @@
"setimmediate": "^1.0.4"
}
},
- "tiny-emitter": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
- "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
- },
"tinycolor2": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz",
@@ -20929,14 +20854,6 @@
"csstype": "^3.1.0"
}
},
- "vue-clipboard2": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz",
- "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==",
- "requires": {
- "clipboard": "^2.0.0"
- }
- },
"vue-color": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/vue-color/-/vue-color-2.8.1.tgz",
diff --git a/package.json b/package.json
index fd67c5f1..8dc59ca8 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,6 @@
"nextcloud-vue-collections": "^0.10.0",
"v-click-outside": "^3.2.0",
"vue": "^2.7.3",
- "vue-clipboard2": "^0.3.3",
"vue-material-design-icons": "^5.1.2",
"vue-router": "^3.6.5",
"vuedraggable": "^2.24.3",
diff --git a/src/js/components/Shares/SharesList.vue b/src/js/components/Shares/SharesList.vue
index bf946117..6a7dc447 100644
--- a/src/js/components/Shares/SharesList.vue
+++ b/src/js/components/Shares/SharesList.vue
@@ -29,6 +29,7 @@
<UserSearch class="add-share" />
<ShareItemAllUsers v-if="allowAllAccess" />
<SharePublicAdd v-if="allowPublicShares" />
+
<div v-if="invitationShares.length" class="shares-list shared">
<TransitionGroup :css="false" tag="div">
<UserItem v-for="(share) in invitationShares"
@@ -86,13 +87,15 @@
{{ 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"
value="optional"
@@ -100,6 +103,7 @@
@change="setPublicPollEmail({ share, value: 'optional' })">
{{ t('polls', 'Email address is optional') }}
</NcActionRadio>
+
<NcActionRadio v-if="share.type === 'public'"
name="publicPollEmail"
value="mandatory"
@@ -107,6 +111,7 @@
@change="setPublicPollEmail({ share, value: 'mandatory' })">
{{ t('polls', 'Email address is mandatory') }}
</NcActionRadio>
+
<NcActionRadio v-if="share.type === 'public'"
name="publicPollEmail"
value="disabled"
@@ -116,11 +121,6 @@
</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>
@@ -132,7 +132,7 @@
<script>
import { mapGetters, mapActions, mapState } from 'vuex'
import { showSuccess, showError } from '@nextcloud/dialogs'
-import { NcActions, NcActionButton, NcButton, NcActionCaption, NcActionRadio } from '@nextcloud/vue'
+import { NcActions, NcActionButton, 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'
@@ -158,7 +158,6 @@ export default {
NcActionButton,
NcActionCaption,
NcActionRadio,
- NcButton,
ActionDelete,
ConfigBox,
SharePublicAdd,
@@ -201,7 +200,7 @@ export default {
copyLink(payload) {
try {
- this.$copyText(payload.url)
+ navigator.clipboard.writeText(payload.url)
showSuccess(t('polls', 'Link copied to clipboard'))
} catch {
showError(t('polls', 'Error while copying link to clipboard'))
diff --git a/src/js/components/User/UserMenu.vue b/src/js/components/User/UserMenu.vue
index 10ee722c..0f0daa43 100644
--- a/src/js/components/User/UserMenu.vue
+++ b/src/js/components/User/UserMenu.vue
@@ -25,7 +25,10 @@
<template #icon>
<SettingsIcon :size="20" decorative />
</template>
- <NcActionButton v-if="$route.name === 'publicVote'" icon="icon-md-link" @click="copyLink()">
+ <NcActionButton v-if="$route.name === 'publicVote'" @click="copyLink()">
+ <template #icon>
+ <ClippyIcon />
+ </template>
{{ t('polls', 'Copy your personal link to clipboard') }}
</NcActionButton>
<NcActionSeparator v-if="$route.name === 'publicVote'" />
@@ -318,7 +321,7 @@ export default {
async copyLink() {
try {
- await this.$copyText(this.personalLink)
+ await navigator.clipboard.writeText(this.personalLink)
showSuccess(t('polls', 'Link copied to clipboard'))
} catch {
showError(t('polls', 'Error while copying link to clipboard'))
@@ -328,7 +331,7 @@ export default {
async getAddresses() {
try {
const response = await this.$store.dispatch('poll/getParticipantsEmailAddresses')
- await this.$copyText(response.data.map((item) => item.combined))
+ await navigator.clipboard.writeText(response.data.map((item) => item.combined))
showSuccess(t('polls', 'Link copied to clipboard'))
} catch {
showError(t('polls', 'Error while copying link to clipboard'))
diff --git a/src/js/main.js b/src/js/main.js
index 8282ea5f..9ef4fc8b 100644
--- a/src/js/main.js
+++ b/src/js/main.js
@@ -27,7 +27,6 @@ import { sync } from 'vuex-router-sync'
import store from './store/index.js'
import router from './router.js'
import ClickOutside from 'v-click-outside'
-import VueClipboard from 'vue-clipboard2'
import { getRequestToken, getCurrentUser } from '@nextcloud/auth'
import { translate, translatePlural } from '@nextcloud/l10n'
import { generateFilePath } from '@nextcloud/router'
@@ -55,7 +54,6 @@ Vue.component('UserItem', UserItem)
Vue.directive('tooltip', Tooltip)
Vue.use(ClickOutside)
-Vue.use(VueClipboard)
/* eslint-disable-next-line no-new */
new Vue({