AI-Studio/app/MindWork AI Studio/Components/ReadFileContent.razor

23 lines
971 B
Plaintext
Raw Normal View History

@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.Disabled">
@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.Disabled">
@this.ButtonText
</MudButton>
}