R5 the server's own settings in decePub: instance, rules, announcements, relays, media limits, the staff's log, About
Build / Build (push) Successful in 1m5s
Build / Build (push) Successful in 1m5s
Administration's Pleroma placeholders give way to real sections: Instance (title, descriptions, contact, thumbnail, privacy policy, terms, the weekly activity), Rules, Announcements, Relays, Media limits and the Moderation log, next to Reports, blocked servers (now published or obfuscated), statistics and backups; moderators see Reports and the log. Every save sends the whole settings form built from the latest read, since PrivaPub replaces what it carries. /about shows the server's documents to anyone. The report dialog picks the rules a violation breaks, and reports show them. Announcements show above the feed tabs, dismissed and reacted to, live from the user stream. Login names the server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpVCoDeM1qUTRp4fXQdfof
This commit is contained in:
1 parent
b8d7858acb
commit
4c88980374
33 files changed
+3743
-239
No files matched your search
+15
-3
@@ -6,7 +6,9 @@
|
||||
one (CascadingState.LoadSession picks the last one used, or the only one). A server without an administrator offers
|
||||
its setup (Setup); anyone else joins through a group's invitation (Join). A forgotten password is recovered through
|
||||
the login's verified address (PasswordRecovery). With two-factor sign-in on, PrivaPub answers a right password with a
|
||||
428, and the same form goes again with the authenticator app's six digits or a recovery code (LoginForm.OneTimeCode). *@
|
||||
428, and the same form goes again with the authenticator app's six digits or a recovery code (LoginForm.OneTimeCode).
|
||||
The heading names the server as its administrator calls it (/api/v2/instance, read without credentials); About tells
|
||||
the rest. *@
|
||||
<section class="block relative w-full h-full neo-inset neo-xs rounded-xl">
|
||||
|
||||
<div class="flex flex-col items-center gap-6 p-4 md:p-5 w-full h-full absolute overflow-y-auto">
|
||||
@@ -26,7 +28,7 @@
|
||||
}
|
||||
<EditForm Model="form" OnValidSubmit="SignIn" class="flex flex-col gap-4 w-full p-5 rounded-xl neo-raised neo-sm">
|
||||
<DataAnnotationsValidator />
|
||||
<h1 class="text-xl font-bold">@Localizer["Sign in to PrivaPub"]</h1>
|
||||
<h1 class="text-xl font-bold break-words" data-login-title>@Localizer["Sign in to {0}", serverTitle ?? "PrivaPub"]</h1>
|
||||
@if (needsCode)
|
||||
{
|
||||
@* The name and the password stay in the form, out of sight, and go again with the code. *@
|
||||
@@ -93,6 +95,9 @@
|
||||
<p class="text-sm text-center">
|
||||
@Localizer["Have an invitation?"] <a class="link touch-target" href="join" data-join-offer>@Localizer["Join with an invitation"]</a>
|
||||
</p>
|
||||
<p class="text-sm text-center">
|
||||
<a class="link touch-target" href="about" data-about-offer>@Localizer["About this server"]</a>
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
else if (CascadingState.Personas.Count == 0)
|
||||
@@ -134,11 +139,14 @@
|
||||
|
||||
@code {
|
||||
[Inject] AuthService AuthService { get; set; }
|
||||
[Inject] AboutService AboutService { get; set; }
|
||||
|
||||
readonly LoginForm form = new();
|
||||
string error;
|
||||
bool isWorking;
|
||||
bool setupPending;
|
||||
// the server's own name, once read
|
||||
string serverTitle;
|
||||
/// <summary>PrivaPub asked for a code (its 428): the password was right, and two-factor sign-in is on.</summary>
|
||||
bool needsCode;
|
||||
/// <summary>The code asked for is a recovery code (two groups of five letters and digits), not the app's six digits.</summary>
|
||||
@@ -160,7 +168,11 @@
|
||||
IsLoading = false;
|
||||
}
|
||||
|
||||
async Task LoadData() => setupPending = !CascadingState.IsSignedIn && await AuthService.SetupPending();
|
||||
async Task LoadData()
|
||||
{
|
||||
serverTitle = (await AboutService.Instance())?.Title;
|
||||
setupPending = !CascadingState.IsSignedIn && await AuthService.SetupPending();
|
||||
}
|
||||
|
||||
async Task SignIn()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user