add extend subscription link on settings page
This commit is contained in:
parent
6c21b83975
commit
fbe48b7b3e
|
@ -39,7 +39,7 @@
|
|||
{% 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 %}
|
||||
{% elif manual_sub and manual_sub.is_active() %}
|
||||
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 %}
|
||||
|
@ -48,6 +48,15 @@
|
|||
<a href="{{ url_for('dashboard.pricing') }}" class="btn btn-sm btn-outline-primary">Upgrade</a>
|
||||
{% endif %}
|
||||
|
||||
{% elif coinbase_sub and coinbase_sub.is_active() %}
|
||||
You are on the Premium plan which expires {{ coinbase_sub.end_at | dt }}
|
||||
({{ coinbase_sub.end_at.format("YYYY-MM-DD") }}).
|
||||
<br>
|
||||
You can extend your subscription on
|
||||
<a href="{{ url_for('dashboard.extend_subscription_route') }}" class="btn btn-sm btn-outline-primary">
|
||||
Extend Subscription
|
||||
</a>
|
||||
|
||||
{% elif current_user.in_trial() %}
|
||||
Your Premium trial expires {{ current_user.trial_end | dt }}.
|
||||
{% else %}
|
||||
|
|
|
@ -40,6 +40,7 @@ from app.models import (
|
|||
ManualSubscription,
|
||||
SenderFormatEnum,
|
||||
SLDomain,
|
||||
CoinbaseSubscription,
|
||||
)
|
||||
from app.utils import random_string
|
||||
|
||||
|
@ -304,6 +305,8 @@ def setting():
|
|||
return output
|
||||
|
||||
manual_sub = ManualSubscription.get_by(user_id=current_user.id)
|
||||
coinbase_sub = CoinbaseSubscription.get_by(user_id=current_user.id)
|
||||
|
||||
return render_template(
|
||||
"dashboard/setting.html",
|
||||
form=form,
|
||||
|
@ -314,6 +317,7 @@ def setting():
|
|||
pending_email=pending_email,
|
||||
AliasGeneratorEnum=AliasGeneratorEnum,
|
||||
manual_sub=manual_sub,
|
||||
coinbase_sub=coinbase_sub,
|
||||
FIRST_ALIAS_DOMAIN=FIRST_ALIAS_DOMAIN,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue