chore: updates
This commit is contained in:
@@ -216,7 +216,7 @@
|
|||||||
height: 5px;
|
height: 5px;
|
||||||
}
|
}
|
||||||
html.dark ::-webkit-scrollbar-thumb {
|
html.dark ::-webkit-scrollbar-thumb {
|
||||||
background: #1c1c1e;
|
background: rgb(17 24 39);
|
||||||
}
|
}
|
||||||
/* markdown overrides */
|
/* markdown overrides */
|
||||||
|
|
||||||
|
|||||||
@@ -18,16 +18,16 @@ const AudioMessage = ({ url, name, size, download }: Props) => {
|
|||||||
};
|
};
|
||||||
const _size = formatBytes(size);
|
const _size = formatBytes(size);
|
||||||
return (
|
return (
|
||||||
<div className='w-96 flex flex-col gap-2 px-3 py-2 rounded-md border border-solid border-gray-300 overflow-hidden bg-stone-100'>
|
<div className='w-96 flex flex-col gap-2 px-3 py-2 rounded-md border border-solid border-gray-300 dark:border-gray-500 overflow-hidden bg-stone-100 dark:bg-stone-900'>
|
||||||
<div className="flex justify-between z-30 overflow-hidden">
|
<div className="flex justify-between z-30 overflow-hidden">
|
||||||
<div className="flex gap-2 ">
|
<div className="flex gap-2 ">
|
||||||
<IconAudio className="w-9 h-auto" />
|
<IconAudio className="w-9 h-auto" />
|
||||||
<div className="flex flex-col gap-1 text-sm text-gray-700">
|
<div className="flex flex-col gap-1 text-sm text-gray-700 dark:text-gray-300">
|
||||||
<span title={name} className='font-bold w-[240px] truncate'>{name}</span>
|
<span title={name} className='font-bold w-[240px] truncate'>{name}</span>
|
||||||
<span>{_size}</span>
|
<span>{_size}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href={download} className="mt-2"><IconDownload className="download_icon gray" /></a>
|
<a href={download} className="mt-2"><IconDownload className="fill-gray-500 dark:fill-gray-400" /></a>
|
||||||
</div>
|
</div>
|
||||||
<audio src={url} onCanPlay={handleCanPlay} controls className={clsx("w-full object-cover z-10", canPlay ? "" : "hidden")} />
|
<audio src={url} onCanPlay={handleCanPlay} controls className={clsx("w-full object-cover z-10", canPlay ? "" : "hidden")} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const GoBackNav = ({ path, className = "" }: Props) => {
|
|||||||
const isChannelChatPage = useMatch("/chat/channel/:channel_id");
|
const isChannelChatPage = useMatch("/chat/channel/:channel_id");
|
||||||
const isDMChatPage = useMatch("/chat/dm/:user_id");
|
const isDMChatPage = useMatch("/chat/dm/:user_id");
|
||||||
const isProfilePage = useMatch("/users/:user_id");
|
const isProfilePage = useMatch("/users/:user_id");
|
||||||
console.log("routt", isChannelChatPage, isDMChatPage);
|
// console.log("routt", isChannelChatPage, isDMChatPage);
|
||||||
const isChatPage = !!isChannelChatPage || !!isDMChatPage;
|
const isChatPage = !!isChannelChatPage || !!isDMChatPage;
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
if (path) {
|
if (path) {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ const AddMembers: FC<Props> = ({ cid = 0, closeModal }) => {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
<Button disabled={selects.length == 0 || isAdding} className="flex mt-4 justify-center" onClick={handleAddMembers}>
|
<Button disabled={selects.length == 0 || isAdding} className="flex mt-4 justify-center items-center" onClick={handleAddMembers}>
|
||||||
{isAdding ? `Adding` : "Add"} to #{channel.name}
|
{isAdding ? `Adding` : "Add"} to #{channel.name}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const ForwardedMessage: FC<Props> = ({ context, to, from_uid, id }) => {
|
|||||||
return (
|
return (
|
||||||
<div className="w-full relative flex items-start gap-4 px-2 py-1 my-2 rounded-lg" key={idx}>
|
<div className="w-full relative flex items-start gap-4 px-2 py-1 my-2 rounded-lg" key={idx}>
|
||||||
{user && (
|
{user && (
|
||||||
<div >
|
<div className="w-6 h-6 rounded-full flex shrink-0 overflow-hidden">
|
||||||
<Avatar width={24} height={24} src={user.avatar} name={user.name} />
|
<Avatar width={24} height={24} src={user.avatar} name={user.name} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const MobileNavs = () => {
|
|||||||
const linkClass = `flex`;
|
const linkClass = `flex`;
|
||||||
const isChatPage = isHomePath || pathname.startsWith("/chat");
|
const isChatPage = isHomePath || pathname.startsWith("/chat");
|
||||||
const isChattingPage = !!isDMChat || !!isChannelChat;
|
const isChattingPage = !!isDMChat || !!isChannelChat;
|
||||||
console.log("rrr", isDMChat, isChannelChat);
|
// console.log("rrr", isDMChat, isChannelChat);
|
||||||
|
|
||||||
// 有点绕
|
// 有点绕
|
||||||
const chatNav = isChatHomePath ? "/chat" : chatPath || "/chat";
|
const chatNav = isChatHomePath ? "/chat" : chatPath || "/chat";
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const WebhookEdit = ({ uid }: Props) => {
|
|||||||
// 保存编辑
|
// 保存编辑
|
||||||
const webhook_url = new FormData(form).get("webhook") as string;
|
const webhook_url = new FormData(form).get("webhook") as string;
|
||||||
const resp = await updateUser({ id: uid, webhook_url });
|
const resp = await updateUser({ id: uid, webhook_url });
|
||||||
console.log("ressssss", resp);
|
// console.log("ressssss", resp);
|
||||||
if ("error" in resp) {
|
if ("error" in resp) {
|
||||||
switch (resp.error.status) {
|
switch (resp.error.status) {
|
||||||
case 406:
|
case 406:
|
||||||
|
|||||||
Reference in New Issue
Block a user