ui: improve ui for info bar under editor title

This commit is contained in:
thecodrr
2020-03-04 09:19:27 +05:00
parent 6654cb4306
commit 748586df5e
2 changed files with 10 additions and 4 deletions

View File

@@ -22,6 +22,7 @@ const TextSeperator = () => {
function Editor() {
const title = useStore(store => store.session.title);
const dateEdited = useStore(store => store.session.dateEdited);
const id = useStore(store => store.session.id);
const text = useStore(store => store.session.content.text);
const isSaving = useStore(store => store.session.isSaving);
const delta = useStore(store => store.session.content.delta);
@@ -56,14 +57,19 @@ function Editor() {
}
sx={{
paddingTop: 2,
paddingBottom: dateEdited > 0 ? 0 : 2
paddingBottom: 0
}}
/>
<Text
fontSize={"subBody"}
mx={2}
color="fontTertiary"
sx={{ display: "flex", alignItems: "center", marginBottom: 2 }}
sx={{
display: "flex",
alignItems: "center",
marginTop: 2,
marginBottom: dateEdited || text.length || id.length ? 2 : 0
}}
>
{dateEdited > 0 && (
<>
@@ -77,7 +83,7 @@ function Editor() {
<TextSeperator />
</>
)}
{isSaving ? "Saving" : "Saved"}
{id.length > 0 && <>{isSaving ? "Saving" : "Saved"}</>}
</Text>
<Box id="toolbar" display={["none", "flex", "flex"]} />
<ReactQuill

View File

@@ -6825,7 +6825,7 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
"notes-core@https://github.com/thecodrr/notes-core.git":
version "1.2.0"
resolved "https://github.com/thecodrr/notes-core.git#f88c06d4bcdcff876cb8f12391e501a2e03ed8e0"
resolved "https://github.com/thecodrr/notes-core.git#5ee5dfbd5df2abb748cc1a6b8eae6bdad234dba3"
dependencies:
fast-sort "^2.0.1"
fuzzysearch "^1.0.3"