Add configuration for player image aspect ratio (#138)

This commit is contained in:
Jeff 2023-06-10 19:14:49 -07:00 committed by GitHub
parent eeefe9d9dc
commit 72099cb1fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 40 additions and 8 deletions

View file

@ -59,7 +59,7 @@ const BackgroundImageOverlay = styled.div`
`;
const Controls = () => {
const { dynamicBackground, expanded } = useFullScreenPlayerStore();
const { dynamicBackground, expanded, useImageAspectRatio } = useFullScreenPlayerStore();
const { setStore } = useFullScreenPlayerStoreActions();
const handleToggleFullScreenPlayer = () => {
@ -112,6 +112,19 @@ const Controls = () => {
/>
</Option.Control>
</Option>
<Option>
<Option.Label>Use image aspect ratio</Option.Label>
<Option.Control>
<Switch
defaultChecked={useImageAspectRatio}
onChange={(e) =>
setStore({
useImageAspectRatio: e.target.checked,
})
}
/>
</Option.Control>
</Option>
<TableConfigDropdown type="fullScreen" />
</Popover.Dropdown>
</Popover>