Replace ActionLink with ActionButton on sharing tab

Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
So-authored-by: Grigorii K. Shartsev <me@shgk.me>
This commit is contained in:
julia.kirschenheuter 2023-11-17 16:45:22 +01:00 committed by Grigorii K. Shartsev
parent 8c24a32fda
commit ff2ef8d0d6
9 changed files with 13 additions and 18 deletions

View file

@ -8,12 +8,10 @@
<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>
@ -21,14 +19,14 @@
<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,
},
@ -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

View file

@ -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>

3
dist/486-486.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/486-486.js.map vendored Normal file

File diff suppressed because one or more lines are too long

3
dist/4997-4997.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long