UI: Unify URL handling, show full URL everywhere

This commit is contained in:
Max Berger
2026-03-29 23:13:22 +02:00
parent 1921c0c8eb
commit 045ab573db
7 changed files with 69 additions and 24 deletions

View File

@@ -25,6 +25,7 @@ import { ErrorHandler } from "../utils/error.js";
import { get_element, get_element_by_id } from "../utils/misc.js";
import { displayPermissionsOrConversion } from "../utils/permissions.js";
import { Scene, pop_scene } from "./scene_manager.js";
import { UrlTextHandler } from "../utils/url_text.js";
/**
* @implements {Scene}
@@ -119,12 +120,7 @@ export class IncomingSharingScene {
let enabled_cb = /** @type {HTMLInputElement} */ (get_element(node, "[data-name=enabled]"));
let shown_cb = /** @type {HTMLInputElement} */ (get_element(node, "[data-name=shown]"));
let displayPath = share.PathOrToken.substring(prefix.length);
if (displayPath.endsWith("/")) {
displayPath = displayPath.substring(0, displayPath.length - 1);
}
pathortoken.value = displayPath;
new UrlTextHandler(pathortoken).setHref(share.PathOrToken);
owner_td.textContent = share.Owner;
displayPermissionsOrConversion(share.Conversion, share.Permissions, permissions_td);