Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated packages #270

Merged
merged 5 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"chai": "^4.5.0",
"colorette": "^2.0.20",
"mocha": "^11.0.1",
"puppeteer": "^23.11.0",
"puppeteer": "^23.11.1",
"typescript": "~5.7.2"
},
"bugs": {
Expand Down
32 changes: 16 additions & 16 deletions src-admin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
},
"dependencies": {
"@foxriver76/iob-component-lib": "^0.2.0",
"@iobroker/adapter-react-v5": "^7.4.8",
"@iobroker/dm-gui-components": "~7.4.8",
"@iobroker/adapter-react-v5": "^7.4.10",
"@iobroker/dm-gui-components": "~7.4.10",
"@iobroker/type-detector": "^4.1.1",
"@types/react-dom": "^18.3.5",
"@types/uuid": "^10.0.0",
Expand Down Expand Up @@ -51,4 +51,4 @@
}
]
]
}
}
12 changes: 6 additions & 6 deletions src-admin/src/Tabs/Bridges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
addDeviceDialog: null,
addCustomDeviceDialog: {
oid,
name,
name: name || '',
deviceType: '',
bridgeIndex: this.bridgeIndex as number,
noComposed: false,
Expand All @@ -930,7 +930,7 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
addDeviceDialog: null,
addCustomDeviceDialog: {
oid,
name,
name: name || '',
deviceType,
bridgeIndex: this.bridgeIndex as number,
hasOnState: controls[0].devices[0].hasOnState,
Expand All @@ -945,6 +945,8 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
);
}

const nodeState = this.props.nodeStates[this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].uuid];

