Complete removal of http and protocol from public

This commit is contained in:
Owen
2026-05-27 17:19:04 -07:00
parent 6d491b7bb9
commit 0ff0e83c9f
24 changed files with 169 additions and 131 deletions

View File

@@ -44,13 +44,13 @@ function isSafeUrlForLink(href: string): boolean {
const OVERVIEW_META_CLASS = "w-full min-w-0 text-muted-foreground text-sm";
function publicProtocolLabel(r: PublicResourceRow): string {
if (r.http) {
if (r.mode == "http") {
return r.ssl ? "HTTPS" : "HTTP";
}
const p = (r.protocol || "").toLowerCase();
const p = (r.mode || "").toLowerCase();
if (p === "tcp") return "TCP";
if (p === "udp") return "UDP";
return (r.protocol || "—").toUpperCase();
return (r.mode || "—").toUpperCase();
}
function PublicResourceMeta({ resource: r }: { resource: PublicResourceRow }) {
@@ -91,7 +91,7 @@ function PrivateResourceMeta({ row }: { row: SiteResourceRow }) {
function PublicAccessMethod({ resource: r }: { resource: PublicResourceRow }) {
const t = useTranslations();
if (!r.http) {
if (!["http", "ssh", "rdp", "vnc"].includes(r.mode || "")) {
return (
<CopyToClipboard
text={r.proxyPort?.toString() ?? ""}