mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
feat: full screen onboarding with a plugin picker and per step versions
This commit is contained in:
1 parent
1e74ce4827
commit
b9dd3488a5
59 files changed
+5413
-643
No files matched your search
@@ -56,6 +56,14 @@ export async function hasPermission(permission: string): Promise<boolean> {
|
||||
return matchesPermission(permissions, isAdmin, permission);
|
||||
}
|
||||
|
||||
/** A sync has() over the current grants, for code outside a component. */
|
||||
export async function loadPermissionChecker(): Promise<
|
||||
(permission: string) => boolean
|
||||
> {
|
||||
const { permissions, isAdmin } = await load();
|
||||
return (permission) => matchesPermission(permissions, isAdmin, permission);
|
||||
}
|
||||
|
||||
/**
|
||||
* Warms the permissions cache before the shell mounts, so permission-gated
|
||||
* rail items are already known on first paint instead of popping in once
|
||||
|
||||
Reference in new issue
Block a user