diff options
author | Max <max@nextcloud.com> | 2022-02-24 16:59:45 +0300 |
---|---|---|
committer | Max <max@nextcloud.com> | 2022-03-02 10:19:29 +0300 |
commit | 3886c549b687d700404c5245f9a4e85502332d11 (patch) | |
tree | f52cd9ad8219bee237b9527aaabb8264349fc048 /src | |
parent | f2384f4f895cf8c8c37b349d0b0c2bac7da81b98 (diff) |
fix: `relativePath` prop to include filename
Signed-off-by: Max <max@nextcloud.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/views/RichWorkspace.vue | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/views/RichWorkspace.vue b/src/views/RichWorkspace.vue index 1afc666c1..ef4d35064 100644 --- a/src/views/RichWorkspace.vue +++ b/src/views/RichWorkspace.vue @@ -32,7 +32,7 @@ v-show="ready" :key="file.path" :file-id="file.id" - :relative-path="file.path" + :relative-path="filepath" :share-token="shareToken" :active="true" :autohide="true" @@ -75,7 +75,7 @@ export default { }, computed: { shareToken() { - return document.getElementById('sharingToken') ? document.getElementById('sharingToken').value : null + return document.getElementById('sharingToken')?.value }, canCreate() { return !!(this.folder && (this.folder.permissions & OC.PERMISSION_CREATE)) @@ -83,6 +83,10 @@ export default { showEmptyWorkspace() { return (!this.file || (this.autofocus && !this.ready)) && this.canCreate }, + filepath() { + const { path, name } = this.file + return path + (path.endsWith('/') ? '' : '/') + name + }, }, watch: { focus(newValue) { |