Skip to content

Commit

Permalink
Accidentally removed multiple file uploads in the preview section. Fi…
Browse files Browse the repository at this point in the history
…xed some minor css styling.
  • Loading branch information
naheyansheikh committed Dec 6, 2024
1 parent 2de023b commit e1acb37
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
border-radius: 30px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
padding: 20px;
height: 83%;
max-height: 300px;
min-height: 32%;
overflow-y: auto;
transition: transform 0.2s ease;
}
Expand Down Expand Up @@ -36,7 +35,6 @@
.activity-list {
display: flex;
flex-direction: column;
margin-top: -10px;
}

.activity-item {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Home/LeftSection/ShopBooksCard.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
display: flex;
justify-content: space-between;
cursor: pointer;
height: 83%;
height: 32%;
position: relative;
overflow: hidden;
transition: transform 0.2s ease;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Home/MainContent.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
display: grid;
grid-template-columns: 1fr 1fr;
gap: 30px;
margin-top: 30px;
margin-top: 25px;
width: 95%;
height: calc(500px - 280px - 24px);
height: 100%;
}
14 changes: 7 additions & 7 deletions frontend/src/components/Home/RightSection/ProgressItem.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.progress-item {
.logbook-progress-item {
width: 100%;
padding: 12px;
border-radius: 8px;
Expand All @@ -7,33 +7,33 @@
background-color: transparent;
}

.progress-item:hover {
.logbook-progress-item:hover {
background-color: #e7edf8;
}

.progress-item:hover .progress-bar {
.logbook-progress-item:hover .logbook-progress-bar {
background: #fbfcfe;
}

.progress-item:hover .progress-info {
.logbook-progress-item:hover .logbook-progress-info {
color: #244b94;
}

.progress-info {
.logbook-progress-info {
display: flex;
justify-content: space-between;
margin-bottom: 6px;
font-size: 15px;
}

.progress-bar {
.logbook-progress-bar {
height: 8px;
background: #e7edf8;
border-radius: 4px;
overflow: hidden;
}

.progress-fill {
.logbook-progress-fill {
height: 100%;
background: #244b94;
border-radius: 4px;
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/Home/RightSection/ProgressItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import "./ProgressItem.css";

export default function ProgressItem({ item, onClick }) {
return (
<div className="progress-item" onClick={onClick}>
<div className="progress-info">
<div className="logbook-progress-item" onClick={onClick}>
<div className="logbook-progress-info">
<span>{item.name}</span>
<span>{item.progress}%</span>
</div>
<div className="progress-bar">
<div className="logbook-progress-bar">
<div
className="progress-fill"
className="logbook-progress-fill"
style={{ width: `${item.progress}%` }}
></div>
</div>
Expand Down
7 changes: 1 addition & 6 deletions frontend/src/pages/upload_photo/UploadPhoto.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,16 @@ function MainContent({ files, setFiles, handleTranscribe }) {

/** Handle files from input or drop */
const handleFiles = (newFiles) => {
console.log("Received files:", newFiles); // Debug log

const filesArray = Array.from(newFiles);
console.log("Files array:", filesArray); // Debug log

const filesWithPreview = filesArray.map((file) => {
console.log("Processing file:", file); // Debug log
return {
file: file, // Store the actual File object
timestamp: Date.now(),
preview: URL.createObjectURL(file),
};
});

setFiles(filesWithPreview);
setFiles((prev) => [...filesWithPreview, ...prev]); // Add new files to beginning
};

/** Toggle preview visibility */
Expand Down

0 comments on commit e1acb37

Please sign in to comment.