66 <div :style =" previewLoaded ? { backgroundImage: `url(${previewURL})`} : undefined"
77 :class =" fileListIconStyles['file-picker__file-icon']" >
88 <template v-if =" ! previewLoaded " >
9- <IconFile v-if =" isFile" :size =" 20" />
10- <component :is =" folderDecorationIcon" v-else-if =" folderDecorationIcon" />
11- <IconFolder v-else :size =" 20" />
9+ <IconFile v-if =" isFile" :size =" 32" />
10+ <template v-else >
11+ <NcIconSvgWrapper v-if =" folderDecorationIcon"
12+ :class =" fileListIconStyles['file-picker__file-icon-overlay']"
13+ inline
14+ :path =" folderDecorationIcon"
15+ :size =" 16" />
16+ <IconFolder :class =" fileListIconStyles['file-picker__file-icon--primary']"
17+ :size =" 32" />
18+ </template >
1219 </template >
1320 </div >
1421</template >
1522
1623<script setup lang="ts">
1724import type { INode } from ' @nextcloud/files'
25+
26+ import { mdiAccountPlus , mdiGroup , mdiLink , mdiLock , mdiNetwork , mdiTag } from ' @mdi/js'
1827import { FileType } from ' @nextcloud/files'
1928import { ShareType } from ' @nextcloud/sharing'
2029import { computed , ref , toRef } from ' vue'
2130import { usePreviewURL } from ' ../../composables/preview'
2231
32+ import NcIconSvgWrapper from ' @nextcloud/vue/components/NcIconSvgWrapper'
2333import IconFile from ' vue-material-design-icons/File.vue'
2434import IconFolder from ' vue-material-design-icons/Folder.vue'
25- import LockIcon from ' vue-material-design-icons/Lock.vue'
26- import TagIcon from ' vue-material-design-icons/Tag.vue'
27- import LinkIcon from ' vue-material-design-icons/Link.vue'
28- import AccountPlusIcon from ' vue-material-design-icons/AccountPlus.vue'
29- import NetworkIcon from ' vue-material-design-icons/Network.vue'
30- import AccountGroupIcon from ' vue-material-design-icons/AccountGroup.vue'
3135
3236// CSS modules
3337import fileListIconStylesModule from ' ./FileListIcon.module.scss'
@@ -53,33 +57,33 @@ const folderDecorationIcon = computed(() => {
5357
5458 // Encrypted folders
5559 if (props .node .attributes ?.[' is-encrypted' ] === 1 ) {
56- return LockIcon
60+ return mdiLock
5761 }
5862
5963 // System tags
6064 if (props .node .attributes ?.[' is-tag' ]) {
61- return TagIcon
65+ return mdiTag
6266 }
6367
6468 // Link and mail shared folders
6569 const shareTypes = Object .values (props .node .attributes ?.[' share-types' ] || {}).flat () as number []
6670 if (shareTypes .some (type => type === ShareType .Link || type === ShareType .Email )) {
67- return LinkIcon
71+ return mdiLink
6872 }
6973
7074 // Shared folders
7175 if (shareTypes .length > 0 ) {
72- return AccountPlusIcon
76+ return mdiAccountPlus
7377 }
7478
7579 switch (props .node .attributes ?.[' mount-type' ]) {
7680 case ' external' :
7781 case ' external-session' :
78- return NetworkIcon
82+ return mdiNetwork
7983 case ' group' :
80- return AccountGroupIcon
84+ return mdiGroup
8185 case ' shared' :
82- return AccountPlusIcon
86+ return mdiAccountPlus
8387 }
8488
8589 return null
0 commit comments