Fix issues caused by refactoring

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 60faf81187
commit aa563830c1

@ -13,13 +13,14 @@ import {MatProgressBarModule} from "@angular/material/progress-bar";
import {ScrollingModule} from "@angular/cdk/scrolling"; import {ScrollingModule} from "@angular/cdk/scrolling";
import {MatTabsModule} from "@angular/material/tabs"; import {MatTabsModule} from "@angular/material/tabs";
import {FlexModule} from "@angular/flex-layout"; import {FlexModule} from "@angular/flex-layout";
import {MatOptionModule} from "@angular/material/core"; import {MatOptionModule, MatRippleModule} from "@angular/material/core";
import {MatSelectModule} from "@angular/material/select"; import {MatSelectModule} from "@angular/material/select";
import {MatCheckboxModule} from "@angular/material/checkbox"; import {MatCheckboxModule} from "@angular/material/checkbox";
import {SharedModule} from "../shared/shared.module"; import {SharedModule} from "../shared/shared.module";
import {MatDividerModule} from "@angular/material/divider"; import {MatDividerModule} from "@angular/material/divider";
import {NgIconsModule} from "@ng-icons/core"; import {NgIconsModule} from "@ng-icons/core";
import * as materialIcons from "@ng-icons/material-icons"; import * as materialIcons from "@ng-icons/material-icons";
import {MatMenuModule} from "@angular/material/menu";
@NgModule({ @NgModule({
@ -49,6 +50,8 @@ import * as materialIcons from "@ng-icons/material-icons";
NgIconsModule.withIcons({...materialIcons}), NgIconsModule.withIcons({...materialIcons}),
FlexModule, FlexModule,
MatButtonModule, MatButtonModule,
MatMenuModule,
MatRippleModule,
] ]
}) })
export class CoreModule { export class CoreModule {

@ -29,7 +29,7 @@
</div> </div>
<mat-form-field appearance="fill" class="form-field-mode"> <mat-form-field appearance="fill" class="form-field-mode">
<mat-label>Mode</mat-label> <mat-label>Mode</mat-label>
<mat-select #modeSelect [(value)]="editMode"> <mat-select [(value)]="editMode">
<mat-option value="Toggle">Toggle</mat-option> <mat-option value="Toggle">Toggle</mat-option>
<mat-option value="Add">Add</mat-option> <mat-option value="Add">Add</mat-option>
<mat-option value="Remove">Remove</mat-option> <mat-option value="Remove">Remove</mat-option>

@ -31,7 +31,7 @@ export class FileGridEntryComponent implements OnInit, OnChanges {
private cachedFile: File | undefined; private cachedFile: File | undefined;
private urlSetTimeout: number | undefined; private urlSetTimeout: number | undefined;
constructor(private fileService: FileService, private errorBroker: ErrorBrokerService) { constructor(private fileService: FileService) {
} }
async ngOnInit() { async ngOnInit() {

@ -68,8 +68,6 @@ export class FileGridComponent implements OnChanges, OnInit {
* @param {FileGridEntryComponent} clickedEntry * @param {FileGridEntryComponent} clickedEntry
*/ */
setSelectedFile(clickedEntry: GridEntry) { setSelectedFile(clickedEntry: GridEntry) {
const previousSelectionSize = this.selectedEntries.length;
if (!(this.shiftClicked || this.ctrlClicked) && this.selectedEntries.length > 0) { if (!(this.shiftClicked || this.ctrlClicked) && this.selectedEntries.length > 0) {
this.selectedEntries.forEach(entry => { this.selectedEntries.forEach(entry => {
if (entry !== clickedEntry) entry.selected = false if (entry !== clickedEntry) entry.selected = false

@ -29,7 +29,7 @@ export class TagFilterListItemComponent implements OnChanges {
public selectedIndices: number[] = []; public selectedIndices: number[] = [];
constructor(private changeDetector: ChangeDetectorRef) { constructor() {
} }
public ngOnChanges(changes: SimpleChanges): void { public ngOnChanges(changes: SimpleChanges): void {

@ -9,8 +9,4 @@ export class Selectable<T> {
public unselect() { public unselect() {
this.selected = false; this.selected = false;
} }
public toggle() {
this.selected = !this.selected;
}
} }

Loading…
Cancel
Save