diff --git a/README.md b/README.md index 511abd82..bbff5d30 100644 --- a/README.md +++ b/README.md @@ -263,6 +263,9 @@ E.g., if it was used in a menu and the menu is red, the circle would be red. ### **WORK IN PROGRESS** --> ## Changelog +### **WORK IN PROGRESS** +* (foxriver76) implemented buttons to show or hide all views in views manager + ### 2.9.31 (2024-02-06) * (foxriver76) apply default overflow correctly * (foxriver76) navigation style fixes (fix icon background and allow to customize header text color) diff --git a/src/src/Toolbar/ViewsManager/index.jsx b/src/src/Toolbar/ViewsManager/index.jsx index e15abf77..ee93dce2 100644 --- a/src/src/Toolbar/ViewsManager/index.jsx +++ b/src/src/Toolbar/ViewsManager/index.jsx @@ -12,6 +12,8 @@ import { AppBar, IconButton, Tooltip } from '@mui/material'; import { Add as AddIcon, CreateNewFolder as CreateNewFolderIcon, + Visibility as VisibilityIcon, + VisibilityOff as VisibilityOffIcon, } from '@mui/icons-material'; import { BiImport } from 'react-icons/bi'; @@ -209,6 +211,37 @@ const ViewsManager = props => { : null} + {props.editMode ? + { + const proj = deepClone(store.getState().visProject); + + const views = Object.keys(proj).filter(name => !name.startsWith('___')); + + for (const view of views) { + proj.___settings.openedViews.push(view); + } + + await props.changeProject(proj, false); + }} + > + + + : null} + {props.editMode ? + { + const proj = deepClone(store.getState().visProject); + proj.___settings.openedViews = []; + + await props.changeProject(proj, false); + }} + > + + + : null} : null}