1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-24 20:19:10 +02:00

Compare commits

...

12 Commits

Author SHA1 Message Date
Hubert
3ab14c4ab0 Merge remote-tracking branch 'origin/issue-7808' into issue-7808
# Conflicts:
#	packages/server/src/views/index/user.mustache
2023-08-18 09:02:58 -03:00
Hubert
74d407de6f Removing the spaces. 2023-08-18 09:01:37 -03:00
Hubert
9740dd9bbe Merge remote-tracking branch 'origin/dev' into issue-7808 2023-08-18 08:49:04 -03:00
Hubert
98b3432105 Removing the spaces. 2023-08-18 08:48:35 -03:00
Hubert
cdba5cfa8c Removing the spaces. 2023-08-18 08:45:30 -03:00
Hubert
0cfe4f1e33 Removing the spaces. 2023-08-18 08:44:59 -03:00
Hubert
56fb48d78b Fixes from review. 2023-08-18 08:40:40 -03:00
Hubert
5ff963704b Merge remote-tracking branch 'origin/dev' into issue-7808 2023-08-15 16:15:19 -03:00
Hubert
bea40d0997 Fixes appointed in the review. 2023-08-15 16:14:10 -03:00
Hubert
3dea9ab6e7 A shortcut to user resent the account confirmation email. 2023-08-11 15:59:53 -03:00
Hubert
dd869c43bb Added a condition to only show send account confirmation email when the user didn't confirm the email yet. 2023-08-10 17:00:03 -03:00
Hubert
7f5acdea5e Added the possibility to user send account confirmation email from their profile. 2023-08-10 15:25:24 -03:00
3 changed files with 10 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ async function handleConfirmEmailNotification(ctx: AppContext): Promise<Notifica
if (!ctx.joplin.owner.email_confirmed) {
return {
id: 'confirmEmail',
messageHtml: renderMarkdown('An email has been sent to you containing an activation link to complete your registration.\n\nMake sure you click it to secure your account and keep access to it.'),
messageHtml: renderMarkdown(`An email has been sent to you containing an activation link to complete your registration. If you did not receive it, you may send it again from [your profile page](${profileUrl()}).\n\nMake sure you click it to secure your account and keep access to it.`),
levelClassName: levelClassName(NotificationLevel.Important),
closeUrl: '',
};

View File

@@ -90,6 +90,7 @@ router.get('users/:id', async (path: SubPath, ctx: AppContext, formUser: User =
view.content.error = error;
view.content.postUrl = postUrl;
view.content.csrfTag = await createCsrfTag(ctx);
view.content.showSendAccountConfirmationEmailButton = !user.email_confirmed;
if (subscription) {
const lastPaymentAttempt = models.subscription().lastPaymentAttempt(subscription);
@@ -213,6 +214,7 @@ interface FormFields {
update_subscription_basic_button: string;
update_subscription_pro_button: string;
stop_impersonate_button: string;
send_account_confirmation_email: string;
}
router.post('users', async (path: SubPath, ctx: AppContext) => {
@@ -246,6 +248,8 @@ router.post('users', async (path: SubPath, ctx: AppContext) => {
// that user, except the current one (otherwise they would be
// logged out).
if (userToSave.password) await models.session().deleteByUserId(userToSave.id, contextSessionId(ctx));
} else if (fields.send_account_confirmation_email) {
await models.user().sendAccountConfirmationEmail(user);
} else if (fields.stop_impersonate_button) {
await stopImpersonating(ctx);
return redirect(ctx, config().baseUrl);

View File

@@ -27,7 +27,7 @@
</div>
<p id="password_strength" class="help"></p>
</div>
<div class="field">
<label class="label">Repeat password</label>
<div class="control">
@@ -37,6 +37,9 @@
<div class="control block">
<input type="submit" name="post_button" class="button is-primary" value="{{buttonTitle}}" />
{{#showSendAccountConfirmationEmailButton}}
<input type="submit" name="send_account_confirmation_email" class="button is-link" value="Send account confirmation email" />
{{/showSendAccountConfirmationEmailButton}}
</div>
</div>
@@ -50,7 +53,7 @@
<p class="help">Click for more info about the Pro plan and to upgrade your account.</p>
</div>
{{/showUpdateSubscriptionPro}}
<div class="control block">
<p><a class="button is-link" target="_blank" href="{{stripePortalUrl}}">Manage subscription</a></p>
<p class="help">Click to update your payment details, switch to a different billing cycle or plan, or to cancel your subscription.</p>