From 6921ab05fdf54802b5d658afc111cd5401eaf82b Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Tue, 20 Oct 2020 17:47:58 +0200 Subject: [PATCH] reorganise settings sections --- .../templates/dashboard/setting.html | 239 +++++++++--------- 1 file changed, 119 insertions(+), 120 deletions(-) diff --git a/app/dashboard/templates/dashboard/setting.html b/app/dashboard/templates/dashboard/setting.html index b9b6c9b9..51f2a6a4 100644 --- a/app/dashboard/templates/dashboard/setting.html +++ b/app/dashboard/templates/dashboard/setting.html @@ -19,71 +19,43 @@ {% block default_content %}
- +
-
- - {{ change_email_form.csrf_token }} +
+
Current Plan
-
-
- Email Address -
-
- + {% if current_user.lifetime %} + You have lifetime access to the Premium plan. + {% if not current_user.paid_lifetime %} +
+ To support Simple Login you can switch to a paid plan.
+ Upgrade + {% endif %} + {% elif current_user.get_subscription() %} + You are on the {{ current_user.get_subscription().plan_name() }} plan.
+ + Manage Subscription + + {% if current_user.lifetime %} + You have however lifetime access to the Premium plan now so make sure to cancel the previous plan :). + {% endif %} + {% elif manual_sub %} + You are on the Premium plan which expires {{ manual_sub.end_at | dt }} + ({{ manual_sub.end_at.format("YYYY-MM-DD") }}). + {% if manual_sub.is_giveaway %} +
+ To gain additional features and support Simple Login you can upgrade to a Premium plan.
+ Upgrade + {% endif %} - - {{ change_email_form.email(class="form-control", value=current_user.email, readonly=pending_email != None) }} - {{ render_field_errors(change_email_form.email) }} - - {% if pending_email %} -
- Pending email change: {{ pending_email }} - Resend - confirmation email - Cancel email - change -
- {% endif %} -
- -
- + {% elif current_user.in_trial() %} + Your Premium trial expires {{ current_user.trial_end | dt }}. + {% else %} + You are on the Free plan. + {% endif %} +
- - - -
-
- {{ form.csrf_token }} - - -
-
- Profile -
-
- This information will be filled in automatically when you use "Sign in with SimpleLogin" button. -
-
- - {{ form.name(class="form-control", value=current_user.name) }} - {{ render_field_errors(form.name) }} -
- -
-
Profile picture
- {{ form.profile_picture(class="form-control-file") }} - {{ render_field_errors(form.profile_picture) }} - {% if current_user.profile_picture_id %} - - {% endif %} -
- -
-
-
- +
@@ -121,6 +93,92 @@
+ +
+
+
Newsletters
+
+ We will occasionally send you emails with new feature announcements. +
+
+ +
+ + +
+ +
+
+
+ + + +
+
+ {{ form.csrf_token }} + + +
+
+ Profile +
+
+ This information will be filled in automatically when you use "Sign in with SimpleLogin" button. +
+
+ + {{ form.name(class="form-control", value=current_user.name) }} + {{ render_field_errors(form.name) }} +
+ +
+
Profile picture
+ {{ form.profile_picture(class="form-control-file") }} + {{ render_field_errors(form.profile_picture) }} + {% if current_user.profile_picture_id %} + + {% endif %} +
+ +
+
+
+ + + +
+
+ + {{ change_email_form.csrf_token }} + +
+
+ Email Address +
+
+ + + + {{ change_email_form.email(class="form-control", value=current_user.email, readonly=pending_email != None) }} + {{ render_field_errors(change_email_form.email) }} + + {% if pending_email %} +
+ Pending email change: {{ pending_email }} + Resend + confirmation email + Cancel email + change +
+ {% endif %} +
+ +
+
+
+ +
@@ -174,64 +232,6 @@
- -
-
-
Newsletters
-
- We will occasionally send you emails with new feature announcements. -
-
- -
- - -
- -
-
-
- - - -
-
-
Current Plan
- - {% if current_user.lifetime %} - You have lifetime access to the Premium plan. - {% if not current_user.paid_lifetime %} -
- To support Simple Login you can switch to a paid plan.
- Upgrade - {% endif %} - {% elif current_user.get_subscription() %} - You are on the {{ current_user.get_subscription().plan_name() }} plan.
- - Manage Subscription - - {% if current_user.lifetime %} - You have however lifetime access to the Premium plan now so make sure to cancel the previous plan :). - {% endif %} - {% elif manual_sub %} - You are on the Premium plan which expires {{ manual_sub.end_at | dt }} - ({{ manual_sub.end_at.format("YYYY-MM-DD") }}). - {% if manual_sub.is_giveaway %} -
- To gain additional features and support Simple Login you can upgrade to a Premium plan.
- Upgrade - {% endif %} - - {% elif current_user.in_trial() %} - Your Premium trial expires {{ current_user.trial_end | dt }}. - {% else %} - You are on the Free plan. - {% endif %} -
-
- -
@@ -352,7 +352,6 @@
-
Delete Account