Auto-expand utilities menu when upgrade is available. Closes https://github.com/owncast/owncast/issues/1299

This commit is contained in:
Gabe Kangas 2021-08-12 23:46:24 -07:00
parent ff595bfd7b
commit e3eda87719

View File

@ -78,6 +78,7 @@ export default function MainLayout(props) {
const upgradeVersionString = `${upgradeVersion}` || '';
const upgradeMessage = `Upgrade to v${upgradeVersionString}`;
const chatMenuItemStyle = chatDisabled ? 'none' : 'block';
const openMenuItems = upgradeVersion ? ['utilities-menu'] : [];
const clearAlertMessage = () => {
alertMessage.setMessage(null);
@ -127,7 +128,7 @@ export default function MainLayout(props) {
<Sider width={240} className="side-nav">
<Menu
defaultSelectedKeys={[route.substring(1) || 'home']}
defaultOpenKeys={[]}
defaultOpenKeys={openMenuItems}
mode="inline"
className="menu-container"
>