mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 19:32:10 +00:00
coverting the export button into a menu and wiring them up to the method
This commit is contained in:
parent
52b778c990
commit
c99be93bc5
@ -16,55 +16,65 @@
|
|||||||
</MudText>
|
</MudText>
|
||||||
</CardHeaderContent>
|
</CardHeaderContent>
|
||||||
<CardHeaderActions>
|
<CardHeaderActions>
|
||||||
@if (this.Content.FileAttachments.Count > 0)
|
<div class="d-flex">
|
||||||
{
|
@if (this.Content.FileAttachments.Count > 0)
|
||||||
<MudTooltip Text="@T("Number of attachments")" Placement="Placement.Bottom">
|
{
|
||||||
<MudBadge Content="@this.Content.FileAttachments.Count" Color="Color.Primary" Overlap="true" BadgeClass="sources-card-header">
|
<MudTooltip Text="@T("Number of attachments")" Placement="Placement.Bottom">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.AttachFile"
|
<MudBadge Content="@this.Content.FileAttachments.Count" Color="Color.Primary" Overlap="true" BadgeClass="sources-card-header">
|
||||||
OnClick="@this.OpenAttachmentsDialog"/>
|
<MudIconButton Icon="@Icons.Material.Filled.AttachFile"
|
||||||
</MudBadge>
|
OnClick="@this.OpenAttachmentsDialog"/>
|
||||||
</MudTooltip>
|
</MudBadge>
|
||||||
}
|
</MudTooltip>
|
||||||
@if (this.Content.Sources.Count > 0)
|
}
|
||||||
{
|
@if (this.Content.Sources.Count > 0)
|
||||||
<MudTooltip Text="@T("Number of sources")" Placement="Placement.Bottom">
|
{
|
||||||
<MudBadge Content="@this.Content.Sources.Count" Color="Color.Primary" Overlap="true" BadgeClass="sources-card-header">
|
<MudTooltip Text="@T("Number of sources")" Placement="Placement.Bottom">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Link"/>
|
<MudBadge Content="@this.Content.Sources.Count" Color="Color.Primary" Overlap="true" BadgeClass="sources-card-header">
|
||||||
</MudBadge>
|
<MudIconButton Icon="@Icons.Material.Filled.Link"/>
|
||||||
</MudTooltip>
|
</MudBadge>
|
||||||
}
|
</MudTooltip>
|
||||||
@if (this.IsSecondToLastBlock && this.Role is ChatRole.USER && this.EditLastUserBlockFunc is not null)
|
}
|
||||||
{
|
@if (this.IsSecondToLastBlock && this.Role is ChatRole.USER && this.EditLastUserBlockFunc is not null)
|
||||||
<MudTooltip Text="@T("Edit")" Placement="Placement.Bottom">
|
{
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Edit" Color="Color.Default" OnClick="@this.EditLastUserBlock"/>
|
<MudTooltip Text="@T("Edit")" Placement="Placement.Bottom">
|
||||||
</MudTooltip>
|
<MudIconButton Icon="@Icons.Material.Filled.Edit" Color="Color.Default" OnClick="@this.EditLastUserBlock"/>
|
||||||
}
|
</MudTooltip>
|
||||||
@if (this.IsLastContentBlock && this.Role is ChatRole.USER && this.EditLastBlockFunc is not null)
|
}
|
||||||
{
|
@if (this.IsLastContentBlock && this.Role is ChatRole.USER && this.EditLastBlockFunc is not null)
|
||||||
<MudTooltip Text="@T("Edit")" Placement="Placement.Bottom">
|
{
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Edit" Color="Color.Default" OnClick="@this.EditLastBlock"/>
|
<MudTooltip Text="@T("Edit")" Placement="Placement.Bottom">
|
||||||
</MudTooltip>
|
<MudIconButton Icon="@Icons.Material.Filled.Edit" Color="Color.Default" OnClick="@this.EditLastBlock"/>
|
||||||
}
|
</MudTooltip>
|
||||||
@if (this.IsLastContentBlock && this.Role is ChatRole.AI && this.RegenerateFunc is not null)
|
}
|
||||||
{
|
@if (this.IsLastContentBlock && this.Role is ChatRole.AI && this.RegenerateFunc is not null)
|
||||||
<MudTooltip Text="@T("Regenerate")" Placement="Placement.Bottom">
|
{
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Recycling" Color="Color.Default" Disabled="@(!this.RegenerateEnabled())" OnClick="@this.RegenerateBlock"/>
|
<MudTooltip Text="@T("Regenerate")" Placement="Placement.Bottom">
|
||||||
</MudTooltip>
|
<MudIconButton Icon="@Icons.Material.Filled.Recycling" Color="Color.Default" Disabled="@(!this.RegenerateEnabled())" OnClick="@this.RegenerateBlock"/>
|
||||||
}
|
</MudTooltip>
|
||||||
@if (this.RemoveBlockFunc is not null)
|
}
|
||||||
{
|
@if (this.RemoveBlockFunc is not null)
|
||||||
<MudTooltip Text="@T("Removes this block")" Placement="Placement.Bottom">
|
{
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" OnClick="@this.RemoveBlock"/>
|
<MudTooltip Text="@T("Removes this block")" Placement="Placement.Bottom">
|
||||||
</MudTooltip>
|
<MudIconButton Icon="@Icons.Material.Filled.Delete" Color="Color.Error" OnClick="@this.RemoveBlock"/>
|
||||||
}
|
</MudTooltip>
|
||||||
|
}
|
||||||
|
|
||||||
@if (this.Role is ChatRole.AI)
|
@if (this.Role is ChatRole.AI)
|
||||||
{
|
{
|
||||||
<MudTooltip Text="@T("Export Chat to Microsoft Word")" Placement="Placement.Bottom">
|
<MudTooltip Text="@T("Export chat")" Placement="Placement.Bottom">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Save" OnClick="@this.ExportToWord"/>
|
<MudMenu Icon="@Icons.Material.Filled.Save">
|
||||||
</MudTooltip>
|
<MudMenuItem OnClick="@(() => this.ExportDocument(FileExportFormat.MICROSOFT_WORD))" Icon="@Icons.Custom.FileFormats.FileWord">
|
||||||
}
|
@T("Microsoft Word (.docx)")
|
||||||
<MudCopyClipboardButton Content="@this.Content" Type="@this.Type" Size="Size.Medium"/>
|
</MudMenuItem>
|
||||||
|
<MudMenuItem OnClick="@(() => this.ExportDocument(FileExportFormat.OPEN_DOCUMENT_TEXT))" Icon="@Icons.Custom.FileFormats.FileDocument">
|
||||||
|
<MudTooltip Text="@T("LibreOffice / OpenOffice")">
|
||||||
|
@T("OpenDocument Text (.odt)")
|
||||||
|
</MudTooltip>
|
||||||
|
</MudMenuItem>
|
||||||
|
</MudMenu>
|
||||||
|
</MudTooltip>
|
||||||
|
}
|
||||||
|
<MudCopyClipboardButton Content="@this.Content" Type="@this.Type" Size="Size.Medium"/></div>
|
||||||
</CardHeaderActions>
|
</CardHeaderActions>
|
||||||
</MudCardHeader>
|
</MudCardHeader>
|
||||||
<MudCardContent>
|
<MudCardContent>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user