From b4de4fcf657a8d5de1be52c45549f3cb16cb55ed Mon Sep 17 00:00:00 2001 From: gallery Date: Sun, 15 Nov 2026 20:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E7=BB=86=E4=BF=A1=E6=81=AF=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E6=96=B0=E5=A2=9E=20Location=EF=BC=88?= =?UTF-8?q?=E6=8C=89=E6=96=87=E4=BB=B6=E5=90=8D=E8=A7=A3=E6=9E=90=E7=9A=84?= =?UTF-8?q?=E5=9F=8E=E5=B8=82=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/sidebar/MediaSidebar/MediaSidebar.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ui/src/components/sidebar/MediaSidebar/MediaSidebar.tsx b/ui/src/components/sidebar/MediaSidebar/MediaSidebar.tsx index b1f1ef2..e4bc8c6 100644 --- a/ui/src/components/sidebar/MediaSidebar/MediaSidebar.tsx +++ b/ui/src/components/sidebar/MediaSidebar/MediaSidebar.tsx @@ -17,6 +17,8 @@ import { SidebarPhotoCover } from '../AlbumCovers' import { SidebarPhotoShare } from '../Sharing' import SidebarMediaDownload from '../SidebarDownloadMedia' import SidebarHeader from '../SidebarHeader' +import { SidebarSection, SidebarSectionTitle } from '../SidebarComponents' +import { mediaCaption } from '../../../helpers/mediaCaption' import { sidebarDownloadQuery_media_downloads } from '../__generated__/sidebarDownloadQuery' import ExifDetails from './MediaSidebarExif' import MediaSidebarPeople from './MediaSidebarPeople' @@ -180,6 +182,8 @@ const SidebarContent = ({ media, hidePreview }: SidebarContentProps) => { sidebarMap = } + const locationCity = mediaCaption(media.title)?.city + let albumPath = null const mediaAlbum = media.album if (!isNil(mediaAlbum)) { @@ -227,6 +231,14 @@ const SidebarContent = ({ media, hidePreview }: SidebarContentProps) => { )} + {locationCity && !mediaCoordinates && ( + + + {t('sidebar.location.title', 'Location')} + +
{locationCity}
+
+ )} {albumPath} {sidebarMap}