From e3e395be431ba7ef041555073eb5fa3fcc7edacb Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Sun, 3 Aug 2025 13:11:12 +0300 Subject: [PATCH 1/3] feat: add edited indication on main gallery --- src/components/panel/MainLibrary.jsx | 33 +++++++++++++++++----------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/components/panel/MainLibrary.jsx b/src/components/panel/MainLibrary.jsx index 80449248..3f01722c 100644 --- a/src/components/panel/MainLibrary.jsx +++ b/src/components/panel/MainLibrary.jsx @@ -13,6 +13,7 @@ import { Loader2, AlertTriangle, FolderInput, + Pencil, } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; import { FixedSizeGrid as Grid } from 'react-window'; @@ -286,9 +287,9 @@ function ViewOptionsDropdown({ sortCriteria, setSortCriteria, }) { - const isFilterActive = filterCriteria.rating > 0 || - (filterCriteria.rawStatus && filterCriteria.rawStatus !== 'all') || - (filterCriteria.colors && filterCriteria.colors.length > 0); + const isFilterActive = filterCriteria.rating > 0 || + (filterCriteria.rawStatus && filterCriteria.rawStatus !== 'all') || + (filterCriteria.colors && filterCriteria.colors.length > 0); return ( { @@ -342,11 +343,11 @@ function Thumbnail({ path, data, onImageClick, onImageDoubleClick, isSelected, i )} - + {(colorLabel || rating > 0) && (
{colorLabel && ( -

{path.split(/[\\/]/).pop()}

+ {isEdited && ( +
+ +
+ )}
); } @@ -384,6 +390,7 @@ const Cell = ({ columnIndex, rowIndex, style, data }) => { className="p-2 h-full" >

- {aiModelDownloadStatus ? `Downloading ${aiModelDownloadStatus}...` - : (isIndexing && indexingProgress.total > 0) - ? `Indexing images... (${indexingProgress.current}/${indexingProgress.total})` - : (importState.status === 'importing' && importState.progress.total > 0) - ? `Importing images... (${importState.progress.current}/${importState.progress.total})` - : "Processing images..." + {aiModelDownloadStatus ? `Downloading ${aiModelDownloadStatus}...` + : (isIndexing && indexingProgress.total > 0) + ? `Indexing images... (${indexingProgress.current}/${indexingProgress.total})` + : (importState.status === 'importing' && importState.progress.total > 0) + ? `Importing images... (${importState.progress.current}/${importState.progress.total})` + : "Processing images..." }

This may take a moment.

@@ -578,4 +585,4 @@ export default function MainLibrary({ )} ); -} \ No newline at end of file +} From 49946ffe5193300c431600d9c4d0508ce0fc3a05 Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Sun, 3 Aug 2025 13:36:22 +0300 Subject: [PATCH 2/3] fix: edit indicator when rated image --- src/components/panel/MainLibrary.jsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/panel/MainLibrary.jsx b/src/components/panel/MainLibrary.jsx index 3f01722c..e2789ee0 100644 --- a/src/components/panel/MainLibrary.jsx +++ b/src/components/panel/MainLibrary.jsx @@ -344,7 +344,7 @@ function Thumbnail({ isEdited, path, data, onImageClick, onImageDoubleClick, isS )} - {(colorLabel || rating > 0) && ( + {(colorLabel || rating > 0 || isEdited) && (
{colorLabel && (
)} + {isEdited && ( + <> + + + )}
)}

{path.split(/[\\/]/).pop()}

- {isEdited && ( -
- -
- )}
); } From 01cc67dfd8325246ff31b569a6e98ad6d3f99833 Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Sun, 3 Aug 2025 13:36:53 +0300 Subject: [PATCH 3/3] feat: add edit indicator on film strip --- src/components/panel/Filmstrip.jsx | 34 +++++++++++++++++------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/src/components/panel/Filmstrip.jsx b/src/components/panel/Filmstrip.jsx index 6369efbb..bd4c4e77 100644 --- a/src/components/panel/Filmstrip.jsx +++ b/src/components/panel/Filmstrip.jsx @@ -1,5 +1,5 @@ import { useEffect, useRef } from 'react'; -import { Image as ImageIcon, Star } from 'lucide-react'; +import { Image as ImageIcon, Star, Pencil } from 'lucide-react'; import { motion, AnimatePresence } from 'framer-motion'; const COLOR_LABELS = [ @@ -10,10 +10,10 @@ const COLOR_LABELS = [ { name: 'purple', color: '#a78bfa' }, ]; -export default function Filmstrip({ - imageList, - selectedImage, - onImageSelect, +export default function Filmstrip({ + imageList, + selectedImage, + onImageSelect, onContextMenu, thumbnails, multiSelectedPaths, @@ -57,15 +57,15 @@ export default function Filmstrip({ block: 'nearest', inline: 'center', }); - }, 320); + }, 320); } } } }, [selectedImage, imageList]); return ( -
@@ -74,17 +74,18 @@ export default function Filmstrip({ {imageList.map((imageFile) => { const path = imageFile.path; const isActive = selectedImage?.path === path; + const isEdited = imageFile.is_edited; const isSelected = multiSelectedPaths.includes(path); const thumbData = thumbnails[path]; const rating = imageRatings?.[path] || 0; const colorTag = imageFile.tags?.find(t => t.startsWith('color:'))?.substring(6); const colorLabel = COLOR_LABELS.find(c => c.name === colorTag); - + const ringClass = isActive ? 'ring-2 ring-accent' : isSelected - ? 'ring-2 ring-gray-400' - : 'hover:ring-2 hover:ring-hover-color'; + ? 'ring-2 ring-gray-400' + : 'hover:ring-2 hover:ring-hover-color'; return (
)} - - {(colorLabel || rating > 0) && ( + + {(colorLabel || rating > 0 || isEdited) && (
{colorLabel && ( -
)} + {isEdited && (
+ +
)}
)} @@ -136,4 +140,4 @@ export default function Filmstrip({
); -} \ No newline at end of file +}