From bbbf6ebe376c7b6c3a64e14571a3a477b880e3ad Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 8 Jul 2024 09:38:27 +0200 Subject: [frontend] Better autocapitalize/spellcheck settings on forms (#3077) --- .../views/moderation/accounts/detail/actions.tsx | 13 +++++-- .../settings/views/moderation/accounts/index.tsx | 16 +++++--- .../views/moderation/accounts/pending/index.tsx | 18 ++++++++- .../views/moderation/accounts/search/index.tsx | 44 +++++++++++++++++++--- 4 files changed, 75 insertions(+), 16 deletions(-) (limited to 'web/source/settings/views/moderation/accounts') diff --git a/web/source/settings/views/moderation/accounts/detail/actions.tsx b/web/source/settings/views/moderation/accounts/detail/actions.tsx index 4132b778a..ddcb1a5de 100644 --- a/web/source/settings/views/moderation/accounts/detail/actions.tsx +++ b/web/source/settings/views/moderation/accounts/detail/actions.tsx @@ -78,14 +78,21 @@ function ModerateAccount({ account }: { account: AdminAccount }) { >

Account Moderation Actions

- Currently only the "suspend" action is implemented.
- Suspending an account will delete it from your server, and remove all of its media, posts, relationships, etc.
- If the suspended account is local, suspending will also send out a "delete" message to other servers, requesting them to remove its data from their instance as well.
+ Currently only the "suspend" action is implemented. +
+ Suspending an account will delete it from your server, + and remove all of its media, posts, relationships, etc. +
+ If the suspended account is local, suspending will also + send out a "delete" message to other servers, requesting + them to remove its data from their instance as well. +
Account suspension cannot be reversed.
-

Accounts Search

- - You can perform actions on an account by clicking - its name in a report, or by searching for the account - using the form below and clicking on its name. - +
+

Accounts Search

+

+ You can perform actions on an account by clicking + its name in a report, or by searching for the account + using the form below and clicking on its name. +
+ All fields in the below form are optional. +

+
); diff --git a/web/source/settings/views/moderation/accounts/pending/index.tsx b/web/source/settings/views/moderation/accounts/pending/index.tsx index d47363954..f03c4800c 100644 --- a/web/source/settings/views/moderation/accounts/pending/index.tsx +++ b/web/source/settings/views/moderation/accounts/pending/index.tsx @@ -44,7 +44,23 @@ export default function AccountsPending() { return (
-

Pending Accounts

+
+

Pending Accounts

+

+ You can see a list of pending account sign-ups below. +
+ To approve or reject a sign-up, click on the account's name in the + list, and use the controls at the bottom of the account detail view. +

+ + Learn more about account sign-ups (opens in a new tab) + +
{ + if (v.length === 0) { + return ""; + } + + if (v[v.length-1] === ".") { + return "invalid domain"; + } + + const valid = isValidDomain(v, { + subdomain: true, + wildcard: false, + allowUnicode: true, + topLevel: false, + }); + + if (valid) { + return ""; + } + + return "invalid domain"; + } + }), email: useTextInput("email", { defaultValue: urlQueryParams.get("email") ?? ""}), ip: useTextInput("ip", { defaultValue: urlQueryParams.get("ip") ?? ""}), limit: useTextInput("limit", { defaultValue: urlQueryParams.get("limit") ?? "50"}) @@ -109,13 +134,17 @@ export function AccountSearchForm() { >