mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-24 06:32:08 -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,16 +82,16 @@ function HomeSidebar(props: Props) {
|
||||||
<GenericSidebarBase padding>
|
<GenericSidebarBase padding>
|
||||||
<ConnectionStatus />
|
<ConnectionStatus />
|
||||||
<GenericSidebarList>
|
<GenericSidebarList>
|
||||||
|
<ConditionalLink active={pathname === "/"} to="/">
|
||||||
|
<ButtonItem active={pathname === "/"}>
|
||||||
|
<Home size={20} />
|
||||||
|
<span>
|
||||||
|
<Text id="app.navigation.tabs.home" />
|
||||||
|
</span>
|
||||||
|
</ButtonItem>
|
||||||
|
</ConditionalLink>
|
||||||
{!isTouchscreenDevice && (
|
{!isTouchscreenDevice && (
|
||||||
<>
|
<>
|
||||||
<ConditionalLink active={pathname === "/"} to="/">
|
|
||||||
<ButtonItem active={pathname === "/"}>
|
|
||||||
<Home size={20} />
|
|
||||||
<span>
|
|
||||||
<Text id="app.navigation.tabs.home" />
|
|
||||||
</span>
|
|
||||||
</ButtonItem>
|
|
||||||
</ConditionalLink>
|
|
||||||
<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,17 +238,22 @@ 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}>
|
||||||
<div
|
{ isTouchscreenDevice ?
|
||||||
onContextMenu={attachContextMenu("Status")}
|
<Icon size={42} unread={homeUnread}>
|
||||||
onClick={() =>
|
<img style={{ width: 32, height: 32 }} src={logoSVG} />
|
||||||
homeActive && openContextMenu("Status")
|
</Icon> :
|
||||||
}>
|
<div
|
||||||
<UserHover user={self}>
|
onContextMenu={attachContextMenu("Status")}
|
||||||
<Icon size={42} unread={homeUnread}>
|
onClick={() =>
|
||||||
<UserIcon target={self} size={32} status />
|
homeActive && openContextMenu("Status")
|
||||||
</Icon>
|
}>
|
||||||
</UserHover>
|
<UserHover user={self}>
|
||||||
</div>
|
<Icon size={42} unread={homeUnread}>
|
||||||
|
<UserIcon target={self} size={32} status />
|
||||||
|
</Icon>
|
||||||
|
</UserHover>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<span />
|
<span />
|
||||||
</ServerEntry>
|
</ServerEntry>
|
||||||
</ConditionalLink>
|
</ConditionalLink>
|
||||||
|
|
Loading…
Reference in a new issue