[Blacklist] Minor fixes (#720)

* Fix deferred posts blacklisting
* Fix fav:me metatag not working correctly
* Fix a strange overflow issue in older browsers
* Minor style tweaks
* Reduce collapse animation speed
This commit is contained in:
Cinder 2024-08-13 08:20:02 -07:00 committed by GitHub
parent 27b2359dde
commit d9dfe04301
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 11 deletions

View File

@ -74,11 +74,12 @@ export default class Filter {
*/
update ($post) {
if ($post.length == 0) return false;
else if (Array.isArray($post))
$post = $post[0]; // Deferred posts return an array
else if ($post.length > 1) {
// Batch update
else if (Array.isArray($post)) { // Deferred posts return an array
for (const $one of $post)
this.update($one);
return;
} else if ($post.length > 1) { // More than one matched
for (const $one of $post.get())
this.update($($one));
return;
}

View File

@ -43,7 +43,7 @@ export default class PostCache {
score: parseInt(data.score) || 0,
fav_count: parseInt(data.favCount) || 0,
is_favorited: !!data.isFavorited,
is_favorited: data.isFavorited === "true",
uploader: (data.uploader || "").toLowerCase(),
uploader_id: parseInt(data.uploaderId) || -1,

View File

@ -45,7 +45,7 @@
border-color: transparent var(--color-text) var(--color-text) transparent;
transform: rotate(45deg);
bottom: 0.25em;
transition: 0.25s ease-in-out;
transition: 0.1s ease-in-out;
}
}
&[collapsed="true"] {
@ -64,8 +64,9 @@
@keyframes hide-scroll {
from, to { overflow: hidden; }
}
animation: hide-scroll 0.25s backwards;
overflow: hidden auto;
animation: hide-scroll 0.1s backwards;
overflow-x: hidden;
overflow-y: auto;
}
}
@ -73,12 +74,11 @@
.blacklist-filters {
display: flex;
flex-flow: column;
font-size: 1.1em;
gap: 0.125rem;
gap: 0.1rem;
margin: 0.25em 0;
max-height: 50vh;
transition: max-height 0.25s ease-in-out;
transition: max-height 0.1s ease-in-out;
li {
display: flex;