aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/topbar
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-04-21 19:03:49 -0400
committerbobzel <zzzman@gmail.com>2024-04-21 19:03:49 -0400
commit939e18624af4252551f38c43335ee8ef0acd144c (patch)
treed4e7a8dd4db05737ec1343ff8d80611537bde65b /src/client/views/topbar
parent57d9c12d6b88d6814e468aca93b9bf809eabd9ce (diff)
more lint cleanup
Diffstat (limited to 'src/client/views/topbar')
-rw-r--r--src/client/views/topbar/TopBar.tsx25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx
index b87e5cdde..1ab0932a3 100644
--- a/src/client/views/topbar/TopBar.tsx
+++ b/src/client/views/topbar/TopBar.tsx
@@ -36,6 +36,7 @@ import { dropActionType } from '../../util/DropActionTypes';
*/
@observer
export class TopBar extends ObservableReactComponent<{}> {
+ // eslint-disable-next-line no-use-before-define
static Instance: TopBar;
@observable private _flipDocumentation = 0;
constructor(props: any) {
@@ -45,10 +46,12 @@ export class TopBar extends ObservableReactComponent<{}> {
}
navigateToHome = () => {
- (CollectionDockingView.Instance?.CaptureThumbnail() ?? new Promise<void>(res => res())).then(() => {
+ (CollectionDockingView.Instance?.CaptureThumbnail() ??
+ new Promise<void>(res => { res(); })) .then(() =>
+ {
Doc.ActivePage = 'home';
DashboardView.closeActiveDashboard(); // bcz: if we do this, we need some other way to keep track, for user convenience, of the last dashboard in use
- });
+ }); // prettier-ignore
};
@computed get color() {
@@ -62,7 +65,9 @@ export class TopBar extends ObservableReactComponent<{}> {
}
@observable happyHeart: boolean = PingManager.Instance.IsBeating;
- setHappyHeart = action((status: boolean) => (this.happyHeart = status));
+ setHappyHeart = action((status: boolean) => {
+ this.happyHeart = status;
+ });
dispose = reaction(
() => PingManager.Instance.IsBeating,
isBeating => this.setHappyHeart(isBeating)
@@ -86,7 +91,7 @@ export class TopBar extends ObservableReactComponent<{}> {
/>
) : (
<div className="logo-container">
- <img className="logo" src="/assets/medium-blue-light-blue-circle.png" alt="dash logo"></img>
+ <img className="logo" src="/assets/medium-blue-light-blue-circle.png" alt="dash logo" />
<span style={{ color: isDark(this.backgroundColor) ? Colors.LIGHT_GRAY : Colors.DARK_GRAY, fontWeight: 200 }}>brown</span>
<span style={{ color: isDark(this.backgroundColor) ? Colors.LIGHT_BLUE : Colors.MEDIUM_BLUE, fontWeight: 500 }}>dash</span>
</div>
@@ -193,11 +198,11 @@ export class TopBar extends ObservableReactComponent<{}> {
}}
/>
) : null}
- <IconButton tooltip={'Issue Reporter ⌘I'} size={Size.SMALL} color={this.color} onClick={ReportManager.Instance.open} icon={<FaBug />} />
+ <IconButton tooltip="Issue Reporter ⌘I" size={Size.SMALL} color={this.color} onClick={ReportManager.Instance.open} icon={<FaBug />} />
<Flip key={this._flipDocumentation}>
- <IconButton tooltip={'Documentation ⌘D'} size={Size.SMALL} color={this.color} onClick={() => window.open('https://brown-dash.github.io/Dash-Documentation/', '_blank')} icon={<FontAwesomeIcon icon="question-circle" />} />
+ <IconButton tooltip="Documentation ⌘D" size={Size.SMALL} color={this.color} onClick={() => window.open('https://brown-dash.github.io/Dash-Documentation/', '_blank')} icon={<FontAwesomeIcon icon="question-circle" />} />
</Flip>
- <IconButton tooltip={'Settings ⌘⇧S'} size={Size.SMALL} color={this.color} onClick={SettingsManager.Instance.open} icon={<FontAwesomeIcon icon="cog" />} />
+ <IconButton tooltip="Settings ⌘⇧S" size={Size.SMALL} color={this.color} onClick={SettingsManager.Instance.openMgr} icon={<FontAwesomeIcon icon="cog" />} />
<IconButton
size={Size.SMALL}
onClick={ServerStats.Instance.open}
@@ -214,11 +219,13 @@ export class TopBar extends ObservableReactComponent<{}> {
/**
* Make the documentation icon flip around to draw attention to it.
*/
- FlipDocumentationIcon = action(() => (this._flipDocumentation = this._flipDocumentation + 1));
+ FlipDocumentationIcon = action(() => {
+ this._flipDocumentation += 1;
+ });
render() {
return (
- //TODO:glr Add support for light / dark mode
+ // TODO:glr Add support for light / dark mode
<div
style={{
pointerEvents: 'all',