1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-12 11:15:22 +02:00

Fixing reference issues

This commit is contained in:
Patrik J. Braun 2021-03-14 17:45:32 +01:00
parent 1de6114c5b
commit 7ab2d9e62d
7 changed files with 8 additions and 30 deletions

3
package-lock.json generated
View File

@ -13512,7 +13512,8 @@
"natural-orderby": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/natural-orderby/-/natural-orderby-2.0.3.tgz",
"integrity": "sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q=="
"integrity": "sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q==",
"dev": true
},
"needle": {
"version": "2.5.2",

View File

@ -1,16 +1,4 @@
import {DirectoryDTO} from '../../../../common/entities/DirectoryDTO';
import {PhotoDTO} from '../../../../common/entities/PhotoDTO';
import {OrientationType} from '../../../../common/entities/RandomQueryDTO';
export interface RandomQuery {
directory?: string;
recursive?: boolean;
orientation?: OrientationType;
fromDate?: Date;
toDate?: Date;
minResolution?: number;
maxResolution?: number;
}
export interface IGalleryManager {
listDirectory(relativeDirectoryName: string,

View File

@ -2,7 +2,6 @@ import {AutoCompleteItem} from '../../../../common/entities/AutoCompleteItem';
import {SearchResultDTO} from '../../../../common/entities/SearchResultDTO';
import {SearchQueryDTO, SearchQueryTypes} from '../../../../common/entities/SearchQueryDTO';
import {PhotoDTO} from '../../../../common/entities/PhotoDTO';
import {RandomQuery} from './IGalleryManager';
export interface ISearchManager {
autocomplete(text: string, type: SearchQueryTypes): Promise<AutoCompleteItem[]>;

View File

@ -1,11 +1,10 @@
import {DirectoryDTO} from '../../../../common/entities/DirectoryDTO';
import {IGalleryManager, RandomQuery} from '../interfaces/IGalleryManager';
import {IGalleryManager} from '../interfaces/IGalleryManager';
import * as path from 'path';
import * as fs from 'fs';
import {DiskManager} from '../../DiskManger';
import {ProjectPath} from '../../../ProjectPath';
import {Config} from '../../../../common/config/private/Config';
import {PhotoDTO} from '../../../../common/entities/PhotoDTO';
import {DiskMangerWorker} from '../../threading/DiskMangerWorker';
import {ServerConfig} from '../../../../common/config/private/PrivateConfig';
@ -25,7 +24,4 @@ export class GalleryManager implements IGalleryManager {
return DiskManager.scanDirectory(relativeDirectoryName);
}
getRandomPhoto(queryFilter: RandomQuery): Promise<PhotoDTO> {
throw new Error('Random media is not supported without database');
}
}

View File

@ -1,4 +1,4 @@
import {IGalleryManager, RandomQuery} from '../interfaces/IGalleryManager';
import {IGalleryManager} from '../interfaces/IGalleryManager';
import {DirectoryDTO} from '../../../../common/entities/DirectoryDTO';
import * as path from 'path';
import * as fs from 'fs';
@ -9,8 +9,7 @@ import {ProjectPath} from '../../../ProjectPath';
import {Config} from '../../../../common/config/private/Config';
import {ISQLGalleryManager} from './IGalleryManager';
import {PhotoDTO} from '../../../../common/entities/PhotoDTO';
import {OrientationType} from '../../../../common/entities/RandomQueryDTO';
import {Brackets, Connection, SelectQueryBuilder} from 'typeorm';
import {Connection} from 'typeorm';
import {MediaEntity} from './enitites/MediaEntity';
import {VideoEntity} from './enitites/VideoEntity';
import {DiskMangerWorker} from '../../threading/DiskMangerWorker';
@ -19,7 +18,6 @@ import {FaceRegionEntry} from './enitites/FaceRegionEntry';
import {ObjectManagers} from '../../ObjectManagers';
import {DuplicatesDTO} from '../../../../common/entities/DuplicatesDTO';
import {ServerConfig} from '../../../../common/config/private/PrivateConfig';
import {SearchQueryDTO} from '../../../../common/entities/SearchQueryDTO';
const LOG_TAG = '[GalleryManager]';

View File

@ -3,7 +3,6 @@ import {AuthenticationService} from '../../model/network/authentication.service'
import {ActivatedRoute, Params, Router} from '@angular/router';
import {GalleryService} from './gallery.service';
import {GalleryGridComponent} from './grid/grid.gallery.component';
import {SearchTypes} from '../../../../common/entities/AutoCompleteItem';
import {Config} from '../../../../common/config/public/Config';
import {DirectoryDTO} from '../../../../common/entities/DirectoryDTO';
import {SearchResultDTO} from '../../../../common/entities/SearchResultDTO';
@ -18,8 +17,7 @@ import {PhotoDTO} from '../../../../common/entities/PhotoDTO';
import {QueryParams} from '../../../../common/QueryParams';
import {SeededRandomService} from '../../model/seededRandom.service';
import {take} from 'rxjs/operators';
import {SearchQueryTypes} from '../../../../common/entities/SearchQueryDTO';
import { compare } from 'natural-orderby';
import {compare} from 'natural-orderby';
@Component({
selector: 'app-gallery',
@ -38,7 +36,6 @@ export class GalleryComponent implements OnInit, OnDestroy {
public isPhotoWithLocation = false;
public countDown: { day: number, hour: number, minute: number, second: number } = null;
public readonly mapEnabled: boolean;
readonly SearchTypes: typeof SearchTypes;
private $counter: Observable<number>;
private subscription: { [key: string]: Subscription } = {
content: null,
@ -55,7 +52,6 @@ export class GalleryComponent implements OnInit, OnDestroy {
private _navigation: NavigationService,
private rndService: SeededRandomService) {
this.mapEnabled = Config.Client.Map.enabled;
this.SearchTypes = SearchTypes;
PageHelper.showScrollY();
}
@ -173,10 +169,10 @@ export class GalleryComponent implements OnInit, OnDestroy {
this.directories.sort((a: DirectoryDTO, b: DirectoryDTO) => compare()(a.lastModified, b.lastModified));
break;
case SortingMethods.descName:
this.directories.sort((a: DirectoryDTO, b: DirectoryDTO) => compare({ order: 'desc' })(a.name, b.name));
this.directories.sort((a: DirectoryDTO, b: DirectoryDTO) => compare({order: 'desc'})(a.name, b.name));
break;
case SortingMethods.descDate:
this.directories.sort((a: DirectoryDTO, b: DirectoryDTO) => compare({ order: 'desc' })(a.lastModified, b.lastModified));
this.directories.sort((a: DirectoryDTO, b: DirectoryDTO) => compare({order: 'desc'})(a.lastModified, b.lastModified));
break;
case SortingMethods.random:
this.rndService.setSeed(this.directories.length);