Handle backtick command earlier + Ignore commands when cmd/atl is pressed + prevent -0.0 as subtitle delay (#62)

* Use 12 hour clock + box around time

* Fix ref

* Handle backtick earlier + Ignore commands when cmd/atl is pressed + prevent -0.0 as subtitle delay

* Exclude thumbnail from fade effect

* Bring back comments
This commit is contained in:
zisra 2025-11-13 03:02:41 +08:00 committed by GitHub
parent 8d8a5bdb66
commit a14b3755cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View file

@ -429,17 +429,17 @@ input[type="range"].styled-slider.slider-progress::-ms-fill-lower {
}
/* Image fade-in on load */
img:not([src=""]) {
img:not(.no-fade):not([src=""]) {
opacity: 0;
transition: opacity 0.8s ease-in-out;
}
/* Fade in when image has loaded class */
img.loaded {
img.loaded:not(.no-fade) {
opacity: 1;
}
/* For images that are already cached/loaded, show them immediately */
img[complete]:not([src=""]) {
img[complete]:not(.no-fade):not([src=""]) {
opacity: 1;
}

View file

@ -59,7 +59,7 @@ function ThumbnailDisplay(props: { at: number; show: boolean }) {
{currentThumbnail && (
<img
src={currentThumbnail.data}
className="h-24 border rounded-xl border-gray-800"
className="h-24 border rounded-xl border-gray-800 no-fade"
/>
)}
<p className="mt-1 mx-auto text-center border rounded-xl border-gray-800 px-3 py-1 backdrop-blur-lg bg-black bg-opacity-20 w-max">

View file

@ -411,7 +411,7 @@ export function CaptionsView({
};
try {
await navigator.clipboard.writeText(JSON.stringify(copyData, null, 2));
await navigator.clipboard.writeText(JSON.stringify(copyData));
// Could add a toast notification here if needed
} catch (err) {
console.error("Failed to copy subtitle data:", err);

View file

@ -5,7 +5,7 @@
export function initializeImageFadeIn() {
// Handle images that are already loaded (cached)
const handleExistingImages = () => {
const images = document.querySelectorAll("img:not(.loaded)");
const images = document.querySelectorAll(`img:not(.no-fade):not([src=""]`);
images.forEach((img) => {
const htmlImg = img as HTMLImageElement;
if (htmlImg.complete && htmlImg.naturalHeight !== 0) {
@ -35,7 +35,7 @@ export function initializeImageFadeIn() {
// Also check periodically for images that might have loaded
// This handles edge cases where the load event might not fire
const checkInterval = setInterval(() => {
const images = document.querySelectorAll("img:not(.loaded)");
const images = document.querySelectorAll(`img:not(.no-fade):not([src=""]`);
if (images.length === 0) {
clearInterval(checkInterval);
return;