mirror of https://github.com/usememos/memos
feat: add avatar to user in frontend (#1108)
parent
096a71c58b
commit
bcee0bbf3a
@ -0,0 +1,17 @@
|
||||
import { MEMOS_LOGO_URL } from "../helpers/consts";
|
||||
|
||||
interface Props {
|
||||
avatarUrl?: string;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const UserAvatar = (props: Props) => {
|
||||
const { avatarUrl, className } = props;
|
||||
return (
|
||||
<div className={`${className ?? ""} w-8 h-8 rounded-full bg-gray-100 dark:bg-zinc-800`}>
|
||||
<img className="w-full h-full" src={avatarUrl || MEMOS_LOGO_URL} alt="" />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default UserAvatar;
|
@ -1,43 +0,0 @@
|
||||
.user-banner-container {
|
||||
@apply flex flex-row justify-between items-center relative w-full h-10 px-6 flex-nowrap mb-1 shrink-0;
|
||||
|
||||
> .username-container {
|
||||
@apply shrink flex flex-row justify-start items-center flex-nowrap truncate;
|
||||
|
||||
> .username-text {
|
||||
@apply font-bold text-lg pr-1 text-slate-800 dark:text-gray-200 cursor-pointer shrink truncate;
|
||||
}
|
||||
|
||||
> .tag {
|
||||
@apply text-xs px-1 bg-blue-600 dark:bg-blue-800 rounded text-white dark:text-gray-200 shadow;
|
||||
}
|
||||
}
|
||||
|
||||
> .action-btn {
|
||||
@apply shrink-0 select-none border-none;
|
||||
|
||||
&.menu-popup-btn {
|
||||
@apply flex flex-col justify-center items-center w-9 h-10 -mr-2 cursor-pointer;
|
||||
|
||||
> .icon-img {
|
||||
@apply w-5 h-auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.amount-text-container {
|
||||
@apply flex flex-row justify-between items-start w-full px-6 select-none shrink-0 pb-4;
|
||||
|
||||
> .status-text {
|
||||
@apply flex flex-col justify-start items-start;
|
||||
|
||||
> .amount-text {
|
||||
@apply font-bold text-2xl opacity-80 leading-10 text-slate-600 dark:text-gray-300;
|
||||
}
|
||||
|
||||
> .type-text {
|
||||
@apply text-gray-400 text-xs font-mono;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue