Compare commits
7 Commits
5f39417109
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 594541a103 | |||
| ee7bcc1eae | |||
| 4fe354add0 | |||
| c6355d47df | |||
| 97a92269ad | |||
| 66468a1f8b | |||
| e48e8b6394 |
@@ -159,7 +159,7 @@
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
GlobalEntities = await CouchLogDB.GlobalEntities.OrderByDescending(Entity => Entity.Title).ToListAsync();
|
||||
GlobalEntities = await CouchLogDB.GlobalEntities.OrderByDescending(Entity => Entity.CreationTime).ToListAsync();
|
||||
MediaTypes = await CouchLogDB.MediaType.OrderBy(Type => Type.Id).ToListAsync();
|
||||
Genres = await CouchLogDB.Genres.OrderBy(Genre => Genre.Name).ToListAsync();
|
||||
|
||||
|
||||
@@ -179,7 +179,9 @@
|
||||
<h5 class="modal-title">Optionen</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">Optionen...</div>
|
||||
<div class="modal-body">
|
||||
<button type="button" class="btn btn-danger" @onclick="@(e => RemoveEntityFromPrivateList(Entity))" data-bs-dismiss="modal">Aus PrivateList entfernen</button>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Schließen</button>
|
||||
</div>
|
||||
@@ -189,6 +191,16 @@
|
||||
</div>
|
||||
};
|
||||
|
||||
private async Task RemoveEntityFromPrivateList(PrivateEntity entity)
|
||||
{
|
||||
//Delete DB
|
||||
CouchLogDB.PrivateEntities.Remove(entity);
|
||||
await CouchLogDB.SaveChangesAsync();
|
||||
|
||||
//Delete Memory List
|
||||
PrivateEntities.Remove(entity);
|
||||
}
|
||||
|
||||
private async Task UpdateWatchStatus(PrivateEntity entity, object? newValue)
|
||||
{
|
||||
if (int.TryParse(newValue?.ToString(), out int newId))
|
||||
|
||||
Reference in New Issue
Block a user