File tree 3 files changed +10
-28
lines changed
3 files changed +10
-28
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,12 @@ export default class MenuBuilder {
166
166
} ) ;
167
167
} ,
168
168
} ,
169
+ {
170
+ label : 'quiet down' ,
171
+ click : ( ) => {
172
+ this . mainWindow . webContents . send ( 'menu-quiet-mode' ) ;
173
+ } ,
174
+ } ,
169
175
170
176
{ type : 'separator' } ,
171
177
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export default function Main() {
47
47
( store ) => store . setOverrideScrollToIndex ,
48
48
) ;
49
49
const skipToNextSong = usePlayerStore ( ( store ) => store . skipToNextSong ) ;
50
+ const setVolume = usePlayerStore ( ( store ) => store . setVolume ) ;
50
51
51
52
// Component state
52
53
const [ dialogState , setDialogState ] = useState ( {
@@ -208,6 +209,9 @@ export default function Main() {
208
209
'menu-reset-library' : ( ) => {
209
210
window . electron . ipcRenderer . sendMessage ( 'menu-reset-library' ) ;
210
211
} ,
212
+ 'menu-quiet-mode' : ( ) => {
213
+ setVolume ( 2 ) ;
214
+ } ,
211
215
} ;
212
216
213
217
Object . entries ( handlers ) . forEach ( ( [ event , handler ] ) => {
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import ShuffleOnIcon from '@mui/icons-material/ShuffleOn';
10
10
import RepeatIcon from '@mui/icons-material/Repeat' ;
11
11
import Stack from '@mui/material/Stack' ;
12
12
import RepeatOnIcon from '@mui/icons-material/RepeatOn' ;
13
- import SpatialAudioIcon from '@mui/icons-material/SpatialAudio' ;
14
13
import VolumeSliderStack from './VolumeSliderStack' ;
15
14
import SongProgressAndSongDisplay from './SongProgressAndSongDisplay' ;
16
15
import usePlayerStore from '../store/player' ;
@@ -99,20 +98,6 @@ export default function StaticPlayer({
99
98
) }
100
99
</ IconButton >
101
100
</ Tooltip >
102
- < Tooltip title = "Quiet Mode" >
103
- < IconButton
104
- onClick = { ( ) => {
105
- // set the volume to 0.02 so you can listen to a podcast or hear the person next to you
106
- setVolume ( 2 ) ;
107
- } }
108
- sx = { {
109
- fontSize : '1rem' ,
110
- color : 'rgb(133,133,133)' ,
111
- } }
112
- >
113
- < SpatialAudioIcon fontSize = "inherit" />
114
- </ IconButton >
115
- </ Tooltip >
116
101
</ div >
117
102
118
103
{ /**
@@ -223,19 +208,6 @@ export default function StaticPlayer({
223
208
) }
224
209
</ IconButton >
225
210
</ Tooltip >
226
- < Tooltip title = "Quiet Mode" >
227
- < IconButton
228
- onClick = { ( ) => {
229
- setVolume ( 2.5 ) ;
230
- } }
231
- sx = { {
232
- fontSize : '1rem' ,
233
- color : 'rgb(133,133,133)' ,
234
- } }
235
- >
236
- < SpatialAudioIcon fontSize = "inherit" />
237
- </ IconButton >
238
- </ Tooltip >
239
211
</ div >
240
212
< VolumeSliderStack
241
213
onChange = { ( event , value ) => {
You can’t perform that action at this time.
0 commit comments