mirror of
https://git.vectorsigma.ru/public/photoview.git
synced 2026-08-03 20:59:03 +00:00
Merge pull request #668 from jmc265/adding-image-description
Adding image description to sidebar
This commit is contained in:
@@ -68,6 +68,7 @@ export const SHARE_ALBUM_QUERY = gql`
|
||||
}
|
||||
exif {
|
||||
id
|
||||
description
|
||||
camera
|
||||
maker
|
||||
lens
|
||||
|
||||
@@ -49,6 +49,7 @@ export const SHARE_TOKEN_QUERY = gql`
|
||||
}
|
||||
exif {
|
||||
id
|
||||
description
|
||||
camera
|
||||
maker
|
||||
lens
|
||||
|
||||
@@ -106,6 +106,10 @@ export interface SharePageToken_shareToken_media_exif_coordinates {
|
||||
export interface SharePageToken_shareToken_media_exif {
|
||||
__typename: 'MediaEXIF'
|
||||
id: string
|
||||
/**
|
||||
* The description of the image
|
||||
*/
|
||||
description: string | null
|
||||
/**
|
||||
* The model name of the camera
|
||||
*/
|
||||
|
||||
@@ -120,6 +120,10 @@ export interface shareAlbumQuery_album_media_exif_coordinates {
|
||||
export interface shareAlbumQuery_album_media_exif {
|
||||
__typename: 'MediaEXIF'
|
||||
id: string
|
||||
/**
|
||||
* The description of the image
|
||||
*/
|
||||
description: string | null
|
||||
/**
|
||||
* The model name of the camera
|
||||
*/
|
||||
|
||||
@@ -65,6 +65,7 @@ export const SIDEBAR_MEDIA_QUERY = gql`
|
||||
}
|
||||
exif {
|
||||
id
|
||||
description
|
||||
camera
|
||||
maker
|
||||
lens
|
||||
|
||||
@@ -12,6 +12,7 @@ describe('ExifDetails', () => {
|
||||
type: MediaType.Photo,
|
||||
exif: {
|
||||
id: '0',
|
||||
description: null,
|
||||
camera: null,
|
||||
maker: null,
|
||||
lens: null,
|
||||
@@ -30,6 +31,7 @@ describe('ExifDetails', () => {
|
||||
|
||||
render(<ExifDetails media={media} />)
|
||||
|
||||
expect(screen.queryByText('Description')).not.toBeInTheDocument()
|
||||
expect(screen.queryByText('Camera')).not.toBeInTheDocument()
|
||||
expect(screen.queryByText('Maker')).not.toBeInTheDocument()
|
||||
expect(screen.queryByText('Lens')).not.toBeInTheDocument()
|
||||
@@ -50,6 +52,7 @@ describe('ExifDetails', () => {
|
||||
type: MediaType.Photo,
|
||||
exif: {
|
||||
id: '1666',
|
||||
description: "Media description",
|
||||
camera: 'Canon EOS R',
|
||||
maker: 'Canon',
|
||||
lens: 'TAMRON SP 24-70mm F/2.8',
|
||||
@@ -72,6 +75,8 @@ describe('ExifDetails', () => {
|
||||
|
||||
render(<ExifDetails media={media} />)
|
||||
|
||||
expect(screen.getByText('Description')).toBeInTheDocument()
|
||||
|
||||
expect(screen.getByText('Camera')).toBeInTheDocument()
|
||||
expect(screen.getByText('Canon EOS R')).toBeInTheDocument()
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ const ExifDetails = ({ media }: ExifDetailsProps) => {
|
||||
}
|
||||
|
||||
const exifNameLookup = (t: TranslationFn): { [key: string]: string } => ({
|
||||
description: t('sidebar.media.exif.description', 'Description'),
|
||||
camera: t('sidebar.media.exif.name.camera', 'Camera'),
|
||||
maker: t('sidebar.media.exif.name.maker', 'Maker'),
|
||||
lens: t('sidebar.media.exif.name.lens', 'Lens'),
|
||||
|
||||
@@ -85,6 +85,10 @@ export interface sidebarMediaQuery_media_exif_coordinates {
|
||||
export interface sidebarMediaQuery_media_exif {
|
||||
__typename: 'MediaEXIF'
|
||||
id: string
|
||||
/**
|
||||
* The description of the image
|
||||
*/
|
||||
description: string | null
|
||||
/**
|
||||
* The model name of the camera
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user