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 enabled: boolean
instantSearchEnabled: boolean instantSearchEnabled: boolean
autocompleteEnabled: boolean autocompleteEnabled: boolean
InstantSearchTimeout: number;
} }
export interface SharingConfig { export interface SharingConfig {
@ -48,7 +49,8 @@ export class PublicConfigClass {
Search: { Search: {
enabled: true, enabled: true,
instantSearchEnabled: true, instantSearchEnabled: true,
autocompleteEnabled: true autocompleteEnabled: true,
InstantSearchTimeout: 3000
}, },
Sharing: { Sharing: {
enabled: true, enabled: true,

View File

@ -104,7 +104,7 @@ export class GalleryService {
this.searchId = setTimeout(() => { this.searchId = setTimeout(() => {
this.search(text); this.search(text);
this.searchId = null; 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); const cw = await this.networkService.getJson<ContentWrapper>("/instant-search/" + text);
this.content.next(cw); this.content.next(cw);

View File

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

View File

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

View File

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