mirror of
https://github.com/simple-login/app.git
synced 2025-11-12 10:50:55 +08:00
A few (self hosting) improvements
This commit is contained in:
parent
0d1e5b1f7d
commit
8e71e8e7f4
4 changed files with 21 additions and 5 deletions
|
|
@ -252,6 +252,8 @@ if LOCAL_FILE_UPLOAD:
|
||||||
|
|
||||||
LANDING_PAGE_URL = os.environ.get("LANDING_PAGE_URL") or "https://simplelogin.io"
|
LANDING_PAGE_URL = os.environ.get("LANDING_PAGE_URL") or "https://simplelogin.io"
|
||||||
|
|
||||||
|
STATUS_PAGE_URL = os.environ.get("STATUS_PAGE_URL") or "https://status.simplelogin.io"
|
||||||
|
|
||||||
# Loading PGP keys when mail_handler runs. To be used locally when init_app is not called.
|
# Loading PGP keys when mail_handler runs. To be used locally when init_app is not called.
|
||||||
LOAD_PGP_EMAIL_HANDLER = "LOAD_PGP_EMAIL_HANDLER" in os.environ
|
LOAD_PGP_EMAIL_HANDLER = "LOAD_PGP_EMAIL_HANDLER" in os.environ
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1078,7 +1078,18 @@ class Contact(db.Model, ModelMixin):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Prefer using contact name if possible
|
# Prefer using contact name if possible
|
||||||
|
user = self.user
|
||||||
name = self.name
|
name = self.name
|
||||||
|
email = self.website_email
|
||||||
|
|
||||||
|
if (
|
||||||
|
not user
|
||||||
|
or not SenderFormatEnum.has_value(user.sender_format)
|
||||||
|
or user.sender_format == SenderFormatEnum.AT.value
|
||||||
|
):
|
||||||
|
email = email.replace("@", " at ")
|
||||||
|
elif user.sender_format == SenderFormatEnum.A.value:
|
||||||
|
email = email.replace("@", "(a)")
|
||||||
|
|
||||||
# if no name, try to parse it from website_from
|
# if no name, try to parse it from website_from
|
||||||
if not name and self.website_from:
|
if not name and self.website_from:
|
||||||
|
|
@ -1098,9 +1109,9 @@ class Contact(db.Model, ModelMixin):
|
||||||
name = name.replace('"', "")
|
name = name.replace('"', "")
|
||||||
|
|
||||||
if name:
|
if name:
|
||||||
name = name + " | " + self.website_email.replace("@", " at ")
|
name = name + " | " + email
|
||||||
else:
|
else:
|
||||||
name = self.website_email.replace("@", " at ")
|
name = email
|
||||||
|
|
||||||
# cannot use formataddr here as this field is for email client, not for MTA
|
# cannot use formataddr here as this field is for email client, not for MTA
|
||||||
return f'"{name}" <{self.reply_email}>'
|
return f'"{name}" <{self.reply_email}>'
|
||||||
|
|
|
||||||
|
|
@ -135,6 +135,9 @@ FACEBOOK_CLIENT_SECRET=to_fill
|
||||||
# The landing page
|
# The landing page
|
||||||
# LANDING_PAGE_URL=https://simplelogin.io
|
# LANDING_PAGE_URL=https://simplelogin.io
|
||||||
|
|
||||||
|
# The status page
|
||||||
|
# STATUS_PAGE_URL=https://status.simplelogin.io
|
||||||
|
|
||||||
# Used when querying info on Apple API
|
# Used when querying info on Apple API
|
||||||
# APPLE_API_SECRET=secret
|
# APPLE_API_SECRET=secret
|
||||||
# MACAPP_APPLE_API_SECRET=secret
|
# MACAPP_APPLE_API_SECRET=secret
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="row align-items-center">
|
<div class="row align-items-center">
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="https://simplelogin.io" target="_blank" rel="noopener">
|
<li class="list-inline-item"><a href="{{LANDING_PAGE_URL}}" target="_blank" rel="noopener">
|
||||||
Website <i class="fe fe-external-link"></i>
|
Website <i class="fe fe-external-link"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
<li class="list-inline-item"><a href="https://trello.com/b/4d6A69I4/open-roadmap" target="_blank" rel="noopener">
|
<li class="list-inline-item"><a href="https://trello.com/b/4d6A69I4/open-roadmap" target="_blank" rel="noopener">
|
||||||
|
|
@ -14,10 +14,10 @@
|
||||||
<li class="list-inline-item"><a href="https://docs.simplelogin.io" target="_blank" rel="noopener">
|
<li class="list-inline-item"><a href="https://docs.simplelogin.io" target="_blank" rel="noopener">
|
||||||
Developer Documentation <i class="fe fe-external-link"></i>
|
Developer Documentation <i class="fe fe-external-link"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
<li class="list-inline-item"><a href="https://status.simplelogin.io" target="_blank" rel="noopener">
|
<li class="list-inline-item"><a href="{{STATUS_PAGE_URL}}" target="_blank" rel="noopener">
|
||||||
Status <i class="fe fe-external-link"></i>
|
Status <i class="fe fe-external-link"></i>
|
||||||
</a></li>
|
</a></li>
|
||||||
<li class="list-inline-item"><a href="mailto:hi@simplelogin.io">Contact Us
|
<li class="list-inline-item"><a href="mailto:{{SUPPORT_EMAIL}}">Contact Us
|
||||||
<i class="fe fe-external-link"></i></a></li>
|
<i class="fe fe-external-link"></i></a></li>
|
||||||
<li class="list-inline-item intro-step-0">
|
<li class="list-inline-item intro-step-0">
|
||||||
<a onclick="startIntro()"
|
<a onclick="startIntro()"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue