mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-25 16:40:58 -05:00
fix(header): added text overflow
This commit is contained in:
parent
2ce4136a52
commit
7241498f87
1 changed files with 34 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
import { Redirect, useParams } from "react-router";
|
import { Redirect, useParams } from "react-router";
|
||||||
|
import { Server } from "revolt.js/dist/maps/Servers";
|
||||||
import styled, { css } from "styled-components";
|
import styled, { css } from "styled-components";
|
||||||
|
|
||||||
import { attachContextMenu } from "preact-context-menu";
|
import { attachContextMenu } from "preact-context-menu";
|
||||||
|
@ -48,6 +49,32 @@ const ServerList = styled.div`
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
const ServerBanner = styled.div`
|
||||||
|
background-color: var(--primary-background);
|
||||||
|
|
||||||
|
.title {
|
||||||
|
height: 48px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
gap: 8px;
|
||||||
|
|
||||||
|
.test {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
server: Server;
|
||||||
|
}
|
||||||
|
|
||||||
export default observer(() => {
|
export default observer(() => {
|
||||||
const client = useClient();
|
const client = useClient();
|
||||||
const state = useApplicationState();
|
const state = useApplicationState();
|
||||||
|
@ -137,7 +164,13 @@ export default observer(() => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ServerBase>
|
<ServerBase>
|
||||||
<ServerHeader server={server} />
|
<ServerBanner>
|
||||||
|
<div className="title">
|
||||||
|
<ServerHeader server={server} />
|
||||||
|
<div className="test">{server.name}</div>
|
||||||
|
</div>
|
||||||
|
</ServerBanner>
|
||||||
|
|
||||||
<ConnectionStatus />
|
<ConnectionStatus />
|
||||||
<ServerList
|
<ServerList
|
||||||
onContextMenu={attachContextMenu("Menu", {
|
onContextMenu={attachContextMenu("Menu", {
|
||||||
|
|
Loading…
Reference in a new issue