mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Differentiate share links
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
d389b54e2a
commit
f09300b343
4 changed files with 23 additions and 4 deletions
|
|
@ -49,6 +49,7 @@
|
|||
<!-- pending actions -->
|
||||
<NcActions v-if="!pending && (pendingPassword || pendingExpirationDate)"
|
||||
class="sharing-entry__actions"
|
||||
:aria-label="actionsTooltip"
|
||||
menu-align="right"
|
||||
:open.sync="open"
|
||||
@close="onNewLinkShare">
|
||||
|
|
@ -116,6 +117,7 @@
|
|||
<!-- actions -->
|
||||
<NcActions v-else-if="!loading"
|
||||
class="sharing-entry__actions"
|
||||
:aria-label="actionsTooltip"
|
||||
menu-align="right"
|
||||
:open.sync="open"
|
||||
@close="onMenuClose">
|
||||
|
|
@ -321,6 +323,10 @@ export default {
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
index: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
|
|
@ -370,6 +376,9 @@ export default {
|
|||
return this.share.shareWith
|
||||
}
|
||||
}
|
||||
if (this.index > 1) {
|
||||
return t('files_sharing', 'Share link ({index})', { index: this.index })
|
||||
}
|
||||
return t('files_sharing', 'Share link')
|
||||
},
|
||||
|
||||
|
|
@ -530,6 +539,15 @@ export default {
|
|||
return window.location.protocol + '//' + window.location.host + generateUrl('/s/') + this.share.token
|
||||
},
|
||||
|
||||
/**
|
||||
* Tooltip message for actions button
|
||||
*
|
||||
* @return {string}
|
||||
*/
|
||||
actionsTooltip() {
|
||||
return t('files_sharing', 'Actions for "{title}"', { title: this.title })
|
||||
},
|
||||
|
||||
/**
|
||||
* Tooltip message for copy button
|
||||
*
|
||||
|
|
@ -542,7 +560,7 @@ export default {
|
|||
}
|
||||
return t('files_sharing', 'Cannot copy, please copy the link manually')
|
||||
}
|
||||
return t('files_sharing', 'Copy public link to clipboard')
|
||||
return t('files_sharing', 'Copy public link of "{title}" to clipboard', { title: this.title })
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
<!-- using shares[index] to work with .sync -->
|
||||
<SharingEntryLink v-for="(share, index) in shares"
|
||||
:key="share.id"
|
||||
:index="shares.length > 1 ? index + 1 : null"
|
||||
:can-reshare="canReshare"
|
||||
:share.sync="shares[index]"
|
||||
:file-info="fileInfo"
|
||||
|
|
|
|||
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue