mirror of
https://github.com/revoltchat/revite.git
synced 2025-02-22 08:11:03 -05:00
Open settings when clicking top left on desktop.
This commit is contained in:
parent
df39b1fc2b
commit
38dd135f67
1 changed files with 9 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { Plus } from "@styled-icons/boxicons-regular";
|
import { Plus } from "@styled-icons/boxicons-regular";
|
||||||
import { Compass } from "@styled-icons/boxicons-solid";
|
import { Compass } from "@styled-icons/boxicons-solid";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
import { useLocation, useParams } from "react-router-dom";
|
import { useHistory, useLocation, useParams } from "react-router-dom";
|
||||||
import { RelationshipStatus } from "revolt-api/types/Users";
|
import { RelationshipStatus } from "revolt-api/types/Users";
|
||||||
import styled, { css } from "styled-components";
|
import styled, { css } from "styled-components";
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ const ServerEntry = styled.div<{ active: boolean; home?: boolean }>`
|
||||||
|
|
||||||
:focus {
|
:focus {
|
||||||
outline: 3px solid blue;
|
outline: 3px solid blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
> div {
|
> div {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
|
@ -150,8 +150,11 @@ const ServerEntry = styled.div<{ active: boolean; home?: boolean }>`
|
||||||
function Swoosh() {
|
function Swoosh() {
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
|
<svg
|
||||||
<svg width="54" height="106" viewBox="0 0 54 106" xmlns="http://www.w3.org/2000/svg">
|
width="54"
|
||||||
|
height="106"
|
||||||
|
viewBox="0 0 54 106"
|
||||||
|
xmlns="http://www.w3.org/2000/svg">
|
||||||
<path
|
<path
|
||||||
d="M54 53C54 67.9117 41.9117 80 27 80C12.0883 80 0 67.9117 0 53C0 38.0883 12.0883 26 27 26C41.9117 26 54 38.0883 54 53Z"
|
d="M54 53C54 67.9117 41.9117 80 27 80C12.0883 80 0 67.9117 0 53C0 38.0883 12.0883 26 27 26C41.9117 26 54 38.0883 54 53Z"
|
||||||
fill="var(--sidebar-active)"
|
fill="var(--sidebar-active)"
|
||||||
|
@ -165,7 +168,6 @@ function Swoosh() {
|
||||||
fill="var(--sidebar-active)"
|
fill="var(--sidebar-active)"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -211,6 +213,7 @@ export const ServerListSidebar = observer(({ unreads, lastOpened }: Props) => {
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const history = useHistory();
|
||||||
const path = useLocation().pathname;
|
const path = useLocation().pathname;
|
||||||
const { openScreen } = useIntermediate();
|
const { openScreen } = useIntermediate();
|
||||||
|
|
||||||
|
@ -251,7 +254,7 @@ export const ServerListSidebar = observer(({ unreads, lastOpened }: Props) => {
|
||||||
<div
|
<div
|
||||||
onContextMenu={attachContextMenu("Status")}
|
onContextMenu={attachContextMenu("Status")}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
homeActive && openContextMenu("Status")
|
homeActive && history.push("/settings")
|
||||||
}>
|
}>
|
||||||
<UserHover user={client.user}>
|
<UserHover user={client.user}>
|
||||||
<Icon size={42} unread={homeUnread}>
|
<Icon size={42} unread={homeUnread}>
|
||||||
|
|
Loading…
Add table
Reference in a new issue