-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
41 additions
and
40 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/renderer/components/settings/app/SelectDefaultView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Box, FormControl, InputLabel, NativeSelect } from '@mui/material'; | ||
import React from 'react'; | ||
import { useMainView } from 'renderer/context/MainViewContext'; | ||
|
||
const SelectDefaultView = () => { | ||
const myMainView: any = useMainView(); | ||
|
||
const handleChange = (event: any) => { | ||
myMainView.setView(event.target.value); | ||
window.electron.store.set('defaultView', Number(event.target.value)); | ||
}; | ||
|
||
return ( | ||
<Box> | ||
<FormControl fullWidth> | ||
<InputLabel variant="standard" id="defaultLinkLabel"> | ||
Default View for Media Lists | ||
</InputLabel> | ||
<NativeSelect | ||
id="defaultLinkSelect" | ||
value={myMainView.view} | ||
onChange={handleChange} | ||
> | ||
<option value={0}>Grid</option> | ||
<option value={1}>Compact</option> | ||
<option value={2}>List</option> | ||
</NativeSelect> | ||
</FormControl> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default SelectDefaultView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters