mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
web/mainscreen: don't allow side bars to be more than 40% wide
This commit is contained in:
parent
57475e2d48
commit
d9d3ad3d67
1 changed files with 4 additions and 2 deletions
|
@ -259,10 +259,12 @@ const MainScreen = () => {
|
||||||
}
|
}
|
||||||
}, [client.userID])
|
}, [client.userID])
|
||||||
const [roomListWidth, resizeHandle1] = useResizeHandle(
|
const [roomListWidth, resizeHandle1] = useResizeHandle(
|
||||||
300, 48, 900, "roomListWidth", { className: "room-list-resizer" },
|
300, 48, Math.min(900, window.innerWidth * 0.4),
|
||||||
|
"roomListWidth", { className: "room-list-resizer" },
|
||||||
)
|
)
|
||||||
const [rightPanelWidth, resizeHandle2] = useResizeHandle(
|
const [rightPanelWidth, resizeHandle2] = useResizeHandle(
|
||||||
300, 100, 900, "rightPanelWidth", { className: "right-panel-resizer", inverted: true },
|
300, 100, Math.min(900, window.innerWidth * 0.4),
|
||||||
|
"rightPanelWidth", { className: "right-panel-resizer", inverted: true },
|
||||||
)
|
)
|
||||||
const extraStyle = {
|
const extraStyle = {
|
||||||
["--room-list-width" as string]: `${roomListWidth}px`,
|
["--room-list-width" as string]: `${roomListWidth}px`,
|
||||||
|
|
Loading…
Add table
Reference in a new issue