diff --git a/src/common/entities/PersonDTO.ts b/src/common/entities/PersonDTO.ts index 8f2987d5..7110a59b 100644 --- a/src/common/entities/PersonDTO.ts +++ b/src/common/entities/PersonDTO.ts @@ -13,17 +13,3 @@ export interface PersonDTO { } -export class Person implements PersonDTO { - isFavourite: boolean; - count: number; - id: number; - name: string; - - - constructor() { - } - - public static getThumbnailUrl(that: PersonDTO): string { - return '/api/person/' + that.name + '/thumbnail'; - } -} diff --git a/src/frontend/app/ui/faces/Person.ts b/src/frontend/app/ui/faces/Person.ts new file mode 100644 index 00000000..629e824c --- /dev/null +++ b/src/frontend/app/ui/faces/Person.ts @@ -0,0 +1,18 @@ +import {PersonDTO} from '../../../../common/entities/PersonDTO'; +import {Config} from '../../../../common/config/public/Config'; +import {Utils} from '../../../../common/Utils'; + +export class Person implements PersonDTO { + isFavourite: boolean; + count: number; + id: number; + name: string; + + + constructor() { + } + + public static getThumbnailUrl(that: PersonDTO): string { + return Utils.concatUrls(Config.Client.urlBase, '/api/person/', that.name, '/thumbnail'); + } +} diff --git a/src/frontend/app/ui/gallery/thumbnailLoader.service.ts b/src/frontend/app/ui/gallery/thumbnailLoader.service.ts index 01f1d33a..bd7bf6b0 100644 --- a/src/frontend/app/ui/gallery/thumbnailLoader.service.ts +++ b/src/frontend/app/ui/gallery/thumbnailLoader.service.ts @@ -3,7 +3,8 @@ import {GalleryCacheService} from './cache.gallery.service'; import {Media} from './Media'; import {MediaIcon} from './MediaIcon'; import {Config} from '../../../../common/config/public/Config'; -import {Person, PersonDTO} from '../../../../common/entities/PersonDTO'; +import {PersonDTO} from '../../../../common/entities/PersonDTO'; +import {Person} from '../faces/Person'; export enum ThumbnailLoadingPriority { extraHigh = 4, high = 3, medium = 2, low = 1 @@ -51,7 +52,7 @@ export class ThumbnailLoaderService { }; curImg.src = task.path; - } + }; removeTask(taskEntry: ThumbnailTaskEntity): void { diff --git a/src/frontend/app/ui/gallery/thumbnailManager.service.ts b/src/frontend/app/ui/gallery/thumbnailManager.service.ts index 49ddfe10..d8e50b20 100644 --- a/src/frontend/app/ui/gallery/thumbnailManager.service.ts +++ b/src/frontend/app/ui/gallery/thumbnailManager.service.ts @@ -2,7 +2,8 @@ import {Injectable} from '@angular/core'; import {ThumbnailLoaderService, ThumbnailLoadingListener, ThumbnailLoadingPriority, ThumbnailTaskEntity} from './thumbnailLoader.service'; import {Media} from './Media'; import {MediaIcon} from './MediaIcon'; -import {Person, PersonDTO} from '../../../../common/entities/PersonDTO'; +import {PersonDTO} from '../../../../common/entities/PersonDTO'; +import {Person} from '../faces/Person'; @Injectable()