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

improving faces UI

This commit is contained in:
Patrik J. Braun 2019-07-21 16:55:19 +02:00
parent 685c406e91
commit 8ff32f5b8a
3 changed files with 18 additions and 4 deletions

View File

@ -128,10 +128,14 @@ export class ConfigDiagnostics {
static async testFacesConfig(faces: ClientConfig.FacesConfig, config: IPrivateConfig) { static async testFacesConfig(faces: ClientConfig.FacesConfig, config: IPrivateConfig) {
if (faces.enabled === true && if (faces.enabled === true) {
config.Server.database.type === DatabaseType.memory) { if (config.Server.database.type === DatabaseType.memory) {
throw new Error('Memory Database do not support faces'); throw new Error('Memory Database do not support faces');
} }
if (config.Client.Search.enabled === false) {
throw new Error('Faces support needs enabled search');
}
}
} }
static async testSearchConfig(search: ClientConfig.SearchConfig, config: IPrivateConfig) { static async testSearchConfig(search: ClientConfig.SearchConfig, config: IPrivateConfig) {

View File

@ -216,9 +216,18 @@ input[type="range"].zoom-progress::-moz-range-track {
transition: opacity 0.5s; transition: opacity 0.5s;
} }
#controllers-container.dim-controls .face,
#controllers-container.dim-controls-video .face {
opacity: 0;
}
.face-name { .face-name {
white-space: nowrap; white-space: nowrap;
color: white; color: white;
margin-left: -100%;
margin-right: -100%;
text-align: center;
display: block;
} }
.face-box { .face-box {

View File

@ -13,7 +13,8 @@ export class FacesSettingsService extends AbstractSettingsService<ClientConfig.F
} }
public isSupported(): boolean { public isSupported(): boolean {
return this._settingsService.settings.value.Server.database.type !== DatabaseType.memory; return this._settingsService.settings.value.Server.database.type !== DatabaseType.memory &&
this._settingsService.settings.value.Client.Search.enabled === true;
} }
public updateSettings(settings: ClientConfig.FacesConfig): Promise<void> { public updateSettings(settings: ClientConfig.FacesConfig): Promise<void> {