mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-26 15:32:11 -05:00
feat(servers): added new icons to server sidebar
This commit is contained in:
parent
5797eb3686
commit
716edb3318
3 changed files with 76 additions and 14 deletions
|
@ -13,12 +13,13 @@ interface Props extends IconBaseProps<Server> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ServerText = styled.div`
|
const ServerText = styled.div`
|
||||||
display: grid;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
padding: 0.2em;
|
padding: 0.2em;
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
place-items: center;
|
|
||||||
color: var(--foreground);
|
color: var(--foreground);
|
||||||
background: var(--primary-background);
|
background: var(--primary-background);
|
||||||
border-radius: var(--border-radius-half);
|
border-radius: var(--border-radius-half);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Plus } from "@styled-icons/boxicons-regular";
|
import { Plus, LinkExternal } from "@styled-icons/boxicons-regular";
|
||||||
import { Cog } from "@styled-icons/boxicons-solid";
|
import { Cog, Compass } from "@styled-icons/boxicons-solid";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
import { Link, useHistory, useLocation, useParams } from "react-router-dom";
|
import { Link, useHistory, useLocation, useParams } from "react-router-dom";
|
||||||
import { RelationshipStatus } from "revolt-api/types/Users";
|
import { RelationshipStatus } from "revolt-api/types/Users";
|
||||||
|
@ -162,6 +162,33 @@ const ServerEntry = styled.div<{ active: boolean; home?: boolean }>`
|
||||||
`}
|
`}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const ServerCircle = styled.div`
|
||||||
|
width: 54px;
|
||||||
|
height: 58px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.circle {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: var(--primary-background);
|
||||||
|
border-radius: 50%;
|
||||||
|
height: 42px;
|
||||||
|
width: 42px;
|
||||||
|
transition: background-color 0.1s ease-in;
|
||||||
|
|
||||||
|
> div svg {
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
transform: translateY(1px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
const SettingsButton = styled.div`
|
const SettingsButton = styled.div`
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
|
@ -341,17 +368,50 @@ export default observer(() => {
|
||||||
</ConditionalLink>
|
</ConditionalLink>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
<IconButton
|
{/*<LineDivider />*/}
|
||||||
onClick={() =>
|
<ServerCircle>
|
||||||
openScreen({
|
<Tooltip content="Add a Server" placement="right">
|
||||||
id: "special_input",
|
<div className="circle">
|
||||||
type: "create_server",
|
<IconButton
|
||||||
})
|
onClick={() =>
|
||||||
}>
|
openScreen({
|
||||||
<Plus size={36} />
|
id: "special_input",
|
||||||
</IconButton>
|
type: "create_server",
|
||||||
<PaintCounter small />
|
})
|
||||||
|
}>
|
||||||
|
<Plus size={32} />
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
</ServerCircle>
|
||||||
|
<ServerCircle>
|
||||||
|
<Tooltip
|
||||||
|
content={
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
gap: "4px",
|
||||||
|
}}>
|
||||||
|
<div>Discover Public Servers</div>
|
||||||
|
<LinkExternal size={12} />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
placement="right">
|
||||||
|
<div className="circle">
|
||||||
|
<IconButton>
|
||||||
|
<a
|
||||||
|
href="https://revolt.social"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer">
|
||||||
|
<Compass size={32} />
|
||||||
|
</a>
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
</Tooltip>
|
||||||
|
</ServerCircle>
|
||||||
</ServerList>
|
</ServerList>
|
||||||
|
<PaintCounter small />
|
||||||
{!isTouchscreenDevice && (
|
{!isTouchscreenDevice && (
|
||||||
<SettingsButton>
|
<SettingsButton>
|
||||||
<Link to="/settings">
|
<Link to="/settings">
|
||||||
|
|
|
@ -227,6 +227,7 @@
|
||||||
font-size: 0.8125rem;
|
font-size: 0.8125rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--secondary-foreground);
|
color: var(--secondary-foreground);
|
||||||
|
/*margin-bottom: 10px;*/
|
||||||
|
|
||||||
&:first-child {
|
&:first-child {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
|
Loading…
Reference in a new issue