diff --git a/lib/app.tsx b/lib/app.tsx index d31395560..a83773202 100644 --- a/lib/app.tsx +++ b/lib/app.tsx @@ -24,7 +24,6 @@ type OwnProps = { type StateProps = { autoHideMenuBar: boolean; hotkeysEnabled: boolean; - isOffline: boolean; isSmallScreen: boolean; lineLength: T.LineLength; showNavigation: boolean; @@ -137,7 +136,6 @@ class AppComponent extends Component { render() { const { isDevConfig, - isOffline, lineLength, showNavigation, showNoteInfo, @@ -159,7 +157,6 @@ class AppComponent extends Component { return (
{isDevConfig && } - {isOffline &&
OFFLINE
}
{showNavigation && } @@ -174,7 +171,6 @@ class AppComponent extends Component { const mapStateToProps: S.MapState = (state) => ({ autoHideMenuBar: state.settings.autoHideMenuBar, hotkeysEnabled: state.settings.keyboardShortcuts, - isOffline: state.simperium.connectionStatus === 'offline', isSmallScreen: selectors.isSmallScreen(state), lineLength: state.settings.lineLength, showNavigation: state.ui.showNavigation, diff --git a/lib/note-toolbar/index.tsx b/lib/note-toolbar/index.tsx index 732b9d760..62fe5f20c 100644 --- a/lib/note-toolbar/index.tsx +++ b/lib/note-toolbar/index.tsx @@ -18,6 +18,7 @@ import * as T from '../types'; type StateProps = { editMode: boolean; hasRevisions: boolean; + isOffline: boolean; markdownEnabled: boolean; note: T.Note | null; }; @@ -40,7 +41,7 @@ export class NoteToolbar extends Component { static displayName = 'NoteToolbar'; render() { - const { note } = this.props; + const { isOffline, note } = this.props; return (
@@ -53,6 +54,7 @@ export class NoteToolbar extends Component { const { editMode, hasRevisions, + isOffline, markdownEnabled, note, toggleNoteInfo, @@ -62,15 +64,13 @@ export class NoteToolbar extends Component { ) : (
-
+
} onClick={this.props.toggleFocusMode} title="Toggle Sidebar" />
-
-
} @@ -78,6 +78,9 @@ export class NoteToolbar extends Component { title="Back • Ctrl+Shift+L" />
+
+ {isOffline &&
OFFLINE
} +
{markdownEnabled && (
{ title="Back • Ctrl+Shift+L" />
+ {isOffline &&
OFFLINE
}