Improved /pasta and /pastalist UX
- adjusted table column widths so buttons dont wrap into next row - added Open button to url pastas so clicking on their keys redirect to their /pasta view, consistent with the rest of the pastas - added copy redirect button to /pasta view of url pastas to make it easier to get the /url endpoint url
This commit is contained in:
parent
c6e2b026e6
commit
edd46eae58
2 changed files with 50 additions and 42 deletions
|
@ -8,30 +8,24 @@
|
|||
</p>
|
||||
<br>
|
||||
{%- else %}
|
||||
<br>
|
||||
<h3>Pastas</h3>
|
||||
{% if args.pure_html %}
|
||||
<table border="1" style="width: 100%">
|
||||
<table border="1" style="width: 100%; white-space: nowrap;">
|
||||
{% else %}
|
||||
<table style="width: 100%">
|
||||
{% endif %}
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">Pastas</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Key
|
||||
</th>
|
||||
<th>
|
||||
Created
|
||||
</th>
|
||||
<th>
|
||||
Expiration
|
||||
</th>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
<th style="width: 30%">
|
||||
Key
|
||||
</th>
|
||||
<th style="width: 20%">
|
||||
Created
|
||||
</th>
|
||||
<th style="width: 20%">
|
||||
Expiration
|
||||
</th>
|
||||
<th style="width: 30%">
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for pasta in pastas %}
|
||||
|
@ -63,35 +57,30 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<br>
|
||||
<h3>URL Redirects</h3>
|
||||
{% if args.pure_html %}
|
||||
<table border="1" style="width: 100%">
|
||||
{% else %}
|
||||
<table style="width: 100%">
|
||||
{% endif %}
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">URL Redirects</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Key
|
||||
</th>
|
||||
<th>
|
||||
Created
|
||||
</th>
|
||||
<th>
|
||||
Expiration
|
||||
</th>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
</tr>
|
||||
<th style="width: 30%">
|
||||
Key
|
||||
</th>
|
||||
<th style="width: 20%">
|
||||
Created
|
||||
</th>
|
||||
<th style="width: 20%">
|
||||
Expiration
|
||||
</th>
|
||||
<th style="width: 30%">
|
||||
</th>
|
||||
</thead>
|
||||
{% for pasta in pastas %}
|
||||
{% if pasta.pasta_type == "url" && !pasta.private %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ args.public_path }}/url/{{pasta.id_as_animals()}}">{{pasta.id_as_animals()}}</a>
|
||||
<a href="{{ args.public_path }}/pasta/{{pasta.id_as_animals()}}">{{pasta.id_as_animals()}}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{pasta.created_as_string()}}
|
||||
|
@ -100,6 +89,7 @@
|
|||
{{pasta.expiration_as_string()}}
|
||||
</td>
|
||||
<td>
|
||||
<a style="margin-right:1rem" href="{{ args.public_path }}/url/{{pasta.id_as_animals()}}">Open</a>
|
||||
<a style="margin-right:1rem; cursor: pointer;" id="copy-button"
|
||||
data-url="{{ args.public_path }}/url/{{pasta.id_as_animals()}}">Copy</a>
|
||||
{% if pasta.editable %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue