Implement photos serializer

This commit is contained in:
Eugene Burmakin
2024-12-02 18:21:12 +01:00
parent 202396a93d
commit be45af95fb
7 changed files with 96 additions and 26 deletions
@@ -137,10 +137,13 @@ export default class extends Controller {
this.map.addControl(this.drawControl);
}
if (e.name === 'Photos') {
if (!this.userSettings.immich_url || !this.userSettings.immich_api_key) {
if (
(!this.userSettings.immich_url || !this.userSettings.immich_api_key) &&
(!this.userSettings.photoprism_url || !this.userSettings.photoprism_api_key)
) {
showFlashMessage(
'error',
'Immich integration is not configured. Please check your settings.'
'Photos integration is not configured. Please check your integrations settings.'
);
return;
}
@@ -836,7 +839,7 @@ export default class extends Controller {
<h3 class="font-bold">${photo.originalFileName}</h3>
<p>Taken: ${new Date(photo.localDateTime).toLocaleString()}</p>
<p>Location: ${photo.exifInfo.city}, ${photo.exifInfo.state}, ${photo.exifInfo.country}</p>
${photo.type === 'VIDEO' ? '🎥 Video' : '📷 Photo'}
${photo.type === 'video' ? '🎥 Video' : '📷 Photo'}
</div>
`;
marker.bindPopup(popupContent);