mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-09 04:40:57 +00:00
feat(cloud): add scoped support admin sessions (#2369)
* feat(cloud): add scoped support admin sessions * style(web): format support admin session changes * fix(cloud): isolate support adapter sessions * fix(cloud): authenticate plugin assets and report workspace resources --------- Co-authored-by: dadachann <185672915+dadachann@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { useAuthenticatedPluginIcon } from '@/hooks/useAuthenticatedPluginResource';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
export function AuthenticatedPluginIcon({
|
||||
author,
|
||||
name,
|
||||
alt = '',
|
||||
className,
|
||||
}: {
|
||||
author: string;
|
||||
name: string;
|
||||
alt?: string;
|
||||
className?: string;
|
||||
}) {
|
||||
const icon = useAuthenticatedPluginIcon(
|
||||
author,
|
||||
name,
|
||||
Boolean(author && name),
|
||||
);
|
||||
|
||||
if (!icon.url || icon.error) {
|
||||
return (
|
||||
<span
|
||||
aria-hidden={alt ? undefined : true}
|
||||
aria-label={alt || undefined}
|
||||
className={cn('inline-block bg-muted', className)}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return <img src={icon.url} alt={alt} className={className} />;
|
||||
}
|
||||
Reference in New Issue
Block a user