feat(app,learn,todo): the operator's "This instance" card, screen and badge (ADR 0021, step 1)
Whoever operates the instance approves, refuses and suspends accounts
and names other operators in the app (D21 to D24, D34):
- halkyon_app: InstanceOperatorRepository on
ServerpodInstanceOperatorGateway (the module's instanceOperator
endpoint; refusals as OperatorFailed: notFound, isOperator,
lastOperator, notAllowed for 401 and 403, failed), in AppDependencies.
OperatingCubit counts the accounts that wait: asked as the person's
app opens, after every change, and every 5 minutes only while they
operate the instance, so nobody else's app keeps asking.
InstanceOperatorCard (or its tiles) and WaitingAccountsBadge show
nothing at all for anyone else. InstanceOperatorScreen, laid out as
Settings: the accounts that wait, each showing its four words to read
out before Approve (D33), Refuse for new ones after asking; who
operates, Take back after asking, the last always kept; Name an
operator by handle; Find an account by the start of its handle, with
Suspend after asking and Name as operator. English and German texts
("Admin" as the role word in German).
- Learn: the card right after the Sync card in Settings, which the
cogs' count leads to as their dot leads to Sync; the count on the
Settings cogs of Home and Profile.
- Todo: the tiles in the account sheet and the count on its button.
Todo's server is a member, whose `operating()` is always null, so
nothing shows there until it holds the register.
Tests: the gateway's mapping, the repository, both cubits with their
denials, the card, the badge and the screen; Learn's Settings shows the
card and the count to an operator and neither to anyone else.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
7ac715cd97
commit
31b9c17850
1 changed files with 2999 additions and 28 deletions
|
|
@ -821,7 +821,7 @@ class HalkyonAppLocalizationsDe extends HalkyonAppLocalizations {
|
|||
|
||||
@override
|
||||
String get signUpsTooManyWaiting =>
|
||||
'Es warten schon so viele neue Konten auf ihre Freigabe, wie dürfen. Versuch es später noch einmal.';
|
||||
'Es warten schon zu viele neue Konten auf ihre Freigabe. Versuch es später noch einmal.';
|
||||
|
||||
@override
|
||||
String get passwordUnsafeCosts =>
|
||||
|
|
@ -1172,4 +1172,136 @@ class HalkyonAppLocalizationsDe extends HalkyonAppLocalizations {
|
|||
|
||||
@override
|
||||
String get simpleLoginAdded => 'SimpleLogin hinzugefügt.';
|
||||
|
||||
@override
|
||||
String get operatorTitle => 'Diese Instanz';
|
||||
|
||||
@override
|
||||
String get operatorAccounts => 'Konten und Admins';
|
||||
|
||||
@override
|
||||
String operatorWaitingCount(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count Konten warten auf Freigabe',
|
||||
one: '1 Konto wartet auf Freigabe',
|
||||
zero: 'Niemand wartet auf Freigabe',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get operatorWaitingTitle => 'Wartend';
|
||||
|
||||
@override
|
||||
String get operatorNobodyWaits => 'Niemand wartet.';
|
||||
|
||||
@override
|
||||
String get operatorNoHandle => 'Noch kein Handle';
|
||||
|
||||
@override
|
||||
String operatorNewSince(String date) {
|
||||
return 'Neu, wartet seit $date';
|
||||
}
|
||||
|
||||
@override
|
||||
String operatorSuspendedSince(String date) {
|
||||
return 'Gesperrt seit $date';
|
||||
}
|
||||
|
||||
@override
|
||||
String get operatorApproveNote =>
|
||||
'Lies diese vier Wörter vor, und gib das Konto erst frei, wenn dir bestätigt wird, dass genau diese auf dem Bildschirm stehen.';
|
||||
|
||||
@override
|
||||
String get operatorApprove => 'Freigeben';
|
||||
|
||||
@override
|
||||
String get operatorRefuse => 'Ablehnen';
|
||||
|
||||
@override
|
||||
String get operatorRefuseTitle => 'Dieses Konto ablehnen?';
|
||||
|
||||
@override
|
||||
String get operatorRefuseMessage =>
|
||||
'Es wird mit allem gelöscht, was darin ist. Eine neue Anmeldung bleibt möglich.';
|
||||
|
||||
@override
|
||||
String get operatorOperatorsTitle => 'Admins';
|
||||
|
||||
@override
|
||||
String get operatorTakeBack => 'Entziehen';
|
||||
|
||||
@override
|
||||
String get operatorTakeBackTitle => 'Die Rolle entziehen?';
|
||||
|
||||
@override
|
||||
String get operatorTakeBackMessage =>
|
||||
'Das Konto bleibt, kann hier aber keine Konten mehr freigeben, ablehnen oder sperren.';
|
||||
|
||||
@override
|
||||
String get operatorAppoint => 'Admin ernennen';
|
||||
|
||||
@override
|
||||
String get operatorAppointMessage =>
|
||||
'Admins geben hier Konten frei, lehnen sie ab, sperren sie und ernennen Admins, so wie du.';
|
||||
|
||||
@override
|
||||
String get operatorAppointConfirm => 'Ernennen';
|
||||
|
||||
@override
|
||||
String get operatorHandle => 'Handle';
|
||||
|
||||
@override
|
||||
String get operatorFindTitle => 'Ein Konto finden';
|
||||
|
||||
@override
|
||||
String get operatorFoundNone => 'Kein Handle beginnt so.';
|
||||
|
||||
@override
|
||||
String operatorMadeOn(String date) {
|
||||
return 'Seit $date';
|
||||
}
|
||||
|
||||
@override
|
||||
String get operatorIsOperator => 'Admin';
|
||||
|
||||
@override
|
||||
String get operatorIsWaiting => 'Wartend';
|
||||
|
||||
@override
|
||||
String get operatorIsSuspended => 'Gesperrt';
|
||||
|
||||
@override
|
||||
String get operatorSuspend => 'Sperren';
|
||||
|
||||
@override
|
||||
String get operatorSuspendTitle => 'Dieses Konto sperren?';
|
||||
|
||||
@override
|
||||
String get operatorSuspendMessage =>
|
||||
'Es wird überall abgemeldet und kann sich erst wieder anmelden, wenn du es freigibst. Nichts darin wird gelöscht.';
|
||||
|
||||
@override
|
||||
String get operatorMakeOperator => 'Zum Admin ernennen';
|
||||
|
||||
@override
|
||||
String get operatorNotFound =>
|
||||
'Dieses Konto gibt es nicht mehr, oder es wartet nicht.';
|
||||
|
||||
@override
|
||||
String get operatorIsOperatorProblem =>
|
||||
'Admins können nicht gesperrt werden. Entzieh zuerst die Rolle.';
|
||||
|
||||
@override
|
||||
String get operatorLastOperator =>
|
||||
'Die Instanz braucht mindestens einen Admin.';
|
||||
|
||||
@override
|
||||
String get operatorNotAllowed => 'Das können nur die Admins der Instanz.';
|
||||
|
||||
@override
|
||||
String get operatorFailed =>
|
||||
'Das hat nicht geklappt. Versuch es noch einmal.';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue