feat(server, web): Include partner's photos on map (#7065)

* feat(server): Include partner's photos on map - if included in timeline

* depend on query parameter withPartners

instead of partners.inTimeline

* web: map option to include partners images

* make open-api
This commit is contained in:
Torbjorn Tyridal
2024-02-14 16:07:00 +01:00
committed by GitHub
parent 7d59900662
commit 6adff50f0a
14 changed files with 70 additions and 19 deletions

View File

@@ -33,6 +33,7 @@
<SettingSwitch title="Allow dark mode" bind:checked={settings.allowDarkMode} />
<SettingSwitch title="Only favorites" bind:checked={settings.onlyFavorites} />
<SettingSwitch title="Include archived" bind:checked={settings.includeArchived} />
<SettingSwitch title="Include shared with me" bind:checked={settings.withPartners} />
{#if customDateRange}
<div in:fly={{ y: 10, duration: 200 }} class="flex flex-col gap-4">
<div class="flex items-center justify-between gap-8">

View File

@@ -46,6 +46,7 @@ export interface MapSettings {
allowDarkMode: boolean;
includeArchived: boolean;
onlyFavorites: boolean;
withPartners: boolean;
relativeDate: string;
dateAfter: string;
dateBefore: string;
@@ -55,6 +56,7 @@ export const mapSettings = persisted<MapSettings>('map-settings', {
allowDarkMode: true,
includeArchived: false,
onlyFavorites: false,
withPartners: false,
relativeDate: '',
dateAfter: '',
dateBefore: '',

View File

@@ -46,7 +46,7 @@
}
abortController = new AbortController();
const { includeArchived, onlyFavorites } = $mapSettings;
const { includeArchived, onlyFavorites, withPartners } = $mapSettings;
const { fileCreatedAfter, fileCreatedBefore } = getFileCreatedDates();
return await getMapMarkers(
@@ -55,6 +55,7 @@
isFavorite: onlyFavorites || undefined,
fileCreatedAfter: fileCreatedAfter || undefined,
fileCreatedBefore,
withPartners: withPartners || undefined,
},
{
signal: abortController.signal,