Skip to content

Commit

Permalink
Merge pull request #35 from RyansOpenSauceRice/fix-typescript-errors
Browse files Browse the repository at this point in the history
Fix TypeScript errors and add missing type declarations
  • Loading branch information
RyansOpenSauceRice authored Feb 13, 2025
2 parents c85ba8f + 5866195 commit 025845f
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 21 deletions.
162 changes: 153 additions & 9 deletions electron-app/package-lock.json

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

21 changes: 13 additions & 8 deletions electron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
"electron-store": "^8.1.0",
"js-yaml": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"zod": "^3.22.4"
"react-dom": "^18.2.0"
},
"devDependencies": {
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.1.2",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^14.3.1",
"@types/electron": "^1.6.10",
"@types/jest": "^29.5.10",
"@types/jest": "^29.5.14",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.9.4",
"@types/react": "^18.2.38",
"@types/react-dom": "^18.2.17",
"@types/testing-library__react": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@vitejs/plugin-react": "^4.2.0",
Expand All @@ -54,7 +54,8 @@
"jest-environment-jsdom": "^29.7.0",
"ts-jest": "^29.1.1",
"typescript": "^5.3.2",
"vite": "^5.0.2"
"vite": "^5.0.2",
"zod": "^3.24.2"
},
"build": {
"appId": "com.frigateNVR.ConfigGUI",
Expand All @@ -70,11 +71,15 @@
"category": "public.app-category.utilities"
},
"linux": {
"target": ["AppImage", "deb", "rpm"],
"target": [
"AppImage",
"deb",
"rpm"
],
"category": "Utility"
},
"win": {
"target": "nsis"
}
}
}
}
6 changes: 3 additions & 3 deletions electron-app/src/renderer/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,19 @@ export default function App() {
<TabPanel value={tabValue} index={0}>
<CameraConfig
config={config?.cameras}
onChange={(cameras) => setConfig(prev => prev ? { ...prev, cameras } : null)}
onChange={(cameras) => setConfig((prev: FrigateConfig | null) => prev ? { ...prev, cameras } : null)}
/>
</TabPanel>
<TabPanel value={tabValue} index={1}>
<MQTTConfig
config={config?.mqtt}
onChange={(mqtt) => setConfig(prev => prev ? { ...prev, mqtt } : null)}
onChange={(mqtt) => setConfig((prev: FrigateConfig | null) => prev ? { ...prev, mqtt } : null)}
/>
</TabPanel>
<TabPanel value={tabValue} index={2}>
<AudioConfig
config={config?.audio}
onChange={(audio) => setConfig(prev => prev ? { ...prev, audio } : null)}
onChange={(audio) => setConfig((prev: FrigateConfig | null) => prev ? { ...prev, audio } : null)}
/>
</TabPanel>
</Container>
Expand Down
2 changes: 1 addition & 1 deletion electron-app/src/renderer/components/CameraConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default function CameraConfig({ config, onChange }: Props) {
</Box>
</Grid>

{cameraConfig.ffmpeg.inputs.map((input, index) => (
{cameraConfig.ffmpeg.inputs.map((input: ICameraConfig['ffmpeg']['inputs'][0], index: number) => (
<Grid item xs={12} key={index}>
<Card variant="outlined">
<CardContent>
Expand Down

0 comments on commit 025845f

Please sign in to comment.