A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
fix: minor ui inconsistencies
thecodrrb83e447d71d1
diff --git a/apps/web/src/common/height-calculator.js b/apps/web/src/common/height-calculator.jsindex b8da83512..7ca2a0a29 100644--- a/apps/web/src/common/height-calculator.js+++ b/apps/web/src/common/height-calculator.js@@ -12,7 +12,7 @@ function getNoteHeight(item) {let height = SINGLE_LINE_HEIGHT * 3;if (title.length > 40) height += SINGLE_LINE_HEIGHT;if (headline.length > 0) height += SINGLE_LINE_HEIGHT;- if (headline.length > 60) height += SINGLE_LINE_HEIGHT;+ if (headline.length > 40) height += SINGLE_LINE_HEIGHT;return height * DEFAULT_FONT_SIZE;}diff --git a/apps/web/src/utils/useContextMenu.js b/apps/web/src/utils/useContextMenu.jsindex 6d7241c93..cd829d4f6 100644--- a/apps/web/src/utils/useContextMenu.js+++ b/apps/web/src/utils/useContextMenu.js@@ -38,6 +38,8 @@ function openMenu(e) {isOpening = true;}+ menu.style.display = "block";+const clickCoords = getPosition(e);const clickCoordsX = clickCoords.x;const clickCoordsY = clickCoords.y;@@ -45,8 +47,8 @@ function openMenu(e) {const menuWidth = menu.offsetWidth + 4;const menuHeight = menu.offsetHeight + 4;- const windowWidth = window.innerWidth;- const windowHeight = window.innerHeight;+ const windowWidth = window.document.body.offsetWidth;+ const windowHeight = window.document.body.offsetHeight;if (windowWidth - clickCoordsX < menuWidth) {menu.style.left = windowWidth - menuWidth + "px";diff --git a/apps/web/src/utils/useHashParam.js b/apps/web/src/utils/useHashParam.jsindex 1ed5fc339..9b5b810d0 100644--- a/apps/web/src/utils/useHashParam.js+++ b/apps/web/src/utils/useHashParam.js@@ -1,4 +1,5 @@import { useState, useEffect } from "react";+import { isMobile } from "./dimensions";const getHashSearchParams = () => {const hash = window.location.hash.slice(1);@@ -25,7 +26,12 @@ const setHashParam = (obj, notify = true) => {const search = searchParams.toString();let hash = search ? `${prefix}?${search}` : prefix;if (window.history.replaceState) {- window.history.replaceState(null, null, `#${hash}`);+ if (isMobile()) {+ window.history.pushState(null, null, `#${hash}`);+ } else {+ window.history.replaceState(null, null, `#${hash}`);+ }+if (notify) window.dispatchEvent(new HashChangeEvent("hashchange"));} else {window.location.hash = hash;