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) {
|
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');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 {
|
||||||
|
@ -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> {
|
||||||
|
Loading…
Reference in New Issue
Block a user