Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: link preview folder icon color updated #44580

Closed
wants to merge 9 commits into from
25 changes: 13 additions & 12 deletions apps/files/css/files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -348,18 +348,19 @@ table td.filename .thumbnail-wrapper.icon-loading-small {
}
}
table td.filename .thumbnail {
display: inline-block;
width: 32px;
height: 32px;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
margin-left: 9px;
margin-top: 9px;
border-radius: var(--border-radius);
cursor: pointer;
position: absolute;
z-index: 4;
display: inline-block;
width: 32px;
height: 32px;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
margin-left: 9px;
margin-top: 9px;
border-radius: var(--border-radius);
cursor: pointer;
position: absolute;
z-index: 4;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra newline character that isn't needed

}
table td.filename p.name .thumbnail {
cursor: default;
Expand Down
4 changes: 3 additions & 1 deletion apps/files/src/views/ReferenceFileWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
:href="richObject.link"
target="_blank"
@click="navigate">
<span class="widget-file__image" :class="filePreviewClass" :style="filePreviewStyle">
<span class="widget-file__image" :class="filePreviewClass" :style="{ backgroundColor: primaryColor }">
Copy link
Contributor

@susnux susnux Apr 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply putting this into the widget-file__image class styles? The color is never changed, no?

<template v-if="!previewUrl">
<FolderIcon v-if="isFolder" :size="88" />
<FileIcon v-else :size="88" />
Expand Down Expand Up @@ -141,6 +141,7 @@ export default defineComponent({
return {
previewUrl: null as string | null,
failedViewer: false,
primaryColor: 'var(--primary-color)'
}
},

Expand Down Expand Up @@ -276,6 +277,7 @@ export default defineComponent({
display: flex;
align-items: center;
justify-content: center;
color: var(--primary-color);
}
}

Expand Down