Fix magic shelf physical book filter, shorten badge, and punch up heart icon (#2888)
This commit is contained in:
+1
-1
@@ -365,7 +365,7 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.book-type-physical {
|
.book-type-phy {
|
||||||
background: var(--book-type-physical-color);
|
background: var(--book-type-physical-color);
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -800,7 +800,7 @@ export class BookCardComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
|
|
||||||
getDisplayFormat(): string | null {
|
getDisplayFormat(): string | null {
|
||||||
if (!this.book?.primaryFile) {
|
if (!this.book?.primaryFile) {
|
||||||
return 'PHYSICAL';
|
return 'PHY';
|
||||||
}
|
}
|
||||||
if (this.forceEbookMode && this.book.primaryFile?.bookType === 'AUDIOBOOK') {
|
if (this.forceEbookMode && this.book.primaryFile?.bookType === 'AUDIOBOOK') {
|
||||||
const ebookType = this.getEbookType(this.book);
|
const ebookType = this.getEbookType(this.book);
|
||||||
|
|||||||
+7
-3
@@ -677,9 +677,13 @@ describe('BookRuleEvaluatorService', () => {
|
|||||||
expect(service.evaluateGroup(book, rule('audiobookDuration', 'is_empty', null))).toBe(true);
|
expect(service.evaluateGroup(book, rule('audiobookDuration', 'is_empty', null))).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter by isPhysical', () => {
|
it('should filter by isPhysical with string value from UI', () => {
|
||||||
const book = createBook({isPhysical: true});
|
const physical = createBook({isPhysical: true});
|
||||||
expect(service.evaluateGroup(book, rule('isPhysical', 'equals', true))).toBe(true);
|
const digital = createBook({isPhysical: false});
|
||||||
|
expect(service.evaluateGroup(physical, rule('isPhysical', 'equals', 'true'))).toBe(true);
|
||||||
|
expect(service.evaluateGroup(digital, rule('isPhysical', 'equals', 'true'))).toBe(false);
|
||||||
|
expect(service.evaluateGroup(digital, rule('isPhysical', 'equals', 'false'))).toBe(true);
|
||||||
|
expect(service.evaluateGroup(physical, rule('isPhysical', 'not_equals', 'true'))).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should filter by lubimyczytacRating', () => {
|
it('should filter by lubimyczytacRating', () => {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export class BookRuleEvaluatorService {
|
|||||||
const normalize = (val: unknown): unknown => {
|
const normalize = (val: unknown): unknown => {
|
||||||
if (val === null || val === undefined) return val;
|
if (val === null || val === undefined) return val;
|
||||||
if (val instanceof Date) return val;
|
if (val instanceof Date) return val;
|
||||||
|
if (typeof val === 'boolean') return String(val);
|
||||||
if (typeof val === 'string') {
|
if (typeof val === 'string') {
|
||||||
const date = new Date(val);
|
const date = new Date(val);
|
||||||
if (!isNaN(date.getTime())) return date;
|
if (!isNaN(date.getTime())) return date;
|
||||||
|
|||||||
@@ -108,27 +108,28 @@
|
|||||||
|
|
||||||
.heart-orbit-1 {
|
.heart-orbit-1 {
|
||||||
background: #f472b6;
|
background: #f472b6;
|
||||||
box-shadow: 0 0 6px #f472b6;
|
box-shadow: 0 0 10px #f472b6, 0 0 4px #f472b6;
|
||||||
animation: orbit-1 2.5s linear infinite;
|
animation: orbit-1 2.5s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heart-orbit-2 {
|
.heart-orbit-2 {
|
||||||
background: #a78bfa;
|
background: #a78bfa;
|
||||||
box-shadow: 0 0 6px #a78bfa;
|
box-shadow: 0 0 10px #a78bfa, 0 0 4px #a78bfa;
|
||||||
animation: orbit-2 3.2s linear infinite reverse;
|
animation: orbit-2 3.2s linear infinite reverse;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heart-orbit-3 {
|
.heart-orbit-3 {
|
||||||
background: #38bdf8;
|
background: #38bdf8;
|
||||||
box-shadow: 0 0 6px #38bdf8;
|
box-shadow: 0 0 10px #38bdf8, 0 0 4px #38bdf8;
|
||||||
animation: orbit-3 4s linear infinite;
|
animation: orbit-3 4s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.heart-icon {
|
.heart-icon {
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
color: #ec4899 !important;
|
color: #e8366d !important;
|
||||||
|
font-size: 1.05rem;
|
||||||
animation: heart-float 2.5s ease-in-out infinite;
|
animation: heart-float 2.5s ease-in-out infinite;
|
||||||
filter: drop-shadow(0 0 4px rgba(236, 72, 153, 0.5));
|
filter: drop-shadow(0 0 6px rgba(232, 54, 109, 0.8));
|
||||||
transition: filter 0.3s;
|
transition: filter 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,8 +204,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@keyframes heart-float {
|
@keyframes heart-float {
|
||||||
0%, 100% { transform: translateY(2px); }
|
0%, 100% { transform: translateY(1px); }
|
||||||
50% { transform: translateY(-2px); }
|
50% { transform: translateY(-1px); }
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes heartbeat {
|
@keyframes heartbeat {
|
||||||
|
|||||||
Reference in New Issue
Block a user