1
0

Removed status bar, replaced with Show: Stats command

This commit is contained in:
Zef Hemel
2022-08-01 11:04:48 +02:00
parent 525b30c9bb
commit ec7c272594
6 changed files with 30 additions and 42 deletions
-19
View File
@@ -1,19 +0,0 @@
import { EditorView } from "@codemirror/view";
import * as util from "../../common/util";
export function StatusBar({ editorView }: { editorView?: EditorView }) {
let wordCount = 0,
readingTime = 0;
if (editorView) {
let text = editorView.state.sliceDoc();
wordCount = util.countWords(text);
readingTime = util.readingTime(wordCount);
}
return (
<div id="sb-status-bar">
<div className="inner">
{wordCount} words | {readingTime} min
</div>
</div>
);
}
-2
View File
@@ -50,7 +50,6 @@ import { SlashCommandHook } from "./hooks/slash_command";
import { pasteLinkExtension } from "./editor_paste";
import { markdownSyscalls } from "@silverbulletmd/common/syscalls/markdown";
import { clientStoreSyscalls } from "./syscalls/clientStore";
import { StatusBar } from "./components/status_bar";
import {
loadMarkdownExtensions,
MDExt,
@@ -758,7 +757,6 @@ export class Editor {
/>
</div>
)}
<StatusBar editorView={editor.editorView} />
</>
);
}
+1 -11
View File
@@ -67,7 +67,7 @@
.notifications {
position: absolute;
font-family: "iA-Mono";
bottom: 45px;
bottom: 0;
left: 5px;
right: 5px;
font-size: 15px;
@@ -171,13 +171,3 @@
}
}
}
#sb-status-bar {
height: 40px;
line-height: 40px;
padding: 0 10px;
text-align: right;
background-color: rgb(213, 213, 213);
border-top: rgb(193, 193, 193) 1px solid;
font-family: "iA-Mono";
}