From 6dea1fb3f6add47a297d4dc10ef4ee9f87fec1d9 Mon Sep 17 00:00:00 2001 From: mrjvs Date: Sat, 16 Dec 2023 16:50:34 +0100 Subject: [PATCH] Fix RTL issues --- src/assets/css/index.css | 6 +++- src/components/player/atoms/ProgressBar.tsx | 2 +- .../atoms/settings/CaptionSettingsView.tsx | 1 + src/pages/parts/player/ScrapingPart.tsx | 29 ++++++++++--------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/assets/css/index.css b/src/assets/css/index.css index 809c5cda..08b24f68 100644 --- a/src/assets/css/index.css +++ b/src/assets/css/index.css @@ -226,4 +226,8 @@ input[type=range].styled-slider.slider-progress::-ms-fill-lower { [dir="rtl"] .transform { /* Invert horizontal X offset on transform (Tailwind RTL plugin does the rest) */ transform: translate(calc(var(--tw-translate-x) * -1), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; -} \ No newline at end of file +} +[dir="ltr"] .transform { + /* default - otherwise it overwrites*/ + transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)) !important; +} diff --git a/src/components/player/atoms/ProgressBar.tsx b/src/components/player/atoms/ProgressBar.tsx index 887e5ed8..56d8c472 100644 --- a/src/components/player/atoms/ProgressBar.tsx +++ b/src/components/player/atoms/ProgressBar.tsx @@ -158,7 +158,7 @@ export function ProgressBar() { {/* Actual progress bar */}
{ const output = await startScraping(props.media); if (!isMounted()) return; - // props.onResult?.( - // resultRef.current.sources, - // resultRef.current.sourceOrder - // ); - // report( - // scrapePartsToProviderMetric( - // props.media, - // resultRef.current.sourceOrder, - // resultRef.current.sources - // ) - // ); - // props.onGetStream?.(output); + props.onResult?.( + resultRef.current.sources, + resultRef.current.sourceOrder + ); + report( + scrapePartsToProviderMetric( + props.media, + resultRef.current.sourceOrder, + resultRef.current.sources + ) + ); + props.onGetStream?.(output); })(); }, [startScraping, props, report, isMounted]); @@ -86,12 +86,13 @@ export function ScrapingPart(props: ScrapingProps) { return (