1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/common/config/public/ConfigClass.ts
2017-06-11 23:33:47 +02:00

42 lines
953 B
TypeScript

interface SearchConfig {
searchEnabled: boolean
instantSearchEnabled: boolean
autocompleteEnabled: boolean
}
interface ClientConfig {
iconSize: number;
thumbnailSizes: Array<number>;
Search: SearchConfig;
concurrentThumbnailGenerations: number;
enableCache: boolean;
enableOnScrollRendering: boolean;
enableOnScrollThumbnailPrioritising: boolean;
authenticationRequired: boolean;
googleApiKey: string;
}
/**
* These configuration will be available at frontend and backend too
*/
export class PublicConfigClass {
public Client: ClientConfig = {
thumbnailSizes: [200, 400, 600],
iconSize: 30,
Search: {
searchEnabled: true,
instantSearchEnabled: true,
autocompleteEnabled: true
},
concurrentThumbnailGenerations: 1,
enableCache: false,
enableOnScrollRendering: true,
enableOnScrollThumbnailPrioritising: true,
authenticationRequired: true,
googleApiKey: ""
};
}