feat: open street man integrated
Signed-off-by: Varun Raj <varun@skcript.com>
This commit is contained in:
1 parent
bc92e50507
commit
0715257048
3 files changed
+17
-21
No files matched your search
+8
-8
@@ -46,19 +46,19 @@ export default function TagMissingLocationDialog({
|
|||||||
Tagging a location will add the location to the selected assets.
|
Tagging a location will add the location to the selected assets.
|
||||||
</DialogDescription>
|
</DialogDescription>
|
||||||
</DialogHeader>
|
</DialogHeader>
|
||||||
<Tabs defaultValue="search" className="border rounded-lg">
|
<Tabs defaultValue="searchOsm" className="border rounded-lg">
|
||||||
<TabsList className="flex justify-between">
|
<TabsList className="flex justify-between">
|
||||||
<TabsTrigger value="search">Immich Search</TabsTrigger>
|
<TabsTrigger value="searchOsm" className="w-full">Open Street Map</TabsTrigger>
|
||||||
<TabsTrigger value="searchOsm">OSM Search</TabsTrigger>
|
<TabsTrigger value="search" className="w-full">Immich Geo</TabsTrigger>
|
||||||
<TabsTrigger value="latlong">Lat & Long</TabsTrigger>
|
<TabsTrigger value="latlong" className="w-full">Lat & Long</TabsTrigger>
|
||||||
<TabsTrigger value="maps">Map</TabsTrigger>
|
<TabsTrigger value="maps" className="w-full">Map</TabsTrigger>
|
||||||
</TabsList>
|
</TabsList>
|
||||||
<TabsContent value="search">
|
|
||||||
<TagMissingLocationSearchAndAdd onSubmit={onSubmit} onOpenChange={setOpen} />
|
|
||||||
</TabsContent>
|
|
||||||
<TabsContent value="searchOsm">
|
<TabsContent value="searchOsm">
|
||||||
<TagMissingLocationOSMSearchAndAdd onSubmit={onSubmit} onOpenChange={setOpen} location={mapPosition} onLocationChange={setMapPosition} />
|
<TagMissingLocationOSMSearchAndAdd onSubmit={onSubmit} onOpenChange={setOpen} location={mapPosition} onLocationChange={setMapPosition} />
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
|
<TabsContent value="search">
|
||||||
|
<TagMissingLocationSearchAndAdd onSubmit={onSubmit} onOpenChange={setOpen} />
|
||||||
|
</TabsContent>
|
||||||
<TabsContent value="latlong">
|
<TabsContent value="latlong">
|
||||||
<TagMissingLocationSearchLatLong onSubmit={onSubmit} onOpenChange={setOpen} location={mapPosition} onLocationChange={setMapPosition} />
|
<TagMissingLocationSearchLatLong onSubmit={onSubmit} onOpenChange={setOpen} location={mapPosition} onLocationChange={setMapPosition} />
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
|
|||||||
+3
-6
@@ -132,15 +132,12 @@ export default function TagMissingLocationOSMSearchAndAdd(
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4 py-4 px-2">
|
<div className="flex flex-col gap-4 py-4 px-2">
|
||||||
<div className="flex flex-col gap-2">
|
|
||||||
<Label>Search Location</Label>
|
|
||||||
<Input
|
<Input
|
||||||
placeholder="Search location"
|
placeholder="Search location"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
handleSearch(e.target.value);
|
handleSearch(e.target.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
{loading && <Loader />}
|
{loading && <Loader />}
|
||||||
{!loading && searchedPlaces && searchedPlaces.length === 0 && (
|
{!loading && searchedPlaces && searchedPlaces.length === 0 && (
|
||||||
@@ -161,7 +158,7 @@ export default function TagMissingLocationOSMSearchAndAdd(
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<p>{place.name}</p>
|
<p className="text-sm">{place.name}</p>
|
||||||
<span className="text-xs text-gray-600">
|
<span className="text-xs text-gray-600">
|
||||||
{place.latitude}, {place.longitude}
|
{place.latitude}, {place.longitude}
|
||||||
</span>
|
</span>
|
||||||
@@ -176,11 +173,11 @@ export default function TagMissingLocationOSMSearchAndAdd(
|
|||||||
</div>
|
</div>
|
||||||
<div className="self-end">
|
<div className="self-end">
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="default"
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
disabled={!selectedPlace || submitting}
|
disabled={!selectedPlace || submitting}
|
||||||
>
|
>
|
||||||
Add New Location
|
Tag Location
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+6
-7
@@ -96,7 +96,6 @@ export default function TagMissingLocationSearchAndAdd(
|
|||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-4 py-4 px-2">
|
<div className="flex flex-col gap-4 py-4 px-2">
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Label>Search Location</Label>
|
|
||||||
<Input
|
<Input
|
||||||
placeholder="Search location"
|
placeholder="Search location"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -116,21 +115,21 @@ export default function TagMissingLocationSearchAndAdd(
|
|||||||
key={place.name}
|
key={place.name}
|
||||||
onClick={() => handleSelect(place)}
|
onClick={() => handleSelect(place)}
|
||||||
className={cn(
|
className={cn(
|
||||||
"hover:bg-zinc-900 flex justify-between items-center px-2 py-1 rounded-lg cursor-pointer",
|
"hover:bg-zinc-200 dark:hover:bg-zinc-800 flex justify-between items-center px-2 py-1 rounded-lg cursor-pointer",
|
||||||
{
|
{
|
||||||
"bg-zinc-900":
|
"bg-zinc-900 dark:bg-zinc-200":
|
||||||
selectedPlace && selectedPlace.name === place.name,
|
selectedPlace && selectedPlace.name === place.name,
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<p>{place.name}</p>
|
<p>{place.name}</p>
|
||||||
<span className="text-xs text-gray-600">
|
<span className="text-xs text-gray-600 dark:text-gray-200">
|
||||||
{place.latitude}, {place.longitude}
|
{place.latitude}, {place.longitude}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{selectedPlace && selectedPlace.name === place.name && (
|
{selectedPlace && selectedPlace.name === place.name && (
|
||||||
<Check className="text-green-500" />
|
<Check className="text-green-500 dark:text-green-400" />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
@@ -139,11 +138,11 @@ export default function TagMissingLocationSearchAndAdd(
|
|||||||
</div>
|
</div>
|
||||||
<div className="self-end">
|
<div className="self-end">
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="default"
|
||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
disabled={!selectedPlace || submitting}
|
disabled={!selectedPlace || submitting}
|
||||||
>
|
>
|
||||||
Add New Location
|
Tag Location
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user