mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-18 00:38:00 +00:00
Integrated data sources into any chat (#282)
This commit is contained in:
1 parent
954cf44939
commit
f4780939fc
70 files changed
+1506
-250
No files matched your search
@@ -1,4 +1,5 @@
|
||||
using AIStudio.Settings;
|
||||
using AIStudio.Tools.Services;
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
@@ -20,6 +21,9 @@ public partial class TextInfoLines : ComponentBase
|
||||
|
||||
[Parameter]
|
||||
public bool ShowingCopyButton { get; set; } = true;
|
||||
|
||||
[Parameter]
|
||||
public TextColor Color { get; set; } = TextColor.DEFAULT;
|
||||
|
||||
[Inject]
|
||||
private RustService RustService { get; init; } = null!;
|
||||
@@ -47,4 +51,13 @@ public partial class TextInfoLines : ComponentBase
|
||||
private string ClipboardTooltip => $"Copy {this.ClipboardTooltipSubject} to the clipboard";
|
||||
|
||||
private async Task CopyToClipboard(string content) => await this.RustService.CopyText2Clipboard(this.Snackbar, content);
|
||||
|
||||
private string GetColor()
|
||||
{
|
||||
var htmlColorCode = this.Color.GetHTMLColor(this.SettingsManager);
|
||||
if(string.IsNullOrWhiteSpace(htmlColorCode))
|
||||
return string.Empty;
|
||||
|
||||
return $"color: {htmlColorCode} !important;";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user