1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-24 05:17:16 +02:00

Adding baseUrl to /api/person path #264

This commit is contained in:
Patrik J. Braun 2021-04-19 15:12:27 +02:00
parent 6810c7a24a
commit 07012ebd3c
4 changed files with 23 additions and 17 deletions

View File

@ -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';
}
}

View File

@ -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');
}
}

View File

@ -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 {

View File

@ -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()