Improved multiline descriptions

This commit is contained in:
Thorsten Sommer 2025-12-05 22:28:31 +01:00
parent 134c018117
commit ed497c67c0
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 11 additions and 5 deletions

View File

@ -191,14 +191,20 @@ public sealed class AgentDataSourceSelection (ILogger<AgentDataSourceSelection>
if (string.IsNullOrWhiteSpace(localDirectory.Description))
sb.AppendLine($"- Id={ds.Id}, name='{localDirectory.Name}', type=local directory, path='{localDirectory.Path}'");
else
sb.AppendLine($"- Id={ds.Id}, name='{localDirectory.Name}', type=local directory, path='{localDirectory.Path}', description='{localDirectory.Description}'");
{
var description = localDirectory.Description.Replace("\n", " ").Replace("\r", " ");
sb.AppendLine($"- Id={ds.Id}, name='{localDirectory.Name}', type=local directory, path='{localDirectory.Path}', description='{description}'");
}
break;
case DataSourceLocalFile localFile:
if (string.IsNullOrWhiteSpace(localFile.Description))
sb.AppendLine($"- Id={ds.Id}, name='{localFile.Name}', type=local file, path='{localFile.FilePath}'");
else
sb.AppendLine($"- Id={ds.Id}, name='{localFile.Name}', type=local file, path='{localFile.FilePath}', description='{localFile.Description}'");
{
var description = localFile.Description.Replace("\n", " ").Replace("\r", " ");
sb.AppendLine($"- Id={ds.Id}, name='{localFile.Name}', type=local file, path='{localFile.FilePath}', description='{description}'");
}
break;
case IERIDataSource eriDataSource:

View File

@ -6,7 +6,7 @@
<TextInfoLine Icon="@Icons.Material.Filled.Tag" Label="@T("Data source name")" Value="@this.DataSource.Name" ClipboardTooltipSubject="@T("the data source name")"/>
@if (!string.IsNullOrWhiteSpace(this.DataSource.Description))
{
<TextInfoLine Icon="@Icons.Material.Filled.Description" Label="@T("Description")" Value="@this.DataSource.Description" ClipboardTooltipSubject="@T("the description")"/>
<TextInfoLines Label="@T("Description")" Value="@this.DataSource.Description" MaxLines="5" ClipboardTooltipSubject="@T("the description")"/>
}
<TextInfoLine Icon="@Icons.Material.Filled.FolderOpen" Label="@T("Path")" Value="@this.DataSource.Path" ClipboardTooltipSubject="@T("this path")"/>

View File

@ -6,9 +6,9 @@
<TextInfoLine Icon="@Icons.Material.Filled.Tag" Label="@T("Data source name")" Value="@this.DataSource.Name" ClipboardTooltipSubject="@T("the data source name")"/>
@if (!string.IsNullOrWhiteSpace(this.DataSource.Description))
{
<TextInfoLine Icon="@Icons.Material.Filled.Description" Label="@T("Description")" Value="@this.DataSource.Description" ClipboardTooltipSubject="@T("the description")"/>
<TextInfoLines Label="@T("Description")" Value="@this.DataSource.Description" MaxLines="5" ClipboardTooltipSubject="@T("the description")"/>
}
<TextInfoLine Icon="@Icons.Material.Filled.FolderOpen" Label="@T("File path")" Value="@this.DataSource.FilePath" ClipboardTooltipSubject="@T("this path")"/>
@if (!this.IsFileAvailable)
{