App.razor 673 B

12345678910111213141516171819202122232425262728293031
  1. @using RackPeek.Domain.Persistence
  2. @using RackPeek.Web.Viewer.Pages
  3. @using Shared.Rcl.Servers
  4. @inject IResourceCollection Resources
  5. @if (!_ready)
  6. {
  7. <p>Loading…</p>
  8. }
  9. else
  10. {
  11. <Router AppAssembly="@typeof(App).Assembly"
  12. AdditionalAssemblies="new[] { typeof(ServersListPage).Assembly }"
  13. NotFoundPage="typeof(NotFound)">
  14. <Found Context="routeData">
  15. <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
  16. </Found>
  17. </Router>
  18. }
  19. @code {
  20. private bool _ready;
  21. protected override async Task OnInitializedAsync()
  22. {
  23. await Resources.LoadAsync();
  24. _ready = true;
  25. }
  26. }