2025-04-27 14:13:15 +00:00
|
|
|
@inherits MSGComponentBase
|
2024-07-13 08:37:57 +00:00
|
|
|
<MudDialog>
|
|
|
|
|
<DialogContent>
|
2025-04-27 14:13:15 +00:00
|
|
|
<MudText Typo="Typo.body1">
|
|
|
|
|
@this.Message
|
|
|
|
|
</MudText>
|
2024-07-28 16:38:03 +00:00
|
|
|
<MudList T="Guid" @bind-SelectedValue="@this.selectedWorkspace">
|
2026-06-06 08:06:41 +00:00
|
|
|
@foreach (var workspace in this.workspaces)
|
2024-07-13 08:37:57 +00:00
|
|
|
{
|
2026-06-06 08:06:41 +00:00
|
|
|
<MudListItem Text="@workspace.Name" Icon="@Icons.Material.Filled.Description" Value="@workspace.WorkspaceId" />
|
2024-07-13 08:37:57 +00:00
|
|
|
}
|
|
|
|
|
</MudList>
|
|
|
|
|
</DialogContent>
|
|
|
|
|
<DialogActions>
|
2026-06-06 08:06:41 +00:00
|
|
|
<MudStack Style="width: 100%;" Spacing="2">
|
|
|
|
|
<MudDivider/>
|
|
|
|
|
|
|
|
|
|
@if (this.showCreateWorkspaceForm)
|
|
|
|
|
{
|
|
|
|
|
<MudForm @ref="this.createWorkspaceForm">
|
|
|
|
|
<MudTextField T="string"
|
|
|
|
|
@ref="@this.newWorkspaceNameField"
|
|
|
|
|
@bind-Text="@this.newWorkspaceName"
|
|
|
|
|
Variant="Variant.Outlined"
|
|
|
|
|
AutoGrow="@false"
|
|
|
|
|
Lines="1"
|
|
|
|
|
Label="@T("Workspace name")"
|
|
|
|
|
AutoFocus="@true"
|
|
|
|
|
Immediate="@true"
|
|
|
|
|
Disabled="@this.isCreatingWorkspace"
|
|
|
|
|
OnKeyDown="@this.HandleNewWorkspaceNameKeyDown"
|
|
|
|
|
Validation="@this.ValidateNewWorkspaceName" />
|
|
|
|
|
</MudForm>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<MudButton StartIcon="@Icons.Material.Filled.LibraryAdd" Variant="Variant.Filled" OnClick="@this.ShowCreateWorkspaceForm">
|
|
|
|
|
@T("Create new workspace")
|
|
|
|
|
</MudButton>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<MudStack Row="@true" Justify="Justify.FlexEnd" AlignItems="AlignItems.Center" Wrap="Wrap.NoWrap" Spacing="2">
|
|
|
|
|
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
|
|
|
|
|
@T("Cancel")
|
|
|
|
|
</MudButton>
|
|
|
|
|
@if (this.showCreateWorkspaceForm)
|
|
|
|
|
{
|
|
|
|
|
<MudButton OnClick="@this.CreateWorkspaceAsync" Variant="Variant.Filled" Color="Color.Info" Disabled="@this.isCreatingWorkspace">
|
|
|
|
|
@T("Add workspace")
|
|
|
|
|
</MudButton>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<MudButton OnClick="@this.Confirm" Variant="Variant.Filled" Color="Color.Info" Disabled="@(this.selectedWorkspace == Guid.Empty)">
|
|
|
|
|
@this.ConfirmText
|
|
|
|
|
</MudButton>
|
|
|
|
|
}
|
|
|
|
|
</MudStack>
|
|
|
|
|
</MudStack>
|
2024-07-13 08:37:57 +00:00
|
|
|
</DialogActions>
|
|
|
|
|
</MudDialog>
|