mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-03 12:23:02 +01:00
Only enable API token, Whatsapp cards on Web UI when Stripe, Twilio setup
This commit is contained in:
parent
cf4a524988
commit
4722da9642
2 changed files with 7 additions and 1 deletions
|
@ -187,8 +187,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if not anonymous_mode or is_twilio_enabled %}
|
||||
<div id="clients" class="section">
|
||||
<h2 class="section-title">Clients</h2>
|
||||
{% if not anonymous_mode %}
|
||||
<div id="clients-api" class="api-settings">
|
||||
<div class="card-title-row">
|
||||
<img class="card-icon" src="/static/assets/icons/key.svg" alt="API Key">
|
||||
|
@ -213,6 +215,8 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if is_twilio_enabled %}
|
||||
<div id="phone-number-input-card" class="api-settings">
|
||||
<div class="card-title-row">
|
||||
<img class="card-icon" src="/static/assets/icons/whatsapp.svg" alt="WhatsApp icon">
|
||||
|
@ -244,7 +248,9 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if billing_enabled %}
|
||||
<div id="billing" class="section">
|
||||
<h2 class="section-title">Billing</h2>
|
||||
|
|
|
@ -180,8 +180,8 @@ def config_page(request: Request):
|
|||
"khoj_cloud_subscription_url": os.getenv("KHOJ_CLOUD_SUBSCRIPTION_URL"),
|
||||
"is_active": has_required_scope(request, ["premium"]),
|
||||
"has_documents": has_documents,
|
||||
"phone_number": user.phone_number,
|
||||
"is_twilio_enabled": is_twilio_enabled(),
|
||||
"phone_number": user.phone_number,
|
||||
"is_phone_number_verified": user.verified_phone_number,
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue