Added hamburger and member sidebar icons

This commit is contained in:
nizune 2021-07-08 18:39:03 +02:00
parent eb7b915edb
commit 76f43a4b98
5 changed files with 16 additions and 13 deletions

View file

@ -25,6 +25,11 @@ export default styled.div<Props>`
flex-shrink: 0;
}
.menu {
margin-inline-end: 8px;
color: var(--secondary-foreground);
}
/*@media only screen and (max-width: 768px) {
padding: 0 12px;
}*/

View file

@ -335,13 +335,7 @@ function Theme({ children, options }: Props) {
return (
<ThemeContext.Provider value={theme}>
<Helmet>
<meta
name="theme-color"
content={
isTouchscreenDevice
? theme["primary-header"]
: theme["background"]
}
<meta name="theme-color" content={theme["background"]}
/>
</Helmet>
<GlobalTheme theme={theme} />

View file

@ -1,4 +1,4 @@
import { At, Hash } from "@styled-icons/boxicons-regular";
import { At, Hash, Menu } from "@styled-icons/boxicons-regular";
import { Notepad, Group } from "@styled-icons/boxicons-solid";
import { Channel, User } from "revolt.js";
import styled from "styled-components";
@ -89,6 +89,11 @@ export default function ChannelHeader({
return (
<Header placement="primary">
{isTouchscreenDevice &&
<div className="menu">
<Menu size={27} />
</div>
}
{icon}
<Info>
<span className="name">{name}</span>

View file

@ -1,9 +1,9 @@
import { Sidebar as SidebarIcon } from "@styled-icons/boxicons-regular";
import {
UserPlus,
Cog,
PhoneCall,
PhoneOutgoing,
Group
} from "@styled-icons/boxicons-solid";
import { useHistory } from "react-router-dom";
@ -65,11 +65,10 @@ export default function HeaderActions({
<VoiceActions channel={channel} />
{(channel.channel_type === "Group" ||
channel.channel_type === "TextChannel") &&
!isTouchscreenDevice && (
<IconButton onClick={toggleSidebar}>
<SidebarIcon size={22} />
<Group size={25} />
</IconButton>
)}
}
</>
);
}

View file

@ -75,7 +75,7 @@ export function GenericSettings({
content={
isTouchscreenDevice
? theme["primary-header"]
: theme["secondary-background"]
: theme["background"]
}
/>
</Helmet>