From e2b560a76a5a72d4666c0d5cb5f008e3c0b3df89 Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Thu, 6 Apr 2023 11:43:06 +0800 Subject: [PATCH] refactor: tweaks --- .gitignore | 1 + src/app/slices/server.ts | 3 +-- src/common/component/User/index.tsx | 5 ++--- src/routes/chat/VoiceChat/VoiceManagement.tsx | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 6c9142c6..262cbc0b 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ # production /build +/src-tauri/target # misc .DS_Store diff --git a/src/app/slices/server.ts b/src/app/slices/server.ts index 21543a93..2e0cfeba 100644 --- a/src/app/slices/server.ts +++ b/src/app/slices/server.ts @@ -42,10 +42,9 @@ const serverSlice = createSlice({ name = "", description = "", show_user_online_status = false, - language = "en", webclient_auto_update = true } = action.payload || {}; - return { upgraded, name, logo, description, inviteLink, show_user_online_status, language, webclient_auto_update }; + return { upgraded, name, logo, description, inviteLink, show_user_online_status, webclient_auto_update }; }, updateInfo(state, action: PayloadAction>) { const values = action.payload || {}; diff --git a/src/common/component/User/index.tsx b/src/common/component/User/index.tsx index b49a0f44..f5e1af6f 100644 --- a/src/common/component/User/index.tsx +++ b/src/common/component/User/index.tsx @@ -45,7 +45,7 @@ const User: FC = ({ const online = curr.online || curr.uid == loginUid; const containerClass = clsx(`relative flex items-center justify-start gap-2 rounded-lg select-none`, interactive && "md:hover:bg-gray-500/10", compact ? "p-0" : "p-2"); const nameClass = clsx(`text-sm text-gray-500 max-w-[190px] truncate font-semibold dark:text-white`); - const statusClass = clsx(`absolute -bottom-[2.5px] -right-[2.5px] border-content rounded-full border-[1px] border-solid border-white dark:border-gray-300`, + const statusClass = clsx(`absolute -bottom-[2.5px] -right-[2.5px] border-content rounded-full border-[1px] border-white dark:border-gray-300`, online ? "bg-green-500" : "bg-zinc-400", compact ? "w-[15px] h-[15px]" : "w-3 h-3"); if (!popover) @@ -71,7 +71,7 @@ const User: FC = ({ name={curr.name} alt="avatar" /> -
+ {curr.is_bot ? :
} {!compact && ( @@ -79,7 +79,6 @@ const User: FC = ({ )} {owner && } - {curr.is_bot && } ); diff --git a/src/routes/chat/VoiceChat/VoiceManagement.tsx b/src/routes/chat/VoiceChat/VoiceManagement.tsx index cbffa124..2abce270 100644 --- a/src/routes/chat/VoiceChat/VoiceManagement.tsx +++ b/src/routes/chat/VoiceChat/VoiceManagement.tsx @@ -58,7 +58,7 @@ const VoiceManagement = ({ info, setMute, setDeafen, leave }: Props) => { return
  • - {speaking &&
    } + {speaking &&
    }