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:
parent
6810c7a24a
commit
07012ebd3c
@ -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';
|
||||
}
|
||||
}
|
||||
|
18
src/frontend/app/ui/faces/Person.ts
Normal file
18
src/frontend/app/ui/faces/Person.ts
Normal 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');
|
||||
}
|
||||
}
|
@ -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 {
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user