mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-13 18:59:22 -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}>
|
{/*<IconButton onClick={emojiPicker}>
|
||||||
<HappyAlt size={20} />
|
<HappyAlt size={20} />
|
||||||
</IconButton>*/}
|
</IconButton>*/}
|
||||||
<IconButton className="mobile" onClick={send}>
|
<IconButton
|
||||||
|
className="mobile" onClick={send}
|
||||||
|
onMouseDown={e => e.preventDefault()}>
|
||||||
<Send size={20} />
|
<Send size={20} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Action>
|
</Action>
|
||||||
|
|
|
@ -82,8 +82,6 @@ function HomeSidebar(props: Props) {
|
||||||
<GenericSidebarBase padding>
|
<GenericSidebarBase padding>
|
||||||
<ConnectionStatus />
|
<ConnectionStatus />
|
||||||
<GenericSidebarList>
|
<GenericSidebarList>
|
||||||
{!isTouchscreenDevice && (
|
|
||||||
<>
|
|
||||||
<ConditionalLink active={pathname === "/"} to="/">
|
<ConditionalLink active={pathname === "/"} to="/">
|
||||||
<ButtonItem active={pathname === "/"}>
|
<ButtonItem active={pathname === "/"}>
|
||||||
<Home size={20} />
|
<Home size={20} />
|
||||||
|
@ -92,6 +90,8 @@ function HomeSidebar(props: Props) {
|
||||||
</span>
|
</span>
|
||||||
</ButtonItem>
|
</ButtonItem>
|
||||||
</ConditionalLink>
|
</ConditionalLink>
|
||||||
|
{!isTouchscreenDevice && (
|
||||||
|
<>
|
||||||
<ConditionalLink
|
<ConditionalLink
|
||||||
active={pathname === "/friends"}
|
active={pathname === "/friends"}
|
||||||
to="/friends">
|
to="/friends">
|
||||||
|
|
|
@ -28,6 +28,7 @@ import IconButton from "../../ui/IconButton";
|
||||||
import LineDivider from "../../ui/LineDivider";
|
import LineDivider from "../../ui/LineDivider";
|
||||||
import { mapChannelWithUnread } from "./common";
|
import { mapChannelWithUnread } from "./common";
|
||||||
|
|
||||||
|
import logoSVG from '../../../assets/logo.svg';
|
||||||
import { Children } from "../../../types/Preact";
|
import { Children } from "../../../types/Preact";
|
||||||
import UserHover from "../../common/user/UserHover";
|
import UserHover from "../../common/user/UserHover";
|
||||||
|
|
||||||
|
@ -237,6 +238,10 @@ export function ServerListSidebar({ unreads, lastOpened }: Props) {
|
||||||
active={homeActive}
|
active={homeActive}
|
||||||
to={lastOpened.home ? `/channel/${lastOpened.home}` : "/"}>
|
to={lastOpened.home ? `/channel/${lastOpened.home}` : "/"}>
|
||||||
<ServerEntry home active={homeActive}>
|
<ServerEntry home active={homeActive}>
|
||||||
|
{ isTouchscreenDevice ?
|
||||||
|
<Icon size={42} unread={homeUnread}>
|
||||||
|
<img style={{ width: 32, height: 32 }} src={logoSVG} />
|
||||||
|
</Icon> :
|
||||||
<div
|
<div
|
||||||
onContextMenu={attachContextMenu("Status")}
|
onContextMenu={attachContextMenu("Status")}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
|
@ -248,6 +253,7 @@ export function ServerListSidebar({ unreads, lastOpened }: Props) {
|
||||||
</Icon>
|
</Icon>
|
||||||
</UserHover>
|
</UserHover>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
<span />
|
<span />
|
||||||
</ServerEntry>
|
</ServerEntry>
|
||||||
</ConditionalLink>
|
</ConditionalLink>
|
||||||
|
|
Loading…
Reference in a new issue