chore: updates

This commit is contained in:
Tristan Yang
2024-07-01 21:46:02 +08:00
parent 10690f05e8
commit 1303e7fef7
3 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "vocechat-web", "name": "vocechat-web",
"version": "0.7.19", "version": "0.7.20",
"homepage": "https://voce.chat", "homepage": "https://voce.chat",
"dependencies": { "dependencies": {
"@metamask/onboarding": "^1.0.1", "@metamask/onboarding": "^1.0.1",
+8 -2
View File
@@ -11,6 +11,7 @@ import Avatar from "../Avatar";
import Profile from "../Profile"; import Profile from "../Profile";
import ContextMenu from "./ContextMenu"; import ContextMenu from "./ContextMenu";
import { shallowEqual } from "react-redux"; import { shallowEqual } from "react-redux";
import { cn } from "@/utils";
interface Props extends React.HTMLAttributes<HTMLDivElement> { interface Props extends React.HTMLAttributes<HTMLDivElement> {
uid: number; uid: number;
@@ -28,7 +29,7 @@ interface Props extends React.HTMLAttributes<HTMLDivElement> {
const User: FC<Props> = ({ const User: FC<Props> = ({
cid, cid,
uid, uid,
owner = false, // owner = false,
dm = false, dm = false,
interactive = true, interactive = true,
popover = false, popover = false,
@@ -60,6 +61,7 @@ const User: FC<Props> = ({
const nameClass = clsx( const nameClass = clsx(
`text-sm text-gray-500 max-w-[190px] truncate font-semibold dark:text-white` `text-sm text-gray-500 max-w-[190px] truncate font-semibold dark:text-white`
); );
const isFromWidget = !!curr.widget_id;
const statusContainerClass = `absolute -bottom-[2.5px] -right-[2.5px] border-content rounded-full border-[1px] border-white dark:border-gray-300`; const statusContainerClass = `absolute -bottom-[2.5px] -right-[2.5px] border-content rounded-full border-[1px] border-white dark:border-gray-300`;
const statusClass = clsx( const statusClass = clsx(
statusContainerClass, statusContainerClass,
@@ -94,7 +96,11 @@ const User: FC<Props> = ({
style={{ width: `${avatarSize}px`, height: `${avatarSize}px` }} style={{ width: `${avatarSize}px`, height: `${avatarSize}px` }}
> >
<Avatar <Avatar
className="w-full h-full rounded-full object-cover" className={cn(
"size-full rounded-full object-cover",
isFromWidget && "ring-2 ring-orange-500"
)}
title={curr.widget_id}
width={avatarSize} width={avatarSize}
height={avatarSize} height={avatarSize}
src={curr.avatar} src={curr.avatar}
+4 -3
View File
@@ -25,9 +25,10 @@ const Index = ({ needLogin = false }: Props) => {
className="rounded-lg" className="rounded-lg"
style={{ maxWidth: "min(((100vw - 56px) - 20px) - 64px, 360px)" }} style={{ maxWidth: "min(((100vw - 56px) - 20px) - 64px, 360px)" }}
> >
<div className="text-md text-gray-900 dark:text-gray-100 px-3 py-1.5 bg-gray-100 dark:bg-gray-900 rounded-lg mb-1.5"> <div
{welcome || t("welcome")} dangerouslySetInnerHTML={{ __html: welcome || t("welcome") }}
</div> className="text-md text-gray-900 dark:text-gray-100 px-3 py-1.5 bg-gray-100 dark:bg-gray-900 rounded-lg mb-1.5"
></div>
</div> </div>
</div> </div>
</div> </div>