Prettify alias page: use collapsible layout

This commit is contained in:
Son NK 2020-04-24 20:27:10 +02:00 committed by Son NK
parent c61213fae9
commit f34b9f6ca6
1 changed files with 134 additions and 125 deletions

View File

@ -76,6 +76,7 @@
<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"
@ -88,17 +89,11 @@
{% 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 class="btn btn-sm btn-success copy-btn">
Copy
</span>
{% endif %}
</span> </span>
</div> </div>
<div class="col text-right"> <div class="col text-right">
@ -133,10 +128,10 @@
</div> </div>
</div> </div>
<hr class="my-2"> <!-- Email Activity -->
<div class="row">
<div class="col">
<div class="" style="font-size: 12px"> <div style="font-size: 12px">
{% if alias_info.latest_email_log != None %} {% if alias_info.latest_email_log != None %}
{% set email_log = alias_info.latest_email_log %} {% set email_log = alias_info.latest_email_log %}
{% set contact = alias_info.latest_contact %} {% set contact = alias_info.latest_contact %}
@ -174,6 +169,39 @@
See All &nbsp; See All &nbsp;
</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&nbsp; &nbsp;<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 %} {% if mailboxes|length > 1 %}
<form method="post"> <form method="post">
@ -206,7 +234,6 @@
</div> </div>
{% endif %} {% endif %}
<form method="post"> <form method="post">
<div class="d-flex mt-2"> <div class="d-flex mt-2">
@ -230,25 +257,6 @@
</form> </form>
<div class="row mt-3"> <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&nbsp; &nbsp;<i class="fe fe-send"></i>
</a>
{% endif %}
</div>
<div class="col"> <div class="col">
<form method="post"> <form method="post">
<input type="hidden" name="form-name" value="delete-email"> <input type="hidden" name="form-name" value="delete-email">
@ -262,6 +270,7 @@
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>