Skip to content

Commit 321147d

Browse files
authored
Merge pull request #147 from varun-raj/march-updates
March updates
2 parents 2915e13 + ea51071 commit 321147d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+526
-160
lines changed

.env.sample

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ GEMINI_API_KEY="" # Gemini API Key for parsing search query in "Find"
1515

1616
# Immich Share Link
1717
IMMICH_SHARE_LINK_KEY="" # Share link key for Immich
18-
POWER_TOOLS_ENDPOINT_URL="" # URL of the Power Tools endpoint (Used for share links)
18+
POWER_TOOLS_ENDPOINT_URL="" # URL of the Power Tools endpoint (Used for share links)
19+
JWT_SECRET="" # JWT Secret for authentication

.eslintrc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@
66
"files": ["remotion/*.{ts,tsx}"],
77
"extends": ["plugin:@remotion/recommended"]
88
}
9-
]
9+
],
10+
"rules": {
11+
"react-hooks/exhaustive-deps": "off",
12+
"@next/next/no-img-element": "off"
13+
}
1014
}

bun.lockb

-3.05 KB
Binary file not shown.

docker-compose-all-immich.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ services:
5757
- "8001:3000"
5858
env_file:
5959
- .env
60+
healthcheck:
61+
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
62+
interval: 30s
63+
timeout: 10s
64+
retries: 3
65+
start_period: 40s
6066

6167
volumes:
6268
model-cache:

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ services:
88
- "3000:3000"
99
env_file:
1010
- .env
11+
healthcheck:
12+
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
13+
interval: 30s
14+
timeout: 10s
15+
retries: 3
16+
start_period: 40s

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
"@radix-ui/react-tooltip": "^1.1.2",
3535
"@remotion/cli": "4.0.232",
3636
"@remotion/eslint-plugin": "^4.0.232",
37+
"@tanstack/react-query": "^5.69.0",
3738
"@tanstack/react-table": "^8.20.1",
3839
"@types/cookie": "^0.6.0",
3940
"@types/qs": "^6.9.15",
41+
"@types/react-autosuggest": "^10.1.11",
4042
"@types/react-calendar-heatmap": "^1.6.7",
4143
"@vis.gl/react-google-maps": "^1.4.2",
4244
"axios": "^1.7.4",
@@ -57,13 +59,13 @@
5759
"pg": "^8.12.0",
5860
"qs": "^6.13.0",
5961
"react": "^18",
62+
"react-autosuggest": "^10.1.0",
6063
"react-day-picker": "9.0.8",
6164
"react-dom": "^18",
6265
"react-grid-gallery": "^1.0.1",
6366
"react-hot-toast": "^2.5.1",
6467
"react-leaflet": "^4.2.1",
6568
"react-mentions": "^4.4.10",
66-
"react-query": "^3.39.3",
6769
"recharts": "^2.12.7",
6870
"remotion": "4.0.232",
6971
"sass": "^1.77.8",
@@ -78,6 +80,7 @@
7880
"@semantic-release/github": "^10.1.7",
7981
"@semantic-release/npm": "^12.0.1",
8082
"@semantic-release/release-notes-generator": "^14.0.1",
83+
"@tanstack/eslint-plugin-query": "^5.68.0",
8184
"@types/jsonwebtoken": "^9.0.6",
8285
"@types/leaflet": "^1.9.15",
8386
"@types/node": "^20",

src/components/albums/info/AlbumImages.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import { IAsset } from '@/types/asset'
66
import React, { useEffect, useMemo, useRef, useState } from 'react'
77
import { ExternalLink, Hourglass } from 'lucide-react';
88
import { useRouter } from 'next/router';
9-
import { CalendarArrowUp } from 'lucide-react';
109
import Lightbox from 'yet-another-react-lightbox';
1110
import Captions from 'yet-another-react-lightbox/plugins/captions';
1211
import LazyImage from '@/components/ui/lazy-image';
13-
import Image from 'next/image';
1412
import { Button } from "@/components/ui/button";
1513
import Link from "next/link";
1614

src/components/albums/info/AlbumPeople.tsx

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
import React, { useEffect, useMemo, useState } from 'react'
22
import { IAlbum } from '@/types/album'
3-
import { IPerson } from '@/types/person'
43
import { getAlbumPeople } from '@/handlers/api/album.handler'
54
import Loader from '@/components/ui/loader'
65
import LazyImage from '@/components/ui/lazy-image'
76
import { PERSON_THUBNAIL_PATH } from '@/config/routes'
87
import Link from 'next/link'
98
import { useConfig } from '@/contexts/ConfigContext'
10-
import { Tooltip } from '@/components/ui/tooltip'
119
import { cn } from '@/lib/utils'
12-
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@/components/ui/accordion'
13-
import { Users, X } from 'lucide-react'
1410
import { useRouter } from 'next/router'
1511
import Image from 'next/image'
1612
import { PersonMergeDropdown } from '@/components/people/PersonMergeDropdown'
1713
import { Button } from '@/components/ui/button'
1814
import { updatePerson } from '@/handlers/api/people.handler'
1915
import { Checkbox } from '@/components/ui/checkbox'
16+
import { Input } from '@/components/ui/input'
2017

