aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/topbar
diff options
context:
space:
mode:
authormonoguitari <113245090+monoguitari@users.noreply.github.com>2023-08-29 01:20:45 -0400
committermonoguitari <113245090+monoguitari@users.noreply.github.com>2023-08-29 01:20:45 -0400
commit10c6aac13daafb32f7cb93dadceab273c4614209 (patch)
tree4f08abd8b23715a63d5a9a8a0b90471ce0f71f7b /src/client/views/topbar
parentde343764f5f60bb8e9400139e1a56a8483da90b7 (diff)
parent8e143637a34e1766b5993e1c494c8d5a9d881698 (diff)
Merge branch 'master' into advanced-trails-2-jesus
Diffstat (limited to 'src/client/views/topbar')
-rw-r--r--src/client/views/topbar/TopBar.tsx18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index 68446d4e7..5b097e639 100644
--- a/src/client/views/topbar/TopBar.tsx
+++ b/src/client/views/topbar/TopBar.tsx
@@ -1,5 +1,5 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { Button, IconButton, isDark, Size, Type } from 'browndash-components';
+import { Button, IconButton, isDark, Size, Toggle, Type } from 'browndash-components';
import { action, computed, observable, reaction } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
@@ -37,10 +37,10 @@ export class TopBar extends React.Component {
};
@computed get color() {
- return StrCast(Doc.UserDoc().userColor, Colors.LIGHT_GRAY);
+ return SettingsManager.userColor;
}
@computed get variantColor() {
- return StrCast(Doc.UserDoc().userVariantColor, Colors.MEDIUM_BLUE);
+ return SettingsManager.userVariantColor;
}
@computed get backgroundColor() {
return PingManager.Instance.IsBeating ? SettingsManager.userBackgroundColor : Colors.MEDIUM_GRAY;
@@ -76,7 +76,17 @@ export class TopBar extends React.Component {
<span style={{ color: isDark(this.backgroundColor) ? Colors.LIGHT_BLUE : Colors.MEDIUM_BLUE, fontWeight: 500 }}>dash</span>
</div>
)}
- {Doc.ActiveDashboard && <Button text="Explore" tooltip="Browsing mode for directly navigating to documents" size={Size.SMALL} color={this.color} onClick={action(() => (DocumentView.ExploreMode = !DocumentView.ExploreMode))} />}
+ {Doc.ActiveDashboard && (
+ <Button
+ text="Explore"
+ type={Type.TERT}
+ tooltip="Browsing mode for directly navigating to documents"
+ size={Size.SMALL}
+ color={DocumentView.ExploreMode ? this.variantColor : this.color}
+ background={DocumentView.ExploreMode ? this.color : 'transparent'}
+ onClick={action(() => (DocumentView.ExploreMode = !DocumentView.ExploreMode))}
+ />
+ )}
</div>
);
}