Skip to content

Commit

Permalink
refactor: remove unused code (#2137)
Browse files Browse the repository at this point in the history
  • Loading branch information
derschnee68 authored Feb 26, 2025
1 parent 097b620 commit 6c9d1b0
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ export class ListViewComponent implements OnChanges, OnInit, OnDestroy {
this.initSearch();
});
}
}),
this._componentCommsService.on([Events.resourceDeleted], () => this.doSearch())
})
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { ResourceUtil } from '../resource.util';
<mat-menu #more="matMenu" class="representation-menu">
<button mat-menu-item (click)="openIIIFnewTab()">Open audio in new tab</button>
<button mat-menu-item [cdkCopyToClipboard]="src.fileValue.fileUrl">Copy audio URL to clipboard</button>
<button mat-menu-item (click)="download(src.fileValue.fileUrl)">Download audio</button>
<button mat-menu-item (click)="download()">Download audio</button>
<button mat-menu-item [disabled]="!userCanEdit" (click)="openReplaceFileDialog()">Replace file</button>
</mat-menu>`,
})
Expand Down Expand Up @@ -75,7 +75,7 @@ export class AudioMoreButtonComponent {
window.open(this.src.fileValue.fileUrl, '_blank');
}

download(url: string) {
download() {
this._rs.downloadProjectFile(this.src.fileValue, this.parentResource);
}

Expand Down

This file was deleted.

Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,9 @@ import {
SimpleChanges,
ViewChild,
} from '@angular/core';
import { Constants, ReadProject, ReadResource, ReadStillImageFileValue } from '@dasch-swiss/dsp-js';
import { Constants, ReadResource, ReadStillImageFileValue } from '@dasch-swiss/dsp-js';
import { ReadStillImageExternalFileValue } from '@dasch-swiss/dsp-js/src/models/v2/resources/values/read/read-file-value';
import { AppError } from '@dasch-swiss/vre/core/error-handler';
import { ResourceSelectors } from '@dasch-swiss/vre/core/state';
import { Store } from '@ngxs/store';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { RepresentationService } from '../representation.service';
import { IIIFUrl } from '../third-party-iiif/third-party-iiif';
import { OpenSeaDragonService } from './open-sea-dragon.service';
import { OsdDrawerService } from './osd-drawer.service';
Expand Down Expand Up @@ -53,18 +48,10 @@ export class StillImageComponent implements OnChanges, AfterViewInit, OnDestroy
isViewInitialized = false;
isPng = false;

attachedProject$: Observable<ReadProject | undefined> = this._store.select(ResourceSelectors.attachedProjects).pipe(
map(attachedProjects => {
return this._rs.getParentResourceAttachedProject(attachedProjects, this.resource);
})
);

constructor(
private _cdr: ChangeDetectorRef,
protected osdService: OpenSeaDragonService,
private _osdDrawerService: OsdDrawerService,
private _store: Store,
private _rs: RepresentationService
private _osdDrawerService: OsdDrawerService
) {}

ngOnChanges(changes: SimpleChanges): void {
Expand Down
1 change: 0 additions & 1 deletion libs/vre/shared/app-common-to-move/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export * from './common-to-move.components';
export * from './lib/dialog-header.component';
export * from './lib/filtered-resources.interface';
export * from './lib/gui-cardinality.interface';
export * from './lib/short-res-info.interface';
export * from './lib/split.pipe';
export * from './lib/incoming.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Component, Input } from '@angular/core';

@Component({
selector: 'app-dialog-header',
Expand All @@ -18,6 +18,4 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
export class DialogHeaderComponent {
@Input({ required: true }) title!: string;
@Input() subtitle?: string;

@Output() closed = new EventEmitter<any>();
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,5 @@ export enum Events {
resourceLanguageChanged,
loginSuccess,
gravSearchExecuted,
resourceDeleted,
resourceChanged,
unselectedListItem,
}

0 comments on commit 6c9d1b0

Please sign in to comment.