drew water edits

This commit is contained in:
Drew Ansbacher
2021-11-29 14:50:07 -07:00
committed by Aiden McClelland
parent f8f1f70dc4
commit d5819c25b9
3 changed files with 24 additions and 25 deletions

View File

@@ -1,7 +1,3 @@
:host {
display: block;
}
.item {
--background: var(--ion-color-medium-shade);
}
}

View File

@@ -4,47 +4,47 @@ import {
EventEmitter,
Input,
Output,
} from "@angular/core";
import { ItemReorderEventDetail } from "@ionic/core";
import { PackageDataEntry } from "src/app/services/patch-db/data-model";
import { map } from "rxjs/operators";
} from '@angular/core'
import { ItemReorderEventDetail } from '@ionic/core'
import { PackageDataEntry } from 'src/app/services/patch-db/data-model'
import { map } from 'rxjs/operators'
import {
ConnectionFailure,
ConnectionService,
} from "src/app/services/connection.service";
} from 'src/app/services/connection.service'
@Component({
selector: "app-list-reorder",
templateUrl: "app-list-reorder.component.html",
styleUrls: ["app-list-reorder.component.scss"],
selector: 'app-list-reorder',
templateUrl: 'app-list-reorder.component.html',
styleUrls: ['app-list-reorder.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AppListReorderComponent {
@Input()
reordering = false;
reordering = false
@Input()
pkgs: readonly PackageDataEntry[] = [];
pkgs: readonly PackageDataEntry[] = []
@Output()
readonly reorderingChange = new EventEmitter<boolean>();
readonly reorderingChange = new EventEmitter<boolean>()
@Output()
readonly pkgsChange = new EventEmitter<readonly PackageDataEntry[]>();
readonly pkgsChange = new EventEmitter<readonly PackageDataEntry[]>()
readonly connectionFailure$ = this.connectionService
.watchFailure$()
.pipe(map((failure) => failure !== ConnectionFailure.None));
.pipe(map((failure) => failure !== ConnectionFailure.None))
constructor(private readonly connectionService: ConnectionService) {}
constructor (private readonly connectionService: ConnectionService) { }
toggle() {
this.reordering = !this.reordering;
this.reorderingChange.emit(this.reordering);
toggle () {
this.reordering = !this.reordering
this.reorderingChange.emit(this.reordering)
}
reorder({ detail }: CustomEvent<ItemReorderEventDetail>): void {
this.pkgs = detail.complete([...this.pkgs]);
this.pkgsChange.emit(this.pkgs);
reorder ({ detail }: CustomEvent<ItemReorderEventDetail>): void {
this.pkgs = detail.complete([...this.pkgs])
this.pkgsChange.emit(this.pkgs)
}
}

View File

@@ -15,7 +15,10 @@ import { ErrorToastService } from 'src/app/services/error-toast.service'
import { AppConfigPage } from 'src/app/modals/app-config/app-config.page'
import { filter } from 'rxjs/operators'
import { MarkdownPage } from 'src/app/modals/markdown/markdown.page'
<<<<<<< HEAD
import { Pipe, PipeTransform } from '@angular/core'
=======
>>>>>>> 19161705 (drew water edits)
import { packageLoadingProgress, ProgressData } from 'src/app/util/package-loading-progress'
@Component({