return (
<DeviceDialog
onClose={() => this.setState({ addDeviceDialog: null })}
Expand All @@ -954,11 +956,9 @@ export class Bridges extends BridgesAndDevices<BridgesProps, BridgesState> {
}
devicesInBridge={this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].list.length}
checkAddedDevices={
this.props.nodeStates[this.props.matter.bridges[this.state.addDeviceDialog.bridgeIndex].uuid]
?.status !== 'waitingForCommissioning'
? 0
: MAX_UN_COMMISSIONED_DEVICES
nodeState && nodeState?.status !== 'waitingForCommissioning' ? 0 : MAX_UN_COMMISSIONED_DEVICES
}
themeType={this.props.themeType}
matter={this.props.matter}
socket={this.props.socket}
detectedDevices={this.props.detectedDevices}
Expand Down
3 changes: 3 additions & 0 deletions src-admin/src/Tabs/BridgesAndDevices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,9 @@ class BridgesAndDevices<TProps extends BridgesAndDevicesProps, TState extends Br
variant="standard"
sx={{ marginTop: 1 }}
/>
<div style={{ fontStyle: 'italic', fontSize: 14, width: '100%' }}>
{I18n.t('Announcement will stop automatically after 15 minutes')}
</div>
</DialogContent>
<DialogActions>
<Button
Expand Down
5 changes: 3 additions & 2 deletions src-admin/src/Tabs/Devices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ class Devices extends BridgesAndDevices<DevicesProps, DevicesState> {
addDeviceDialog: null,
addCustomDeviceDialog: {
oid,
name,
name: name || '',
deviceType: '',
noComposed: false,
vendorID: '0xFFF1',
Expand All @@ -890,7 +890,7 @@ class Devices extends BridgesAndDevices<DevicesProps, DevicesState> {
addDeviceDialog: null,
addCustomDeviceDialog: {
oid,
name,
name: name || '',
deviceType,
hasOnState: controls[0].devices[0].hasOnState,
vendorID: '0xFFF1',
Expand All @@ -911,6 +911,7 @@ class Devices extends BridgesAndDevices<DevicesProps, DevicesState> {
addDevices={(devices: DetectedDevice[]) => this.addDevices(devices, true)}
matter={this.props.matter}
socket={this.props.socket}
themeType={this.props.themeType}
detectedDevices={this.props.detectedDevices}
setDetectedDevices={detectedDevices => this.props.setDetectedDevices(detectedDevices)}
type="device"
Expand Down
26 changes: 20 additions & 6 deletions src-admin/src/components/DeviceDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ import {

import { Add, Close, ExpandMore } from '@mui/icons-material';

import { type AdminConnection, I18n, Icon, IconDeviceType, type IobTheme } from '@iobroker/adapter-react-v5';
import {
type AdminConnection,
I18n,
Icon,
IconDeviceType,
type IobTheme,
type ThemeType,
} from '@iobroker/adapter-react-v5';
import { Types } from '@iobroker/type-detector';

import { clone, detectDevices, getText } from '../Utils';
Expand Down Expand Up @@ -124,6 +131,7 @@ interface DeviceDialogProps {
devicesInBridge?: number;
/** If dialog should check the number of devices */
checkAddedDevices?: number;
themeType: ThemeType;
}

interface DeviceDialogState {
Expand Down Expand Up @@ -458,7 +466,11 @@ class DeviceDialog extends Component<DeviceDialogProps, DeviceDialogState> {
devices.length &&
(this.props.devicesInBridge || 0) + devices.length > this.props.checkAddedDevices
) {
showHint = <div style={{ color: '#FF0000', fontSize: 10 }}>{I18n.t('Warning about 15 devices')}</div>;
showHint = (
<div style={{ color: this.props.themeType === 'dark' ? '#ff5555' : '#980000', fontSize: 14 }}>
{I18n.t('Warning about 15 devices')}
</div>
);
}

return (
Expand Down Expand Up @@ -612,15 +624,15 @@ class DeviceDialog extends Component<DeviceDialogProps, DeviceDialogState> {
<Checkbox
title={I18n.t('Select/Unselect all devices in room')}
indeterminate={
counters[roomIndex] !== room.devices.length &&
counters[roomIndex] !== lengths[roomIndex] &&
!!counters[roomIndex]
}
checked={counters[roomIndex] === room.devices.length}
checked={counters[roomIndex] === lengths[roomIndex]}
onClick={e => {
e.stopPropagation();
e.preventDefault();
const devicesChecked = clone(this.state.devicesChecked);
if (counters[roomIndex] === room.devices.length) {
if (counters[roomIndex] === lengths[roomIndex]) {
room.devices.forEach(
device => (devicesChecked[device._id] = false),
);
Expand All @@ -629,7 +641,9 @@ class DeviceDialog extends Component<DeviceDialogProps, DeviceDialogState> {
if (
SUPPORTED_DEVICES.includes(
device.deviceType,
)
) &&
(!this.state.ignoreUsedDevices ||
!this.state.usedDevices[device._id])
) {
devicesChecked[device._id] = true;
}
Expand Down
3 changes: 2 additions & 1 deletion src-admin/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"All information of this device or bridge will be deleted and you must reconnect (with PIN or QR code) again.": "Alle Informationen dieses Geräts oder dieser Bridge werden gelöscht und Sie müssen die Verbindung (mit PIN oder QR-Code) erneut herstellen.",
"All interfaces": "Alle Schnittstellen",
"All state information of matter controller and devices will be deleted. You cannot undo it.": "Der Controller und alle Geräte und Bridges werden auf die Werkseinstellungen zurückgesetzt. \nDadurch werden die Pairing- und aktuellen Werte für alle Geräte, Bridges und auch gepaarten Geräte im Controller gelöscht. Sie können dies nicht rückgängig machen.\nDie allgemeine Konfiguration des Controllers und die zugewiesenen ioBroker-Zustände für die Bridges und Geräte bleiben unverändert.",
"Announcement will stop automatically after 15 minutes": "Die Durchsage wird nach 15 Minuten automatisch beendet",
"Apply": "Anwenden",
"Are you sure?": "Bist du sicher?",
"At least one bridge must be enabled": "Mindestens eine Bridge muss aktiviert sein",
Expand Down Expand Up @@ -113,7 +114,7 @@
"Provide your Thread or WiFi information or both!": "Geben Sie Ihre Thread- oder WiFi-Informationen oder beides an!",
"QR Code": "QR-Code",
"QR Code to connect": "QR-Code zum Verbinden",
"Re-Announce": "Re-announce",
"Re-Announce": "Pairing neu starten",
"Reconnect to backend": "Erneute Verbindung zum Backend herstellen",
"Required": "Erforderlich",
"Requirements: add via QR Code": "Voraussetzung: Das Matter-Gerät muss bereits mit einem anderen Matter-System (z. B. Google, Apple, Alexa, …) verbunden sein. Hier musst du den QR-Code-Pairing-Code eingeben oder den QR-Code scannen, der vom Matter-Ökosystem (z. B. Google Home) für dieses Matter-Gerät in der App bereitgestellt wird.",
Expand Down
1 change: 1 addition & 0 deletions src-admin/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"All information of this device or bridge will be deleted and you must reconnect (with PIN or QR code) again.": "All information of this device or bridge will be deleted and you must reconnect (with PIN or QR code) again.",
"All interfaces": "All interfaces",
"All state information of matter controller and devices will be deleted. You cannot undo it.": "The Controller and all devices and bridges will be rest to factory defaults. \nThis deletes the pairing and current values for all devices, bridges and also paired devices in the controller. You cannot undo it.\nThe general configuration of the controller, and the assigned ioBroker states for the bridges and devices will stay unchanged.",
"Announcement will stop automatically after 15 minutes": "Announcement will stop automatically after 15 minutes",
"Apply": "Apply",
"Are you sure?": "Are you sure?",
"At least one bridge must be enabled": "At least one bridge must be enabled",
Expand Down
1 change: 1 addition & 0 deletions src-admin/src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"All information of this device or bridge will be deleted and you must reconnect (with PIN or QR code) again.": "Se eliminará toda la información de este dispositivo o puente y deberás volver a conectarte (con PIN o código QR) nuevamente.",
"All interfaces": "Todas las interfaces",
"All state information of matter controller and devices will be deleted. You cannot undo it.": "El controlador y todos los dispositivos y puentes volverán a los valores predeterminados de fábrica. \nEsto elimina el emparejamiento y los valores actuales de todos los dispositivos, puentes y también los dispositivos emparejados en el controlador. No puedes deshacerlo.\nLa configuración general del controlador y los estados de ioBroker asignados para los puentes y dispositivos permanecerán sin cambios.",
"Announcement will stop automatically after 15 minutes": "El anuncio se detendrá automáticamente después de 15 minutos.",
"Apply": "Aplicar",
"Are you sure?": "¿Está seguro?",
"At least one bridge must be enabled": "Al menos un puente debe estar habilitado.",
Expand Down
1 change: 1 addition & 0 deletions src-admin/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"All information of this device or bridge will be deleted and you must reconnect (with PIN or QR code) again.": "Toutes les informations de cet appareil ou pont seront supprimées et vous devrez vous reconnecter (avec code PIN ou QR) à nouveau.",
"All interfaces": "Toutes les interfaces",
"All state information of matter controller and devices will be deleted. You cannot undo it.": "Le contrôleur et tous les appareils et ponts seront restaurés aux paramètres d'usine par défaut. \nCela supprime les valeurs d'appariement et de courant pour tous les appareils, ponts ainsi que les appareils appairés dans le contrôleur. Vous ne pouvez pas l'annuler.\nLa configuration générale du contrôleur et les états ioBroker attribués aux ponts et aux appareils resteront inchangés.",
"Announcement will stop automatically after 15 minutes": "L'annonce s'arrêtera automatiquement après 15 minutes",
"Apply": "Appliquer",
"Are you sure?": "Es-tu sûr?",
"At least one bridge must be enabled": "Au moins un pont doit être activé",
Expand Down
Loading
Loading