AI-Studio/app/MindWork AI Studio/Components/ReadFileContent.razor
2026-07-14 14:41:13 +02:00

23 lines
981 B
Plaintext

@inherits MSGComponentBase
@if (this.EnableDragDrop)
{
<div @onmouseenter="@this.OnMouseEnter" @onmouseleave="@this.OnMouseLeave">
<MudPaper Outlined="true" Class="@this.dragClass">
<MudStack Row="true" AlignItems="AlignItems.Center" StretchItems="StretchItems.None" Wrap="Wrap.Wrap">
<MudButton StartIcon="@Icons.Material.Filled.Description" OnClick="@(async () => await this.SelectFile())" Variant="Variant.Filled" Disabled="@this.IsUnavailable">
@this.ButtonText
</MudButton>
<MudText Typo="Typo.body2">
@T("Drop one file here to load its content.")
</MudText>
</MudStack>
</MudPaper>
</div>
}
else
{
<MudButton StartIcon="@Icons.Material.Filled.Description" OnClick="@(async () => await this.SelectFile())" Variant="Variant.Filled" Class="mb-3" Disabled="@this.IsUnavailable">
@this.ButtonText
</MudButton>
}