refactor: tweaks
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
# production
|
# production
|
||||||
/build
|
/build
|
||||||
|
/src-tauri/target
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
@@ -42,10 +42,9 @@ const serverSlice = createSlice({
|
|||||||
name = "",
|
name = "",
|
||||||
description = "",
|
description = "",
|
||||||
show_user_online_status = false,
|
show_user_online_status = false,
|
||||||
language = "en",
|
|
||||||
webclient_auto_update = true
|
webclient_auto_update = true
|
||||||
} = action.payload || {};
|
} = 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<Partial<StoredServer>>) {
|
updateInfo(state, action: PayloadAction<Partial<StoredServer>>) {
|
||||||
const values = action.payload || {};
|
const values = action.payload || {};
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const User: FC<Props> = ({
|
|||||||
const online = curr.online || curr.uid == loginUid;
|
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 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 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",
|
online ? "bg-green-500" : "bg-zinc-400",
|
||||||
compact ? "w-[15px] h-[15px]" : "w-3 h-3");
|
compact ? "w-[15px] h-[15px]" : "w-3 h-3");
|
||||||
if (!popover)
|
if (!popover)
|
||||||
@@ -71,7 +71,7 @@ const User: FC<Props> = ({
|
|||||||
name={curr.name}
|
name={curr.name}
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
/>
|
/>
|
||||||
<div className={statusClass}></div>
|
{curr.is_bot ? <IconBot className={clsx(compact && "absolute -bottom-[2.5px] -right-[2.5px]", "!w-[15px] !h-[15px]")} /> : <div className={statusClass}></div>}
|
||||||
</div>
|
</div>
|
||||||
{!compact && (
|
{!compact && (
|
||||||
<span className={nameClass} title={curr?.name}>
|
<span className={nameClass} title={curr?.name}>
|
||||||
@@ -79,7 +79,6 @@ const User: FC<Props> = ({
|
|||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
{owner && <IconOwner />}
|
{owner && <IconOwner />}
|
||||||
{curr.is_bot && <IconBot className={clsx(compact && "absolute -top-[2.5px] -right-[2.5px]", "!w-[15px] !h-[15px]")} />}
|
|
||||||
</div>
|
</div>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ const VoiceManagement = ({ info, setMute, setDeafen, leave }: Props) => {
|
|||||||
return <li key={uid} className="flex items-center justify-between gap-6 pb-4 ">
|
return <li key={uid} className="flex items-center justify-between gap-6 pb-4 ">
|
||||||
<div className="flex items-center gap-2 transition-opacity">
|
<div className="flex items-center gap-2 transition-opacity">
|
||||||
<div className={clsx("w-8 h-8 flex shrink-0 relative")}>
|
<div className={clsx("w-8 h-8 flex shrink-0 relative")}>
|
||||||
{speaking && <div className="z-10 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-0 rounded-full bg-green-500 animate-speaking w-10 h-10"></div>}
|
{speaking && <div className="z-10 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 opacity-0 rounded-full bg-green-500 animate-speaking w-[36px] h-[36px]"></div>}
|
||||||
<Avatar
|
<Avatar
|
||||||
width={32}
|
width={32}
|
||||||
height={32}
|
height={32}
|
||||||
|
|||||||
Reference in New Issue
Block a user