1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

removing todo-s

minor bug fix
This commit is contained in:
Patrik Braun 2017-07-21 19:33:24 +02:00
parent e9b5758909
commit 0b5d3b86c4
5 changed files with 5 additions and 8 deletions

View File

@ -3,6 +3,7 @@ export module ClientConfig {
enabled: boolean
instantSearchEnabled: boolean
autocompleteEnabled: boolean
InstantSearchTimeout: number;
}
export interface SharingConfig {
@ -48,7 +49,8 @@ export class PublicConfigClass {
Search: {
enabled: true,
instantSearchEnabled: true,
autocompleteEnabled: true
autocompleteEnabled: true,
InstantSearchTimeout: 3000
},
Sharing: {
enabled: true,

View File

@ -104,7 +104,7 @@ export class GalleryService {
this.searchId = setTimeout(() => {
this.search(text);
this.searchId = null;
}, 3000); //TODO: set timeout to config
}, Config.Client.Search.InstantSearchTimeout); //TODO: set timeout to config
const cw = await this.networkService.getJson<ContentWrapper>("/instant-search/" + text);
this.content.next(cw);

View File

@ -87,8 +87,6 @@ export class GalleryGridComponent implements OnChanges, AfterViewInit, OnDestroy
ngAfterViewInit() {
this.lightbox.setGridPhotoQL(this.gridPhotoQL);
//TODO: implement scroll detection
this.updateContainerWidth();
this.sortPhotos();

View File

@ -48,8 +48,7 @@ export class InfoPanelLightboxComponent {
getTime() {
const date = new Date(this.photo.metadata.creationDate);
//TODO: pad with zeros
return date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds();
return date.toTimeString().split(' ')[0];
}
getDay() {

View File

@ -21,7 +21,6 @@ export class NetworkService {
let headers = new Headers({'Content-Type': 'application/json'});
let options = new RequestOptions({headers: headers});
//TODO handle long loading time
this.slimLoadingBarService.visible = true;
this.slimLoadingBarService.start(() => {
this.slimLoadingBarService.visible = false;
@ -94,7 +93,6 @@ export class NetworkService {
}
return Promise.reject(error);
}
// TODO: in a real world app do something better
// instead of just logging it to the console
console.error(error);
return Promise.reject(error.message || error || 'Server error');