Skip to content

Commit 34eea21

Browse files
authored
Merge pull request #13 from angelonels/main
feat:implemented blur detection
2 parents 1053b2f + d2a039e commit 34eea21

20 files changed

Lines changed: 1215 additions & 1100 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ jobs:
1616
with:
1717
node-version: 18
1818

19-
- run: npm install --legacy-peer-deps
19+
- name: Install client dependencies
20+
run: cd client && npm install --legacy-peer-deps
2021

21-
- run: npm run lint
22-
23-
- run: npm test
24-
25-
- run: npm run build
22+
- name: Build client
23+
run: cd client && npm run build

client/src/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@ function App() {
7676

7777
if (!res.ok) {
7878
const errData = await res.json();
79+
if (errData.error === 'BLURRY_IMAGE') {
80+
setError(`📸 ${errData.message} (Sharpness score: ${errData.variance}, minimum: ${errData.threshold})`);
81+
setAppState('select');
82+
return;
83+
}
7984
throw new Error(errData.error || 'Diagnosis failed');
8085
}
8186

server/node_modules/.package-lock.json

Lines changed: 131 additions & 119 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)