mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +00:00
Improved UX
This commit is contained in:
parent
ab6cfb0218
commit
22c897a3a8
@ -10,11 +10,14 @@
|
|||||||
<MudListItem Text="@workspace.Name" Icon="@Icons.Material.Filled.Description" Value="@workspace.WorkspaceId" />
|
<MudListItem Text="@workspace.Name" Icon="@Icons.Material.Filled.Description" Value="@workspace.WorkspaceId" />
|
||||||
}
|
}
|
||||||
</MudList>
|
</MudList>
|
||||||
<MudDivider Class="my-4"/>
|
</DialogContent>
|
||||||
@if (this.showCreateWorkspaceForm)
|
<DialogActions>
|
||||||
{
|
<MudStack Style="width: 100%;" Spacing="2">
|
||||||
<MudForm @ref="this.createWorkspaceForm">
|
<MudDivider/>
|
||||||
<MudStack Row="@true" AlignItems="AlignItems.Start" Wrap="Wrap.NoWrap" Spacing="1">
|
|
||||||
|
@if (this.showCreateWorkspaceForm)
|
||||||
|
{
|
||||||
|
<MudForm @ref="this.createWorkspaceForm">
|
||||||
<MudTextField T="string"
|
<MudTextField T="string"
|
||||||
@bind-Text="@this.newWorkspaceName"
|
@bind-Text="@this.newWorkspaceName"
|
||||||
Variant="Variant.Outlined"
|
Variant="Variant.Outlined"
|
||||||
@ -25,25 +28,32 @@
|
|||||||
Disabled="@this.isCreatingWorkspace"
|
Disabled="@this.isCreatingWorkspace"
|
||||||
OnKeyDown="@this.HandleNewWorkspaceNameKeyDown"
|
OnKeyDown="@this.HandleNewWorkspaceNameKeyDown"
|
||||||
Validation="@this.ValidateNewWorkspaceName" />
|
Validation="@this.ValidateNewWorkspaceName" />
|
||||||
<MudTooltip Text="@T("Add workspace")">
|
</MudForm>
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.LibraryAdd" Color="Color.Info" Disabled="@this.isCreatingWorkspace" OnClick="@this.CreateWorkspaceAsync"/>
|
}
|
||||||
</MudTooltip>
|
else
|
||||||
</MudStack>
|
{
|
||||||
</MudForm>
|
<MudButton StartIcon="@Icons.Material.Filled.LibraryAdd" Variant="Variant.Filled" OnClick="@this.ShowCreateWorkspaceForm">
|
||||||
}
|
@T("Create new workspace")
|
||||||
else
|
</MudButton>
|
||||||
{
|
}
|
||||||
<MudButton StartIcon="@Icons.Material.Filled.LibraryAdd" Variant="Variant.Filled" OnClick="@this.ShowCreateWorkspaceForm">
|
|
||||||
@T("Create new workspace")
|
<MudStack Row="@true" Justify="Justify.FlexEnd" AlignItems="AlignItems.Center" Wrap="Wrap.NoWrap" Spacing="2">
|
||||||
</MudButton>
|
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
|
||||||
}
|
@T("Cancel")
|
||||||
</DialogContent>
|
</MudButton>
|
||||||
<DialogActions>
|
@if (this.showCreateWorkspaceForm)
|
||||||
<MudButton OnClick="@this.Cancel" Variant="Variant.Filled">
|
{
|
||||||
@T("Cancel")
|
<MudButton OnClick="@this.CreateWorkspaceAsync" Variant="Variant.Filled" Color="Color.Info" Disabled="@this.isCreatingWorkspace">
|
||||||
</MudButton>
|
@T("Add workspace")
|
||||||
<MudButton OnClick="@this.Confirm" Variant="Variant.Filled" Color="Color.Info" Disabled="@(this.selectedWorkspace == Guid.Empty)">
|
</MudButton>
|
||||||
@this.ConfirmText
|
}
|
||||||
</MudButton>
|
else
|
||||||
|
{
|
||||||
|
<MudButton OnClick="@this.Confirm" Variant="Variant.Filled" Color="Color.Info" Disabled="@(this.selectedWorkspace == Guid.Empty)">
|
||||||
|
@this.ConfirmText
|
||||||
|
</MudButton>
|
||||||
|
}
|
||||||
|
</MudStack>
|
||||||
|
</MudStack>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</MudDialog>
|
</MudDialog>
|
||||||
Loading…
Reference in New Issue
Block a user