feat: Enhance UI with emoji page titles and improve tagging functionality

This commit updates the Layout component to include emojis in page titles for better visual cues. The Login component removes default credential placeholders for improved security. Additionally, the Search component is enhanced to allow immediate tagging of selected photos with existing tags, and it supports adding multiple tags at once, improving user experience. Documentation has been updated to reflect these changes.
This commit is contained in:
tanyar09
2025-12-09 13:01:35 -05:00
parent 0a109b198a
commit 6e196ff859
4 changed files with 67 additions and 32 deletions
+6 -3
View File
@@ -229,6 +229,7 @@ def get_photos_with_tags(db: Session) -> List[dict]:
# Query 1: Get all photos with face counts using LEFT JOIN and GROUP BY
# This gets face_count and unidentified_face_count in one query
# Note: Excludes excluded faces (Face.excluded == False) to match identify UI behavior
photos_with_counts = (
db.query(
Photo.id,
@@ -238,14 +239,14 @@ def get_photos_with_tags(db: Session) -> List[dict]:
Photo.date_taken,
Photo.date_added,
Photo.media_type,
# Face count (all faces)
# Face count (non-excluded faces only)
func.count(distinct(Face.id)).label('face_count'),
# Unidentified face count (faces with person_id IS NULL)
# Unidentified face count (non-excluded faces with person_id IS NULL)
func.sum(
case((Face.person_id.is_(None), 1), else_=0)
).label('unidentified_face_count'),
)
.outerjoin(Face, Photo.id == Face.photo_id)
.outerjoin(Face, (Photo.id == Face.photo_id) & (Face.excluded == False))
.group_by(
Photo.id,
Photo.filename,
@@ -292,6 +293,7 @@ def get_photos_with_tags(db: Session) -> List[dict]:
# Query 3: Get all people for all photos in one query
# Get distinct people per photo, then format names in Python
# Note: Excludes excluded faces to match face count behavior
people_data = (
db.query(
Face.photo_id,
@@ -304,6 +306,7 @@ def get_photos_with_tags(db: Session) -> List[dict]:
.join(Person, Face.person_id == Person.id)
.filter(Face.photo_id.in_(photo_ids))
.filter(Face.person_id.isnot(None))
.filter(Face.excluded == False)
.distinct()
.order_by(Face.photo_id, Person.last_name, Person.first_name)
.all()