github-actions[bot]
commited on
Commit
·
9c7e72f
1
Parent(s):
e74ba5a
Sync from GitHub: 348f87ee32be977289a37d8330e6a2ca58fee0c9
Browse files
frontend/src/App.jsx
CHANGED
|
@@ -205,7 +205,13 @@ function App() {
|
|
| 205 |
</span>
|
| 206 |
</div>
|
| 207 |
|
| 208 |
-
<div className=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
{previewImages.map((preview, idx) => (
|
| 210 |
<ImagePreview
|
| 211 |
key={preview.key}
|
|
@@ -322,7 +328,7 @@ function App() {
|
|
| 322 |
|
| 323 |
{/* Footer */}
|
| 324 |
<div className="mt-12 text-center text-white/80 text-sm">
|
| 325 |
-
<p>
|
| 326 |
</div>
|
| 327 |
</div>
|
| 328 |
</div>
|
|
|
|
| 205 |
</span>
|
| 206 |
</div>
|
| 207 |
|
| 208 |
+
<div className={`grid gap-4 ${
|
| 209 |
+
previewImages.length === 1
|
| 210 |
+
? 'grid-cols-1 max-w-2xl mx-auto'
|
| 211 |
+
: previewImages.length === 2
|
| 212 |
+
? 'grid-cols-1 md:grid-cols-2'
|
| 213 |
+
: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3'
|
| 214 |
+
}`}>
|
| 215 |
{previewImages.map((preview, idx) => (
|
| 216 |
<ImagePreview
|
| 217 |
key={preview.key}
|
|
|
|
| 328 |
|
| 329 |
{/* Footer */}
|
| 330 |
<div className="mt-12 text-center text-white/80 text-sm">
|
| 331 |
+
<p>By Team DevBytes ⚡</p>
|
| 332 |
</div>
|
| 333 |
</div>
|
| 334 |
</div>
|
frontend/src/components/ImagePreview.jsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
-
import {
|
| 3 |
|
| 4 |
const ImagePreview = ({ imageData, fileName, onResolutionChange }) => {
|
| 5 |
const [resolution, setResolution] = useState(100);
|
|
@@ -71,20 +71,22 @@ const ImagePreview = ({ imageData, fileName, onResolutionChange }) => {
|
|
| 71 |
<div className="space-y-2">
|
| 72 |
<div className="flex items-center justify-between">
|
| 73 |
<label className="text-sm font-medium text-gray-700 flex items-center gap-2">
|
| 74 |
-
<
|
| 75 |
Resolution
|
| 76 |
</label>
|
| 77 |
<span className="text-sm font-bold text-primary-600">{resolution}%</span>
|
| 78 |
</div>
|
| 79 |
|
| 80 |
<input
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
| 87 |
/>
|
|
|
|
| 88 |
|
| 89 |
<div className="flex justify-between text-xs text-gray-500">
|
| 90 |
<span>Low Quality</span>
|
|
|
|
| 1 |
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
+
import { SlidersHorizontal } from 'lucide-react';
|
| 3 |
|
| 4 |
const ImagePreview = ({ imageData, fileName, onResolutionChange }) => {
|
| 5 |
const [resolution, setResolution] = useState(100);
|
|
|
|
| 71 |
<div className="space-y-2">
|
| 72 |
<div className="flex items-center justify-between">
|
| 73 |
<label className="text-sm font-medium text-gray-700 flex items-center gap-2">
|
| 74 |
+
<SlidersHorizontal className="w-4 h-4" />
|
| 75 |
Resolution
|
| 76 |
</label>
|
| 77 |
<span className="text-sm font-bold text-primary-600">{resolution}%</span>
|
| 78 |
</div>
|
| 79 |
|
| 80 |
<input
|
| 81 |
+
type="range"
|
| 82 |
+
min="10"
|
| 83 |
+
max="100"
|
| 84 |
+
value={resolution}
|
| 85 |
+
onChange={handleResolutionChange}
|
| 86 |
+
className="w-full h-2 rounded-lg cursor-pointer"
|
| 87 |
+
style={{ accentColor: '#2563eb' }} // Tailwind blue-600
|
| 88 |
/>
|
| 89 |
+
|
| 90 |
|
| 91 |
<div className="flex justify-between text-xs text-gray-500">
|
| 92 |
<span>Low Quality</span>
|