1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

Creating Album settings UI and adding album related translations #45

This commit is contained in:
Patrik J. Braun 2021-05-31 22:34:55 +02:00
parent c832e2d5e2
commit f1818c1ca6
21 changed files with 554 additions and 3 deletions

View File

@ -18,6 +18,7 @@ import {
ServerVideoConfig ServerVideoConfig
} from '../../../common/config/private/PrivateConfig'; } from '../../../common/config/private/PrivateConfig';
import { import {
ClientAlbumConfig,
ClientFacesConfig, ClientFacesConfig,
ClientMapConfig, ClientMapConfig,
ClientMetaFileConfig, ClientMetaFileConfig,
@ -159,6 +160,33 @@ export class SettingsMWs {
} }
} }
public static async updateAlbumsSettings(req: Request, res: Response, next: NextFunction): Promise<any> {
if ((typeof req.body === 'undefined') || (typeof req.body.settings === 'undefined')) {
return next(new ErrorDTO(ErrorCodes.INPUT_ERROR, 'settings is needed'));
}
try {
const original = await Config.original();
await ConfigDiagnostics.testAlbumsConfig(req.body.settings as ClientAlbumConfig, original);
Config.Client.Album = (req.body.settings as ClientAlbumConfig);
// only updating explicitly set config (not saving config set by the diagnostics)
original.Client.Album = (req.body.settings as ClientAlbumConfig);
original.save();
await ConfigDiagnostics.runDiagnostics();
Logger.info(LOG_TAG, 'new config:');
Logger.info(LOG_TAG, JSON.stringify(Config, null, '\t'));
return next();
} catch (err) {
if (err instanceof Error) {
return next(new ErrorDTO(ErrorCodes.SETTINGS_ERROR, 'Settings error: ' + err.toString(), err));
}
return next(new ErrorDTO(ErrorCodes.SETTINGS_ERROR, 'Settings error: ' + JSON.stringify(err, null, ' '), err));
}
}
public static async updateShareSettings(req: Request, res: Response, next: NextFunction): Promise<any> { public static async updateShareSettings(req: Request, res: Response, next: NextFunction): Promise<any> {
if ((typeof req.body === 'undefined') || (typeof req.body.settings === 'undefined')) { if ((typeof req.body === 'undefined') || (typeof req.body.settings === 'undefined')) {
return next(new ErrorDTO(ErrorCodes.INPUT_ERROR, 'settings is needed')); return next(new ErrorDTO(ErrorCodes.INPUT_ERROR, 'settings is needed'));

View File

@ -5,6 +5,7 @@ import {SQLConnection} from '../database/sql/SQLConnection';
import * as fs from 'fs'; import * as fs from 'fs';
import {FFmpegFactory} from '../FFmpegFactory'; import {FFmpegFactory} from '../FFmpegFactory';
import { import {
ClientAlbumConfig,
ClientFacesConfig, ClientFacesConfig,
ClientMapConfig, ClientMapConfig,
ClientMetaFileConfig, ClientMetaFileConfig,
@ -30,6 +31,12 @@ const LOG_TAG = '[ConfigDiagnostics]';
export class ConfigDiagnostics { export class ConfigDiagnostics {
static testAlbumsConfig(albumConfig: ClientAlbumConfig, original: IPrivateConfig): void {
if (albumConfig.enabled === true &&
original.Server.Database.type === DatabaseType.memory) {
throw new Error('Memory Database does not support albums');
}
}
static checkReadWritePermission(path: string): Promise<void> { static checkReadWritePermission(path: string): Promise<void> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@ -273,6 +280,15 @@ export class ConfigDiagnostics {
Config.Client.MetaFile.enabled = false; Config.Client.MetaFile.enabled = false;
} }
try {
await ConfigDiagnostics.testAlbumsConfig(Config.Client.Album, Config);
} catch (ex) {
const err: Error = ex;
NotificationManager.warning('Albums support error, switching off..', err.toString());
Logger.warn(LOG_TAG, 'Meta file support error, switching off..', err.toString());
Config.Client.Album.enabled = false;
}
try { try {
await ConfigDiagnostics.testImageFolder(Config.Server.Media.folder); await ConfigDiagnostics.testImageFolder(Config.Server.Media.folder);

View File

@ -74,6 +74,12 @@ export class SettingsRouter {
SettingsMWs.updateFacesSettings, SettingsMWs.updateFacesSettings,
RenderingMWs.renderOK RenderingMWs.renderOK
); );
app.put('/api/settings/albums',
AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Admin),
SettingsMWs.updateAlbumsSettings,
RenderingMWs.renderOK
);
app.put('/api/settings/share', app.put('/api/settings/share',
AuthenticationMWs.authenticate, AuthenticationMWs.authenticate,
AuthenticationMWs.authorise(UserRoles.Admin), AuthenticationMWs.authorise(UserRoles.Admin),

View File

@ -39,7 +39,7 @@ export class ClientSearchConfig {
@SubConfigClass() @SubConfigClass()
export class ClientAlbumConfig { export class ClientAlbumConfig {
@ConfigProperty() @ConfigProperty()
enabled: boolean = false; enabled: boolean = true;
} }
@SubConfigClass() @SubConfigClass()

View File

@ -105,6 +105,7 @@ import {AlbumComponent} from './ui/albums/album/album.component';
import {AlbumsService} from './ui/albums/albums.service'; import {AlbumsService} from './ui/albums/albums.service';
import {GallerySearchQueryBuilderComponent} from './ui/gallery/search/query-builder/query-bulder.gallery.component'; import {GallerySearchQueryBuilderComponent} from './ui/gallery/search/query-builder/query-bulder.gallery.component';
import {SavedSearchPopupComponent} from './ui/albums/saved-search-popup/saved-search-popup.component'; import {SavedSearchPopupComponent} from './ui/albums/saved-search-popup/saved-search-popup.component';
import {AlbumsSettingsComponent} from './ui/settings/albums/albums.settings.component';
@Injectable() @Injectable()
@ -227,6 +228,7 @@ Marker.prototype.options.icon = iconDefault;
RandomPhotoSettingsComponent, RandomPhotoSettingsComponent,
BasicSettingsComponent, BasicSettingsComponent,
FacesSettingsComponent, FacesSettingsComponent,
AlbumsSettingsComponent,
OtherSettingsComponent, OtherSettingsComponent,
IndexingSettingsComponent, IndexingSettingsComponent,
JobProgressComponent, JobProgressComponent,

View File

@ -125,6 +125,9 @@
<app-settings-faces #setting #faces <app-settings-faces #setting #faces
[hidden]="!faces.HasAvailableSettings" [hidden]="!faces.HasAvailableSettings"
[simplifiedMode]="simplifiedMode"></app-settings-faces> [simplifiedMode]="simplifiedMode"></app-settings-faces>
<app-settings-albums #setting #albums
[hidden]="!albums.HasAvailableSettings"
[simplifiedMode]="simplifiedMode"></app-settings-albums>
<app-settings-indexing #setting #indexing <app-settings-indexing #setting #indexing
[hidden]="!indexing.HasAvailableSettings" [hidden]="!indexing.HasAvailableSettings"
[simplifiedMode]="simplifiedMode"></app-settings-indexing> [simplifiedMode]="simplifiedMode"></app-settings-indexing>

View File

@ -31,7 +31,7 @@
<ng-template #modal> <ng-template #modal>
<!-- sharing Modal--> <!-- sharing Modal-->
<div class="modal-header"> <div class="modal-header">
<h5 class="modal-title" i18n>Add Saved Search</h5> <h5 class="modal-title" i18n>Add saved search</h5>
<button type="button" class="close" (click)="hideModal()" data-dismiss="modal" aria-label="Close"> <button type="button" class="close" (click)="hideModal()" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>

View File

@ -0,0 +1,42 @@
<form #settingsForm="ngForm" class="form-horizontal">
<div class="card mb-4">
<h5 class="card-header">
{{Name}}
<div class="switch-wrapper">
<bSwitch
class="switch"
name="enabled"
switch-on-color="success"
switch-inverse="true"
switch-off-text="Disabled"
switch-on-text="Enabled"
i18n-switch-off-text
i18n-switch-on-text
[switch-disabled]="inProgress"
switch-handle-width="100"
switch-label-width="20"
[(ngModel)]="states.enabled.value">
</bSwitch>
</div>
</h5>
<div class="card-body">
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
<ng-container i18n>Shows albums tab in the top bar and enables creating saved searches.</ng-container>
<br/>
<ng-container i18n>Note: custom albums are not supported, see:</ng-container>&nbsp;
<a href="https://github.com/bpatrik/pigallery2/issues/301">#301</a>
<button class="btn btn-success float-right"
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
</button>
<button class="btn btn-secondary float-right"
[disabled]=" !changed || inProgress"
(click)="reset()" i18n>Reset
</button>
</div>
</div>
</form>

View File

@ -0,0 +1,30 @@
import {Component} from '@angular/core';
import {AlbumsSettingsService} from './albums.settings.service';
import {SettingsComponentDirective} from '../_abstract/abstract.settings.component';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {NavigationService} from '../../../model/navigation.service';
import {NotificationService} from '../../../model/notification.service';
import {ClientAlbumConfig} from '../../../../../common/config/public/ClientConfig';
@Component({
selector: 'app-settings-albums',
templateUrl: './albums.settings.component.html',
styleUrls: ['./albums.settings.component.css',
'../_abstract/abstract.settings.component.css'],
providers: [AlbumsSettingsService],
})
export class AlbumsSettingsComponent extends SettingsComponentDirective<ClientAlbumConfig> {
constructor(authService: AuthenticationService,
navigation: NavigationService,
settingsService: AlbumsSettingsService,
notification: NotificationService) {
super($localize`Albums`, authService, navigation, settingsService, notification, s => s.Client.Album);
}
}

View File

@ -0,0 +1,28 @@
import {Injectable} from '@angular/core';
import {NetworkService} from '../../../model/network/network.service';
import {SettingsService} from '../settings.service';
import {AbstractSettingsService} from '../_abstract/abstract.settings.service';
import {ClientAlbumConfig} from '../../../../../common/config/public/ClientConfig';
@Injectable()
export class AlbumsSettingsService extends AbstractSettingsService<ClientAlbumConfig> {
constructor(private networkService: NetworkService,
settingsService: SettingsService) {
super(settingsService);
}
public isSupported(): boolean {
return this.settingsService.settings.value.Client.Map.enabled === true;
}
showInSimplifiedMode(): boolean {
return false;
}
public updateSettings(settings: ClientAlbumConfig): Promise<void> {
return this.networkService.putJson('/settings/albums', {settings});
}
}

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>Search will also return with directories"</target> <target>Search will also return with directories"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Add saved search</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>No albums to show.</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Album is locked, cannot be deleted from the webpage.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Save search to album</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Saved Search to .saved_searches.pg2conf</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>To .pg2conf</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albums</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Note: custom albums are not supported, see:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Shows albums tab in the top bar and enables creating saved searches.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>Search will also return with directories"</target> <target>Search will also return with directories"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Add saved search</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>No albums to show.</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Album is locked, cannot be deleted from the webpage.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Save search to album</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Saved Search to .saved_searches.pg2conf</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>To .pg2conf</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albums</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Note: custom albums are not supported, see:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Shows albums tab in the top bar and enables creating saved searches.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>Search will also return with directories"</target> <target>Search will also return with directories"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Add saved search</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>No albums to show.</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Album is locked, cannot be deleted from the webpage.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Save search to album</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Saved Search to .saved_searches.pg2conf</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>To .pg2conf</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albums</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Note: custom albums are not supported, see:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Shows albums tab in the top bar and enables creating saved searches.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>A keresési eredmény mappákat is fog tartalmazni"</target> <target>A keresési eredmény mappákat is fog tartalmazni"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Mentett keresés hozzáadása</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>Nincs Album</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Az album le van zárva, nem lehet a weboldalon keresztül törölni.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Keresés albumba mentése</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Keresés .saved_searches.pg2conf fájlba mentése</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>.pg2conf fájlba</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albumok</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Megjegyzés: saját albumok nem támogatottak:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Megjeleníti az Album fület a felső sávban és engedélyezi a mentett keresések létrehozásást</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>Search will also return with directories"</target> <target>Search will also return with directories"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Add saved search</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>No albums to show.</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Album is locked, cannot be deleted from the webpage.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Save search to album</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Saved Search to .saved_searches.pg2conf</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>To .pg2conf</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albums</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Note: custom albums are not supported, see:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Shows albums tab in the top bar and enables creating saved searches.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>Search will also return with directories"</target> <target>Search will also return with directories"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Add saved search</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>No albums to show.</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Album is locked, cannot be deleted from the webpage.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Save search to album</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Saved Search to .saved_searches.pg2conf</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>To .pg2conf</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albums</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Note: custom albums are not supported, see:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Shows albums tab in the top bar and enables creating saved searches.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>Search will also return with directories"</target> <target>Search will also return with directories"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Add saved search</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>No albums to show.</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Album is locked, cannot be deleted from the webpage.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Save search to album</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Saved Search to .saved_searches.pg2conf</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>To .pg2conf</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albums</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Note: custom albums are not supported, see:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Shows albums tab in the top bar and enables creating saved searches.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>Search will also return with directories"</target> <target>Search will also return with directories"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Add saved search</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>No albums to show.</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Album is locked, cannot be deleted from the webpage.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Save search to album</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Saved Search to .saved_searches.pg2conf</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>To .pg2conf</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albums</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Note: custom albums are not supported, see:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Shows albums tab in the top bar and enables creating saved searches.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -2784,6 +2784,50 @@
<source>Search will also return with directories"</source> <source>Search will also return with directories"</source>
<target>Search will also return with directories"</target> <target>Search will also return with directories"</target>
</trans-unit> </trans-unit>
<trans-unit id="7786160088790041328" datatype="html">
<source>Add saved search</source>
<target>Add saved search</target>
</trans-unit>
<trans-unit id="3231059240281443547" datatype="html">
<source>No albums to show.</source>
<target>No albums to show.</target>
</trans-unit>
<trans-unit id="3017479276216613525" datatype="html">
<source>Album is locked, cannot be deleted from the webpage.</source>
<target>Album is locked, cannot be deleted from the webpage.</target>
</trans-unit>
<trans-unit id="5466947574428856253" datatype="html">
<source>Save search to album</source>
<target>Save search to album</target>
</trans-unit>
<trans-unit id="1692479277642537323" datatype="html">
<source>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</source>
<target>This saved search will be loaded from file during gallery indexing and it will survive a database reset."</target>
</trans-unit>
<trans-unit id="2861315058248271208" datatype="html">
<source>Add this json to a '.saved_searches.pg2conf' file in your gallery:</source>
<target>Add this json to a '.saved_searches.pg2conf' file in your gallery:</target>
</trans-unit>
<trans-unit id="6733799876332344576" datatype="html">
<source>Saved Search to .saved_searches.pg2conf</source>
<target>Saved Search to .saved_searches.pg2conf</target>
</trans-unit>
<trans-unit id="4531897455936063912" datatype="html">
<source>To .pg2conf</source>
<target>To .pg2conf</target>
</trans-unit>
<trans-unit id="5043933900720743682" datatype="html">
<source>Albums</source>
<target>Albums</target>
</trans-unit>
<trans-unit id="3913155609891930218" datatype="html">
<source>Note: custom albums are not supported, see:</source>
<target>Note: custom albums are not supported, see:</target>
</trans-unit>
<trans-unit id="3211593807292156099" datatype="html">
<source>Shows albums tab in the top bar and enables creating saved searches.</source>
<target>Shows albums tab in the top bar and enables creating saved searches.</target>
</trans-unit>
</body> </body>
</file> </file>
</xliff> </xliff>

View File

@ -595,7 +595,7 @@ describe('IndexingManager', (sqlHelper: DBTestHelper) => {
await im.saveToDB(dir); await im.saveToDB(dir);
const albums = await am.getAlbums(); const albums = await am.getAlbums();
expect(albums[0].preview).to.be.an('object'); // expect(albums[0].preview).to.be.an('object');
delete albums[0].preview; delete albums[0].preview;
expect(albums).to.be.equalInAnyOrder([ expect(albums).to.be.equalInAnyOrder([
{ {