mirror of
https://github.com/Crazyco-xyz/48hr.email.git
synced 2026-01-08 10:49:35 +01:00
[Chore]: Add API note in footer, make footer cleaner, make API opt-in
If anyone reads this, msg me for a guided pentest, just a quick thing. Need to know for sure :)
This commit is contained in:
parent
f52b2b9f6c
commit
b9ab513157
3 changed files with 22 additions and 8 deletions
|
|
@ -37,7 +37,7 @@ function parseBool(v) {
|
|||
}
|
||||
|
||||
const config = {
|
||||
apiEnabled: parseBool(process.env.HTTP_API_ENABLED) || true,
|
||||
apiEnabled: parseBool(process.env.HTTP_API_ENABLED) || false,
|
||||
uxDebugMode: parseBool(process.env.UX_DEBUG_MODE) || false,
|
||||
|
||||
email: {
|
||||
|
|
@ -87,7 +87,7 @@ const config = {
|
|||
displaySort: Number(process.env.HTTP_DISPLAY_SORT) || 0,
|
||||
hideOther: parseBool(process.env.HTTP_HIDE_OTHER),
|
||||
statistics: parseBool(process.env.HTTP_STATISTICS_ENABLED) || false,
|
||||
infoSection: parseBool(process.env.HTTP_SHOW_INFO_SECTION) || true
|
||||
infoSection: parseBool(process.env.HTTP_SHOW_INFO_SECTION) || false
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
16
infrastructure/web/views/_footer-main.twig
Normal file
16
infrastructure/web/views/_footer-main.twig
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{#
|
||||
_footer-main.twig
|
||||
Usage: {% include '_footer-main.twig' %}
|
||||
Expects: branding, purgeTime, mailCount, config
|
||||
#}
|
||||
<h4>
|
||||
{{ branding[0] }} offered by <a href="{{ branding[2] }}" style="text-decoration:underline" target="_blank">{{ branding[1] }}</a> | All Emails will be deleted after {{ purgeTime | raw }}
|
||||
{% if config.http.features.statistics %}
|
||||
| <a href="/stats" style="text-decoration:underline">Statistics</a>
|
||||
{% else %}
|
||||
| Currently handling {{ mailCount | raw }}
|
||||
{% endif %}
|
||||
{% if config.apiEnabled %}
|
||||
| <a href="https://github.com/Crazyco-xyz/48hr.email/wiki" style="text-decoration:underline" target="_blank">API Docs</a>
|
||||
{% endif %}
|
||||
</h4>
|
||||
|
|
@ -101,12 +101,10 @@
|
|||
{% block footer %}
|
||||
<section class="container footer">
|
||||
<hr>
|
||||
{% if config.http.features.statistics %}
|
||||
<h4>{{ branding[0] }} offered by <a href="{{ branding[2] }}" style="text-decoration:underline" target="_blank">{{ branding[1] }}</a> | All Emails will be deleted after {{ purgeTime | raw }} | Check out our public <a href="/stats" style="text-decoration:underline">Statistics</a></h4>
|
||||
{% else %}
|
||||
<h4>{{ branding[0] }} offered by <a href="{{ branding[2] }}" style="text-decoration:underline" target="_blank">{{ branding[1] }}</a> | All Emails will be deleted after {{ purgeTime | raw }} | Currently handling {{ mailCount | raw }}</h4>
|
||||
{% endif %}
|
||||
<h4 class="container footer-two"> This project is <a href="https://github.com/crazyco-xyz/48hr.email" style="text-decoration:underline" target="_blank">open-source ♥</a></h4>
|
||||
{% include '_footer-main.twig' %}
|
||||
<h4 class="container footer-two">
|
||||
This project is <a href="https://github.com/crazyco-xyz/48hr.email" style="text-decoration:underline" target="_blank">open-source ♥</a>
|
||||
</h4>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue