mirror of
https://github.com/nextcloud/server.git
synced 2026-03-12 05:33:11 -04:00
fix(files): pass Node to FileInfo object
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
a6f447241e
commit
cbb3cab919
2 changed files with 4 additions and 1 deletions
|
|
@ -31,6 +31,7 @@ export default function(node: Node) {
|
|||
fileInfo.get = (key) => fileInfo[key]
|
||||
fileInfo.isDirectory = () => fileInfo.mimetype === 'httpd/unix-directory'
|
||||
fileInfo.canEdit = () => Boolean(fileInfo.permissions & OC.PERMISSION_UPDATE)
|
||||
fileInfo.node = node
|
||||
|
||||
return fileInfo
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@
|
|||
</NcAppSidebar>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import type { INode } from '@nextcloud/files'
|
||||
|
||||
import { davRemoteURL, davRootPath, File, Folder, formatFileSize } from '@nextcloud/files'
|
||||
import { defineComponent } from 'vue'
|
||||
import { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'
|
||||
|
|
@ -156,7 +158,7 @@ export default defineComponent({
|
|||
error: null,
|
||||
loading: true,
|
||||
fileInfo: null,
|
||||
node: null,
|
||||
node: null as INode | null,
|
||||
isFullScreen: false,
|
||||
hasLowHeight: false,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue