App.razor 656 B

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