Page MenuHomePhabricator

D4138.id13201.diff
No OneTemporary

D4138.id13201.diff

diff --git a/web/app.react.js b/web/app.react.js
--- a/web/app.react.js
+++ b/web/app.react.js
@@ -26,6 +26,7 @@
import AppsDirectory from './apps/apps-directory.react';
import Calendar from './calendar/calendar.react';
import Chat from './chat/chat.react';
+import NavigationArrows from './components/navigation-arrows.react';
import InputStateContainer from './input/input-state-container.react';
import LoadingIndicator from './loading-indicator.react';
import { MenuProvider } from './menu-provider.react';
@@ -165,6 +166,12 @@
}
}
+ const shouldShowNavigationArrows = false;
+ let navigationArrows = null;
+ if (shouldShowNavigationArrows) {
+ navigationArrows = <NavigationArrows />;
+ }
+
return (
<div className={css.layout}>
<DisconnectedBarVisibilityHandler />
@@ -180,6 +187,7 @@
Comm
</a>
</h1>
+ {navigationArrows}
<div className={css['upper-right']}>
<LoadingIndicator
status={this.props.entriesLoadingStatus}
diff --git a/web/components/navigation-arrows.css b/web/components/navigation-arrows.css
new file mode 100644
--- /dev/null
+++ b/web/components/navigation-arrows.css
@@ -0,0 +1,10 @@
+.container {
+ display: flex;
+ column-gap: 12px;
+}
+
+.button {
+ color: var(--fg);
+ display: flex;
+ align-items: center;
+}
diff --git a/web/components/navigation-arrows.react.js b/web/components/navigation-arrows.react.js
new file mode 100644
--- /dev/null
+++ b/web/components/navigation-arrows.react.js
@@ -0,0 +1,31 @@
+// @flow
+
+import * as React from 'react';
+
+import history from '../router-history.js';
+import SWMansionIcon from '../SWMansionIcon.react.js';
+import css from './navigation-arrows.css';
+
+function NavigationArrows(): React.Node {
+ const goBack = React.useCallback(
+ () => history.getHistoryObject().goBack(),
+ [],
+ );
+ const goForward = React.useCallback(
+ () => history.getHistoryObject().goForward(),
+ [],
+ );
+
+ return (
+ <div className={css.container}>
+ <a className={css.button} onClick={goBack}>
+ <SWMansionIcon icon="arrow-left" size={24} />
+ </a>
+ <a className={css.button} onClick={goForward}>
+ <SWMansionIcon icon="arrow-right" size={24} />
+ </a>
+ </div>
+ );
+}
+
+export default NavigationArrows;
diff --git a/web/style.css b/web/style.css
--- a/web/style.css
+++ b/web/style.css
@@ -80,6 +80,7 @@
line-height: var(--line-height-text);
font-weight: var(--semi-bold);
font-size: var(--logo-font-22);
+ margin-right: 40px;
}
.wordmark > a {
color: inherit;

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 27, 8:37 PM (6 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2711537
Default Alt Text
D4138.id13201.diff (2 KB)

Event Timeline