Skip to content

Commit

Permalink
* (bluefox) Widgets were corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Sep 21, 2024
1 parent e678af3 commit e4e231f
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 1,612 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ Here is an example of how to add Reolink E1:

## How to add a new camera (For developers)
To add a new camera, you must create a Pull Request on GitHub with the following changes:
- Add new file into `cameras` folder. This is a backend to read the single image from the camera.
- Add GUI file in the `src/src/Types/` folder. This is the configuration dialog for the camera
- Add a new file into `cameras` folder. This is a backend to read the single image from the camera.
- Add a GUI file in the `src/src/Types/` folder. This is the configuration dialog for the camera
- Add this dialog in `src/src/Tabs/Cameras.tsx` file analogical as other cameras are added. Only two lines should be added:
- Import new configuration dialog like `import RTSPMyCamConfig from '../Types/RTSPMyCam';`
- Extend `TYPES` structure with the new camera like `mycam: { Config: RTSPMyCamConfig, name: 'MyCam' },`
Expand All @@ -71,6 +71,9 @@ To add a new camera, you must create a Pull Request on GitHub with the following
-->

## Changelog
### **WORK IN PROGRESS**
* (bluefox) Widgets were corrected

### 2.1.2 (2024-07-15)
* (bluefox) Updated packages

Expand Down
Binary file removed admin/assets/favicon-CSF3NglM.ico
Binary file not shown.
1 change: 0 additions & 1 deletion admin/assets/index-BqFSCGOi.css

This file was deleted.

1,543 changes: 0 additions & 1,543 deletions admin/assets/index-Bzuyxa8c.js

This file was deleted.

1 change: 0 additions & 1 deletion admin/assets/index-Bzuyxa8c.js.map

This file was deleted.

15 changes: 0 additions & 15 deletions admin/assets/manifest-DQd0VAqi.json

This file was deleted.

Binary file removed admin/cameras.png
Binary file not shown.
46 changes: 0 additions & 46 deletions admin/index_m.html

This file was deleted.

4 changes: 2 additions & 2 deletions src-widgets/src/RtspCamera.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const CameraField = props => {
enabled: iCamera.enabled !== false,
value: `${instanceId}/${iCamera.name}`,
label: `cameras.${instanceId}/${iCamera.name}`,
subLabel: iCamera.desc ? `${iCamera.desc}/${iCamera.ip}` : iCamera.ip || '',
subLabel: iCamera.desc && iCamera.ip ? `${iCamera.desc}/${iCamera.ip}` : iCamera.desc || iCamera.ip || '',
});
});
});
Expand All @@ -77,7 +77,7 @@ export const CameraField = props => {
style={{ display: 'block', opacity: iCamera.enabled ? 1 : 0.5 }}
>
<div>{iCamera.label}</div>
<div style={{ fontSize: 10, fontStyle: 'italic', opacity: 0.7 }}>{iCamera.subLabel}</div>
{iCamera.subLabel ? <div style={{ fontSize: 10, fontStyle: 'italic', opacity: 0.7 }}>{iCamera.subLabel}</div> : null}
{!iCamera.enabled ? (
<div
style={{
Expand Down
4 changes: 2 additions & 2 deletions src-widgets/src/SnapshotCamera.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class SnapshotCamera extends Generic {
}

getUrl(isFull) {
if (isFull && !this.state.rxData.bigCamera) {
if (isFull && this.state.rxData.bigCamera) {
const url = `../cameras.${this.state.rxData.bigCamera}?`;
const params = [
`ts=${Date.now()}`,
Expand Down Expand Up @@ -364,7 +364,7 @@ class SnapshotCamera extends Generic {
{Generic.t('Cannot load URL')}
:
</div>
<div>{this.getUrl(true)}</div>
<div>{url}</div>
</div>
) : null}
{this.renderDialog(url)}
Expand Down

0 comments on commit e4e231f

Please sign in to comment.