mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-02-12 08:21:37 +00:00
Some checks are pending
Build and Release / Read metadata (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis updater) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage deb updater) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Co-authored-by: Thorsten Sommer
59 lines
2.4 KiB
Plaintext
59 lines
2.4 KiB
Plaintext
@inherits MSGComponentBase
|
|
|
|
@if (this.UseSmallForm)
|
|
{
|
|
<div @onmouseenter="@this.OnMouseEnter" @onmouseleave="@this.OnMouseLeave">
|
|
@{
|
|
var fileInfos = this.DocumentPaths.Select(file => new FileInfo(file)).ToList();
|
|
}
|
|
@if (fileInfos.Any())
|
|
{
|
|
<MudBadge
|
|
Content="@this.DocumentPaths.Count"
|
|
Color="Color.Primary"
|
|
Overlap="true">
|
|
<MudIconButton
|
|
Icon="@Icons.Material.Filled.AttachFile"
|
|
Color="Color.Default"
|
|
OnClick="@AddFilesManually"/>
|
|
</MudBadge>
|
|
}
|
|
else
|
|
{
|
|
<MudTooltip Text="@T("Click to attach files")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
|
|
<MudIconButton
|
|
Icon="@Icons.Material.Filled.AttachFile"
|
|
Color="Color.Default"
|
|
OnClick="@AddFilesManually"/>
|
|
</MudTooltip>
|
|
}
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<MudStack Row="true" AlignItems="AlignItems.Center" StretchItems="StretchItems.None" Wrap="Wrap.Wrap">
|
|
<MudText Typo="Typo.body1" Inline="true">
|
|
@T("Drag and drop files into the marked area or click here to attach documents: ")
|
|
</MudText>
|
|
<MudButton
|
|
Variant="Variant.Filled"
|
|
StartIcon="@Icons.Material.Filled.Add"
|
|
Color="Color.Primary"
|
|
OnClick="@(() => this.AddFilesManually())"
|
|
Style="vertical-align: top; margin-top: -2px;"
|
|
Size="Size.Small">
|
|
@T("Add file")
|
|
</MudButton>
|
|
</MudStack>
|
|
<div @onmouseenter="@this.OnMouseEnter" @onmouseleave="@this.OnMouseLeave">
|
|
<MudPaper Height="20em" Outlined="true" Class="@this.dragClass" Style="overflow-y: auto;">
|
|
@foreach (var fileInfo in this.DocumentPaths.Select(file => new FileInfo(file)))
|
|
{
|
|
<MudChip T="string" Color="Color.Dark" Text="@fileInfo.Name" tabindex="-1" Icon="@Icons.Material.Filled.Search" OnClick="@(() => this.InvestigateFile(@fileInfo))" OnClose="@(() => this.RemoveDocumentPathFromDocumentPaths(@fileInfo))"/>
|
|
}
|
|
</MudPaper>
|
|
</div>
|
|
<MudButton OnClick="@(async () => await this.ClearAllFiles())" Variant="Variant.Filled" Color="Color.Info" Class="mt-2" StartIcon="@Icons.Material.Filled.Delete">
|
|
@T("Clear file list")
|
|
</MudButton>
|
|
} |