Move plugin settings access from sidebar to app card

Remove the "Extensions" section from the sidebar nav. Instead, each app
card on the Apps page shows an "Extension" button when the current user
has access to that app's plugin (matched by service ID). The button links
to /settings/plugins/:id alongside the existing admin Settings button.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
curo1305
2026-04-18 02:31:12 +02:00
parent 18a638bc3a
commit 003fbee20f
4 changed files with 31 additions and 51 deletions
+24 -1
View File
@@ -1,6 +1,6 @@
import { Link } from "react-router-dom";
import { useQuery } from "@tanstack/react-query";
import { getMe, getServices } from "../api/client";
import { getMe, getPlugins, getServices } from "../api/client";
const cardBase: React.CSSProperties = {
backgroundColor: "rgb(var(--color-surface))",
@@ -34,6 +34,12 @@ export default function AppsPage() {
refetchInterval: 30_000,
refetchIntervalInBackground: true,
});
const { data: plugins = [] } = useQuery({
queryKey: ["plugins"],
queryFn: getPlugins,
retry: false,
});
const pluginIds = new Set(plugins.map((p) => p.id));
return (
<div style={{ padding: 32, maxWidth: 900, margin: "0 auto" }}>
@@ -93,6 +99,23 @@ export default function AppsPage() {
Settings
</Link>
)}
{pluginIds.has(svc.id) && (
<Link
to={`/settings/plugins/${svc.id}`}
onClick={(e) => e.stopPropagation()}
style={{
padding: "6px 14px",
border: "1px solid #ccc",
borderRadius: 4,
textDecoration: "none",
fontSize: 14,
color: "#333",
}}
title="Extension settings"
>
Extension
</Link>
)}
</div>
</CardWrapper>
);