feat: implement custom branding

This commit is contained in:
Steven
2024-07-29 23:05:30 +08:00
parent a113d82e9b
commit b6271938b3
6 changed files with 75 additions and 6 deletions

View File

@ -0,0 +1,23 @@
import classNames from "classnames";
import { useWorkspaceStore } from "@/stores";
import Icon from "./Icon";
interface Props {
className?: string;
}
const Logo = ({ className }: Props) => {
const workspaceStore = useWorkspaceStore();
const branding = workspaceStore.setting.branding ? new TextDecoder().decode(workspaceStore.setting.branding) : "";
return (
<div className={classNames("w-8 h-auto dark:text-gray-500 rounded-lg overflow-hidden", className)}>
{branding ? (
<img src={branding} alt="branding" className="max-w-full max-h-full" />
) : (
<Icon.CircleSlash className="w-full h-auto" strokeWidth={1.5} />
)}
</div>
);
};
export default Logo;