Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
bug fixes
zadamef996f3919a9
diff --git a/src/public/app/layouts/desktop_main_window_layout.js b/src/public/app/layouts/desktop_main_window_layout.jsindex 682324a9a3..049bc7107d 100644--- a/src/public/app/layouts/desktop_main_window_layout.js+++ b/src/public/app/layouts/desktop_main_window_layout.js@@ -110,7 +110,7 @@ export default class DesktopMainWindowLayout {.id('root-widget').css('height', '100vh').child(new FlexContainer('row').overflowing()- .css('height', '35px')+ .css('height', '36px').child(new GlobalMenuWidget()).child(new TabRowWidget()).child(new TitleBarButtonsWidget()))diff --git a/src/public/app/services/utils.js b/src/public/app/services/utils.jsindex f70acd63b1..136080305c 100644--- a/src/public/app/services/utils.js+++ b/src/public/app/services/utils.js@@ -1,5 +1,5 @@function reloadApp() {- //window.location.reload(true);+ window.location.reload(true);}function parseDate(str) {diff --git a/src/public/app/setup.js b/src/public/app/setup.jsindex e576aeb2f2..602a6fc7ef 100644--- a/src/public/app/setup.js+++ b/src/public/app/setup.js@@ -133,9 +133,14 @@ async function checkOutstandingSyncs() {const { stats, initialized } = await $.get('api/sync/stats');if (initialized) {- const remote = utils.dynamicRequire('electron').remote;- remote.app.relaunch();- remote.app.exit(0);+ if (utils.isElectron()) {+ const remote = utils.dynamicRequire('electron').remote;+ remote.app.relaunch();+ remote.app.exit(0);+ }+ else {+ utils.reloadApp();+ }}else {const totalOutstandingSyncs = stats.outstandingPushes + stats.outstandingPulls;@@ -155,4 +160,4 @@ function hideAlert() {ko.applyBindings(new SetupModel(), document.getElementById('setup-dialog'));-$("#setup-dialog").show();\ No newline at end of file+$("#setup-dialog").show();diff --git a/src/public/app/widgets/global_menu.js b/src/public/app/widgets/global_menu.jsindex 1acf8ac895..a9e134e702 100644--- a/src/public/app/widgets/global_menu.js+++ b/src/public/app/widgets/global_menu.js@@ -7,12 +7,18 @@ const TPL = `<style>.global-menu-wrapper {height: 35px;+ box-sizing: border-box;border-bottom: 1px solid var(--main-border-color);}+ .global-menu {+ height: 34px;+ box-sizing: border-box;+ }+.global-menu button {margin-right: 10px;- height: 33px;+ height: 34px;border: none;}diff --git a/src/public/app/widgets/tab_row.js b/src/public/app/widgets/tab_row.jsindex 2336717eba..50f55f1a4f 100644--- a/src/public/app/widgets/tab_row.js+++ b/src/public/app/widgets/tab_row.js@@ -44,23 +44,25 @@ const TAB_ROW_TPL = `.note-tab-row {box-sizing: border-box;position: relative;- height: 34px;- min-height: 34px;+ height: 36px;width: 100%;background: var(--main-background-color);- border-radius: 5px 5px 0 0;overflow: hidden;margin-top: 2px;}+.note-tab-row * {box-sizing: inherit;font: inherit;}+.note-tab-row .note-tab-row-container {+ box-sizing: border-box;position: relative;width: 100%;height: 100%;}+.note-tab-row .note-tab {position: absolute;left: 0;@@ -84,6 +86,7 @@ const TAB_ROW_TPL = `font-size: 24px;cursor: pointer;border-bottom: 1px solid var(--main-border-color);+ box-sizing: border-box;}.note-new-tab:hover {@@ -92,14 +95,14 @@ const TAB_ROW_TPL = `}.tab-row-filler {+ box-sizing: border-box;-webkit-app-region: drag;position: absolute;left: 0;- height: 33px;+ height: 36px;}.tab-row-filler .tab-row-border {- position: relative;background: linear-gradient(to right, var(--main-border-color), transparent);height: 1px;margin-top: 32px;diff --git a/src/routes/api/sync.js b/src/routes/api/sync.jsindex ecb5bc91d7..354c3d6913 100644--- a/src/routes/api/sync.js+++ b/src/routes/api/sync.js@@ -41,10 +41,14 @@ function getStats() {return {};}- return {+ const stats = {initialized: optionService.getOption('initialized') === 'true',stats: syncService.stats};++ log.info(`Returning sync stats: ${JSON.stringify(stats)}`);++ return stats;}function checkSync() {@@ -118,7 +122,7 @@ function forceNoteSync(req) {function getChanged(req) {const startTime = Date.now();- const lastEntityChangeId = parseInt(req.query.lastEntityChangedId);+ const lastEntityChangeId = parseInt(req.query.lastEntityChangeId);const entityChanges = sql.getRows("SELECT * FROM entity_changes WHERE isSynced = 1 AND id > ? LIMIT 1000", [lastEntityChangeId]);diff --git a/src/services/sync.js b/src/services/sync.jsindex 138906d21d..da3b57af60 100644--- a/src/services/sync.js+++ b/src/services/sync.js@@ -355,8 +355,8 @@ function getLastSyncedPush() {return parseInt(optionService.getOption('lastSyncedPush'));}-function setLastSyncedPush(lastSyncedPush) {- optionService.setOption('lastSyncedPush', lastSyncedPush);+function setLastSyncedPush(entityChangeId) {+ optionService.setOption('lastSyncedPush', entityChangeId);}function updatePushStats() {