mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
[enhancement]: support using native image aspect ratio
This commit is contained in:
parent
961d1838c0
commit
38ed083693
13 changed files with 41 additions and 9 deletions
|
|
@ -62,7 +62,7 @@ const Image = styled(motion.div)`
|
|||
const PlayerbarImage = styled.img`
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: var(--image-fit);
|
||||
`;
|
||||
|
||||
const LineItem = styled.div<{ $secondary?: boolean }>`
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const MetadataWrapper = styled.div`
|
|||
`;
|
||||
|
||||
const StyledImage = styled.img`
|
||||
object-fit: cover;
|
||||
object-fit: var(--image-fit);
|
||||
border-radius: 4px;
|
||||
`;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,6 +90,28 @@ export const ControlSettings = () => {
|
|||
isHidden: false,
|
||||
title: t('setting.playerAlbumArtResolution', { postProcess: 'sentenceCase' }),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
aria-label="Toggle using native aspect ratio"
|
||||
defaultChecked={settings.nativeAspectRatio}
|
||||
onChange={(e) =>
|
||||
setSettings({
|
||||
general: {
|
||||
...settings,
|
||||
nativeAspectRatio: e.currentTarget.checked,
|
||||
},
|
||||
})
|
||||
}
|
||||
/>
|
||||
),
|
||||
description: t('setting.imageAspectRatio', {
|
||||
context: 'description',
|
||||
postProcess: 'sentenceCase',
|
||||
}),
|
||||
isHidden: false,
|
||||
title: t('setting.imageAspectRatio', { postProcess: 'sentenceCase' }),
|
||||
},
|
||||
{
|
||||
control: (
|
||||
<Switch
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
}
|
||||
|
||||
.image {
|
||||
object-fit: cover;
|
||||
object-fit: var(--image-fit);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const ImageContainer = styled(motion.div)<{ height: string }>`
|
|||
const SidebarImage = styled.img`
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-fit: var(--image-fit);
|
||||
background: var(--placeholder-bg);
|
||||
`;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue