From 8eae420851ca72d2c22c6ed531d472b7f5f0daaf Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sun, 6 Jul 2025 10:36:55 -0700 Subject: [PATCH] Format files --- packages/webamp/js/reducers/equalizer.ts | 5 ++++- packages/webamp/js/reducers/milkdrop.ts | 10 ++++++++-- packages/webamp/js/reducers/playlist.ts | 4 +++- packages/webamp/js/reducers/userInput.ts | 6 +++++- packages/webamp/js/reducers/windows.ts | 25 +++++++++++++++++------- packages/webamp/js/webampLazy.tsx | 13 +++++++++--- 6 files changed, 48 insertions(+), 15 deletions(-) diff --git a/packages/webamp/js/reducers/equalizer.ts b/packages/webamp/js/reducers/equalizer.ts index 0e59ed45..028c7a04 100644 --- a/packages/webamp/js/reducers/equalizer.ts +++ b/packages/webamp/js/reducers/equalizer.ts @@ -31,7 +31,10 @@ const equalizer = ( ): EqualizerState => { switch (action.type) { case "SET_BAND_VALUE": - const newSliders = { ...state.sliders, [(action as any).band]: (action as any).value }; + const newSliders = { + ...state.sliders, + [(action as any).band]: (action as any).value, + }; return { ...state, sliders: newSliders }; case "SET_EQ_ON": return { ...state, on: true }; diff --git a/packages/webamp/js/reducers/milkdrop.ts b/packages/webamp/js/reducers/milkdrop.ts index e088eeed..01704296 100644 --- a/packages/webamp/js/reducers/milkdrop.ts +++ b/packages/webamp/js/reducers/milkdrop.ts @@ -35,9 +35,15 @@ export const milkdrop = ( ): MilkdropState => { switch (action.type) { case "SET_MILKDROP_DESKTOP": - return { ...state, display: (action as any).enabled ? "DESKTOP" : "WINDOW" }; + return { + ...state, + display: (action as any).enabled ? "DESKTOP" : "WINDOW", + }; case "SET_MILKDROP_FULLSCREEN": - return { ...state, display: (action as any).enabled ? "FULLSCREEN" : "WINDOW" }; + return { + ...state, + display: (action as any).enabled ? "FULLSCREEN" : "WINDOW", + }; case "GOT_BUTTERCHURN": return { ...state, butterchurn: (action as any).butterchurn }; case "GOT_BUTTERCHURN_PRESETS": diff --git a/packages/webamp/js/reducers/playlist.ts b/packages/webamp/js/reducers/playlist.ts index c32aa204..3d7cf337 100644 --- a/packages/webamp/js/reducers/playlist.ts +++ b/packages/webamp/js/reducers/playlist.ts @@ -118,7 +118,9 @@ const playlist = ( return { ...state, trackOrder }; case "ADD_TRACK_FROM_URL": const atIndex = - (action as any).atIndex == null ? state.trackOrder.length : (action as any).atIndex; + (action as any).atIndex == null + ? state.trackOrder.length + : (action as any).atIndex; return { ...state, trackOrder: [ diff --git a/packages/webamp/js/reducers/userInput.ts b/packages/webamp/js/reducers/userInput.ts index 8949b9ce..60f8c8a9 100644 --- a/packages/webamp/js/reducers/userInput.ts +++ b/packages/webamp/js/reducers/userInput.ts @@ -22,7 +22,11 @@ export const userInput = ( case "SET_FOCUS": return { ...state, focus: (action as any).input, bandFocused: null }; case "SET_BAND_FOCUS": - return { ...state, focus: (action as any).input, bandFocused: (action as any).bandFocused }; + return { + ...state, + focus: (action as any).input, + bandFocused: (action as any).bandFocused, + }; case "UNSET_FOCUS": return { ...state, focus: null, bandFocused: null }; case "SET_SCRUB_POSITION": diff --git a/packages/webamp/js/reducers/windows.ts b/packages/webamp/js/reducers/windows.ts index 532c2afc..3a05af7f 100644 --- a/packages/webamp/js/reducers/windows.ts +++ b/packages/webamp/js/reducers/windows.ts @@ -111,7 +111,9 @@ const windows = ( let windowOrder = state.windowOrder; if ((action as any).window != null) { windowOrder = [ - ...state.windowOrder.filter((windowId) => windowId !== (action as any).window), + ...state.windowOrder.filter( + (windowId) => windowId !== (action as any).window + ), (action as any).window, ]; } @@ -120,7 +122,9 @@ const windows = ( const { canShade } = state.genWindows[(action as any).windowId]; if (!canShade) { throw new Error( - `Tried to shade/unshade a window that cannot be shaded: ${(action as any).windowId}` + `Tried to shade/unshade a window that cannot be shaded: ${ + (action as any).windowId + }` ); } return { @@ -160,7 +164,9 @@ const windows = ( const { canResize } = state.genWindows[(action as any).windowId]; if (!canResize) { throw new Error( - `Tried to resize a window that cannot be resized: ${(action as any).windowId}` + `Tried to resize a window that cannot be resized: ${ + (action as any).windowId + }` ); } return { @@ -177,7 +183,9 @@ const windows = ( return { ...state, positionsAreRelative: - (action as any).absolute === true ? false : state.positionsAreRelative, + (action as any).absolute === true + ? false + : state.positionsAreRelative, genWindows: Utils.objectMap(state.genWindows, (w, windowId) => { const newPosition = (action as any).positions[windowId]; if (newPosition == null) { @@ -196,8 +204,8 @@ const windows = ( })), }; case "LOAD_SERIALIZED_STATE": { - const { genWindows, focused, positionsAreRelative } = - (action as any).serializedState.windows; + const { genWindows, focused, positionsAreRelative } = (action as any) + .serializedState.windows; return { ...state, positionsAreRelative, @@ -216,7 +224,10 @@ const windows = ( case "BROWSER_WINDOW_SIZE_CHANGED": return { ...state, - browserWindowSize: { height: (action as any).height, width: (action as any).width }, + browserWindowSize: { + height: (action as any).height, + width: (action as any).width, + }, }; default: diff --git a/packages/webamp/js/webampLazy.tsx b/packages/webamp/js/webampLazy.tsx index d88fdd0e..2638c348 100644 --- a/packages/webamp/js/webampLazy.tsx +++ b/packages/webamp/js/webampLazy.tsx @@ -158,7 +158,8 @@ class Webamp { ); } - const handleOnline = () => this.store.dispatch({ type: "NETWORK_CONNECTED" }); + const handleOnline = () => + this.store.dispatch({ type: "NETWORK_CONNECTED" }); const handleOffline = () => this.store.dispatch({ type: "NETWORK_DISCONNECTED" }); @@ -187,9 +188,15 @@ class Webamp { "The misspelled option `avaliableSkins` is deprecated. Please use `availableSkins` instead." ); // @ts-ignore - this.store.dispatch({ type: "SET_AVAILABLE_SKINS", skins: avaliableSkins }); + this.store.dispatch({ + type: "SET_AVAILABLE_SKINS", + skins: avaliableSkins, + }); } else if (availableSkins != null) { - this.store.dispatch({ type: "SET_AVAILABLE_SKINS", skins: availableSkins }); + this.store.dispatch({ + type: "SET_AVAILABLE_SKINS", + skins: availableSkins, + }); } this.store.dispatch(Actions.setWindowLayout(options.windowLayout));