11<!--
2- - @copyright 2019 Christoph Wurst <[email protected] > 3- -
4- - @author 2019 Christoph Wurst <[email protected] > 5- -
6- - @license GNU AGPL version 3 or any later version
7- -
8- - This program is free software: you can redistribute it and/or modify
9- - it under the terms of the GNU Affero General Public License as
10- - published by the Free Software Foundation, either version 3 of the
11- - License, or (at your option) any later version.
12- -
13- - This program is distributed in the hope that it will be useful,
14- - but WITHOUT ANY WARRANTY; without even the implied warranty of
15- - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16- - GNU Affero General Public License for more details.
17- -
18- - You should have received a copy of the GNU Affero General Public License
19- - along with this program. If not, see <http://www.gnu.org/licenses/>.
20- -->
2+ - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
3+ - SPDX-License-Identifier: AGPL-3.0-or-later
4+ -->
215
226<template >
237 <a class =" recommendation"
2610 :title =" path"
2711 @click.prevent =" navigate"
2812 @keyup.enter.prevent =" navigate" >
29- <div class =" thumbnail"
30- :style =" { 'background-image': 'url(' + previewUrl + ')' }" />
13+ <!-- Preview or mime icon -->
14+ <FolderIcon v-if =" isFolder" class =" thumbnail" />
15+ <div v-else class =" thumbnail" :style =" { 'background-image': 'url(' + previewUrl + ')' }" />
16+
17+ <!-- Details -->
3118 <div class =" details" >
3219 <div class =" file-name" >
3320 <template v-if =" extension " >
@@ -53,8 +40,15 @@ import { translate as t } from '@nextcloud/l10n'
5340import { generateUrl } from ' @nextcloud/router'
5441import { joinPaths } from ' @nextcloud/paths'
5542
43+ import FolderIcon from ' vue-material-design-icons/Folder.vue'
44+
5645export default {
5746 name: ' RecommendedFile' ,
47+
48+ components: {
49+ FolderIcon,
50+ },
51+
5852 props: {
5953 id: {
6054 type: String ,
@@ -179,6 +173,15 @@ export default {
179173 background- size: contain;
180174 flex- shrink: 0 ;
181175 border- radius: var (-- border- radius);
176+ display: flex;
177+ justify- content: center;
178+ align- items: center;
179+ // For the folder icon
180+ : deep (svg ) {
181+ color: var (-- color- primary- element);
182+ width: 100 % ;
183+ height: 100 % ;
184+ }
182185 }
183186
184187 .details {
0 commit comments