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:
parent
685c406e91
commit
8ff32f5b8a
@ -128,9 +128,13 @@ export class ConfigDiagnostics {
|
||||
|
||||
|
||||
static async testFacesConfig(faces: ClientConfig.FacesConfig, config: IPrivateConfig) {
|
||||
if (faces.enabled === true &&
|
||||
config.Server.database.type === DatabaseType.memory) {
|
||||
throw new Error('Memory Database do not support faces');
|
||||
if (faces.enabled === true) {
|
||||
if (config.Server.database.type === DatabaseType.memory) {
|
||||
throw new Error('Memory Database do not support faces');
|
||||
}
|
||||
if (config.Client.Search.enabled === false) {
|
||||
throw new Error('Faces support needs enabled search');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,9 +216,18 @@ input[type="range"].zoom-progress::-moz-range-track {
|
||||
transition: opacity 0.5s;
|
||||
}
|
||||
|
||||
#controllers-container.dim-controls .face,
|
||||
#controllers-container.dim-controls-video .face {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.face-name {
|
||||
white-space: nowrap;
|
||||
color: white;
|
||||
margin-left: -100%;
|
||||
margin-right: -100%;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.face-box {
|
||||
|
@ -13,7 +13,8 @@ export class FacesSettingsService extends AbstractSettingsService<ClientConfig.F
|
||||
}
|
||||
|
||||
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> {
|
||||
|
Loading…
Reference in New Issue
Block a user