Skip to content

Commit 8eae420

Browse files
committed
Format files
1 parent 704112b commit 8eae420

File tree

6 files changed

+48
-15
lines changed

6 files changed

+48
-15
lines changed

packages/webamp/js/reducers/equalizer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ const equalizer = (
3131
): EqualizerState => {
3232
switch (action.type) {
3333
case "SET_BAND_VALUE":
34-
const newSliders = { ...state.sliders, [(action as any).band]: (action as any).value };
34+
const newSliders = {
35+
...state.sliders,
36+
[(action as any).band]: (action as any).value,
37+
};
3538
return { ...state, sliders: newSliders };
3639
case "SET_EQ_ON":
3740
return { ...state, on: true };

packages/webamp/js/reducers/milkdrop.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,15 @@ export const milkdrop = (
3535
): MilkdropState => {
3636
switch (action.type) {
3737
case "SET_MILKDROP_DESKTOP":
38-
return { ...state, display: (action as any).enabled ? "DESKTOP" : "WINDOW" };
38+
return {
39+
...state,
40+
display: (action as any).enabled ? "DESKTOP" : "WINDOW",
41+
};
3942
case "SET_MILKDROP_FULLSCREEN":
40-
return { ...state, display: (action as any).enabled ? "FULLSCREEN" : "WINDOW" };
43+
return {
44+
...state,
45+
display: (action as any).enabled ? "FULLSCREEN" : "WINDOW",
46+
};
4147
case "GOT_BUTTERCHURN":
4248
return { ...state, butterchurn: (action as any).butterchurn };
4349
case "GOT_BUTTERCHURN_PRESETS":

packages/webamp/js/reducers/playlist.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ const playlist = (
118118
return { ...state, trackOrder };
119119
case "ADD_TRACK_FROM_URL":
120120
const atIndex =
121-
(action as any).atIndex == null ? state.trackOrder.length : (action as any).atIndex;
121+
(action as any).atIndex == null
122+
? state.trackOrder.length
123+
: (action as any).atIndex;
122124
return {
123125
...state,
124126
trackOrder: [

packages/webamp/js/reducers/userInput.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ export const userInput = (
2222
case "SET_FOCUS":
2323
return { ...state, focus: (action as any).input, bandFocused: null };
2424
case "SET_BAND_FOCUS":
25-
return { ...state, focus: (action as any).input, bandFocused: (action as any).bandFocused };
25+
return {
26+
...state,
27+
focus: (action as any).input,
28+
bandFocused: (action as any).bandFocused,
29+
};
2630
case "UNSET_FOCUS":
2731
return { ...state, focus: null, bandFocused: null };
2832
case "SET_SCRUB_POSITION":

packages/webamp/js/reducers/windows.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ const windows = (
111111
let windowOrder = state.windowOrder;
112112
if ((action as any).window != null) {
113113
windowOrder = [
114-
...state.windowOrder.filter((windowId) => windowId !== (action as any).window),
114+
...state.windowOrder.filter(
115+
(windowId) => windowId !== (action as any).window
116+
),
115117
(action as any).window,
116118
];
117119
}
@@ -120,7 +122,9 @@ const windows = (
120122
const { canShade } = state.genWindows[(action as any).windowId];
121123
if (!canShade) {
122124
throw new Error(
123-
`Tried to shade/unshade a window that cannot be shaded: ${(action as any).windowId}`
125+
`Tried to shade/unshade a window that cannot be shaded: ${
126+
(action as any).windowId
127+
}`
124128
);
125129
}
126130
return {
@@ -160,7 +164,9 @@ const windows = (
160164
const { canResize } = state.genWindows[(action as any).windowId];
161165
if (!canResize) {
162166
throw new Error(
163-
`Tried to resize a window that cannot be resized: ${(action as any).windowId}`
167+
`Tried to resize a window that cannot be resized: ${
168+
(action as any).windowId
169+
}`
164170
);
165171
}
166172
return {
@@ -177,7 +183,9 @@ const windows = (
177183
return {
178184
...state,
179185
positionsAreRelative:
180-
(action as any).absolute === true ? false : state.positionsAreRelative,
186+
(action as any).absolute === true
187+
? false
188+
: state.positionsAreRelative,
181189
genWindows: Utils.objectMap(state.genWindows, (w, windowId) => {
182190
const newPosition = (action as any).positions[windowId];
183191
if (newPosition == null) {
@@ -196,8 +204,8 @@ const windows = (
196204
})),
197205
};
198206
case "LOAD_SERIALIZED_STATE": {
199-
const { genWindows, focused, positionsAreRelative } =
200-
(action as any).serializedState.windows;
207+
const { genWindows, focused, positionsAreRelative } = (action as any)
208+
.serializedState.windows;
201209
return {
202210
...state,
203211
positionsAreRelative,
@@ -216,7 +224,10 @@ const windows = (
216224
case "BROWSER_WINDOW_SIZE_CHANGED":
217225
return {
218226
...state,
219-
browserWindowSize: { height: (action as any).height, width: (action as any).width },
227+
browserWindowSize: {
228+
height: (action as any).height,
229+
width: (action as any).width,
230+
},
220231
};
221232

222233
default:

packages/webamp/js/webampLazy.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ class Webamp {
158158
);
159159
}
160160

161-
const handleOnline = () => this.store.dispatch({ type: "NETWORK_CONNECTED" });
161+
const handleOnline = () =>
162+
this.store.dispatch({ type: "NETWORK_CONNECTED" });
162163
const handleOffline = () =>
163164
this.store.dispatch({ type: "NETWORK_DISCONNECTED" });
164165

@@ -187,9 +188,15 @@ class Webamp {
187188
"The misspelled option `avaliableSkins` is deprecated. Please use `availableSkins` instead."
188189
);
189190
// @ts-ignore
190-
this.store.dispatch({ type: "SET_AVAILABLE_SKINS", skins: avaliableSkins });
191+
this.store.dispatch({
192+
type: "SET_AVAILABLE_SKINS",
193+
skins: avaliableSkins,
194+
});
191195
} else if (availableSkins != null) {
192-
this.store.dispatch({ type: "SET_AVAILABLE_SKINS", skins: availableSkins });
196+
this.store.dispatch({
197+
type: "SET_AVAILABLE_SKINS",
198+
skins: availableSkins,
199+
});
193200
}
194201

195202
this.store.dispatch(Actions.setWindowLayout(options.windowLayout));

0 commit comments

Comments
 (0)