diff --git a/mediarepo-ui/src/app/app.component.spec.ts b/mediarepo-ui/src/app/app.component.spec.ts
index 5478d30..c9bd039 100644
--- a/mediarepo-ui/src/app/app.component.spec.ts
+++ b/mediarepo-ui/src/app/app.component.spec.ts
@@ -1,6 +1,6 @@
-import { TestBed } from '@angular/core/testing';
-import { RouterTestingModule } from '@angular/router/testing';
-import { AppComponent } from './app.component';
+import {TestBed} from '@angular/core/testing';
+import {RouterTestingModule} from '@angular/router/testing';
+import {AppComponent} from './app.component';
describe('AppComponent', () => {
beforeEach(async () => {
@@ -30,6 +30,7 @@ describe('AppComponent', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.nativeElement as HTMLElement;
- expect(compiled.querySelector('.content span')?.textContent).toContain('mediarepo-ui app is running!');
+ expect(compiled.querySelector('.content span')?.textContent)
+ .toContain('mediarepo-ui app is running!');
});
});
diff --git a/mediarepo-ui/src/app/app.component.ts b/mediarepo-ui/src/app/app.component.ts
index 15abd0b..dee33bc 100644
--- a/mediarepo-ui/src/app/app.component.ts
+++ b/mediarepo-ui/src/app/app.component.ts
@@ -9,7 +9,7 @@ import {ErrorBrokerService} from "./services/error-broker/error-broker.service";
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
-export class AppComponent implements OnInit{
+export class AppComponent implements OnInit {
title = 'mediarepo-ui';
constructor(
@@ -21,7 +21,8 @@ export class AppComponent implements OnInit{
}
async ngOnInit() {
- this.errorBroker.errorCb = (err: { message: string }) => this.showError(err);
+ this.errorBroker.errorCb = (err: { message: string }) => this.showError(
+ err);
this.errorBroker.infoCb = (info: string) => this.showInfo(info);
await this.repoService.loadRepositories();
}
diff --git a/mediarepo-ui/src/app/app.module.ts b/mediarepo-ui/src/app/app.module.ts
index aab9560..820afba 100644
--- a/mediarepo-ui/src/app/app.module.ts
+++ b/mediarepo-ui/src/app/app.module.ts
@@ -34,21 +34,21 @@ import {MatRippleModule} from "@angular/material/core";
import {FilterDialogComponent} from './components/file-search/filter-dialog/filter-dialog.component';
import {MatDialogModule} from "@angular/material/dialog";
import {MatSelectModule} from "@angular/material/select";
-import { FileGalleryComponent } from './components/file-gallery/file-gallery.component';
-import { FileGalleryEntryComponent } from './components/file-gallery/file-gallery-entry/file-gallery-entry.component';
+import {FileGalleryComponent} from './components/file-gallery/file-gallery.component';
+import {FileGalleryEntryComponent} from './components/file-gallery/file-gallery-entry/file-gallery-entry.component';
import {MatProgressSpinnerModule} from "@angular/material/progress-spinner";
import {BlockUIModule} from "primeng/blockui";
import {PanelModule} from "primeng/panel";
import {DragDropModule} from "@angular/cdk/drag-drop";
-import { ContentAwareImageComponent } from './components/content-aware-image/content-aware-image.component';
+import {ContentAwareImageComponent} from './components/content-aware-image/content-aware-image.component';
import {MatSliderModule} from "@angular/material/slider";
-import { AddRepositoryDialogComponent } from './pages/home/repositories-tab/add-repository-dialog/add-repository-dialog.component';
+import {AddRepositoryDialogComponent} from './pages/home/repositories-tab/add-repository-dialog/add-repository-dialog.component';
import {MatTooltipModule} from "@angular/material/tooltip";
import {MatMenuModule} from "@angular/material/menu";
-import { ConfirmDialogComponent } from './components/confirm-dialog/confirm-dialog.component';
-import { FilesTabSidebarComponent } from './pages/home/files-tab/files-tab-sidebar/files-tab-sidebar.component';
+import {ConfirmDialogComponent} from './components/confirm-dialog/confirm-dialog.component';
+import {FilesTabSidebarComponent} from './pages/home/files-tab/files-tab-sidebar/files-tab-sidebar.component';
import {MatExpansionModule} from "@angular/material/expansion";
-import { TagItemComponent } from './components/tag-item/tag-item.component';
+import {TagItemComponent} from './components/tag-item/tag-item.component';
@NgModule({
declarations: [
diff --git a/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.html b/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.html
index 3168e8b..f0821c4 100644
--- a/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.html
+++ b/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.html
@@ -1,10 +1,10 @@
-
-
+
+
+
diff --git a/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.spec.ts b/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.spec.ts
index fe08dc5..6a26a12 100644
--- a/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.spec.ts
+++ b/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.spec.ts
@@ -1,6 +1,6 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
+import {ComponentFixture, TestBed} from '@angular/core/testing';
-import { ConfirmDialogComponent } from './confirm-dialog.component';
+import {ConfirmDialogComponent} from './confirm-dialog.component';
describe('ConfirmDialogComponent', () => {
let component: ConfirmDialogComponent;
@@ -8,9 +8,9 @@ describe('ConfirmDialogComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- declarations: [ ConfirmDialogComponent ]
- })
- .compileComponents();
+ declarations: [ConfirmDialogComponent]
+ })
+ .compileComponents();
});
beforeEach(() => {
diff --git a/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.ts b/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.ts
index 0c2bda6..ad8fb39 100644
--- a/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.ts
+++ b/mediarepo-ui/src/app/components/confirm-dialog/confirm-dialog.component.ts
@@ -1,4 +1,4 @@
-import {Component, Inject, OnInit} from '@angular/core';
+import {Component, Inject} from '@angular/core';
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
import {ThemePalette} from "@angular/material/core";
diff --git a/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.html b/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.html
index 5269d90..20718ae 100644
--- a/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.html
+++ b/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.html
@@ -1,5 +1,5 @@
-
-
+
diff --git a/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.spec.ts b/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.spec.ts
index 0aaef2b..cdb136d 100644
--- a/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.spec.ts
+++ b/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.spec.ts
@@ -1,6 +1,6 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
+import {ComponentFixture, TestBed} from '@angular/core/testing';
-import { ContentAwareImageComponent } from './content-aware-image.component';
+import {ContentAwareImageComponent} from './content-aware-image.component';
describe('ContentAwareImageComponent', () => {
let component: ContentAwareImageComponent;
@@ -8,9 +8,9 @@ describe('ContentAwareImageComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- declarations: [ ContentAwareImageComponent ]
- })
- .compileComponents();
+ declarations: [ContentAwareImageComponent]
+ })
+ .compileComponents();
});
beforeEach(() => {
diff --git a/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.ts b/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.ts
index 0ba383e..81b5bbb 100644
--- a/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.ts
+++ b/mediarepo-ui/src/app/components/content-aware-image/content-aware-image.component.ts
@@ -1,4 +1,4 @@
-import {Component, Input, OnInit} from '@angular/core';
+import {Component, Input} from '@angular/core';
import {SafeResourceUrl} from "@angular/platform-browser";
@Component({
@@ -14,7 +14,8 @@ export class ContentAwareImageComponent {
scaleWidth = false;
- constructor() { }
+ constructor() {
+ }
/**
* Fits the image into the container
diff --git a/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.html b/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.html
index 1324653..08ea2de 100644
--- a/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.html
+++ b/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.html
@@ -1,4 +1,4 @@
-
+
diff --git a/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.scss b/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.scss
index ee1eebc..57c7b26 100644
--- a/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.scss
+++ b/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.scss
@@ -12,7 +12,7 @@ app-content-aware-image {
padding: 10px;
border-radius: 5px;
cursor: pointer;
- user-select:none;
+ user-select: none;
}
.image-wrapper.selected {
diff --git a/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.spec.ts b/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.spec.ts
index 5d0579b..d13c5d1 100644
--- a/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.spec.ts
+++ b/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.spec.ts
@@ -1,6 +1,6 @@
-import { ComponentFixture, TestBed } from '@angular/core/testing';
+import {ComponentFixture, TestBed} from '@angular/core/testing';
-import { FileGalleryEntryComponent } from './file-gallery-entry.component';
+import {FileGalleryEntryComponent} from './file-gallery-entry.component';
describe('FileGalleryEntryComponent', () => {
let component: FileGalleryEntryComponent;
@@ -8,9 +8,9 @@ describe('FileGalleryEntryComponent', () => {
beforeEach(async () => {
await TestBed.configureTestingModule({
- declarations: [ FileGalleryEntryComponent ]
- })
- .compileComponents();
+ declarations: [FileGalleryEntryComponent]
+ })
+ .compileComponents();
});
beforeEach(() => {
diff --git a/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.ts b/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.ts
index 242beed..72f74a2 100644
--- a/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.ts
+++ b/mediarepo-ui/src/app/components/file-gallery/file-gallery-entry/file-gallery-entry.component.ts
@@ -1,10 +1,11 @@
import {
Component,
EventEmitter,
- Input, OnChanges,
- OnDestroy,
+ Input,
+ OnChanges,
OnInit,
- Output, SimpleChanges
+ Output,
+ SimpleChanges
} from '@angular/core';
import {File} from "../../../models/File";
import {FileService} from "../../../services/file/file.service";
@@ -25,7 +26,8 @@ export class FileGalleryEntryComponent implements OnInit, OnChanges {
private cachedFile: File | undefined;
- constructor(private fileService: FileService, private errorBroker: ErrorBrokerService) { }
+ constructor(private fileService: FileService, private errorBroker: ErrorBrokerService) {
+ }
async ngOnChanges(changes: SimpleChanges): Promise
{
if (changes["file"] && (!this.cachedFile || this.file.data.hash !== this.cachedFile!.hash)) { // handle changes to the file when the component is not destroyed
@@ -46,7 +48,8 @@ export class FileGalleryEntryComponent implements OnInit, OnChanges {
try {
const hash = this.file.data.hash;
const thumbnails = await this.fileService.getThumbnails(hash);
- let thumbnail = thumbnails.find(t => (t.height > 250 || t.width > 250) && (t.height < 500 && t.width < 500));
+ let thumbnail = thumbnails.find(
+ t => (t.height > 250 || t.width > 250) && (t.height < 500 && t.width < 500));
thumbnail = thumbnail ?? thumbnails[0];
if (!thumbnail) {
diff --git a/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.html b/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.html
index 45ff592..6db7787 100644
--- a/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.html
+++ b/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.html
@@ -1,22 +1,24 @@
-