@page "/Projects/New" @using ArcaneLibs.Extensions @using BugMine.Sdk.Events.State @using LibMatrix @inject ILogger Logger

New project

Project name:
Project repository:
@* Room alias: *@ @* *@ @*
*@ @if (Constants.Debug) { Debug:
        @_request.ToJson()
    

} @if (!_busy) { Create project } else {

Powering up the framework...

} @code { private bool _busy = false; private bool Busy { get => _busy; set { _busy = value; StateHasChanged(); } } private BugMineClient? Client { get; set; } private readonly ProjectInfo _request = new(); protected override async Task OnInitializedAsync() { Client = await BugMineStorage.GetCurrentSessionOrNavigate(); if (Client == null) { return; } } private async Task CreateProject() { if (Client == null) { return; } Busy = true; try { var proj = await Client.CreateProject(_request); NavigationManager.NavigateTo($"/Projects/{proj.ProjectSlug}/"); } catch (MatrixException e) { Logger.LogError(e, "Failed to create project"); } } }