Prettify alias page: use collapsible layout
This commit is contained in:
parent
c61213fae9
commit
f34b9f6ca6
|
@ -76,30 +76,25 @@
|
||||||
|
|
||||||
<div class="col-12 col-lg-6">
|
<div class="col-12 col-lg-6">
|
||||||
<div class="card p-4 shadow-sm {% if alias_info.highlight %} highlight-row {% endif %} ">
|
<div class="card p-4 shadow-sm {% if alias_info.highlight %} highlight-row {% endif %} ">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<span class="clipboard cursor mb-0"
|
<span class="clipboard cursor mb-0"
|
||||||
{% if loop.index ==1 %}
|
{% if loop.index ==1 %}
|
||||||
data-intro="This is an <em>alias</em>. <br><br>
|
data-intro="This is an <em>alias</em>. <br><br>
|
||||||
<b>All</b> emails sent to an alias will be <em>forwarded</em> to your inbox. <br><br>
|
<b>All</b> emails sent to an alias will be <em>forwarded</em> to your inbox. <br><br>
|
||||||
Alias is a great way to hide your personal email address so feel free to
|
Alias is a great way to hide your personal email address so feel free to
|
||||||
use it whenever possible, for example when signing up for a newsletter or creating a new account on a suspicious website 😎"
|
use it whenever possible, for example when signing up for a newsletter or creating a new account on a suspicious website 😎"
|
||||||
data-step="2"
|
data-step="2"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if alias.enabled %}
|
{% if alias.enabled %}
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
title="Copy to clipboard"
|
title="Click to copy"
|
||||||
data-clipboard-text="{{ alias.email }}"
|
data-clipboard-text="{{ alias.email }}"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
>
|
>
|
||||||
<span class="font-weight-bold">{{ alias.email }}</span>
|
<span class="font-weight-bold">{{ alias.email }}</span>
|
||||||
{% if alias.enabled %}
|
</span>
|
||||||
<span class="btn btn-sm btn-success copy-btn">
|
|
||||||
Copy
|
|
||||||
</span>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-right">
|
<div class="col text-right">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
@ -133,134 +128,148 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr class="my-2">
|
<!-- Email Activity -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div style="font-size: 12px">
|
||||||
|
{% if alias_info.latest_email_log != None %}
|
||||||
|
{% set email_log = alias_info.latest_email_log %}
|
||||||
|
{% set contact = alias_info.latest_contact %}
|
||||||
|
|
||||||
|
{% if email_log.is_reply %}
|
||||||
<div class="" style="font-size: 12px">
|
{{ contact.website_email }}
|
||||||
{% if alias_info.latest_email_log != None %}
|
<i class="fa fa-reply mr-2" data-toggle="tooltip" title="Email reply/sent from alias"></i>
|
||||||
{% set email_log = alias_info.latest_email_log %}
|
{{ email_log.created_at | dt }}
|
||||||
{% set contact = alias_info.latest_contact %}
|
{% elif email_log.bounced %}
|
||||||
|
<span class="text-danger">
|
||||||
{% if email_log.is_reply %}
|
|
||||||
{{ contact.website_email }}
|
|
||||||
<i class="fa fa-reply mr-2" data-toggle="tooltip" title="Email reply/sent from alias"></i>
|
|
||||||
{{ email_log.created_at | dt }}
|
|
||||||
{% elif email_log.bounced %}
|
|
||||||
<span class="text-danger">
|
|
||||||
{{ contact.website_email }}
|
{{ contact.website_email }}
|
||||||
<i class="fa fa-warning mr-2" data-toggle="tooltip"
|
<i class="fa fa-warning mr-2" data-toggle="tooltip"
|
||||||
title="Email bounced and cannot be forwarded to your mailbox"></i>
|
title="Email bounced and cannot be forwarded to your mailbox"></i>
|
||||||
{{ email_log.created_at | dt }}
|
{{ email_log.created_at | dt }}
|
||||||
</span>
|
</span>
|
||||||
{% elif email_log.blocked %}
|
{% elif email_log.blocked %}
|
||||||
{{ contact.website_email }}
|
{{ contact.website_email }}
|
||||||
<i class="fa fa-ban mr-2 text-danger" data-toggle="tooltip" title="Email blocked"></i>
|
<i class="fa fa-ban mr-2 text-danger" data-toggle="tooltip" title="Email blocked"></i>
|
||||||
{{ email_log.created_at | dt }}
|
{{ email_log.created_at | dt }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ contact.website_email }}
|
{{ contact.website_email }}
|
||||||
<i class="fa fa-paper-plane mr-2" data-toggle="tooltip" title="Email forwarded to alias"></i>
|
<i class="fa fa-paper-plane mr-2" data-toggle="tooltip" title="Email forwarded to alias"></i>
|
||||||
{{ email_log.created_at | dt }}
|
{{ email_log.created_at | dt }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
No Activity. Alias created {{ alias.created_at | dt }}
|
No Activity. Alias created {{ alias.created_at | dt }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<span class="alias-activity">{{ alias_info.nb_forward }}</span> forwards,
|
<span class="alias-activity">{{ alias_info.nb_forward }}</span> forwards,
|
||||||
<span class="alias-activity">{{ alias_info.nb_blocked }}</span> blocks,
|
<span class="alias-activity">{{ alias_info.nb_blocked }}</span> blocks,
|
||||||
<span class="alias-activity">{{ alias_info.nb_reply }}</span> replies
|
<span class="alias-activity">{{ alias_info.nb_reply }}</span> replies
|
||||||
<a href="{{ url_for('dashboard.alias_log', alias_id=alias.id) }}"
|
<a href="{{ url_for('dashboard.alias_log', alias_id=alias.id) }}"
|
||||||
class="btn btn-sm btn-link">
|
class="btn btn-sm btn-link">
|
||||||
See All →
|
See All →
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- END Email Activity -->
|
||||||
|
|
||||||
|
<!-- Send Email && More button -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<a href="{{ url_for('dashboard.alias_contact_manager', alias_id=alias.id) }}"
|
||||||
|
{% if alias_info.show_intro_test_send_email %}
|
||||||
|
data-intro="Not only alias can receive emails, it can <em>send</em> emails too! <br><br>
|
||||||
|
You can add a new <em>contact</em> to for your alias here. <br><br>
|
||||||
|
To send an email to your contact, SimpleLogin will create a <em>special</em> email address. <br><br>
|
||||||
|
Sending an email to this email address will <em>forward</em> the email to your contact"
|
||||||
|
data-step="4"
|
||||||
|
{% endif %}
|
||||||
|
class="btn btn-sm btn-outline-primary {% if not alias.enabled %} disabled {% endif %}"
|
||||||
|
data-toggle="tooltip"
|
||||||
|
title="Not only an alias can receive emails, it can send emails too"
|
||||||
|
>
|
||||||
|
Send Email <i class="fe fe-send"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="col text-right">
|
||||||
|
<a class="btn btn-sm" data-toggle="collapse" href="#alias-{{ alias.id }}" role="button"
|
||||||
|
aria-expanded="false">
|
||||||
|
More <i class="fe fe-chevron-down"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- END Send Email && More button -->
|
||||||
|
|
||||||
|
<!-- Collapse section -->
|
||||||
|
<div class="collapse" id="alias-{{ alias.id }}">
|
||||||
|
|
||||||
|
{% if mailboxes|length > 1 %}
|
||||||
|
<form method="post">
|
||||||
|
<div class="small-text mt-2">Current mailbox</div>
|
||||||
|
<div class="d-flex">
|
||||||
|
<div class="flex-grow-1 mr-2">
|
||||||
|
<select class="form-control form-control-sm custom-select" name="mailbox">
|
||||||
|
{% for mailbox in mailboxes %}
|
||||||
|
<option value="{{ mailbox }}" {% if mailbox == alias_info.mailbox.email %} selected {% endif %}>
|
||||||
|
{{ mailbox }}
|
||||||
|
</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="">
|
||||||
|
<input type="hidden" name="form-name" value="set-mailbox">
|
||||||
|
<input type="hidden" name="alias-id" value="{{ alias.id }}">
|
||||||
|
|
||||||
|
<button class="btn btn-sm btn-outline-info w-100">
|
||||||
|
Update
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% elif alias_info.mailbox != None and alias_info.mailbox.email != current_user.email %}
|
||||||
|
<div class="small-text">
|
||||||
|
Owned by <b>{{ alias_info.mailbox.email }}</b> mailbox
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if mailboxes|length > 1 %}
|
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<div class="small-text mt-2">Current mailbox</div>
|
<div class="d-flex mt-2">
|
||||||
<div class="d-flex">
|
|
||||||
<div class="flex-grow-1 mr-2">
|
<div class="flex-grow-1 mr-2">
|
||||||
<select class="form-control form-control-sm custom-select" name="mailbox">
|
<textarea
|
||||||
{% for mailbox in mailboxes %}
|
name="note"
|
||||||
<option value="{{ mailbox }}" {% if mailbox == alias_info.mailbox.email %} selected {% endif %}>
|
class="form-control"
|
||||||
{{ mailbox }}
|
rows="2"
|
||||||
</option>
|
placeholder="Alias Note.">{{ alias.note or "" }}</textarea>
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<input type="hidden" name="form-name" value="set-mailbox">
|
<input type="hidden" name="form-name" value="set-note">
|
||||||
<input type="hidden" name="alias-id" value="{{ alias.id }}">
|
<input type="hidden" name="alias-id" value="{{ alias.id }}">
|
||||||
|
|
||||||
<button class="btn btn-sm btn-outline-info w-100">
|
<button class="btn btn-sm btn-outline-success w-100">
|
||||||
Update
|
Save
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% elif alias_info.mailbox != None and alias_info.mailbox.email != current_user.email %}
|
|
||||||
<div class="small-text">
|
|
||||||
Owned by <b>{{ alias_info.mailbox.email }}</b> mailbox
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
<div class="row mt-3">
|
||||||
|
<div class="col">
|
||||||
|
<form method="post">
|
||||||
|
<input type="hidden" name="form-name" value="delete-email">
|
||||||
|
<input type="hidden" name="alias-id" value="{{ alias.id }}">
|
||||||
|
<input type="hidden" name="alias" class="alias" value="{{ alias.email }}">
|
||||||
|
|
||||||
<form method="post">
|
<span class="delete-email btn btn-link btn-sm float-right text-danger">
|
||||||
<div class="d-flex mt-2">
|
|
||||||
|
|
||||||
<div class="flex-grow-1 mr-2">
|
|
||||||
<textarea
|
|
||||||
name="note"
|
|
||||||
class="form-control"
|
|
||||||
rows="2"
|
|
||||||
placeholder="Alias Note.">{{ alias.note or "" }}</textarea>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="">
|
|
||||||
<input type="hidden" name="form-name" value="set-note">
|
|
||||||
<input type="hidden" name="alias-id" value="{{ alias.id }}">
|
|
||||||
|
|
||||||
<button class="btn btn-sm btn-outline-success w-100">
|
|
||||||
Save
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="row mt-3">
|
|
||||||
<div class="col">
|
|
||||||
{% if alias.enabled %}
|
|
||||||
<a href="{{ url_for('dashboard.alias_contact_manager', alias_id=alias.id) }}"
|
|
||||||
{% if alias_info.show_intro_test_send_email %}
|
|
||||||
data-intro="Not only alias can receive emails, it can <em>send</em> emails too! <br><br>
|
|
||||||
You can add a new <em>contact</em> to for your alias here. <br><br>
|
|
||||||
To send an email to your contact, SimpleLogin will create a <em>special</em> email address. <br><br>
|
|
||||||
Sending an email to this email address will <em>forward</em> the email to your contact"
|
|
||||||
data-step="4"
|
|
||||||
{% endif %}
|
|
||||||
class="btn btn-sm btn-outline-primary"
|
|
||||||
data-toggle="tooltip"
|
|
||||||
title="Not only an alias can receive emails, it can send emails too"
|
|
||||||
>
|
|
||||||
Send Email <i class="fe fe-send"></i>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col">
|
|
||||||
<form method="post">
|
|
||||||
<input type="hidden" name="form-name" value="delete-email">
|
|
||||||
<input type="hidden" name="alias-id" value="{{ alias.id }}">
|
|
||||||
<input type="hidden" name="alias" class="alias" value="{{ alias.email }}">
|
|
||||||
|
|
||||||
<span class="delete-email btn btn-link btn-sm float-right text-danger">
|
|
||||||
Delete <i class="dropdown-icon fe fe-trash-2 text-danger"></i>
|
Delete <i class="dropdown-icon fe fe-trash-2 text-danger"></i>
|
||||||
</span>
|
</span>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue