Skip to content

Commit f161cc8

Browse files
committed
shift text up of top navbar; get rid of websocket indicator, since there is no longer a dedicated websocket for each project
1 parent 4698e8c commit f161cc8

File tree

1 file changed

+7
-22
lines changed

1 file changed

+7
-22
lines changed

src/packages/frontend/projects/projects-nav.tsx

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
} from "@cocalc/frontend/components/sortable-tabs";
2222
import StaticMarkdown from "@cocalc/frontend/editors/slate/static-markdown";
2323
import { IS_MOBILE } from "@cocalc/frontend/feature";
24-
import { WebsocketIndicator } from "@cocalc/frontend/project/websocket/websocket-indicator";
2524
import { ProjectAvatarImage } from "@cocalc/frontend/projects/project-row";
2625
import { KUCALC_COCALC_COM } from "@cocalc/util/db-schema/site-defaults";
2726
import { COMPUTE_STATES } from "@cocalc/util/schema";
@@ -75,22 +74,8 @@ function ProjectTab({ project_id }: ProjectTabProps) {
7574
"projects",
7675
"public_project_titles",
7776
);
78-
const project_websockets = useTypedRedux("projects", "project_websockets");
7977
const any_alerts = useProjectStatusAlerts(project_id);
8078

81-
function renderWebsocketIndicator() {
82-
return (
83-
// Hiding this on very skinny devices isn't necessarily bad, since the exact same information is
84-
// now visible via a big "Connecting..." banner after a few seconds.
85-
<span
86-
style={{ paddingLeft: "15px", marginRight: "-15px" }}
87-
className="hidden-xs"
88-
>
89-
<WebsocketIndicator state={project_websockets?.get(project_id)} />
90-
</span>
91-
);
92-
}
93-
9479
const title = project?.get("title") ?? public_project_titles?.get(project_id);
9580
if (title == null) {
9681
if (active_top_tab == project_id) {
@@ -103,11 +88,6 @@ function ProjectTab({ project_id }: ProjectTabProps) {
10388
set_window_title(title);
10489
}
10590

106-
const nav_style_inner: CSSProperties = {
107-
float: "right",
108-
whiteSpace: "nowrap",
109-
};
110-
11191
const project_state = project?.getIn(["state", "state"]);
11292

11393
const icon =
@@ -214,8 +194,13 @@ function ProjectTab({ project_id }: ProjectTabProps) {
214194
}
215195

216196
const body = (
217-
<div onMouseUp={onMouseUp} style={width != null ? { width } : undefined}>
218-
<div style={nav_style_inner}>{renderWebsocketIndicator()}</div>
197+
<div
198+
onMouseUp={onMouseUp}
199+
style={{
200+
marginTop: "-4px" /* compensate for border */,
201+
...(width != null ? { width } : undefined),
202+
}}
203+
>
219204
<div style={PROJECT_NAME_STYLE} onClick={click_title}>
220205
{icon}
221206
{renderNoInternet()}

0 commit comments

Comments
 (0)