Admin updates, dungeon viewer
This commit is contained in:
@@ -493,7 +493,7 @@
|
||||
<!-- Animations Section -->
|
||||
@if (!Model.IsNew)
|
||||
{
|
||||
<div class="card">
|
||||
<div id="animations-section" class="card">
|
||||
<div class="p-4 border-b border-gray-700 flex items-center justify-between">
|
||||
<h2 class="text-lg font-semibold text-white">Animations (@Model.MobAnimations.Count)</h2>
|
||||
<div class="flex gap-2">
|
||||
|
||||
@@ -451,7 +451,7 @@ public class EditModel : AdminPageModel
|
||||
_db.MobAnimationAssignments.Add(assignment);
|
||||
await _db.SaveChangesAsync();
|
||||
|
||||
return RedirectToPage("/Mobs/Edit", new { id = mobId });
|
||||
return Redirect($"/admin/mobs/edit?id={mobId}#animations-section");
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostRemoveAnimationAsync(int assignmentId, int mobId)
|
||||
@@ -463,7 +463,7 @@ public class EditModel : AdminPageModel
|
||||
await _db.SaveChangesAsync();
|
||||
}
|
||||
|
||||
return RedirectToPage("/Mobs/Edit", new { id = mobId });
|
||||
return Redirect($"/admin/mobs/edit?id={mobId}#animations-section");
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostToggleAnimationAsync(int assignmentId, int mobId)
|
||||
@@ -475,6 +475,6 @@ public class EditModel : AdminPageModel
|
||||
await _db.SaveChangesAsync();
|
||||
}
|
||||
|
||||
return RedirectToPage("/Mobs/Edit", new { id = mobId });
|
||||
return Redirect($"/admin/mobs/edit?id={mobId}#animations-section");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user