2118
interface AlbumPeopleProps {
2219
album: IAlbum
@@ -40,11 +37,16 @@ export default function AlbumPeople({ album, onSelect, readOnly }: AlbumPeoplePr
4037
const [hidingPerson, setHidingPerson] = useState<boolean>(false)
4138
const [selectionMode, setSelectionMode] = useState<boolean>(false)
4239
const [selectedPeople, setSelectedPeople] = useState<string[]>([])
40+
const [searchQuery, setSearchQuery] = useState<string>("")
4341

4442
const selectedPerson = useMemo(() => {
4543
return people.find((person) => query.faceId === person.id)
4644
}, [people, query.faceId])
4745

46+
const filteredPeople = useMemo(() => {
47+
return people.filter((person) => person.name.toLowerCase().includes(searchQuery.toLowerCase()))
48+
}, [people, searchQuery])
49+
4850
const fetchPeople = async () => {
4951
return getAlbumPeople(album.id).then((people) => {
5052
setPeople(people)
@@ -102,7 +104,12 @@ export default function AlbumPeople({ album, onSelect, readOnly }: AlbumPeoplePr
102104

103105
return (
104106
<div className="overflow-y-auto min-w-[200px] sticky top-0 py-4 max-h-[calc(100vh-60px)] min-h-[calc(100vh-60px)] border-r border-gray-200 dark:border-zinc-800 flex flex-col gap-2 px-2">
105-
107+
<Input
108+
placeholder="Search"
109+
className="w-full"
110+
value={searchQuery}
111+
onChange={(e) => setSearchQuery(e.target.value)}
112+
/>
106113
{selectedPerson && (
107114
<div className='flex flex-col gap-2 bg-white dark:bg-zinc-900 p-2 rounded-md'>
108115
<div className='flex items-center gap-2'>
@@ -172,7 +179,7 @@ export default function AlbumPeople({ album, onSelect, readOnly }: AlbumPeoplePr
172179
)}
173180
</div>
174181
<div className="flex flex-col overflow-x-hidden gap-2">
175-
{people.map((person) => (
182+
{filteredPeople.map((person) => (
176183
<div
177184
className={cn(
178185
'flex items-center gap-2 cursor-pointer hover:bg-gray-300 dark:hover:bg-gray-700 rounded-md p-1',

src/components/albums/potential-albums/PotentialAlbumsAssets.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { listPotentialAlbumsAssets } from "@/handlers/api/album.handler";
44
import type { IAsset } from "@/types/asset";
55
import React, { type MouseEvent, useEffect, useMemo, useState } from "react";
66
import { Gallery } from "react-grid-gallery";
7-
import Lightbox, { SlideImage, SlideTypes } from "yet-another-react-lightbox";
7+
import Lightbox from "yet-another-react-lightbox";
88
import Captions from "yet-another-react-lightbox/plugins/captions";
9-
import { CalendarArrowDown, CalendarArrowUp, Hourglass } from "lucide-react";
9+
import { CalendarArrowUp, Hourglass } from "lucide-react";
1010
import Video from "yet-another-react-lightbox/plugins/video";
1111
import { useConfig } from "@/contexts/ConfigContext";
1212
import LazyGridImage from "@/components/ui/lazy-grid-image";

src/components/albums/potential-albums/PotentialAlbumsDates.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import {
22
IPotentialAlbumsDatesResponse,
33
listPotentialAlbumsDates,
44
} from "@/handlers/api/album.handler";
5-
import React, { use, useEffect, useState } from "react";
5+
import React, { useEffect, useState } from "react";
66
import PotentialDateItem from "./PotentialDateItem";
77
import { usePotentialAlbumContext } from "@/contexts/PotentialAlbumContext";
88
import { useRouter } from "next/router";
99
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } from "@/components/ui/select";
1010
import { Button } from "@/components/ui/button";
11-
import { ArrowDown, ArrowUp, ArrowUpDownIcon, SortAsc, SortDesc } from "lucide-react";
11+
import { SortAsc, SortDesc } from "lucide-react";
1212

1313
export default function PotentialAlbumsDates() {
1414
const router = useRouter();

0 commit comments

Comments
 (0)