2016-04-28 04:37:07 +08:00
|
|
|
import {Utils} from "../Utils";
|
|
|
|
import {Directory} from "./Directory";
|
2016-04-22 19:23:44 +08:00
|
|
|
export class Photo {
|
|
|
|
constructor(public id:number, public name:string, public width:number, public height:number) {
|
|
|
|
}
|
2016-04-28 04:37:07 +08:00
|
|
|
|
|
|
|
public static getThumbnailPath(directory:Directory,photo:Photo){
|
2016-05-05 00:34:54 +08:00
|
|
|
return Utils.concatUrls("/api/gallery/content/",directory.path,directory.name,photo.name,"thumbnail");
|
2016-04-28 04:37:07 +08:00
|
|
|
}
|
|
|
|
public static getPhotoPath(directory:Directory,photo:Photo){
|
2016-05-05 00:34:54 +08:00
|
|
|
return Utils.concatUrls("/api/gallery/content/",directory.path,directory.name,photo.name);
|
2016-04-28 04:37:07 +08:00
|
|
|
}
|
2016-03-20 17:49:49 +08:00
|
|
|
}
|