mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
feat: add a permission-gated UI action registry and action slots for plugins
Moves the terminal toolbar's hardwired AI button into a slot the ssh-terminal plugin offers and the ai plugin fills, gated on ai.services.use.
This commit is contained in:
1 parent
225f618337
commit
2d6c1cdecb
29 files changed
+1971
-40
No files matched your search
@@ -27,6 +27,7 @@ import {
|
||||
import { createPortal } from "react-dom";
|
||||
import { useIsMobile } from "@/hooks/use-mobile";
|
||||
import { useAiAvailability } from "@/hooks/use-ai-availability";
|
||||
import { resetPermissionsCache } from "@/hooks/use-permissions";
|
||||
import { MobileBottomBar } from "@/shell/MobileBottomBar";
|
||||
import { AppRail, type RailView } from "@/sidebar/AppRail";
|
||||
import {
|
||||
@@ -967,6 +968,8 @@ export function AppShell({
|
||||
const manual =
|
||||
event instanceof CustomEvent &&
|
||||
(event.detail as { manual?: boolean } | undefined)?.manual === true;
|
||||
// Drop the cached grants so the next user never inherits them.
|
||||
resetPermissionsCache();
|
||||
onLogout(manual ? { manual: true } : undefined);
|
||||
};
|
||||
window.addEventListener("termix:logout", handle);
|
||||
|
||||
Reference in new issue
Block a user