mirror of
https://github.com/bulwarkmail/webmail.git
synced 2026-10-31 08:13:50 +00:00
The admin drew its own copy of the rail, with a logo and only the app links, next to a sidebar that signed out from its footer. It now renders the webmail's NavigationRail (desktop and phone), which needs the translation, theme and tour providers under /admin, so the admin layout loads the message catalog itself; the rail marks Admin as the current app for password admins too. The sidebar footer carries the admin session links and the same about footer as the settings. Plugin and theme rows and the detail header show the extension's icon from the directory listing instead of a generic one, and a plugin's own settings move to the bottom of its page, after availability, permissions and versions.
18 lines
622 B
TypeScript
18 lines
622 B
TypeScript
import type { AppIcon } from '@/components/icons';
|
|
|
|
interface ExtensionIconProps {
|
|
/** The brand icon the extension directory serves, when known. */
|
|
url: string | null | undefined;
|
|
/** What to draw without one. */
|
|
fallback: AppIcon;
|
|
className?: string;
|
|
}
|
|
|
|
/** A plugin's or theme's icon, or the generic one when the directory has none. */
|
|
export function ExtensionIcon({ url, fallback: Fallback, className }: ExtensionIconProps) {
|
|
if (url) {
|
|
return <img src={url} alt="" loading="lazy" className={className ?? 'h-full w-full rounded-md object-cover'} />;
|
|
}
|
|
return <Fallback className={className} />;
|
|
}
|