mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-24 22:52:09 -05:00
feat: push temporary outage information
This commit is contained in:
parent
3632b6b351
commit
b1a7a94d26
3 changed files with 44 additions and 10 deletions
|
@ -146,8 +146,8 @@
|
|||
"react-scroll": "^1.8.2",
|
||||
"react-virtualized-auto-sizer": "^1.0.5",
|
||||
"react-virtuoso": "^1.10.4",
|
||||
"revolt-api": "0.5.3-alpha.12",
|
||||
"revolt.js": "5.2.8",
|
||||
"revolt-api": "^0.5.3-alpha.12",
|
||||
"revolt.js": "^5.2.8",
|
||||
"rimraf": "^3.0.2",
|
||||
"sass": "^1.35.1",
|
||||
"shade-blend-color": "^1.0.0",
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import { Docked, OverlappingPanels, ShowIf } from "react-overlapping-panels";
|
||||
import { Switch, Route, useLocation } from "react-router-dom";
|
||||
import { Switch, Route, useLocation, Link } from "react-router-dom";
|
||||
import styled, { css } from "styled-components/macro";
|
||||
|
||||
import { useState } from "preact/hooks";
|
||||
|
||||
import ContextMenus from "../lib/ContextMenus";
|
||||
import { isTouchscreenDevice } from "../lib/isTouchscreenDevice";
|
||||
|
||||
|
@ -39,13 +41,32 @@ const StatusBar = styled.div`
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 13px;
|
||||
gap: 14px;
|
||||
//gap: 14px;
|
||||
gap: 8px;
|
||||
|
||||
user-select: none;
|
||||
|
||||
.button {
|
||||
padding: 5px;
|
||||
border: 1px solid white;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
a {
|
||||
cursor: pointer;
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
.title {
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.actions {
|
||||
gap: 12px;
|
||||
display: flex;
|
||||
padding-right: 4px;
|
||||
}
|
||||
`;
|
||||
|
||||
const Routes = styled.div.attrs({ "data-component": "routes" })<{
|
||||
|
@ -91,12 +112,25 @@ export default function App() {
|
|||
path.startsWith("/invite") ||
|
||||
path.includes("/settings");
|
||||
|
||||
const [statusBar, setStatusBar] = useState(true);
|
||||
|
||||
return (
|
||||
<>
|
||||
{/*<StatusBar>
|
||||
<div className="title">Planned outage: CDN (~2 hours)</div>
|
||||
<div className="button">View status</div>
|
||||
</StatusBar>*/}
|
||||
{statusBar && (
|
||||
<StatusBar>
|
||||
<div className="title">Partial outage: CDN</div>
|
||||
<div class="actions">
|
||||
<Link to="/invites/Testers">
|
||||
<a>
|
||||
<div className="button">Updates</div>
|
||||
</a>
|
||||
</Link>
|
||||
<a onClick={() => setStatusBar(false)}>
|
||||
<div className="button">Dismiss</div>
|
||||
</a>
|
||||
</div>
|
||||
</StatusBar>
|
||||
)}
|
||||
<AppContainer>
|
||||
{window.isNative && !window.native.getConfig().frame && (
|
||||
<Titlebar />
|
||||
|
|
|
@ -4298,12 +4298,12 @@ reusify@^1.0.4:
|
|||
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
|
||||
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
|
||||
|
||||
revolt-api@0.5.3-alpha.12:
|
||||
revolt-api@0.5.3-alpha.12, revolt-api@^0.5.3-alpha.12:
|
||||
version "0.5.3-alpha.12"
|
||||
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.12.tgz#78f25b567b840c1fd072595526592a422cb01f25"
|
||||
integrity sha512-MM42oI5+5JJMnAs3JiOwSQOy/SUYzYs3M8YRC5QI4G6HU7CfyB2HNWh5jFsyRlcLdSi13dGazHm31FUPHsxOzw==
|
||||
|
||||
revolt.js@5.2.8:
|
||||
revolt.js@^5.2.8:
|
||||
version "5.2.8"
|
||||
resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.2.8.tgz#5c9b3b10d3ea488e74b3208a9309e2106fb8c2c2"
|
||||
integrity sha512-J3n2Rwbqen9UTqfgl/N2RJx/9QaXhuZWdp/Pce0wrw9pP/xCTk87FlHHG0ZWuJvX4fltg9lbCHGMcUIT6UA2wA==
|
||||
|
|
Loading…
Reference in a new issue