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

71 lines
1.5 KiB
TypeScript
Raw Normal View History

2017-07-15 18:47:11 +08:00
export module ClientConfig {
export interface SearchConfig {
enabled: boolean
instantSearchEnabled: boolean
autocompleteEnabled: boolean
}
2017-07-15 18:47:11 +08:00
export interface SharingConfig {
enabled: boolean;
passwordProtected: boolean;
}
2017-07-04 01:17:49 +08:00
2017-07-15 18:47:11 +08:00
export interface MapConfig {
enabled: boolean;
googleApiKey: string;
}
export interface ThumbnailConfig {
iconSize: number;
thumbnailSizes: Array<number>;
}
2017-07-14 05:39:09 +08:00
2017-07-15 18:47:11 +08:00
export interface Config {
applicationTitle: string;
Thumbnail: ThumbnailConfig;
Search: SearchConfig;
Sharing: SharingConfig;
Map: MapConfig;
concurrentThumbnailGenerations: number;
enableCache: boolean;
enableOnScrollRendering: boolean;
enableOnScrollThumbnailPrioritising: boolean;
authenticationRequired: boolean;
publicUrl: string;
}
2017-07-15 18:47:11 +08:00
}
2017-06-04 21:25:08 +08:00
/**
* These configuration will be available at frontend and backend too
*/
export class PublicConfigClass {
2017-07-15 18:47:11 +08:00
public Client: ClientConfig.Config = {
2017-07-07 04:54:36 +08:00
applicationTitle: "PiGallery 2",
2017-07-15 18:47:11 +08:00
Thumbnail: {
thumbnailSizes: [200, 400, 600],
iconSize: 30
},
Search: {
2017-07-14 05:39:09 +08:00
enabled: true,
instantSearchEnabled: true,
autocompleteEnabled: true
},
2017-07-04 01:17:49 +08:00
Sharing: {
enabled: true,
passwordProtected: true
},
2017-07-14 05:39:09 +08:00
Map: {
enabled: true,
googleApiKey: ""
},
concurrentThumbnailGenerations: 1,
enableCache: false,
enableOnScrollRendering: true,
enableOnScrollThumbnailPrioritising: true,
authenticationRequired: true,
2017-07-09 18:03:17 +08:00
publicUrl: ""
};
}