Skip to content

Commit

Permalink
Corrected widget selector
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Jul 10, 2024
1 parent 72c81b6 commit fa93b3d
Show file tree
Hide file tree
Showing 15 changed files with 32 additions and 18 deletions.
6 changes: 3 additions & 3 deletions packages/iobroker.vis-2/src/src/Toolbar/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Checkbox, FormControl, MenuItem,
Menu, List,
ListItemButton, ListItemText,
ListItemIcon, InputLabel, Button,
ListItemIcon, InputLabel, Button, Box,
} from '@mui/material';

import {
Expand Down Expand Up @@ -178,7 +178,7 @@ class MultiSelect extends Component<MultiSelectProps, MultiSelectState> {
anchorEl={this.state.elAnchor}
onClose={() => this.setState({ elAnchor: null })}
>
<div style={styles.menuToolbar}>
<Box sx={styles.menuToolbar}>
{I18n.t('All')}
<Button
disabled={value.length === props.options.length}
Expand All @@ -194,7 +194,7 @@ class MultiSelect extends Component<MultiSelectProps, MultiSelectState> {
>
{I18n.t('Unselect')}
</Button>
</div>
</Box>
{props.options.map(item => <MenuItem
value={item.value}
key={item.value}
Expand Down
6 changes: 5 additions & 1 deletion packages/iobroker.vis-2/src/src/Toolbar/ToolbarItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,11 @@ function getItem(
onChange={_value => item.onChange(_value)}
setSelectedWidgets={props.setSelectedWidgets}
options={item.items.map(option => ({
name: option.name as string, subname: option.subName, value: option.value, color: option.color, icon: option.icon,
name: option.name as string,
subname: option.subName,
value: option.value,
color: option.color,
icon: option.icon,
}))}
themeType={props.themeType}
/>;
Expand Down
3 changes: 1 addition & 2 deletions packages/iobroker.vis-2/src/src/Toolbar/Widgets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ import {
VisibilityOff as VisibilityOffIcon,
} from '@mui/icons-material';

import type { ThemeType } from '@iobroker/adapter-react-v5';
import { I18n } from '@iobroker/adapter-react-v5';
import { I18n, type ThemeType } from '@iobroker/adapter-react-v5';
import type { AnyWidgetId, GroupWidgetId, VisTheme } from '@iobroker/types-vis-2';
import type Editor from '@/Editor';
import { store } from '../Store';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class JQuiWriteState extends VisRxWidget<RxData, JQuiWriteStateState> {
{
name: 'text',
type: 'text',
default: I18n.t('Write state'),
default: I18n.t('jqui_Write state'),
},
{
name: 'src',
Expand Down
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Eingegebener Wert",
"vis-2-widgets-basic-autoSetDelay": "Verzögerung für automatisches Schreiben",
"vis-2-widgets-basic-noStyle": "Kein Style",
"Clone": "Klonen"
"Clone": "Klonen",
"jqui_Write state": "Schreibstatus"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Input value",
"vis-2-widgets-basic-autoSetDelay": "Delay for auto-write",
"vis-2-widgets-basic-noStyle": "No style",
"Clone": "Clone"
"Clone": "Clone",
"jqui_Write state": "Write state"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Valor de entrada",
"vis-2-widgets-basic-autoSetDelay": "Retraso para la escritura automática",
"vis-2-widgets-basic-noStyle": "Sin estilo",
"Clone": "Clon"
"Clone": "Clon",
"jqui_Write state": "Escribir estado"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Valeur d'entrée",
"vis-2-widgets-basic-autoSetDelay": "Délai d'écriture automatique",
"vis-2-widgets-basic-noStyle": "Aucun style",
"Clone": "Cloner"
"Clone": "Cloner",
"jqui_Write state": "État d'écriture"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Valore immesso",
"vis-2-widgets-basic-autoSetDelay": "Ritardo per la scrittura automatica",
"vis-2-widgets-basic-noStyle": "Nessuno stile",
"Clone": "Clone"
"Clone": "Clone",
"jqui_Write state": "Scrivi stato"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Invoerwaarde",
"vis-2-widgets-basic-autoSetDelay": "Vertraging voor automatisch schrijven",
"vis-2-widgets-basic-noStyle": "Geen stijl",
"Clone": "Kloon"
"Clone": "Kloon",
"jqui_Write state": "Schrijf staat"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Wartość wejściowa",
"vis-2-widgets-basic-autoSetDelay": "Opóźnienie automatycznego zapisu",
"vis-2-widgets-basic-noStyle": "Brak stylu",
"Clone": "Klon"
"Clone": "Klon",
"jqui_Write state": "Napisz stan"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Valor de entrada",
"vis-2-widgets-basic-autoSetDelay": "Atraso para gravação automática",
"vis-2-widgets-basic-noStyle": "Sem estilo",
"Clone": "Clone"
"Clone": "Clone",
"jqui_Write state": "Escrever estado"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Входное значение",
"vis-2-widgets-basic-autoSetDelay": "Задержка для автозаписи",
"vis-2-widgets-basic-noStyle": "Нет стиля",
"Clone": "Клонировать"
"Clone": "Клонировать",
"jqui_Write state": "Написать состояние"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "Вхідне значення",
"vis-2-widgets-basic-autoSetDelay": "Затримка для автозапису",
"vis-2-widgets-basic-noStyle": "Ніякого стилю",
"Clone": "Клон"
"Clone": "Клон",
"jqui_Write state": "Написати стан"
}
3 changes: 2 additions & 1 deletion packages/iobroker.vis-2/src/src/i18n/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -745,5 +745,6 @@
"vis-2-widgets-basic-input_value": "输入值",
"vis-2-widgets-basic-autoSetDelay": "自动写入延迟",
"vis-2-widgets-basic-noStyle": "没有风格",
"Clone": "克隆"
"Clone": "克隆",
"jqui_Write state": "写状态"
}

0 comments on commit fa93b3d

Please sign in to comment.