fix(sidebar): drop :8443 port from all links, remove toPublicHttpsUrl
Deploy Dashboard (Dev) / Backend Tests (push) Successful in 1m21s
Deploy Dashboard (Dev) / Frontend Tests (push) Successful in 59s
Deploy Dashboard (Main) / Backend Tests (push) Successful in 2m56s
Deploy Dashboard (Main) / Frontend Tests (push) Successful in 5s
Deploy Dashboard (Main) / Build Main Image (push) Successful in 4m23s
Deploy Dashboard (Main) / Deploy to Production (push) Successful in 1m3s
Deploy Dashboard (Dev) / Build Dev Image (push) Successful in 6m39s
Deploy Dashboard (Dev) / Deploy to Dev (push) Successful in 1m1s
Deploy Dashboard (Dev) / Backend Tests (push) Successful in 1m21s
Deploy Dashboard (Dev) / Frontend Tests (push) Successful in 59s
Deploy Dashboard (Main) / Backend Tests (push) Successful in 2m56s
Deploy Dashboard (Main) / Frontend Tests (push) Successful in 5s
Deploy Dashboard (Main) / Build Main Image (push) Successful in 4m23s
Deploy Dashboard (Main) / Deploy to Production (push) Successful in 1m3s
Deploy Dashboard (Dev) / Build Dev Image (push) Successful in 6m39s
Deploy Dashboard (Dev) / Deploy to Dev (push) Successful in 1m1s
This commit is contained in:
+11
-11
@@ -60,18 +60,18 @@ DASHBOARD_URL = os.environ.get("DASHBOARD_URL", "https://nas.jimmygan.com")
|
||||
|
||||
# External service URLs (used by frontend sidebar)
|
||||
EXTERNAL_SERVICES = {
|
||||
"navidrome": os.environ.get("NAVIDROME_URL", "https://music.jimmygan.com:8443"),
|
||||
"jellyfin": os.environ.get("JELLYFIN_URL", "https://media.jimmygan.com:8443"),
|
||||
"audiobookshelf": os.environ.get("AUDIOBOOKSHELF_URL", "https://books.jimmygan.com:8443"),
|
||||
"immich": os.environ.get("IMMICH_URL", "https://photos.jimmygan.com:8443"),
|
||||
"t_youtube": os.environ.get("T_YOUTUBE_URL", "https://yt.jimmygan.com:8443"),
|
||||
"media_management": os.environ.get("MEDIA_MANAGEMENT_URL", "https://media.jimmygan.com:8443"),
|
||||
"navidrome": os.environ.get("NAVIDROME_URL", "https://music.jimmygan.com"),
|
||||
"jellyfin": os.environ.get("JELLYFIN_URL", "https://media.jimmygan.com"),
|
||||
"audiobookshelf": os.environ.get("AUDIOBOOKSHELF_URL", "https://books.jimmygan.com"),
|
||||
"immich": os.environ.get("IMMICH_URL", "https://photos.jimmygan.com"),
|
||||
"t_youtube": os.environ.get("T_YOUTUBE_URL", "https://yt.jimmygan.com"),
|
||||
"media_management": os.environ.get("MEDIA_MANAGEMENT_URL", "https://media.jimmygan.com"),
|
||||
"hermes": os.environ.get("HERMES_URL", "https://hermes-agent.nousresearch.com/docs"),
|
||||
"gitea_web": os.environ.get("GITEA_WEB_URL", "https://git.jimmygan.com:8443"),
|
||||
"stirling_pdf": os.environ.get("STIRLING_PDF_URL", "https://pdf.jimmygan.com:8443"),
|
||||
"vaultwarden": os.environ.get("VAULTWARDEN_URL", "https://vault.jimmygan.com:8443"),
|
||||
"n8n": os.environ.get("N8N_URL", "https://n8n.jimmygan.com:8443"),
|
||||
"speedtest": os.environ.get("SPEEDTEST_URL", "https://speed.jimmygan.com:8443"),
|
||||
"gitea_web": os.environ.get("GITEA_WEB_URL", "https://git.jimmygan.com"),
|
||||
"stirling_pdf": os.environ.get("STIRLING_PDF_URL", "https://pdf.jimmygan.com"),
|
||||
"vaultwarden": os.environ.get("VAULTWARDEN_URL", "https://vault.jimmygan.com"),
|
||||
"n8n": os.environ.get("N8N_URL", "https://n8n.jimmygan.com"),
|
||||
"speedtest": os.environ.get("SPEEDTEST_URL", "https://speed.jimmygan.com"),
|
||||
}
|
||||
|
||||
# Network addresses (used by frontend for LAN/Tailscale direct access)
|
||||
|
||||
@@ -44,12 +44,12 @@
|
||||
}
|
||||
|
||||
const defaultMedia = [
|
||||
{ label: "Navidrome", remoteHref: "https://music.jimmygan.com:8443", icon: "music" },
|
||||
{ label: "Jellyfin", remoteHref: "https://media.jimmygan.com:8443", icon: "play" },
|
||||
{ label: "Audiobookshelf", remoteHref: "https://books.jimmygan.com:8443", icon: "headphones" },
|
||||
{ label: "Immich", remoteHref: "https://photos.jimmygan.com:8443", icon: "image" },
|
||||
{ label: "t-youtube", remoteHref: "https://yt.jimmygan.com:8443", icon: "youtube" },
|
||||
{ label: "Media Management", remoteHref: "https://media.jimmygan.com:8443", icon: "wrench" },
|
||||
{ label: "Navidrome", remoteHref: "https://music.jimmygan.com", icon: "music" },
|
||||
{ label: "Jellyfin", remoteHref: "https://media.jimmygan.com", icon: "play" },
|
||||
{ label: "Audiobookshelf", remoteHref: "https://books.jimmygan.com", icon: "headphones" },
|
||||
{ label: "Immich", remoteHref: "https://photos.jimmygan.com", icon: "image" },
|
||||
{ label: "t-youtube", remoteHref: "https://yt.jimmygan.com", icon: "youtube" },
|
||||
{ label: "Media Management", remoteHref: "https://media.jimmygan.com", icon: "wrench" },
|
||||
{ id: "transmission", label: "Transmission", icon: "download" },
|
||||
];
|
||||
|
||||
@@ -58,11 +58,11 @@
|
||||
{ id: "chat-digest", label: "Chat Digest", icon: "chat" },
|
||||
{ id: "conversations", label: "Code Sessions", icon: "code" },
|
||||
{ id: "gitea", label: "Repos", icon: "git" },
|
||||
{ label: "Gitea Web", remoteHref: "https://git.jimmygan.com:8443", icon: "git", external: true },
|
||||
{ label: "Stirling PDF", remoteHref: "https://pdf.jimmygan.com:8443", icon: "pdf", external: true },
|
||||
{ label: "Vaultwarden", remoteHref: "https://vault.jimmygan.com:8443", icon: "lock", external: true },
|
||||
{ label: "n8n", remoteHref: "https://n8n.jimmygan.com:8443", icon: "n8n", external: true },
|
||||
{ label: "Speedtest", remoteHref: "https://speed.jimmygan.com:8443", icon: "speedtest", external: true },
|
||||
{ label: "Gitea Web", remoteHref: "https://git.jimmygan.com", icon: "git", external: true },
|
||||
{ label: "Stirling PDF", remoteHref: "https://pdf.jimmygan.com", icon: "pdf", external: true },
|
||||
{ label: "Vaultwarden", remoteHref: "https://vault.jimmygan.com", icon: "lock", external: true },
|
||||
{ label: "n8n", remoteHref: "https://n8n.jimmygan.com", icon: "n8n", external: true },
|
||||
{ label: "Speedtest", remoteHref: "https://speed.jimmygan.com", icon: "speedtest", external: true },
|
||||
];
|
||||
|
||||
const defaultTools2 = [];
|
||||
@@ -184,25 +184,6 @@
|
||||
handleDragEnd();
|
||||
}
|
||||
|
||||
function toPublicHttpsUrl(href) {
|
||||
if (typeof window === "undefined") return href;
|
||||
if (!href) return href;
|
||||
|
||||
const isStandardHttps = location.protocol === "https:" && (!location.port || location.port === "443");
|
||||
if (!isStandardHttps) return href;
|
||||
|
||||
try {
|
||||
const url = new URL(href);
|
||||
if (url.protocol === "https:" && url.port === "8443") {
|
||||
url.port = "";
|
||||
return url.toString();
|
||||
}
|
||||
return href;
|
||||
} catch {
|
||||
return href;
|
||||
}
|
||||
}
|
||||
|
||||
function extHref(svc) {
|
||||
// Look up service URL from fetched config by label (lowercased, underscored)
|
||||
const key = svc.label ? svc.label.toLowerCase().replace(/\s+/g, "_") : "";
|
||||
@@ -210,7 +191,7 @@
|
||||
const remoteHref = configUrl || svc.remoteHref;
|
||||
|
||||
if (lanReachable && svc.port) return `http://${lanIp}:${svc.port}`;
|
||||
if (remoteHref) return lanReachable ? remoteHref : toPublicHttpsUrl(remoteHref);
|
||||
if (remoteHref) return remoteHref;
|
||||
if (svc.port) {
|
||||
const host = /^\d+\.\d+\.\d+\.\d+$/.test(location.hostname) ? location.hostname : tsIp;
|
||||
return `http://${host}:${svc.port}`;
|
||||
|
||||
Reference in New Issue
Block a user