Fix: dont use filters for inverted thumbnails (#8121)

This commit is contained in:
shamoon 2024-10-30 11:43:02 -07:00 committed by GitHub
parent 56d296f04b
commit e22ccbda26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 45 additions and 33 deletions

View File

@ -1,6 +1,6 @@
<div class="card mb-3 shadow-sm bg-light" [class.card-selected]="selected" [class.document-card]="selectable" [class.popover-hidden]="popoverHidden" (mouseleave)="mouseLeaveCard()">
<div class="row g-0">
<div class="col-md-2 doc-img-background rounded-start" [class.doc-img-background-selected]="selected" (click)="this.toggleSelected.emit($event)" (dblclick)="dblClickDocument.emit()">
<div class="col-md-2 doc-img-container rounded-start" (click)="this.toggleSelected.emit($event)" (dblclick)="dblClickDocument.emit()">
<img [src]="getThumbUrl()" class="card-img doc-img border-end rounded-start" [class.inverted]="getIsThumbInverted()">
<div class="border-end border-bottom bg-light document-card-check">

View File

@ -2,7 +2,7 @@
overflow-wrap: anywhere;
}
.doc-img-background {
.doc-img-container {
position: relative;
}
@ -49,18 +49,6 @@
display: block;
}
.card-selected {
border-color: var(--bs-primary);
.document-card-check {
display: block;
}
}
.doc-img-background-selected {
background-color: var(--pngx-primary-faded);
}
.card-info {
line-height: 1;

View File

@ -1,7 +1,7 @@
<div class="col p-2 h-100">
<div class="card h-100 shadow-sm document-card" [class.card-selected]="selected" [class.popover-hidden]="popoverHidden" (mouseleave)="mouseLeaveCard()">
<div class="border-bottom doc-img-container" [class.doc-img-background-selected]="selected" (click)="this.toggleSelected.emit($event)" (dblclick)="dblClickDocument.emit(this)">
<img class="card-img doc-img rounded-top" [class.inverted]="getIsThumbInverted()" [src]="getThumbUrl()">
<div class="border-bottom doc-img-container" (click)="this.toggleSelected.emit($event)" (dblclick)="dblClickDocument.emit(this)">
<img class="card-img doc-img" [class.inverted]="getIsThumbInverted()" [src]="getThumbUrl()">
<div class="border-end border-bottom bg-light py-1 px-2 document-card-check">
<div class="form-check">

View File

@ -40,18 +40,6 @@
top: 142px;
}
.card-selected {
border-color:var(--bs-primary);
.document-card-check {
display: block;
}
}
.doc-img-background-selected {
background-color: var(--pngx-primary-faded);
}
.card-info {
line-height: 1;

View File

@ -490,9 +490,23 @@ ul.pagination {
.doc-img-container {
border: none !important;
border-top-left-radius: .25rem;
border-top-right-radius: .25rem;
overflow: hidden;
.doc-img {
overflow: visible;
}
}
.card-selected {
border-color:var(--bs-primary);
.document-card-check {
display: block;
}
.doc-img-container {
background-color: var(--pngx-primary-faded);
}
}
table.table {
@ -705,6 +719,10 @@ i-bs svg {
vertical-align: text-bottom;
}
.document-card .card-footer i-bs svg {
vertical-align: middle;
.document-card {
overflow: hidden;
.card-footer i-bs svg {
vertical-align: middle;
}
}

View File

@ -183,7 +183,7 @@ $form-check-radio-checked-bg-image-dark: url("data:image/svg+xml,<svg xmlns='htt
}
.doc-img {
mix-blend-mode: normal !important;
mix-blend-mode: normal;
border-radius: 0;
border-color: var(--bs-border-color);
filter: invert(10%);
@ -201,6 +201,24 @@ $form-check-radio-checked-bg-image-dark: url("data:image/svg+xml,<svg xmlns='htt
mix-blend-mode: luminosity;
}
@supports (hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none) {
// Safari does not like the filters on the image, see https://github.com/paperless-ngx/paperless-ngx/pull/8121
.doc-img-container {
background-color: #ffffff;
}
.doc-img {
filter: none !important;
box-shadow: inset 0px 0px 0px 10px rgba(0,0,0,1);
}
.doc-img.inverted {
filter: none !important;
mix-blend-mode: difference;
opacity: 0.95;
}
}
.paperless-input-select .ng-select .ng-dropdown-panel .ng-dropdown-panel-items .ng-option:not(.ng-option-selected):hover,
.paperless-input-select .ng-dropdown-panel .ng-dropdown-panel-items .ng-option.ng-option-marked {
background-color: var(--bs-light) !important;