mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-10 01:03:36 -05:00
Fix: Don't lose focus on send.
Sidebar: Show home button on mobile.
This commit is contained in:
parent
586b153eb8
commit
6a2dd50236
3 changed files with 28 additions and 20 deletions
|
@ -501,7 +501,9 @@ export default function MessageBox({ channel }: Props) {
|
|||
{/*<IconButton onClick={emojiPicker}>
|
||||
<HappyAlt size={20} />
|
||||
</IconButton>*/}
|
||||
<IconButton className="mobile" onClick={send}>
|
||||
<IconButton
|
||||
className="mobile" onClick={send}
|
||||
onMouseDown={e => e.preventDefault()}>
|
||||
<Send size={20} />
|
||||
</IconButton>
|
||||
</Action>
|
||||
|
|
|
@ -82,16 +82,16 @@ function HomeSidebar(props: Props) {
|
|||
<GenericSidebarBase padding>
|
||||
<ConnectionStatus />
|
||||
<GenericSidebarList>
|
||||
<ConditionalLink active={pathname === "/"} to="/">
|
||||
<ButtonItem active={pathname === "/"}>
|
||||
<Home size={20} />
|
||||
<span>
|
||||
<Text id="app.navigation.tabs.home" />
|
||||
</span>
|
||||
</ButtonItem>
|
||||
</ConditionalLink>
|
||||
{!isTouchscreenDevice && (
|
||||
<>
|
||||
<ConditionalLink active={pathname === "/"} to="/">
|
||||
<ButtonItem active={pathname === "/"}>
|
||||
<Home size={20} />
|
||||
<span>
|
||||
<Text id="app.navigation.tabs.home" />
|
||||
</span>
|
||||
</ButtonItem>
|
||||
</ConditionalLink>
|
||||
<ConditionalLink
|
||||
active={pathname === "/friends"}
|
||||
to="/friends">
|
||||
|
|
|
@ -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}` : "/"}>
|
||||
<ServerEntry home active={homeActive}>
|
||||
<div
|
||||
onContextMenu={attachContextMenu("Status")}
|
||||
onClick={() =>
|
||||
homeActive && openContextMenu("Status")
|
||||
}>
|
||||
<UserHover user={self}>
|
||||
<Icon size={42} unread={homeUnread}>
|
||||
<UserIcon target={self} size={32} status />
|
||||
</Icon>
|
||||
</UserHover>
|
||||
</div>
|
||||
{ isTouchscreenDevice ?
|
||||
<Icon size={42} unread={homeUnread}>
|
||||
<img style={{ width: 32, height: 32 }} src={logoSVG} />
|
||||
</Icon> :
|
||||
<div
|
||||
onContextMenu={attachContextMenu("Status")}
|
||||
onClick={() =>
|
||||
homeActive && openContextMenu("Status")
|
||||
}>
|
||||
<UserHover user={self}>
|
||||
<Icon size={42} unread={homeUnread}>
|
||||
<UserIcon target={self} size={32} status />
|
||||
</Icon>
|
||||
</UserHover>
|
||||
</div>
|
||||
}
|
||||
<span />
|
||||
</ServerEntry>
|
||||
</ConditionalLink>
|
||||
|
|
Loading…
Reference in a new issue