Make long IDs copyable

This commit is contained in:
Mark Veidemanis 2023-02-10 21:13:00 +00:00
parent 119acdd734
commit 101a4933c9
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
3 changed files with 21 additions and 2 deletions

View File

@ -31,6 +31,7 @@ REGISTRATION_OPEN = getenv("REGISTRATION_OPEN", "false").lower() in trues
# Hook URL, do not include leading or trailing slash
HOOK_PATH = "hook"
ASSET_PATH = "asset"
NOTIFY_TOPIC = getenv("NOTIFY_TOPIC", "great-fisk")
@ -51,4 +52,4 @@ if DEBUG:
"10.0.2.2",
]
SETTINGS_EXPORT = ["STRIPE_ENABLED", "URL", "HOOK_PATH"]
SETTINGS_EXPORT = ["STRIPE_ENABLED", "URL", "HOOK_PATH", "ASSET_PATH"]

View File

@ -14,6 +14,7 @@
<th>description</th>
<th>pairs</th>
<th>group</th>
<th>hook</th>
<th>actions</th>
</thead>
{% for item in object_list %}
@ -24,6 +25,15 @@
<td>{{ item.description }}</td>
<td>{{ item.pairs_parsed|length }}</td>
<td>{{ item.group }}</td>
<td>
<a
class="has-text-grey"
onclick="window.prompt('Copy to clipboard: Ctrl+C, Enter', '{{settings.URL}}/{{settings.ASSET_PATH}}/{{ item.webhook_id }}');">
<span class="icon" data-tooltip="Copy to clipboard">
<i class="fa-solid fa-copy" aria-hidden="true"></i>
</span>
</a>
</td>
<td>
<div class="buttons">
<button

View File

@ -20,7 +20,15 @@
<td>{{ item.id }}</td>
<td>{{ item.user }}</td>
<td>{{ item.name }}</td>
<td><code>{{settings.URL}}/{{settings.HOOK_PATH}}/{{ item.hook }}/</code></td>
<td>
<a
class="has-text-grey"
onclick="window.prompt('Copy to clipboard: Ctrl+C, Enter', '{{settings.URL}}/{{settings.HOOK_PATH}}/{{ item.hook }}');">
<span class="icon" data-tooltip="Copy to clipboard">
<i class="fa-solid fa-copy" aria-hidden="true"></i>
</span>
</a>
</td>
<td>{{ item.received }}</td>
<td>
<div class="buttons">