| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- @using RackPeek.Domain.Helpers
- @using RackPeek.Domain.Persistence
- @using RackPeek.Web.Viewer.Pages
- @using Shared.Rcl.Servers
- @inject IResourceCollection Resources
- @if (!_ready)
- {
- <p>Loading…</p>
- }
- else
- {
- <Router AppAssembly="@typeof(App).Assembly"
- AdditionalAssemblies="new[] { typeof(ServersListPage).Assembly }"
- NotFoundPage="typeof(NotFound)">
- <Found Context="routeData">
- <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
- </Found>
- </Router>
- }
- @code {
- private bool _ready;
- protected override async Task OnInitializedAsync()
- {
- try
- {
- await Resources.LoadAsync();
- }
- catch (ConfigLoadException)
- {
- // Same contract as the server host: a config that cannot be read must not
- // leave the app stuck on "Loading…" — the YAML editor is how it is fixed.
- // Here the store is browser storage, so this is a bad import rather than
- // an interrupted write (#337).
- }
- _ready = true;
- }
- }
|