!Breaking change! - The updated version will not be able to read your old database file Major improvements: - Added editable pastas - Added private pastas - Added line numbers - Added support for wide mode (1080p instead of 720p) - Added syntax highlighting support - Added read-only mode - Added built-in help page - Added option to remove logo, change title and footer text Minor improvements: - Improved looks in pure html mode - Removed link to GitHub repo from navbar - Broke up 7km long main.rs file into smaller modules - Moved water.css into a template instead of serving it as an external resource - Made Save button a bit bigger - Updated README.MD Bugfixes: - Fixed a bug where an incorrect animal ID in a request would cause a crash - Fixed a bug where an empty or corrupt JSON database would cause a crash
115 lines
2.6 KiB
HTML
115 lines
2.6 KiB
HTML
{% include "header.html" %}
|
|
|
|
|
|
{% if pastas.is_empty() %}
|
|
<br>
|
|
<p>
|
|
No pastas yet. 😔 Create one <a href="/">here</a>.
|
|
</p>
|
|
<br>
|
|
{%- else %}
|
|
<br>
|
|
{% if args.pure_html %}
|
|
<table border="1" style="width: 100%">
|
|
{% 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>
|
|
</thead>
|
|
<tbody>
|
|
{% for pasta in pastas %}
|
|
{% if pasta.pasta_type == "text" %}
|
|
<tr>
|
|
<td>
|
|
<a href="/pasta/{{pasta.id_as_animals()}}">{{pasta.id_as_animals()}}</a>
|
|
</td>
|
|
<td>
|
|
{{pasta.created_as_string()}}
|
|
</td>
|
|
<td>
|
|
{{pasta.expiration_as_string()}}
|
|
</td>
|
|
<td>
|
|
<a style="margin-right:1rem" href="/raw/{{pasta.id_as_animals()}}">Raw</a>
|
|
{% if pasta.file != "no-file" %}
|
|
<a style="margin-right:1rem" href="/file/{{pasta.id_as_animals()}}/{{pasta.file}}">File</a>
|
|
{%- endif %}
|
|
{% if pasta.editable %}
|
|
<a style="margin-right:1rem" href="/edit/{{pasta.id_as_animals()}}">Edit</a>
|
|
{%- endif %}
|
|
<a href="/remove/{{pasta.id_as_animals()}}">Remove</a>
|
|
</td>
|
|
</tr>
|
|
{%- endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<br>
|
|
{% 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>
|
|
</thead>
|
|
{% for pasta in pastas %}
|
|
{% if pasta.pasta_type == "url" %}
|
|
<tr>
|
|
<td>
|
|
<a href="/url/{{pasta.id_as_animals()}}">{{pasta.id_as_animals()}}</a>
|
|
</td>
|
|
<td>
|
|
{{pasta.created_as_string()}}
|
|
</td>
|
|
<td>
|
|
{{pasta.expiration_as_string()}}
|
|
</td>
|
|
<td>
|
|
<a style="margin-right:1rem" href="/raw/{{pasta.id_as_animals()}}">Raw</a>
|
|
{% if pasta.editable %}
|
|
<a style="margin-right:1rem" href="/edit/{{pasta.id_as_animals()}}">Edit</a>
|
|
{%- endif %}
|
|
<a href="/remove/{{pasta.id_as_animals()}}">Remove</a>
|
|
</td>
|
|
</tr>
|
|
{%- endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
<br>
|
|
{%- endif %}
|
|
{% include "footer.html" %}
|