fix(files): pass Node to FileInfo object

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/55175/head
Ferdinand Thiessen 2025-09-01 22:02:51 +07:00 committed by nextcloud-command
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,
}