fixed some links

This commit is contained in:
Schrottkatze 2023-03-04 01:02:17 +01:00
parent 353cb5dfde
commit 8623bcb9ae
2 changed files with 7 additions and 8 deletions

View file

@ -22,7 +22,7 @@
</div>
<div style="float: right">
<a style="margin-right: 0.5rem"
href="{{ args.public_path }}/pasta/{{pasta.id_as_animals()}}"><i>{{pasta.id_as_animals()}}</i></a>
href="{{ args.public_path }}/{{ args.pasta_endpoint }}/{{pasta.id_as_animals()}}"><i>{{pasta.id_as_animals()}}</i></a>
{% if args.public_path.to_string() != "" %}
<button id="copy-url-button" class="copy-button" style="margin-right: 0">
Copy URL

View file

@ -32,7 +32,7 @@
{% if pasta.pasta_type == "text" && !pasta.private %}
<tr>
<td>
<a href="{{ args.public_path }}/pasta/{{pasta.id_as_animals()}}">{{pasta.id_as_animals()}}</a>
<a href="{{ args.public_path }}/{{ args.pasta_endpoint }}/{{pasta.id_as_animals()}}">{{pasta.id_as_animals()}}</a>
</td>
<td>
{{pasta.created_as_string()}}
@ -41,7 +41,7 @@
{{pasta.expiration_as_string()}}
</td>
<td>
<a style="margin-right:1rem" href="{{ args.public_path }}/raw/{{pasta.id_as_animals()}}">Raw</a>
<a style="margin-right:1rem" href="{{ args.public_path }}/{{ args.raw_endpoint }}/{{pasta.id_as_animals()}}">Raw</a>
{% if pasta.file.is_some() %}
<a style="margin-right:1rem"
href="{{ args.public_path }}/file/{{pasta.id_as_animals()}}/{{pasta.file.as_ref().unwrap().name()}}">File</a>
@ -80,7 +80,7 @@
{% if pasta.pasta_type == "url" && !pasta.private %}
<tr>
<td>
<a href="{{ args.public_path }}/pasta/{{pasta.id_as_animals()}}">{{pasta.id_as_animals()}}</a>
<a href="{{ args.public_path }}/{{ args.pasta_endpoint }}/{{pasta.id_as_animals()}}">{{pasta.id_as_animals()}}</a>
</td>
<td>
{{pasta.created_as_string()}}
@ -89,9 +89,9 @@
{{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" href="{{ args.public_path }}/{{ args.url_endpoint }}/{{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>
data-url="{{ args.public_path }}/{{ args.url_endpoint }}/{{pasta.id_as_animals()}}">Copy</a>
{% if pasta.editable %}
<a style="margin-right:1rem" href="{{ args.public_path }}/edit/{{pasta.id_as_animals()}}">Edit</a>
{%- endif %}
@ -106,7 +106,6 @@
{%- endif %}
<script>
// const btn = document.getElementById("copy-button")
const btn = document.querySelector("#copy-button");
btn.addEventListener("click", () => {
navigator.clipboard.writeText(btn.dataset.url)