mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-21 22:15:40 +00:00
The squash-merge of PR #419 was performed against an outdated PR base that predated several main-side refactors and features. The resulting squash inadvertently re-introduced files that had already been removed (`src-tauri/src/audio.rs` monolith, `app-icon.png`) and reverted main's content for ~20 files (`src-tauri/src/lib.rs` decompose, `src/App.tsx` animation-pause, `src/components/AlbumRow.tsx` headerExtra, etc). This commit: * Restores all collateral-damage files to their pre-#419 main state (5662dafe), including the audio module split, lib decompose, Cargo.toml `windows` dep, animation-pause-on-blur logic, and `reducedAnimations` toggle plumbing in WaveformSeek/Settings. * Keeps the genuine #419 work intact: tri-state duration toggle, position counter, persistent Now Playing collapse, animated EQ indicator (in QueuePanel.tsx, 8 locales, authStore, components.css). * Merges authStore.ts so both `reducedAnimations` (from #426) and `queueNowPlayingCollapsed` (from #419) coexist. * Adds the `.eq-bars.paused` CSS rule manually since components.css needed a5662dafebase + the single #419 addition. * Fixes a latent type error in OverlayScrollArea.tsx (`useRef<T>(null)` is `RefObject<T>` / read-only under current `@types/react`; widened to `useRef<T | null>(null)` so the existing `wrapRef.current = el` assignment compiles). Verified locally with `cargo check` and `npm run build` — both green.
This commit is contained in:
committed by
GitHub
parent
18b4a982ef
commit
e44e6dcdf4
@@ -20,6 +20,8 @@ export type OverlayScrollAreaProps = {
|
||||
viewportScrollBehaviorAuto?: boolean;
|
||||
/** Ref to the scrollable element (querySelector, scrollIntoView, etc.). */
|
||||
viewportRef?: React.Ref<HTMLDivElement>;
|
||||
/** Ref to the outer wrapper (incl. overlay scrollbar rail). */
|
||||
wrapRef?: React.Ref<HTMLDivElement>;
|
||||
/** Optional id on the viewport (e.g. main app scroll for route pages). */
|
||||
viewportId?: string;
|
||||
/** Optional wheel handler on the scrollable viewport. */
|
||||
@@ -49,11 +51,12 @@ export default function OverlayScrollArea({
|
||||
railInset = 'none',
|
||||
viewportScrollBehaviorAuto = false,
|
||||
viewportRef: viewportRefProp,
|
||||
wrapRef: wrapRefProp,
|
||||
viewportId,
|
||||
viewportOnWheel,
|
||||
viewportOnTouchMove,
|
||||
}: OverlayScrollAreaProps) {
|
||||
const wrapRef = useRef<HTMLDivElement>(null);
|
||||
const wrapRef = useRef<HTMLDivElement | null>(null);
|
||||
const viewportRef = useRef<HTMLDivElement | null>(null);
|
||||
const [meta, setMeta] = useState({ thumbH: 0, thumbT: 0, visible: false });
|
||||
|
||||
@@ -109,6 +112,11 @@ export default function OverlayScrollArea({
|
||||
assignRef(viewportRefProp, el);
|
||||
};
|
||||
|
||||
const setWrapNode = (el: HTMLDivElement | null) => {
|
||||
wrapRef.current = el;
|
||||
assignRef(wrapRefProp, el);
|
||||
};
|
||||
|
||||
const rootClass = [
|
||||
'overlay-scroll',
|
||||
RAIL_INSET_CLASS[railInset],
|
||||
@@ -121,7 +129,7 @@ export default function OverlayScrollArea({
|
||||
const viewportClass = ['overlay-scroll__viewport', viewportClassName].filter(Boolean).join(' ');
|
||||
|
||||
return (
|
||||
<div ref={wrapRef} className={rootClass} onMouseMove={onMouseMove}>
|
||||
<div ref={setWrapNode} className={rootClass} onMouseMove={onMouseMove}>
|
||||
<div
|
||||
id={viewportId}
|
||||
ref={setViewportNode}
|
||||
|
||||
Reference in New Issue
Block a user