feat: Rich-Text-Editor, Bild-Skalierung, PDF-Fix & Zeichenlimit
- Bild-Skalierung in Kartenansicht gefixt (object-position: top, 300px) - Admin-Slider für Zeichenlimit (4–32.000) als Modul-Setting - Textarea durch RichTextEditor (Quill.js) ersetzt - PDF: HTML-Parsing, Einzelperson-Filter, Autorisierung für alle User
This commit is contained in:
@@ -75,10 +75,7 @@ else
|
||||
</div>
|
||||
}
|
||||
<div class="lead text-dark mb-4" style="line-height: 1.7; font-size: 1.1rem;">
|
||||
@foreach (var line in (_item.Description?.Replace("\t", " ").Split('\n') ?? Array.Empty<string>()))
|
||||
{
|
||||
<div class="hof-description-line">@line</div>
|
||||
}
|
||||
@((MarkupString)(_item.Description ?? ""))
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -250,9 +247,16 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
private string GetPdfApiBase()
|
||||
{
|
||||
var aliasPath = PageState.Alias.Path;
|
||||
var prefix = !string.IsNullOrEmpty(aliasPath) ? $"/{aliasPath}" : "";
|
||||
return $"{prefix}/api/HallOfFamePdf";
|
||||
}
|
||||
|
||||
private void ShowPdfPreview()
|
||||
{
|
||||
_pdfPreviewUrl = $"/api/HallOfFamePdf?moduleid={ModuleState.ModuleId}";
|
||||
_pdfPreviewUrl = $"{GetPdfApiBase()}?moduleid={ModuleState.ModuleId}&id={_id}&authmoduleid={ModuleState.ModuleId}";
|
||||
_showPdfModal = true;
|
||||
}
|
||||
|
||||
@@ -264,8 +268,8 @@ else
|
||||
|
||||
private async Task DownloadPdf()
|
||||
{
|
||||
var url = $"/api/HallOfFamePdf?moduleid={ModuleState.ModuleId}&download=true";
|
||||
await JSRuntime.InvokeVoidAsync("eval", $"var a = document.createElement('a'); a.href = '{url}'; a.download = 'HallOfFame.pdf'; document.body.appendChild(a); a.click(); document.body.removeChild(a);");
|
||||
var url = $"{GetPdfApiBase()}?moduleid={ModuleState.ModuleId}&id={_id}&download=true&authmoduleid={ModuleState.ModuleId}";
|
||||
await JSRuntime.InvokeVoidAsync("eval", $"var a = document.createElement('a'); a.href = '{url}'; a.download = 'HallOfFame_{_item?.Name ?? "export"}.pdf'; document.body.appendChild(a); a.click(); document.body.removeChild(a);");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user