From 6a2dd50236ca51f35441f542fc002c64c64b3ae5 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 10 Jul 2021 11:21:05 +0100 Subject: [PATCH] Fix: Don't lose focus on send. Sidebar: Show home button on mobile. --- .../common/messaging/MessageBox.tsx | 4 ++- .../navigation/left/HomeSidebar.tsx | 16 +++++------ .../navigation/left/ServerListSidebar.tsx | 28 +++++++++++-------- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/src/components/common/messaging/MessageBox.tsx b/src/components/common/messaging/MessageBox.tsx index 228c2bff..12c432ff 100644 --- a/src/components/common/messaging/MessageBox.tsx +++ b/src/components/common/messaging/MessageBox.tsx @@ -501,7 +501,9 @@ export default function MessageBox({ channel }: Props) { {/* */} - + e.preventDefault()}> diff --git a/src/components/navigation/left/HomeSidebar.tsx b/src/components/navigation/left/HomeSidebar.tsx index c4ef1e1d..932bc6ac 100644 --- a/src/components/navigation/left/HomeSidebar.tsx +++ b/src/components/navigation/left/HomeSidebar.tsx @@ -82,16 +82,16 @@ function HomeSidebar(props: Props) { + + + + + + + + {!isTouchscreenDevice && ( <> - - - - - - - - diff --git a/src/components/navigation/left/ServerListSidebar.tsx b/src/components/navigation/left/ServerListSidebar.tsx index 2ca6c076..f8dd70e3 100644 --- a/src/components/navigation/left/ServerListSidebar.tsx +++ b/src/components/navigation/left/ServerListSidebar.tsx @@ -28,6 +28,7 @@ import IconButton from "../../ui/IconButton"; import LineDivider from "../../ui/LineDivider"; import { mapChannelWithUnread } from "./common"; +import logoSVG from '../../../assets/logo.svg'; import { Children } from "../../../types/Preact"; import UserHover from "../../common/user/UserHover"; @@ -237,17 +238,22 @@ export function ServerListSidebar({ unreads, lastOpened }: Props) { active={homeActive} to={lastOpened.home ? `/channel/${lastOpened.home}` : "/"}> -
- homeActive && openContextMenu("Status") - }> - - - - - -
+ { isTouchscreenDevice ? + + + : +
+ homeActive && openContextMenu("Status") + }> + + + + + +
+ }