Skip to content

Commit

Permalink
Merge pull request #747 from nextcloud/fix/recommendations-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored May 30, 2024
2 parents ec645b1 + f495cad commit 69234c7
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 8 deletions.
4 changes: 2 additions & 2 deletions js/recommendations-dashboard.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/recommendations-dashboard.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/recommendations-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/recommendations-main.js.map

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@nextcloud/vue-dashboard": "^2.0.1",
"lodash": "^4.17.21",
"vue": "^2.7.16",
"vue-material-design-icons": "^5.3.0",
"vuex": "^3.6.2"
},
"devDependencies": {
Expand Down
23 changes: 21 additions & 2 deletions src/components/RecommendedFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
:title="path"
@click.prevent="navigate"
@keyup.enter.prevent="navigate">
<div class="thumbnail"
:style="{ 'background-image': 'url(' + previewUrl + ')' }" />
<!-- Preview or mime icon -->
<FolderIcon v-if="isFolder" class="thumbnail" />
<div v-else class="thumbnail" :style="{ 'background-image': 'url(' + previewUrl + ')' }" />

<!-- Details -->
<div class="details">
<div class="file-name">
<template v-if="extension">
Expand All @@ -37,8 +40,15 @@ import { translate as t } from '@nextcloud/l10n'
import { generateUrl } from '@nextcloud/router'
import { joinPaths } from '@nextcloud/paths'
import FolderIcon from 'vue-material-design-icons/Folder.vue'
export default {
name: 'RecommendedFile',
components: {
FolderIcon,
},
props: {
id: {
type: String,
Expand Down Expand Up @@ -163,6 +173,15 @@ export default {
background-size: contain;
flex-shrink: 0;
border-radius: var(--border-radius);
display: flex;
justify-content: center;
align-items: center;
// For the folder icon
:deep(svg) {
color: var(--color-primary-element);
width: 100%;
height: 100%;
}
}
.details {
Expand Down

0 comments on commit 69234c7

Please sign in to comment.