mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Code cleanup and icon padding improvements #587
This commit is contained in:
parent
2b75866949
commit
90a5480ff6
@ -176,7 +176,6 @@ export class PublicRouter {
|
||||
vBs[3] += size * (p);
|
||||
};
|
||||
|
||||
addPadding(0.38);
|
||||
addPadding(paddingPercent);
|
||||
|
||||
|
||||
@ -233,7 +232,7 @@ export class PublicRouter {
|
||||
res.set('Cache-control', 'public, max-age=31536000');
|
||||
res.header('Content-Type', 'image/svg+xml');
|
||||
// Use 40% padding: https://w3c.github.io/manifest/#icon-masks
|
||||
res.send(getIcon('auto', 0.3));
|
||||
res.send(getIcon('auto', 0.7));
|
||||
});
|
||||
|
||||
|
||||
|
@ -12,17 +12,15 @@ import {ErrorCodes} from '../../../../common/entities/Error';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {MediaDTO} from '../../../../common/entities/MediaDTO';
|
||||
import {FileDTO} from '../../../../common/entities/FileDTO';
|
||||
import {GroupedDirectoryContent} from './navigator/sorting.service';
|
||||
|
||||
@Injectable()
|
||||
export class ContentLoaderService {
|
||||
public content: BehaviorSubject<ContentWrapperWithError>;
|
||||
public originalContent: Observable<DirectoryContent>;
|
||||
public sortedFilteredContent: Observable<GroupedDirectoryContent>;
|
||||
lastRequest: { directory: string } = {
|
||||
directory: null,
|
||||
};
|
||||
private searchId: any;
|
||||
private searchId: number;
|
||||
private ongoingSearch: string = null;
|
||||
|
||||
constructor(
|
||||
@ -54,7 +52,7 @@ export class ContentLoaderService {
|
||||
this.lastRequest.directory = directoryName;
|
||||
|
||||
// prepare server request
|
||||
const params: { [key: string]: any } = {};
|
||||
const params: { [key: string]: unknown } = {};
|
||||
if (Config.Sharing.enabled === true) {
|
||||
if (this.shareService.isSharing()) {
|
||||
params[QueryParams.gallery.sharingKey_query] =
|
||||
|
@ -9,9 +9,8 @@ import {MapService} from '../../map/map.service';
|
||||
import {SearchQueryTypes, TextSearch, TextSearchQueryMatchTypes,} from '../../../../../../common/entities/SearchQueryDTO';
|
||||
import {AuthenticationService} from '../../../../model/network/authentication.service';
|
||||
import {LatLngLiteral, marker, Marker, TileLayer, tileLayer} from 'leaflet';
|
||||
import {ContentService} from '../../content.service';
|
||||
import {ThemeService} from '../../../../model/theme.service';
|
||||
import { ContentLoaderService } from '../../contentLoader.service';
|
||||
import {ContentLoaderService} from '../../contentLoader.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-info-panel',
|
||||
|
@ -11,7 +11,6 @@ import {PageHelper} from '../../../model/page.helper';
|
||||
import {QueryService} from '../../../model/query.service';
|
||||
import {MediaDTO} from '../../../../../common/entities/MediaDTO';
|
||||
import {QueryParams} from '../../../../../common/QueryParams';
|
||||
import {ContentService} from '../content.service';
|
||||
import {PhotoDTO} from '../../../../../common/entities/PhotoDTO';
|
||||
import {ControlsLightboxComponent} from './controls/controls.lightbox.gallery.component';
|
||||
import {SupportedFormats} from '../../../../../common/SupportedFormats';
|
||||
@ -73,7 +72,6 @@ export class GalleryLightboxComponent implements OnDestroy, OnInit {
|
||||
private builder: AnimationBuilder,
|
||||
private router: Router,
|
||||
private queryService: QueryService,
|
||||
private galleryService: ContentService,
|
||||
private route: ActivatedRoute,
|
||||
private piTitleService: PiTitleService
|
||||
) {
|
||||
@ -105,7 +103,7 @@ export class GalleryLightboxComponent implements OnDestroy, OnInit {
|
||||
this.infoPanelMaxWidth = 1000;
|
||||
this.updatePhotoFrameDim();
|
||||
this.subscription.route = this.route.queryParams.subscribe(
|
||||
(params: Params): any => {
|
||||
(params: Params) => {
|
||||
if (
|
||||
params[QueryParams.gallery.photo] &&
|
||||
params[QueryParams.gallery.photo] !== ''
|
||||
|
@ -1,6 +1,5 @@
|
||||
import {Injectable} from '@angular/core';
|
||||
import {DatePipe} from '@angular/common';
|
||||
import {NetworkService} from '../../../model/network/network.service';
|
||||
import {GalleryCacheService} from '../cache.gallery.service';
|
||||
import {BehaviorSubject, Observable} from 'rxjs';
|
||||
import {Config} from '../../../../../common/config/public/Config';
|
||||
@ -23,7 +22,6 @@ export class GallerySortingService {
|
||||
private collator = new Intl.Collator(undefined, {numeric: true});
|
||||
|
||||
constructor(
|
||||
private networkService: NetworkService,
|
||||
private galleryCacheService: GalleryCacheService,
|
||||
private galleryService: ContentLoaderService,
|
||||
private rndService: SeededRandomService,
|
||||
|
@ -1,20 +1,15 @@
|
||||
import { Component, OnDestroy, OnInit, TemplateRef } from '@angular/core';
|
||||
import { ContentService } from '../content.service';
|
||||
import { ContentWrapper } from '../../../../../common/entities/ConentWrapper';
|
||||
import { Config } from '../../../../../common/config/public/Config';
|
||||
import { NotificationService } from '../../../model/notification.service';
|
||||
import { BsModalService } from 'ngx-bootstrap/modal';
|
||||
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||
import { NetworkService } from '../../../model/network/network.service';
|
||||
import { Subscription } from 'rxjs';
|
||||
import {
|
||||
SearchQueryDTO,
|
||||
SearchQueryTypes,
|
||||
TextSearch,
|
||||
} from '../../../../../common/entities/SearchQueryDTO';
|
||||
import { ActivatedRoute, Params } from '@angular/router';
|
||||
import { QueryParams } from '../../../../../common/QueryParams';
|
||||
import { SearchQueryParserService } from '../search/search-query-parser.service';
|
||||
import {Component, OnDestroy, OnInit, TemplateRef} from '@angular/core';
|
||||
import {ContentWrapper} from '../../../../../common/entities/ConentWrapper';
|
||||
import {Config} from '../../../../../common/config/public/Config';
|
||||
import {NotificationService} from '../../../model/notification.service';
|
||||
import {BsModalService} from 'ngx-bootstrap/modal';
|
||||
import {BsModalRef} from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||
import {NetworkService} from '../../../model/network/network.service';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {SearchQueryDTO, SearchQueryTypes, TextSearch,} from '../../../../../common/entities/SearchQueryDTO';
|
||||
import {ActivatedRoute, Params} from '@angular/router';
|
||||
import {QueryParams} from '../../../../../common/QueryParams';
|
||||
import {SearchQueryParserService} from '../search/search-query-parser.service';
|
||||
import {ContentLoaderService} from '../contentLoader.service';
|
||||
|
||||
@Component({
|
||||
@ -95,7 +90,7 @@ export class RandomQueryBuilderGalleryComponent implements OnInit, OnDestroy {
|
||||
this.modalRef.hide();
|
||||
}
|
||||
|
||||
this.modalRef = this.modalService.show(template, { class: 'modal-lg' });
|
||||
this.modalRef = this.modalService.show(template, {class: 'modal-lg'});
|
||||
document.body.style.paddingRight = '0px';
|
||||
this.onQueryChange();
|
||||
return false;
|
||||
|
@ -1,16 +1,9 @@
|
||||
import {Component, OnDestroy, TemplateRef} from '@angular/core';
|
||||
import {AutoCompleteService} from './autocomplete.service';
|
||||
import {ActivatedRoute, Params, Router, RouterLink} from '@angular/router';
|
||||
import {ContentService} from '../content.service';
|
||||
import {Subscription} from 'rxjs';
|
||||
import {NavigationService} from '../../../model/navigation.service';
|
||||
import {QueryParams} from '../../../../../common/QueryParams';
|
||||
import {
|
||||
MetadataSearchQueryTypes,
|
||||
SearchQueryDTO,
|
||||
SearchQueryTypes,
|
||||
TextSearch,
|
||||
} from '../../../../../common/entities/SearchQueryDTO';
|
||||
import {MetadataSearchQueryTypes, SearchQueryDTO, SearchQueryTypes, TextSearch,} from '../../../../../common/entities/SearchQueryDTO';
|
||||
import {BsModalService} from 'ngx-bootstrap/modal';
|
||||
import {BsModalRef} from 'ngx-bootstrap/modal/bs-modal-ref.service';
|
||||
import {SearchQueryParserService} from './search-query-parser.service';
|
||||
@ -43,11 +36,8 @@ export class GallerySearchComponent implements OnDestroy {
|
||||
private saveSearchModalRef: BsModalRef;
|
||||
|
||||
constructor(
|
||||
private autoCompleteService: AutoCompleteService,
|
||||
private searchQueryParserService: SearchQueryParserService,
|
||||
private galleryService: ContentService,
|
||||
private albumService: AlbumsService,
|
||||
private navigationService: NavigationService,
|
||||
private route: ActivatedRoute,
|
||||
public router: Router,
|
||||
private modalService: BsModalService,
|
||||
|
@ -1,7 +1,6 @@
|
||||
import {Component, Input, OnDestroy, OnInit, TemplateRef} from '@angular/core';
|
||||
import {Utils} from '../../../../../common/Utils';
|
||||
import {ShareService} from '../share.service';
|
||||
import {ContentService} from '../content.service';
|
||||
import {ContentWrapper} from '../../../../../common/entities/ConentWrapper';
|
||||
import {SharingDTO} from '../../../../../common/entities/SharingDTO';
|
||||
import {Config} from '../../../../../common/config/public/Config';
|
||||
|
Loading…
Reference in New Issue
Block a user