mirror of
https://github.com/simon987/sist2.git
synced 2025-12-16 08:49:07 +00:00
Don't show resolution badge on narrow images
This commit is contained in:
@@ -51,6 +51,7 @@ export interface EsHit {
|
||||
duration: number
|
||||
tag: string[]
|
||||
checksum: string
|
||||
thumbnail: string
|
||||
}
|
||||
_props: {
|
||||
isSubDocument: boolean
|
||||
@@ -61,6 +62,8 @@ export interface EsHit {
|
||||
isPlayableImage: boolean
|
||||
isAudio: boolean
|
||||
hasThumbnail: boolean
|
||||
tnW: number
|
||||
tnH: number
|
||||
}
|
||||
highlight: {
|
||||
name: string[] | undefined,
|
||||
@@ -131,6 +134,8 @@ class Sist2Api {
|
||||
|
||||
if ("thumbnail" in hit._source) {
|
||||
hit._props.hasThumbnail = true;
|
||||
hit._props.tnW = Number(hit._source.thumbnail.split(",")[0]);
|
||||
hit._props.tnH = Number(hit._source.thumbnail.split(",")[1]);
|
||||
}
|
||||
|
||||
switch (mimeCategory) {
|
||||
|
||||
Reference in New Issue
Block a user