Removed status bar, replaced with Show: Stats command
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
@@ -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} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user