refactor(sidebar): add t-youtube, media-mgmt, hermes; remove docker, info-engine, openclaw, cc-connect
This commit is contained in:
@@ -64,6 +64,9 @@ EXTERNAL_SERVICES = {
|
||||
"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"),
|
||||
"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"),
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
<script>
|
||||
import Sidebar from "./components/Sidebar.svelte";
|
||||
import Dashboard from "./routes/Dashboard.svelte";
|
||||
import Docker from "./routes/Docker.svelte";
|
||||
import Gitea from "./routes/Gitea.svelte";
|
||||
import Files from "./routes/Files.svelte";
|
||||
import Terminal from "./routes/Terminal.svelte";
|
||||
import OpenClaw from "./routes/OpenClaw.svelte";
|
||||
import Settings from "./routes/Settings.svelte";
|
||||
import ChatSummary from "./routes/ChatSummary.svelte";
|
||||
import Conversations from "./routes/Conversations.svelte";
|
||||
import Security from "./routes/Security.svelte";
|
||||
import LiteLLM from "./routes/LiteLLM.svelte";
|
||||
import CcConnect from "./routes/CcConnect.svelte";
|
||||
import InfoEngine from "./routes/InfoEngine.svelte";
|
||||
import OPC from "./routes/OPC.svelte";
|
||||
import Transmission from "./routes/Transmission.svelte";
|
||||
import Login from "./routes/Login.svelte";
|
||||
@@ -21,18 +17,14 @@
|
||||
|
||||
const KNOWN_PAGES = new Set([
|
||||
"dashboard",
|
||||
"docker",
|
||||
"gitea",
|
||||
"files",
|
||||
"terminal",
|
||||
"openclaw",
|
||||
"chat-digest",
|
||||
"conversations",
|
||||
"settings",
|
||||
"security",
|
||||
"litellm",
|
||||
"cc-connect",
|
||||
"info-engine",
|
||||
"opc",
|
||||
"transmission",
|
||||
]);
|
||||
@@ -56,7 +48,7 @@
|
||||
function canOpenPage(pageId) {
|
||||
if (!pageId || !KNOWN_PAGES.has(pageId)) return false;
|
||||
if (pageId === "settings") return userRole === "admin";
|
||||
if (["litellm", "cc-connect", "info-engine"].includes(pageId)) return hasPageAccess("dashboard");
|
||||
if (["litellm"].includes(pageId)) return hasPageAccess("dashboard");
|
||||
return hasPageAccess(pageId);
|
||||
}
|
||||
|
||||
@@ -193,14 +185,10 @@
|
||||
</button>
|
||||
{#if page === "dashboard" && hasPageAccess("dashboard")}
|
||||
<Dashboard />
|
||||
{:else if page === "docker" && hasPageAccess("docker")}
|
||||
<Docker />
|
||||
{:else if page === "gitea" && hasPageAccess("gitea")}
|
||||
<Gitea />
|
||||
{:else if page === "files" && hasPageAccess("files")}
|
||||
<Files />
|
||||
{:else if page === "openclaw" && hasPageAccess("openclaw")}
|
||||
<OpenClaw />
|
||||
{:else if page === "chat-digest" && hasPageAccess("chat-digest")}
|
||||
<ChatSummary />
|
||||
{:else if page === "conversations" && hasPageAccess("conversations")}
|
||||
@@ -211,10 +199,6 @@
|
||||
<Security />
|
||||
{:else if page === "litellm" && hasPageAccess("dashboard")}
|
||||
<LiteLLM />
|
||||
{:else if page === "cc-connect" && hasPageAccess("dashboard")}
|
||||
<CcConnect />
|
||||
{:else if page === "info-engine" && hasPageAccess("dashboard")}
|
||||
<InfoEngine />
|
||||
{:else if page === "opc" && hasPageAccess("opc")}
|
||||
<OPC />
|
||||
{:else if page === "transmission" && hasPageAccess("transmission")}
|
||||
|
||||
@@ -18,10 +18,8 @@
|
||||
|
||||
const defaultLinks = [
|
||||
{ id: "dashboard", label: "Overview", icon: "grid" },
|
||||
{ id: "info-engine", label: "Info Engine", icon: "sparkles" },
|
||||
{ id: "litellm", label: "LiteLLM", icon: "bolt" },
|
||||
{ id: "opc", label: "OPC", icon: "kanban" },
|
||||
{ id: "docker", label: "Docker", icon: "box" },
|
||||
{ id: "files", label: "Files", icon: "folder" },
|
||||
{ id: "terminal", label: "Terminal", icon: "terminal" },
|
||||
{ id: "security", label: "Security", icon: "shield" },
|
||||
@@ -50,12 +48,13 @@
|
||||
{ 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" },
|
||||
{ id: "transmission", label: "Transmission", icon: "download" },
|
||||
];
|
||||
|
||||
const defaultTools = [
|
||||
{ id: "openclaw", label: "OpenClaw", icon: "openclaw" },
|
||||
{ id: "cc-connect", label: "cc-connect", icon: "users" },
|
||||
{ label: "Hermes", remoteHref: "https://hermes-agent.nousresearch.com/docs", icon: "robot" },
|
||||
{ id: "chat-digest", label: "Chat Digest", icon: "chat" },
|
||||
{ id: "conversations", label: "Code Sessions", icon: "code" },
|
||||
{ id: "gitea", label: "Repos", icon: "git" },
|
||||
@@ -289,6 +288,12 @@
|
||||
<svg class="w-[16px] h-[16px]" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" /></svg>
|
||||
{:else if icon === "n8n"}
|
||||
<svg class="w-[16px] h-[16px]" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" /><circle cx="8" cy="6" r="1.5" fill="currentColor"/><circle cx="16" cy="12" r="1.5" fill="currentColor"/><circle cx="10" cy="18" r="1.5" fill="currentColor"/></svg>
|
||||
{:else if icon === "youtube"}
|
||||
<svg class="w-[16px] h-[16px]" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" /><path stroke-linecap="round" stroke-linejoin="round" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /><path stroke-linecap="round" stroke-linejoin="round" d="M8 3l8 3-8 3" /></svg>
|
||||
{:else if icon === "wrench"}
|
||||
<svg class="w-[16px] h-[16px]" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M11.42 15.17l-7.05 7.05a2 2 0 01-2.83 0l-.09-.09a2 2 0 010-2.83l7.05-7.05m4.24-4.24l1.41-1.41a4 4 0 015.66 0l.09.09a4 4 0 010 5.66l-1.41 1.41M14 14l-3-3m2 8l5-5" /></svg>
|
||||
{:else if icon === "robot"}
|
||||
<svg class="w-[16px] h-[16px]" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.8"><path stroke-linecap="round" stroke-linejoin="round" d="M12 2v4M8 12h8M8 16h4m-2-8h0m0 0c-4 0-7 2-7 6s3 6 7 6 7-2 7-6-3-6-7-6zM6 8V6m12 2V6" /></svg>
|
||||
{/if}
|
||||
</span>
|
||||
{/snippet}
|
||||
|
||||
Reference in New Issue
Block a user