mirror of
https://github.com/immich-app/immich.git
synced 2026-06-03 13:25:19 -04:00
fix(web): prevent partner assets from being selected in geolocation utility (#28737)
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
This commit is contained in:
@@ -38,6 +38,8 @@
|
||||
withCoordinates: true,
|
||||
};
|
||||
|
||||
const isOwnAsset = (asset: TimelineAsset) => asset.ownerId === authManager.user.id;
|
||||
|
||||
const handleUpdate = async () => {
|
||||
if (!point) {
|
||||
return;
|
||||
@@ -54,7 +56,7 @@
|
||||
|
||||
await updateAssets({
|
||||
assetBulkUpdateDto: {
|
||||
ids: assetMultiSelectManager.assets.map((asset) => asset.id),
|
||||
ids: assetMultiSelectManager.assets.filter((asset) => isOwnAsset(asset)).map((asset) => asset.id),
|
||||
latitude: point.lat,
|
||||
longitude: point.lng,
|
||||
},
|
||||
@@ -124,7 +126,7 @@
|
||||
}, 1500);
|
||||
point = { lat: asset.latitude, lng: asset.longitude };
|
||||
void setQueryValue('at', asset.id);
|
||||
} else {
|
||||
} else if (isOwnAsset(asset)) {
|
||||
onClick(timelineManager, timelineDay.getAssets(), timelineDay.groupTitle, asset);
|
||||
}
|
||||
};
|
||||
@@ -199,6 +201,9 @@
|
||||
onThumbnailClick={handleThumbnailClick}
|
||||
>
|
||||
{#snippet customThumbnailLayout(asset: TimelineAsset)}
|
||||
{#if !isOwnAsset(asset)}
|
||||
<div class="pointer-events-none absolute inset-0 rounded-sm bg-black/40"></div>
|
||||
{/if}
|
||||
{#if hasGps(asset)}
|
||||
<div class="absolute inset-e-3 bottom-1 rounded-xl bg-success px-4 py-1 text-xs text-black transition-colors">
|
||||
{asset.city || $t('gps')}
|
||||
|
||||
Reference in New Issue
Block a user