diff --git a/fosspay/blueprints/html.py b/fosspay/blueprints/html.py index 9c59574..293a002 100644 --- a/fosspay/blueprints/html.py +++ b/fosspay/blueprints/html.py @@ -93,7 +93,7 @@ def login(): login_user(user) if user.admin: return redirect("/admin") - return redirect("/") + return redirect("/panel") @html.route("/logout") @loginrequired diff --git a/scripts/index.js b/scripts/index.js index 6b243b2..4bf2164 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -68,6 +68,7 @@ var handler = StripeCheckout.configure({ name: your_name, + email: window.email, key: window.stripe_key, image: window.avatar, locale: 'auto', diff --git a/templates/admin.html b/templates/admin.html index 203e955..feb3aff 100644 --- a/templates/admin.html +++ b/templates/admin.html @@ -80,7 +80,7 @@

Add Project

Donors will not be given a choice of project unless you have at least 2.

-
+
diff --git a/templates/index.html b/templates/index.html index 57d0491..404c40b 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,6 +7,9 @@ window.your_name = "{{ _cfg("your-name") }}"; window.bitcoin = "{{ _cfg("enable-bitcoin") }}" === "yes"; window.default_amount = {{ _cfg("default-amount") }}; window.default_type = "{{ _cfg("default-type") }}"; +{% if user %} +window.email = "{{user.email}}"; +{% endif %} @@ -32,7 +35,7 @@ window.default_type = "{{ _cfg("default-type") }}";
+ {% if not user %}

Been here before? Log in to view your donation history, edit recurring donations, and so on.

+ {% endif %}

Powered by fosspay. diff --git a/templates/login.html b/templates/login.html index c92b4e6..a0b3760 100644 --- a/templates/login.html +++ b/templates/login.html @@ -16,7 +16,7 @@

{% endif %} - +
diff --git a/templates/setup.html b/templates/setup.html index d9e27f7..15d3187 100644 --- a/templates/setup.html +++ b/templates/setup.html @@ -59,7 +59,7 @@

Admin Account

Enter your details for the admin account:

- +