Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace ActionLink with ActionButton on sharing tab #41580

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions apps/files_sharing/src/components/SharingEntryInternal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,25 @@
<div class="avatar-external icon-external-white" />
</template>

<NcActionLink :href="internalLink"
<NcActionButton :title="copyLinkTooltip"
:aria-label="copyLinkTooltip"
:title="copyLinkTooltip"
target="_blank"
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
@click.prevent="copyLink" />
@click="copyLink" />
</SharingEntrySimple>
</ul>
</template>

<script>
import { generateUrl } from '@nextcloud/router'
import { showSuccess } from '@nextcloud/dialogs'
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js'
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
import SharingEntrySimple from './SharingEntrySimple.vue'

export default {
name: 'SharingEntryInternal',

components: {
NcActionLink,
NcActionButton,
SharingEntrySimple,
},

Expand Down Expand Up @@ -85,7 +83,6 @@ export default {
try {
await navigator.clipboard.writeText(this.internalLink)
showSuccess(t('files_sharing', 'Link copied'))
// focus and show the tooltip (note: cannot set ref on NcActionLink)
this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus()
this.copySuccess = true
this.copied = true
Expand Down
6 changes: 2 additions & 4 deletions apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@

<!-- clipboard -->
<NcActions v-if="share && !isEmailShareType && share.token" ref="copyButton" class="sharing-entry__copy">
<NcActionLink :href="shareLink"
target="_blank"
:title="copyLinkTooltip"
<NcActionButton :title="copyLinkTooltip"
:aria-label="copyLinkTooltip"
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
@click.stop.prevent="copyLink" />
@click.prevent="copyLink" />
</NcActions>
</div>

Expand Down
3 changes: 3 additions & 0 deletions dist/486-486.js

Large diffs are not rendered by default.

File renamed without changes.
1 change: 1 addition & 0 deletions dist/486-486.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions dist/4997-4997.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/4997-4997.js.map

This file was deleted.

4 changes: 2 additions & 2 deletions dist/files_sharing-files_sharing_tab.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files_sharing-files_sharing_tab.js.map

Large diffs are not rendered by default.

Loading