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/pages] Add warning to automated account setting

authored by

pancakes and committed by
Iceshrimp development
49c8f733 44f867b2

+11 -1
+11 -1
Iceshrimp.Frontend/Pages/Settings/Profile.razor
··· 139 139 <div class="section"> 140 140 <h3>@Loc["Other"]</h3> 141 141 <div> 142 - <input type="checkbox" id="is-bot" @bind="@UserProfile.IsBot"> 142 + <input type="checkbox" id="is-bot" @bind="@UserProfile.IsBot" @bind:after="AutomatedAccountToggle"> 143 143 <label for="is-bot">@Loc["Mark as an automated (bot) account"]</label> 144 144 </div> 145 145 <div> ··· 329 329 UserProfile.Description = text.Insert(pos, emojiString); 330 330 StateHasChanged(); 331 331 } 332 + 333 + private async Task AutomatedAccountToggle() 334 + { 335 + if (UserProfile.IsBot) 336 + { 337 + await GlobalComponentSvc.ConfirmDialog?.Confirm(new EventCallback<bool>(this, AutomatedAccountCallback), "Marking your account as automated is an accessibility feature. Enabling this for accounts that are not automated may break your ability to interact with automated accounts or hide your notes for some users.", Icons.Warning)!; 338 + } 339 + } 340 + 341 + private void AutomatedAccountCallback(bool confirmed) => UserProfile.IsBot = confirmed; 332 342 }