minor style/functions renaming changes

This commit is contained in:
X4Lo committed 2024-04-16 19:13:56 +01:00
1 parent 3374aa9944
commit 8b4c0792c0
13 files changed
+95 -50

No files matched your search

@@ -19,7 +19,7 @@
</mat-dialog-actions> -->
<div class="modal-content user-lists">
<div class="modal-header">
<h2 class="modal-title">Choose a list</h2>
<h2 class="modal-title">Choose a Collection</h2>
<button type="button" class="btn-close" (click)="closeDialog()"></button>
</div>
@@ -28,9 +28,9 @@
<div class="input-group mb-3 ">
<!-- <label for="listNameInput" class="form-label">List Name</label> -->
<input type="text" class="form-control" id="listNameInput" [formControl]="searchControl"
placeholder="List name..." @scaleInOut>
placeholder="Collection name..." @scaleInOut>
<button class="btn btn-success growing-width-element" type="button" *ngIf="doShowAddButton()" (click)="createList()" @scaleInOut>Create
List</button>
Collection</button>
</div>
<div class="d-grid gap-2" *ngIf="doShowAddButton()">
@@ -63,7 +63,7 @@ export class UserCollectionsModalComponent implements OnInit {
}
getLists() {
this.listService.getLists().subscribe({
this.listService.getCollections().subscribe({
next: (c) => {
c.forEach((collection) => {
if (
@@ -106,7 +106,7 @@ export class UserCollectionsModalComponent implements OnInit {
let myNewList = { name: listName } as UserCollection;
this.listService.createList(myNewList).subscribe(async (list) => {
this.listService.createCollection(myNewList).subscribe(async (list) => {
await this.getLists();
});
}
@@ -124,7 +124,7 @@ export class UserCollectionsModalComponent implements OnInit {
`Adding Entry ${this.entryId} to list: ${userCollection.name}`
);
this.listService
.addEntryToList(
.addEntryToCollection(
userCollection.id,
this.entryId,
userCollection.userCollectionEntries.length + 1
@@ -149,7 +149,7 @@ export class UserCollectionsModalComponent implements OnInit {
`Removing Entry ${this.entryId} from list: ${userCollection.name}`
);
this.listService
.removeEntryFromList(userCollection.id.toString(), this.entryId)
.removeEntryFromCollection(userCollection.id.toString(), this.entryId)
.subscribe({
next: (_) => {
this.showNotification(