UI: Add copy to clipboard button to URL displays

This commit is contained in:
Max Berger
2026-03-29 23:46:30 +02:00
parent 045ab573db
commit afbce5ac87
6 changed files with 133 additions and 28 deletions

View File

@@ -181,8 +181,9 @@ function add_share_row_node(user, password, collection, share, template, delete_
node.classList.remove("hidden");
/** @type {HTMLInputElement} */ let pathortoken_form = /** @type {HTMLInputElement} */ (get_element(node, "[data-name=pathortoken]"));
/** @type {HTMLButtonElement} */ let copy_btn = /** @type {HTMLButtonElement} */ (get_element(node, "[data-name=copy-url]"));
if (pathortoken_form) {
new UrlTextHandler(pathortoken_form).setHref(pathortoken);
new UrlTextHandler(pathortoken_form, copy_btn).setHref(pathortoken);
}
let permissions = (share["Permissions"] || "").toLowerCase();