summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-12-14 00:50:17 +0000
committerChristopher Ng <chrng8@gmail.com>2022-12-14 00:57:57 +0000
commitfb2fb0d2d523174c8355d47df768ad0b23a68da5 (patch)
tree8d2ea31fd18997e09fa0ab708c41d7aa62027813 /apps/files_sharing/src
parent8a1a32fb09725980463c95a5b04a1d2726079c60 (diff)
downloadnextcloud-server-fb2fb0d2d523174c8355d47df768ad0b23a68da5.tar.gz
nextcloud-server-fb2fb0d2d523174c8355d47df768ad0b23a68da5.zip
Revert "Copy to clipboard with button instead of link"
This reverts commit 4ffc022c8b5d2a4df3b1b1452de769c4ad27fe4f. Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r--apps/files_sharing/src/components/SharingEntryInternal.vue20
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue44
2 files changed, 25 insertions, 39 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryInternal.vue b/apps/files_sharing/src/components/SharingEntryInternal.vue
index 7ad5b35c49f..7fe5d5f2e23 100644
--- a/apps/files_sharing/src/components/SharingEntryInternal.vue
+++ b/apps/files_sharing/src/components/SharingEntryInternal.vue
@@ -9,14 +9,13 @@
<div class="avatar-external icon-external-white" />
</template>
- <NcActionButton :aria-label="t('files_sharing', 'Copy internal link to clipboard')"
+ <NcActionLink :href="internalLink"
+ :aria-label="t('files_sharing', 'Copy internal link to clipboard')"
+ target="_blank"
+ :icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
@click.prevent="copyLink">
- <template #icon>
- <Check v-if="copied && copySuccess" :size="20" />
- <ClipboardTextMultipleOutline v-else :size="20" />
- </template>
{{ clipboardTooltip }}
- </NcActionButton>
+ </NcActionLink>
</SharingEntrySimple>
</ul>
</template>
@@ -24,19 +23,14 @@
<script>
import { generateUrl } from '@nextcloud/router'
import { showSuccess } from '@nextcloud/dialogs'
-import { NcActionButton } from '@nextcloud/vue'
+import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink'
import SharingEntrySimple from './SharingEntrySimple'
-import Check from 'vue-material-design-icons/Check.vue'
-import ClipboardTextMultipleOutline from 'vue-material-design-icons/ClipboardTextMultipleOutline.vue'
-
export default {
name: 'SharingEntryInternal',
components: {
- Check,
- ClipboardTextMultipleOutline,
- NcActionButton,
+ NcActionLink,
SharingEntrySimple,
},
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index 9b60e34b194..524b1279b18 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -38,14 +38,13 @@
<NcActions v-if="share && !isEmailShareType && share.token"
ref="copyButton"
class="sharing-entry__copy">
- <NcActionButton :aria-label="t('files_sharing', 'Copy public link to clipboard')"
+ <NcActionLink :href="shareLink"
+ target="_blank"
+ :aria-label="t('files_sharing', 'Copy public link to clipboard')"
+ :icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
@click.stop.prevent="copyLink">
- <template #icon>
- <Check v-if="copied && copySuccess" :size="20" />
- <ClipboardTextMultipleOutline v-else :size="20" />
- </template>
{{ clipboardTooltip }}
- </NcActionButton>
+ </NcActionLink>
</NcActions>
<!-- pending actions -->
@@ -304,18 +303,16 @@ import { showError, showSuccess } from '@nextcloud/dialogs'
import { Type as ShareTypes } from '@nextcloud/sharing'
import Vue from 'vue'
-import {
- NcActionButton,
- NcActionCheckbox,
- NcActionInput,
- NcActionLink,
- NcActions,
- NcActionSeparator,
- NcActionText,
- NcActionTextEditable,
- NcAvatar,
- Tooltip,
-} from '@nextcloud/vue'
+import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton'
+import NcActionCheckbox from '@nextcloud/vue/dist/Components/NcActionCheckbox'
+import NcActionInput from '@nextcloud/vue/dist/Components/NcActionInput'
+import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink'
+import NcActionText from '@nextcloud/vue/dist/Components/NcActionText'
+import NcActionSeparator from '@nextcloud/vue/dist/Components/NcActionSeparator'
+import NcActionTextEditable from '@nextcloud/vue/dist/Components/NcActionTextEditable'
+import NcActions from '@nextcloud/vue/dist/Components/NcActions'
+import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar'
+import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'
import ExternalShareAction from './ExternalShareAction.vue'
import SharePermissionsEditor from './SharePermissionsEditor.vue'
@@ -323,25 +320,20 @@ import GeneratePassword from '../utils/GeneratePassword.js'
import Share from '../models/Share.js'
import SharesMixin from '../mixins/SharesMixin.js'
-import Check from 'vue-material-design-icons/Check.vue'
-import ClipboardTextMultipleOutline from 'vue-material-design-icons/ClipboardTextMultipleOutline.vue'
-
export default {
name: 'SharingEntryLink',
components: {
- Check,
- ClipboardTextMultipleOutline,
- ExternalShareAction,
+ NcActions,
NcActionButton,
NcActionCheckbox,
NcActionInput,
NcActionLink,
- NcActions,
- NcActionSeparator,
NcActionText,
NcActionTextEditable,
+ NcActionSeparator,
NcAvatar,
+ ExternalShareAction,
SharePermissionsEditor,
},