mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 12:41:45 +02:00
fix: minor ui fixes
This commit is contained in:
@@ -11,8 +11,7 @@ function getNoteHeight(item) {
|
||||
const { notebook, headline } = item;
|
||||
let height = SINGLE_LINE_HEIGHT * 3;
|
||||
//if (title.length > 35) height += SINGLE_LINE_HEIGHT;
|
||||
if (headline?.length > 0) height += SINGLE_LINE_HEIGHT;
|
||||
if (headline?.length > 50) height += SINGLE_LINE_HEIGHT;
|
||||
if (headline?.length > 0) height += SINGLE_LINE_HEIGHT * 2;
|
||||
if (notebook) height += SINGLE_LINE_HEIGHT / 2;
|
||||
|
||||
return height * DEFAULT_FONT_SIZE;
|
||||
@@ -33,11 +32,9 @@ function getNotebookHeight(item) {
|
||||
|
||||
if (description?.length > 0) {
|
||||
height += SINGLE_LINE_HEIGHT;
|
||||
}
|
||||
|
||||
if (description?.length > 50) {
|
||||
height += SINGLE_LINE_HEIGHT;
|
||||
}
|
||||
|
||||
return height * DEFAULT_FONT_SIZE;
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ function Note(props) {
|
||||
const theme = useTheme();
|
||||
const color = useMemo(() => COLORS[note.color], [note.color]);
|
||||
const notebook = useMemo(
|
||||
() => note.notebooks && db.notebooks.notebook(note.notebooks[0].id).data,
|
||||
() => note.notebooks && db.notebooks.notebook(note.notebooks[0].id)?.data,
|
||||
[note.notebooks]
|
||||
);
|
||||
|
||||
@@ -140,7 +140,7 @@ function Note(props) {
|
||||
id={note.id}
|
||||
index={index}
|
||||
header={
|
||||
note.notebooks && (
|
||||
notebook && (
|
||||
<Flex
|
||||
alignSelf="flex-start"
|
||||
justifySelf="flex-start"
|
||||
|
||||
@@ -8964,7 +8964,7 @@ normalize-url@^3.0.0, normalize-url@^3.0.1:
|
||||
|
||||
"notes-core@git+ssh://git@github.com:streetwriters/notesnook-core.git":
|
||||
version "4.3.0"
|
||||
resolved "git+ssh://git@github.com:streetwriters/notesnook-core.git#52f3ce5dc6224d72e6d1610be591cbfca5b9c37f"
|
||||
resolved "git+ssh://git@github.com:streetwriters/notesnook-core.git#70fa2cbebb0d3f445699ae8b1d6c6f371d16310e"
|
||||
dependencies:
|
||||
fast-sort "^2.0.1"
|
||||
fuzzysearch "^1.0.3"
|
||||
|
||||
Reference in New Issue
Block a user