Skip to content

Commit

Permalink
implemented buttons to show or hide all views in views manager
Browse files Browse the repository at this point in the history
- closes #33
  • Loading branch information
foxriver76 committed Feb 7, 2024
1 parent bd553fa commit 613171f
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Expand Up @@ -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)
Expand Down
33 changes: 33 additions & 0 deletions src/src/Toolbar/ViewsManager/index.jsx
Expand Up @@ -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';

Expand Down Expand Up @@ -209,6 +211,37 @@ const ViewsManager = props => {
<CreateNewFolderIcon />
</IconButton>
</Tooltip> : null}
{props.editMode ? <Tooltip title={I18n.t('Show all views')} classes={{ popper: props.classes.tooltip }}>
<IconButton
size="small"
onClick={async () => {
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);
}}
>
<VisibilityIcon />
</IconButton>
</Tooltip> : null}
{props.editMode ? <Tooltip title={I18n.t('Hide all views')} classes={{ popper: props.classes.tooltip }}>
<IconButton
size="small"
onClick={async () => {
const proj = deepClone(store.getState().visProject);
proj.___settings.openedViews = [];

await props.changeProject(proj, false);
}}
>
<VisibilityOffIcon />
</IconButton>
</Tooltip> : null}
</AppBar> : null}
<div style={{
width: '100%',
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/de.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Höhe",
"Hide": "Ausblenden",
"Hide after selection": "Nach Auswahl ausblenden",
"Hide all views": "Alle Seiten ausblenden",
"Hide attributes": "Attribute ausblenden",
"Hide menu": "Menü ausblenden",
"Hide palette": "Palette ausblenden",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Einstell.",
"Should it be moved to new place?": "Sollte es an einen neuen Ort verlegt werden?",
"Show": "Zeigen",
"Show all views": "Alle Seiten anzeigen",
"Show app bar": "Anzeigen",
"Show background of button": "Hintergrund der Show-Schaltfläche",
"Show navigation": "Navigation anzeigen",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/en.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Height",
"Hide": "Hide",
"Hide after selection": "Hide after selection",
"Hide all views": "Hide all views",
"Hide attributes": "Hide attributes",
"Hide menu": "Hide menu",
"Hide palette": "Hide palette",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Settings",
"Should it be moved to new place?": "Should it be moved to new place?",
"Show": "Show",
"Show all views": "Show all views",
"Show app bar": "Show",
"Show background of button": "Background of show button",
"Show navigation": "Show navigation",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/es.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Altura",
"Hide": "Ocultar",
"Hide after selection": "Ocultar después de la selección",
"Hide all views": "Ocultar todas las vistas",
"Hide attributes": "Ocultar atributos",
"Hide menu": "Ocultar el menú",
"Hide palette": "Ocultar paleta",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Ajustes",
"Should it be moved to new place?": "¿Debería trasladarse a un nuevo lugar?",
"Show": "Espectáculo",
"Show all views": "Mostrar todas las vistas",
"Show app bar": "Espectáculo",
"Show background of button": "Fondo del botón Mostrar",
"Show navigation": "Mostrar navegación",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/fr.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Hauteur",
"Hide": "Cacher",
"Hide after selection": "Masquer après la sélection",
"Hide all views": "Masquer toutes les vues",
"Hide attributes": "Masquer les attributs",
"Hide menu": "Masquer le menu",
"Hide palette": "Masquer la palette",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Réglages",
"Should it be moved to new place?": "Doit-il être déplacé vers un nouvel endroit ?",
"Show": "Spectacle",
"Show all views": "Afficher toutes les vues",
"Show app bar": "Montrer",
"Show background of button": "Arrière-plan du bouton Afficher",
"Show navigation": "Afficher la navigation",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/it.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Altezza",
"Hide": "Nascondere",
"Hide after selection": "Nascondi dopo la selezione",
"Hide all views": "Nascondi tutte le visualizzazioni",
"Hide attributes": "Nascondi attributi",
"Hide menu": "Nascondi menù",
"Hide palette": "Nascondi tavolozza",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Impost.",
"Should it be moved to new place?": "Dovrebbe essere spostato in un nuovo posto?",
"Show": "Mostrare",
"Show all views": "Mostra tutte le visualizzazioni",
"Show app bar": "Spettacolo",
"Show background of button": "Sfondo del pulsante Mostra",
"Show navigation": "Mostra la navigazione",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/nl.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Hoogte",
"Hide": "Verbergen",
"Hide after selection": "Verbergen na selectie",
"Hide all views": "Verberg alle weergaven",
"Hide attributes": "Kenmerken verbergen",
"Hide menu": "Menu verbergen",
"Hide palette": "Palet verbergen",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Instellingen",
"Should it be moved to new place?": "Moet het naar een nieuwe plek worden verplaatst?",
"Show": "Show",
"Show all views": "Toon alle weergaven",
"Show app bar": "Show",
"Show background of button": "Achtergrond van knop Toon",
"Show navigation": "Toon navigatie",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/pl.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Wysokość",
"Hide": "Ukrywać",
"Hide after selection": "Ukryj po zaznaczeniu",
"Hide all views": "Ukryj wszystkie widoki",
"Hide attributes": "Ukryj atrybuty",
"Hide menu": "Ukryj menu",
"Hide palette": "Ukryj paletę",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Ustawienia",
"Should it be moved to new place?": "Czy należy go przenieść w nowe miejsce?",
"Show": "Pokazać",
"Show all views": "Pokaż wszystkie widoki",
"Show app bar": "Pokazywać",
"Show background of button": "Tło przycisku Pokaż",
"Show navigation": "Pokaż nawigację",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/pt.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Altura",
"Hide": "Esconder",
"Hide after selection": "Ocultar após seleção",
"Hide all views": "Ocultar todas as visualizações",
"Hide attributes": "Ocultar atributos",
"Hide menu": "Ocultar menu",
"Hide palette": "Ocultar paleta",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Definições",
"Should it be moved to new place?": "Deve ser movido para um novo local?",
"Show": "mostrar",
"Show all views": "Mostrar todas as visualizações",
"Show app bar": "Mostrar",
"Show background of button": "Plano de fundo do botão Mostrar",
"Show navigation": "Mostrar navegação",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/ru.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Высота",
"Hide": "Скрывать",
"Hide after selection": "Скрыть после выбора",
"Hide all views": "Скрыть все представления",
"Hide attributes": "Скрыть свойства",
"Hide menu": "Скрыть меню",
"Hide palette": "Скрыть палитру",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Настр.",
"Should it be moved to new place?": "Стоит ли его перенести на новое место?",
"Show": "Показывать",
"Show all views": "Показать все виды",
"Show app bar": "Показать",
"Show background of button": "Фон кнопки «Показать»",
"Show navigation": "Показать навигацию",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/uk.json
Expand Up @@ -216,6 +216,7 @@
"Height": "Висота",
"Hide": "Сховати",
"Hide after selection": "Сховати після виділення",
"Hide all views": "Приховати всі перегляди",
"Hide attributes": "Приховати атрибути",
"Hide menu": "Приховати меню",
"Hide palette": "Сховати палітру",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "Налашт.",
"Should it be moved to new place?": "Чи варто його переносити на нове місце?",
"Show": "Показати",
"Show all views": "Показати всі перегляди",
"Show app bar": "Показати",
"Show background of button": "Фон кнопки «Показати».",
"Show navigation": "Показати навігацію",
Expand Down
2 changes: 2 additions & 0 deletions src/src/i18n/zh-cn.json
Expand Up @@ -216,6 +216,7 @@
"Height": "高度",
"Hide": "隐藏",
"Hide after selection": "选择后隐藏",
"Hide all views": "隐藏所有视图",
"Hide attributes": "隐藏属性",
"Hide menu": "隐藏菜单",
"Hide palette": "隐藏调色板",
Expand Down Expand Up @@ -350,6 +351,7 @@
"Settings": "设置",
"Should it be moved to new place?": "是否应该搬到新地方?",
"Show": "节目",
"Show all views": "显示所有视图",
"Show app bar": "展示",
"Show background of button": "显示按钮的背景",
"Show navigation": "显示导航",
Expand Down

0 comments on commit 613171f

Please sign in to comment.