generated from nhcarrigan/template
feat: add retired category
This commit is contained in:
@@ -68,6 +68,7 @@ import { Manga, MangaStatus, CreateMangaDto, UpdateMangaDto, Comment, Suggestion
|
||||
<option [value]="MangaStatus.reading">Currently Reading</option>
|
||||
<option [value]="MangaStatus.completed">Completed</option>
|
||||
<option [value]="MangaStatus.wantToRead">Want to Read</option>
|
||||
<option [value]="MangaStatus.retired">Retired</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -218,6 +219,7 @@ import { Manga, MangaStatus, CreateMangaDto, UpdateMangaDto, Comment, Suggestion
|
||||
<option [value]="MangaStatus.reading">Currently Reading</option>
|
||||
<option [value]="MangaStatus.completed">Completed</option>
|
||||
<option [value]="MangaStatus.wantToRead">Want to Read</option>
|
||||
<option [value]="MangaStatus.retired">Retired</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -475,6 +477,13 @@ import { Manga, MangaStatus, CreateMangaDto, UpdateMangaDto, Comment, Suggestion
|
||||
>
|
||||
Want to Read ({{ wantToReadCount() }})
|
||||
</button>
|
||||
<button
|
||||
(click)="setFilter(MangaStatus.retired)"
|
||||
[class.active]="statusFilter() === MangaStatus.retired"
|
||||
class="filter-btn"
|
||||
>
|
||||
Retired ({{ retiredCount() }})
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@if (loading()) {
|
||||
@@ -1285,6 +1294,7 @@ export class MangaListComponent implements OnInit {
|
||||
readingCount = computed(() => this.mangaList().filter(m => m.status === MangaStatus.reading).length);
|
||||
completedCount = computed(() => this.mangaList().filter(m => m.status === MangaStatus.completed).length);
|
||||
wantToReadCount = computed(() => this.mangaList().filter(m => m.status === MangaStatus.wantToRead).length);
|
||||
retiredCount = computed(() => this.mangaList().filter(m => m.status === MangaStatus.retired).length);
|
||||
|
||||
allTags = computed(() => {
|
||||
const tagsSet = new Set<string>();
|
||||
@@ -1415,6 +1425,7 @@ export class MangaListComponent implements OnInit {
|
||||
case MangaStatus.reading: return 'Currently Reading';
|
||||
case MangaStatus.completed: return 'Completed';
|
||||
case MangaStatus.wantToRead: return 'Want to Read';
|
||||
case MangaStatus.retired: return 'Retired';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user