feat(ai): move the assistant to its own "Odin" sidebar page
Promote the AI chat from a dashboard widget to a dedicated page: - new sidebar item "Odin" under the Přehled section, gated on ai.use, → /odin - new /odin route + Odin page (reuses the assistant component, with a light ai.use guard) - remove the widget from the dashboard - rebrand the assistant header "Asistent" → "Odin" and give the thread more height now that it owns the page Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
27
src/admin/pages/Odin.tsx
Normal file
27
src/admin/pages/Odin.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import Box from "@mui/material/Box";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { PageEnter } from "../ui";
|
||||
import { useAuth } from "../context/AuthContext";
|
||||
import DashAssistant from "../components/dashboard/DashAssistant";
|
||||
|
||||
export default function Odin() {
|
||||
const { hasPermission } = useAuth();
|
||||
|
||||
if (!hasPermission("ai.use")) {
|
||||
return (
|
||||
<PageEnter>
|
||||
<Typography variant="body1" color="text.secondary">
|
||||
Nemáte oprávnění pro AI asistenta.
|
||||
</Typography>
|
||||
</PageEnter>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<PageEnter>
|
||||
<Box sx={{ maxWidth: 920, mx: "auto" }}>
|
||||
<DashAssistant />
|
||||
</Box>
|
||||
</PageEnter>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user