fix: settings page portrait layout — flex fill instead of fixed 70vh
Root becomes flex column (header fixed, layout flex:1); scroll container uses flex:1 + minHeight:0 instead of fixed height:70vh so portrait/phone screens get full remaining height instead of a short squished panel.
This commit is contained in:
1 parent
8e538fea80
commit
4ff8488587
1 file changed
+6
-5
@@ -46,11 +46,11 @@ export default function SettingsPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="page-slide active" style={{ overflow: 'hidden', height: '100vh' }}>
|
<div className="page-slide active" style={{ overflow: 'hidden', height: '100vh', display: 'flex', flexDirection: 'column' }}>
|
||||||
<div className="page-header" style={{ width: '100%' }}>
|
<div className="page-header" style={{ width: '100%', flexShrink: 0 }}>
|
||||||
<h2><Icon name="settings" size={20} /> {t('settings.title')}</h2>
|
<h2><Icon name="settings" size={20} /> {t('settings.title')}</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="settings-layout" style={{ width: '100%', display: 'flex', gap: 28, alignItems: 'flex-start' }}>
|
<div className="settings-layout" style={{ width: '100%', display: 'flex', gap: 28, alignItems: 'flex-start', flex: 1, minHeight: 0 }}>
|
||||||
<aside className="settings-sidebar" style={{ width: 200, flexShrink: 0 }}>
|
<aside className="settings-sidebar" style={{ width: 200, flexShrink: 0 }}>
|
||||||
<nav className="settings-nav">
|
<nav className="settings-nav">
|
||||||
{NAV.map((n) => (
|
{NAV.map((n) => (
|
||||||
@@ -67,12 +67,13 @@ export default function SettingsPage() {
|
|||||||
))}
|
))}
|
||||||
</nav>
|
</nav>
|
||||||
</aside>
|
</aside>
|
||||||
<main className="settings-content" id="settingsContent" style={{ overflow: 'hidden', padding: 0 }}>
|
<main className="settings-content" id="settingsContent" style={{ overflow: 'hidden', padding: 0, alignSelf: 'stretch', display: 'flex', flexDirection: 'column', minHeight: 0 }}>
|
||||||
<div
|
<div
|
||||||
ref={scrollRef}
|
ref={scrollRef}
|
||||||
onScroll={handleScroll}
|
onScroll={handleScroll}
|
||||||
style={{
|
style={{
|
||||||
height: '70vh',
|
flex: 1,
|
||||||
|
minHeight: 0,
|
||||||
overflowY: 'auto',
|
overflowY: 'auto',
|
||||||
scrollSnapType: 'y mandatory',
|
scrollSnapType: 'y mandatory',
|
||||||
scrollBehavior: 'smooth',
|
scrollBehavior: 'smooth',
|
||||||
|
|||||||
Reference in new issue
Block a user