mirror of
https://github.com/wassname/talk.git
synced 2026-08-06 13:41:02 +08:00
[CORL-219] Change username (#2452)
* add types for username updates * add update username methods * add types and resolvers for username history * connect frontend to username history and change history mutation * style update username box * show username changes in user history drawer * new users have 1 username entry * add translations for username change * allow new users to change username once * add tests for change username ui * send email to users after username change * add types to tests * treat status.username.history as mandatory * remove hardcoded 14 day username update frequency * use framework translation directives * add account history action component * clean up strings * fix imports in change username container * fix templates * rename update username methods * fix nunjucks formatting * add warning if user missing email * add fixme * fix spacing
This commit is contained in:
@@ -71,6 +71,14 @@ export type DownloadCommentsTemplate = UserNotificationContext<
|
||||
}
|
||||
>;
|
||||
|
||||
export type UpdateUsernameTemplate = UserNotificationContext<
|
||||
"update-username",
|
||||
{
|
||||
username: string;
|
||||
organizationContactEmail: string;
|
||||
}
|
||||
>;
|
||||
|
||||
type Templates =
|
||||
| BanTemplate
|
||||
| ConfirmEmailTemplate
|
||||
@@ -78,6 +86,7 @@ type Templates =
|
||||
| InviteEmailTemplate
|
||||
| PasswordChangeTemplate
|
||||
| SuspendTemplate
|
||||
| DownloadCommentsTemplate;
|
||||
| DownloadCommentsTemplate
|
||||
| UpdateUsernameTemplate;
|
||||
|
||||
export { Templates as Template };
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends "layouts/user-notification.html" %}
|
||||
{% block content %} Hello {{ context.username }},<br /><br />
|
||||
|
||||
Thank you for updating your {{ context.organizationName }} commenter account
|
||||
information. The changes you made are effective immediately. If you did not make
|
||||
this change please reach out to <a data-l10n-name="organizationContactEmail" href="mailto:{{ context.organizationContactEmail }}">{{ context.organizationContactEmail }}</a>.
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user