a fork of iceshrimp.net but a tweaked frontend to my personal liking. waow
fediverse social-media social iceshrimp fedi
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[frontend/components] Support multi line strings in notice dialog

pancakes 9e03455e c5165f4b

+10 -3
+6 -3
Iceshrimp.Frontend/Components/NoticeDialog.razor
··· 24 24 throw new ArgumentOutOfRangeException(); 25 25 } 26 26 </span> 27 - <span>@Text</span> 27 + @foreach (var line in Text) 28 + { 29 + <p class="text">@line</p> 30 + } 28 31 <button class="button confirm-btn" @onclick="CloseDialog">@Loc["OK"]</button> 29 32 </div> 30 33 </dialog> ··· 33 36 private ElementReference Dialog { get; set; } 34 37 private IJSObjectReference _module = null!; 35 38 private NoticeType Type { get; set; } 36 - private string Text { get; set; } = ""; 39 + private string[] Text { get; set; } = []; 37 40 38 41 public enum NoticeType 39 42 { ··· 50 53 public async Task Display(string text, NoticeType type = NoticeType.Notice) 51 54 { 52 55 Type = type; 53 - Text = text; 56 + Text = text.Split('\n'); 54 57 55 58 StateHasChanged(); 56 59
+4
Iceshrimp.Frontend/Components/NoticeDialog.razor.css
··· 39 39 color: var(--danger-color); 40 40 } 41 41 42 + .text { 43 + margin-top: 0; 44 + } 45 + 42 46 .confirm-btn { 43 47 background: var(--accent-color); 44 48 color: var(--font-color);